@netless/app-slide 0.2.45 → 0.2.47-alpha.1
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 +4 -4
- 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 +106 -106
- 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) > 500 && 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(() => {
|
|
@@ -35977,9 +35982,9 @@ 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.7";
|
|
35981
35986
|
} catch (t2) {
|
|
35982
|
-
mT = "dev";
|
|
35987
|
+
mT = "dev-";
|
|
35983
35988
|
}
|
|
35984
35989
|
var gT = null;
|
|
35985
35990
|
try {
|
|
@@ -36092,7 +36097,7 @@ void main(void){
|
|
|
36092
36097
|
}), window.addEventListener("__slide_ref__", n3.handleSlideRef), n3.resizeView = Zy()(n3.resizeView.bind(n3), 50), n3.player = n3.initPlayer(n3.config), n3.config.controller && n3.createController(), n3.player.view && n3.canvasContainer.appendChild(n3.player.view), n3.handleViewClick = Zy()(n3.handleViewClick, 300), n3.player.errorChannel.on("error", function(t3, e3) {
|
|
36093
36098
|
var i4 = Tm.transform(t3);
|
|
36094
36099
|
i4.errorType === gm.RuntimeWarn ? n3.logger.warn(i4.message, n3.taskId) : n3.logger.error(i4.message, n3.taskId), n3.isLoading = false, n3.reportError(t3, e3);
|
|
36095
|
-
}), window.addEventListener("message", n3.recoverHandler), e2.volumeAdjuster.on("update", n3._updateVolumeByStaticAdjuster), n3;
|
|
36100
|
+
}), window.addEventListener("message", n3.recoverHandler), e2.volumeAdjuster.on("update", n3._updateVolumeByStaticAdjuster), n3.volumeAdjuster.volume = e2.volumeAdjuster.volume, n3;
|
|
36096
36101
|
}
|
|
36097
36102
|
var i2, n2;
|
|
36098
36103
|
return oT(e2, t2), e2.flushLog = function(t3) {
|
|
@@ -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.1";
|
|
39103
39108
|
const SlideApp = {
|
|
39104
39109
|
kind: "Slide",
|
|
39105
39110
|
setup(context) {
|