xvai-loi 0.1.88 → 0.1.89

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 +8 -1
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi120538
1
+ xvaiLoi120610
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.88",
3
+ "version": "0.1.89",
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
@@ -18825,6 +18825,13 @@ function lichDoan(clips) {
18825
18825
  });
18826
18826
  t += Math.max(0, e - s);
18827
18827
  });
18828
+ {
18829
+ const nen2 = ra.filter((x) => /^(cmNen|cmAnh|cmKinh)$/.test(String(x.doan && x.doan.loai))).sort((p, q) => p.T0 - q.T0);
18830
+ for (let i = 0; i + 1 < nen2.length; i++) {
18831
+ const x = nen2[i], y = nen2[i + 1];
18832
+ if (y.T0 > x.T0 + 0.05 && y.T0 < x.T1 && x.T1 - y.T0 < 0.1) x.T1 = y.T0;
18833
+ }
18834
+ }
18828
18835
  globalThis.__doanRoi = [...new Set(clips.flatMap((c) => (c.textMoments || []).filter((m) => m.kind === "doan" && !da.has(m))))].map((m) => [+(+m.t0).toFixed(2), +(+m.t1).toFixed(2), m.doan?.loai, m.doan?.bo, m.doan?.giant, clips.filter((c) => c.trimEnd > m.t0 - 1 && c.trimStart < m.t0 + 1).map((c) => [+c.trimStart.toFixed(3), +c.trimEnd.toFixed(3)])]);
18829
18836
  return ra;
18830
18837
  }
@@ -21022,7 +21029,7 @@ function datCauLenh(a) {
21022
21029
  on2 = true;
21023
21030
  window.addEventListener("message", async (ev) => {
21024
21031
  const d = ev.data;
21025
- if (!d || d.xvaiLoi120538 !== true) return;
21032
+ if (!d || d.xvaiLoi120610 !== true) return;
21026
21033
  const o = String(ev.origin || "");
21027
21034
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
21028
21035
  const tra = (kq) => {