@netless/app-slide 0.2.46 → 0.2.47-alpha.2
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/index.d.ts +2 -1
- package/dist/main.cjs.js +3 -3
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +11 -6
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +105 -105
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
package/dist/main.es.js
CHANGED
|
@@ -31424,7 +31424,7 @@ void main(void){
|
|
|
31424
31424
|
}));
|
|
31425
31425
|
}
|
|
31426
31426
|
startTimeChangeEmit() {
|
|
31427
|
-
this.currentTime !== this.lastTime && (this.lastTime = this.currentTime, this.emit("timeupdate")), (!this.isEnded || this.duration <= 0) && setTimeout(() => this.startTimeChangeEmit(), 300);
|
|
31427
|
+
this.currentTime !== this.lastTime && (this.lastTime = this.currentTime, this.emit("timeupdate", this.lastTime)), (!this.isEnded || this.duration <= 0) && setTimeout(() => this.startTimeChangeEmit(), 300);
|
|
31428
31428
|
}
|
|
31429
31429
|
play() {
|
|
31430
31430
|
var t2, e2, i2;
|
|
@@ -31511,7 +31511,12 @@ void main(void){
|
|
|
31511
31511
|
const s2 = t2.video.src;
|
|
31512
31512
|
this.videoResource = new Vh.w(s2, { autoLoad: true, autoPlay: false, updateFPS: 30, crossorigin: true }), (r2 = this.videoElement) === null || r2 === void 0 || r2.addEventListener("stalled", this.onVideoStalled), (o2 = this.videoElement) === null || o2 === void 0 || o2.addEventListener("loadedmetadata", this.onVideoResourceLoaded), this.url = t2.video.src;
|
|
31513
31513
|
let a2 = t2.video.src.replace(/4$/, "3");
|
|
31514
|
-
this.ctx.loaderDelegate && (a2 = this.ctx.loaderDelegate.redirectMedia(a2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${a2} by delegate.`, t2.ctx.taskId)), this.rtcAudio = new h_(a2, t2.ctx.runningAudio)
|
|
31514
|
+
this.ctx.loaderDelegate && (a2 = this.ctx.loaderDelegate.redirectMedia(a2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${a2} by delegate.`, t2.ctx.taskId)), this.rtcAudio = new h_(a2, t2.ctx.runningAudio), this.rtcAudio.on("timeupdate", (t3) => {
|
|
31515
|
+
if (this.videoElement) {
|
|
31516
|
+
const e3 = this.videoElement.currentTime;
|
|
31517
|
+
console.log(`[time]: video:${e3} shadow:${t3}`), Math.abs(e3 - t3) > 0.5 && this.videoElement.fastSeek(t3);
|
|
31518
|
+
}
|
|
31519
|
+
});
|
|
31515
31520
|
const { video: l2, width: h2, height: u2, target: c2 } = t2;
|
|
31516
31521
|
this.controller = new a_({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, width: h2, height: u2, target: c2, media: this, info: l2, canvasElement: t2.canvasElement }), this.controller.addPlayCallBack(() => {
|
|
31517
31522
|
this.sprite.width = h2, this.sprite.height = u2, this.ctx.clock.setTimeout(() => {
|
|
@@ -31568,7 +31573,7 @@ void main(void){
|
|
|
31568
31573
|
return !!(t3 && t3.videoWidth > 0);
|
|
31569
31574
|
}, 3e3);
|
|
31570
31575
|
const t2 = this.videoElement;
|
|
31571
|
-
t2 && t2.videoWidth <= 0 || (this.videoElement && (this.videoElement.volume = 0, this.videoElement.muted = true), this.rtcAudio.
|
|
31576
|
+
t2 && t2.videoWidth <= 0 || (this.videoElement && (this.videoElement.volume = 0, this.videoElement.muted = true), this.rtcAudio.on("play", () => {
|
|
31572
31577
|
var t3;
|
|
31573
31578
|
(t3 = this.videoElement) === null || t3 === void 0 || t3.play(), this.fullscreen && this.controller.fullscreenPlay();
|
|
31574
31579
|
}), this.rtcAudio.play());
|
|
@@ -31578,7 +31583,7 @@ void main(void){
|
|
|
31578
31583
|
return this.videoResource.load();
|
|
31579
31584
|
}
|
|
31580
31585
|
pause() {
|
|
31581
|
-
this.isPlaying = false, this.ctx.logger.warn(this.url + ", pause video manual.", this.ctx.taskId), this.ctx.logger.warn(this.url + ", pause rtc audio manual.", this.ctx.taskId), this.rtcAudio.
|
|
31586
|
+
this.isPlaying = false, this.ctx.logger.warn(this.url + ", pause video manual.", this.ctx.taskId), this.ctx.logger.warn(this.url + ", pause rtc audio manual.", this.ctx.taskId), this.rtcAudio.on("pause", () => {
|
|
31582
31587
|
var t2;
|
|
31583
31588
|
(t2 = this.videoElement) === null || t2 === void 0 || t2.pause();
|
|
31584
31589
|
}), this.rtcAudio.pause();
|
|
@@ -35977,7 +35982,7 @@ void main(void){
|
|
|
35977
35982
|
}
|
|
35978
35983
|
var pT = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange", slideStepEnd: "slideEnd", slideStepStart: "slideStart" }, fT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, mT = "";
|
|
35979
35984
|
try {
|
|
35980
|
-
mT = "1.1.
|
|
35985
|
+
mT = "1.1.8-beta.1";
|
|
35981
35986
|
} catch (t2) {
|
|
35982
35987
|
mT = "dev";
|
|
35983
35988
|
}
|
|
@@ -39099,7 +39104,7 @@ class SlidePreviewer {
|
|
|
39099
39104
|
}
|
|
39100
39105
|
}
|
|
39101
39106
|
const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
|
|
39102
|
-
const version = "0.2.
|
|
39107
|
+
const version = "0.2.47-alpha.2";
|
|
39103
39108
|
const SlideApp = {
|
|
39104
39109
|
kind: "Slide",
|
|
39105
39110
|
setup(context) {
|