xvai-loi 0.1.89 → 0.1.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/co.txt +1 -1
  2. package/package.json +1 -1
  3. package/xvai-loi.js +5 -5
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi120610
1
+ xvaiLoi120612
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.89",
3
+ "version": "0.1.90",
4
4
  "description": "Loi dung video (Edit Video Tu Dong) nap vao tool Google Flow qua o cam engine/oCam.ts",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/xvai-loi.js CHANGED
@@ -10536,7 +10536,7 @@ function docDemo(g, d, tuoi, W4, hT) {
10536
10536
  g.restore();
10537
10537
  }
10538
10538
  function taiLieu(g, ds2, tuoi, W4, H2, a) {
10539
- const x = 0.12 * W4, y = 0.16 * H2, w = 0.76 * W4, dh = 0.034 * H2, h = 0.06 * H2 + ds2.length * dh + 0.02 * H2, k = eSoft(tuoi / 0.3);
10539
+ const n = Math.max(1, ds2.length), dh = Math.min(0.06 * H2, Math.max(0.034 * H2, 0.22 * H2 / n)), h = 0.06 * H2 + n * dh + 0.02 * H2, x = 0.12 * W4, y = 0.16 * H2 + Math.max(0, (0.3 * H2 - h) / 2), w = 0.76 * W4, k = eSoft(tuoi / 0.3);
10540
10540
  g.save();
10541
10541
  g.globalAlpha = a;
10542
10542
  g.translate(W4 / 2, y + h / 2);
@@ -10554,14 +10554,14 @@ function taiLieu(g, ds2, tuoi, W4, H2, a) {
10554
10554
  g.fillStyle = CAM;
10555
10555
  g.fillRect(x, y, w, 0.05 * H2);
10556
10556
  g.restore();
10557
- g.font = "900 " + (0.022 * H2).toFixed(1) + "px " + FB;
10557
+ g.font = "900 " + (0.026 * H2).toFixed(1) + "px " + FB;
10558
10558
  g.fillStyle = "#fff";
10559
10559
  g.textBaseline = "middle";
10560
10560
  g.textAlign = "left";
10561
10561
  g.fillText("C\xC0I \u0110\u1EB6T " + ds2.length + " M\u1EE4C", x + 0.04 * W4, y + 0.025 * H2);
10562
10562
  ds2.forEach((t, i) => {
10563
- const yy = y + 0.07 * H2 + i * dh, tick = tuoi > 0.5 + i * 0.18;
10564
- g.font = "700 " + (0.02 * H2).toFixed(1) + "px " + FB;
10563
+ const yy = y + 0.06 * H2 + (i + 0.5) * dh, tick = tuoi > 0.5 + i * 0.18;
10564
+ g.font = "700 " + (0.55 * dh).toFixed(1) + "px " + FB;
10565
10565
  g.fillStyle = "rgb(40,40,48)";
10566
10566
  g.fillText(t, x + 0.11 * W4, yy, w - 0.15 * W4);
10567
10567
  g.strokeStyle = tick ? "rgb(30,180,90)" : "rgba(0,0,0,0.25)";
@@ -21029,7 +21029,7 @@ function datCauLenh(a) {
21029
21029
  on2 = true;
21030
21030
  window.addEventListener("message", async (ev) => {
21031
21031
  const d = ev.data;
21032
- if (!d || d.xvaiLoi120610 !== true) return;
21032
+ if (!d || d.xvaiLoi120612 !== true) return;
21033
21033
  const o = String(ev.origin || "");
21034
21034
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
21035
21035
  const tra = (kq) => {