@shotstack/shotstack-studio 2.22.1 → 2.22.3
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.
package/dist/internal.es.js
CHANGED
|
@@ -226,7 +226,7 @@ class ha {
|
|
|
226
226
|
return this.normaliseAdjacentBoundaries(i), this.validateKeyframes(i), this.insertFillerKeyframes(i, r, n);
|
|
227
227
|
}
|
|
228
228
|
createNormalizedKeyframes(e) {
|
|
229
|
-
return e.filter((r) => typeof r.start == "number" && typeof r.length == "number").
|
|
229
|
+
return e.filter((r) => typeof r.start == "number" && typeof r.length == "number").sort((r, n) => r.start - n.start).map((r) => ({
|
|
230
230
|
start: r.start,
|
|
231
231
|
length: r.length,
|
|
232
232
|
from: typeof r.from == "number" ? r.from : 0,
|
|
@@ -1304,10 +1304,12 @@ class $x extends nr {
|
|
|
1304
1304
|
this.volumeKeyframeBuilder = new ha(this.createVolumeKeyframes(e, s), this.getLength(), s), this.audioResource.volume(this.getVolume()), this.configureKeyframes();
|
|
1305
1305
|
}
|
|
1306
1306
|
update(e, r) {
|
|
1307
|
-
if (super.update(e, r), this.syncTimer += r, this.getContainer().alpha = 0, !this.audioResource)
|
|
1307
|
+
if (super.update(e, r), this.syncTimer += r, this.getContainer().alpha = 0, !this.audioResource || this.audioResource.state() !== "loaded") {
|
|
1308
|
+
this.isPlaying = !1;
|
|
1308
1309
|
return;
|
|
1310
|
+
}
|
|
1309
1311
|
const n = this.getAssetSpeed(), i = this.getSourceTime(), a = this.edit.isPlaying && this.isActive() && n > 0;
|
|
1310
|
-
a && (this.isPlaying || (this.isPlaying = !0, this.audioResource.volume(this.getVolume()), this.audioResource.rate(n), this.audioResource.seek(i), this.audioResource.play()), this.audioResource.volume() !== this.getVolume() && this.audioResource.volume(this.getVolume()), this.audioResource.rate() !== n && this.audioResource.rate(n), Math.abs(this.audioResource.seek() - i) > 0.1 && this.audioResource.seek(i)), this.isPlaying && !a && (this.isPlaying = !1, this.audioResource.pause());
|
|
1312
|
+
a && (this.isPlaying || (this.isPlaying = !0, this.audioResource.volume(this.getVolume()), this.audioResource.rate(n), this.audioResource.seek(i), this.audioResource.play()), this.audioResource.volume() !== this.getVolume() && this.audioResource.volume(this.getVolume()), this.audioResource.playing() && this.audioResource.rate() !== n && this.audioResource.rate(n), Math.abs(this.audioResource.seek() - i) > 0.1 && this.audioResource.seek(i)), this.isPlaying && !a && (this.isPlaying = !1, this.audioResource.pause());
|
|
1311
1313
|
const s = this.syncTimer > 100;
|
|
1312
1314
|
!this.edit.isPlaying && this.isActive() && s && (this.syncTimer = 0, this.audioResource.seek(i));
|
|
1313
1315
|
}
|
|
@@ -14638,6 +14640,8 @@ var ZI = { gsap: `/*!
|
|
|
14638
14640
|
var origGsapPause = origGsapTl && typeof origGsapTl.pause === "function" ? origGsapTl.pause.bind(origGsapTl) : null;
|
|
14639
14641
|
var origGsapSeek = origGsapTl && typeof origGsapTl.seek === "function" ? origGsapTl.seek.bind(origGsapTl) : null;
|
|
14640
14642
|
var origGsapGetChildren = origGsapTl && typeof origGsapTl.getChildren === "function" ? origGsapTl.getChildren.bind(origGsapTl) : null;
|
|
14643
|
+
// Capture may queue longer than an animation lasts; only the host advances its clock.
|
|
14644
|
+
if (origGsapPause) origGsapPause(0);
|
|
14641
14645
|
var origLottieRegistered = window.lottie && typeof window.lottie.getRegisteredAnimations === "function" ? window.lottie.getRegisteredAnimations.bind(window.lottie) : null;
|
|
14642
14646
|
var animeInstances = [];
|
|
14643
14647
|
|
|
@@ -14714,7 +14718,7 @@ ${HI(n)}
|
|
|
14714
14718
|
</body>
|
|
14715
14719
|
</html>`;
|
|
14716
14720
|
}
|
|
14717
|
-
var YI = "
|
|
14721
|
+
var YI = "v3";
|
|
14718
14722
|
async function qI(t) {
|
|
14719
14723
|
const e = `${YI} ${t.html} ${t.css} ${t.js} ${t.width} ${t.height}`, r = new TextEncoder().encode(e), n = await crypto.subtle.digest("SHA-256", r);
|
|
14720
14724
|
return Array.from(new Uint8Array(n)).map((i) => i.toString(16).padStart(2, "0")).join("");
|