@netless/app-slide 0.2.70 → 0.2.71-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/main.cjs.js +45 -45
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +23 -19
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +113 -113
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
package/dist/main.es.js
CHANGED
|
@@ -31499,15 +31499,17 @@ void main(void){
|
|
|
31499
31499
|
class d_ extends Za.a {
|
|
31500
31500
|
constructor(t2, e2, i2, n2) {
|
|
31501
31501
|
var r2, o2;
|
|
31502
|
-
super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.domAudio = null, this.pcmSource = null, this.isHowlEnd = false, this.isHowlLoadEmit = false, this.staticEventId = 1001, this._catParams = void 0, this.url = t2, this.runningAudio = e2, i2 && (this._catParams = i2), Yy.RtcAudioClazz ?
|
|
31503
|
-
this.emit("pause");
|
|
31504
|
-
}), this.domAudio.addEventListener("playing", () => {
|
|
31505
|
-
this.emit("load"), this.startTimeChangeEmit(), this.emit("play"), console.log("connect pcm proxy"), this.pcmSource = window.__pcmProxy.connect(this.domAudio);
|
|
31506
|
-
}), console.log("use pcm proxy")) : (this.rctClient = new Yy.RtcAudioClazz(t2, null === (r2 = this._catParams) || void 0 === r2 ? void 0 : r2.start, null === (o2 = this._catParams) || void 0 === o2 ? void 0 : o2.end), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => {
|
|
31502
|
+
super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.domAudio = null, this.pcmSource = null, this.isHowlEnd = false, this.isHowlLoadEmit = false, this.staticEventId = 1001, this._catParams = void 0, this.url = t2, this.runningAudio = e2, i2 && (this._catParams = i2), Yy.RtcAudioClazz ? (this.rctClient = new Yy.RtcAudioClazz(t2, null === (r2 = this._catParams) || void 0 === r2 ? void 0 : r2.start, null === (o2 = this._catParams) || void 0 === o2 ? void 0 : o2.end), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => {
|
|
31507
31503
|
this.startTimeChangeEmit(), this.emit("play");
|
|
31508
31504
|
}), this.rctClient.on("resumeAllAudioInterruptByAudioSessionChanged", () => {
|
|
31509
31505
|
this.emit("resumeAllAudioInterruptByAudioSessionChanged");
|
|
31510
|
-
})) :
|
|
31506
|
+
})) : window.__pcmProxy ? (this.domAudio = document.createElement("audio"), this.domAudio.addEventListener("pause", () => {
|
|
31507
|
+
this.emit("pause");
|
|
31508
|
+
}), this.domAudio.addEventListener("playing", () => {
|
|
31509
|
+
console.log("connect pcm proxy"), this.pcmSource = window.__pcmProxy.connect(this.domAudio);
|
|
31510
|
+
}, { once: true }), this.domAudio.addEventListener("playing", () => {
|
|
31511
|
+
this.emit("load"), this.startTimeChangeEmit(), this.emit("play");
|
|
31512
|
+
}), console.log("use pcm proxy")) : (this.howl = new c_.Howl({ src: [t2], html5: null == n2 ? void 0 : n2.enableWebAudio }), [this.staticEventId] = this.howl._getSoundIds(), this.howl.load(), this.howl.on("load", () => {
|
|
31511
31513
|
this.isHowlLoadEmit = true, this.emit("load");
|
|
31512
31514
|
}), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => {
|
|
31513
31515
|
this.isHowlLoadEmit || this.emit("load"), this.isHowlEnd = false, this.startTimeChangeEmit(), this.emit("play");
|
|
@@ -31609,7 +31611,7 @@ void main(void){
|
|
|
31609
31611
|
return this.controller.clippedDuration;
|
|
31610
31612
|
}
|
|
31611
31613
|
constructor(t2) {
|
|
31612
|
-
var e2, i2, n2, r2, o2, s2, a2;
|
|
31614
|
+
var e2, i2, n2, r2, o2, s2, a2, l2;
|
|
31613
31615
|
super(), this.type = "video", this.sprite = new ep(), this.rtcAudio = null, this.pcmSource = null, this.isPlaying = false, this.isGlobalPause = false, this.fullscreen = false, this.url = "", this.isLoaded = false, this.onVideoResourceLoaded = () => {
|
|
31614
31616
|
this.isLoaded = true;
|
|
31615
31617
|
}, this.onVideoStalled = () => {
|
|
@@ -31621,10 +31623,12 @@ void main(void){
|
|
|
31621
31623
|
const { targetId: e3, state: i3, slideIndex: n3 } = t3;
|
|
31622
31624
|
n3 === this.ctx.slideIndex && e3 === this.id && (i3 ? (this.requestFullscreen(), this.ctx.latestChangeFullscreenTargetId = e3) : this.requestCancelFullscreen());
|
|
31623
31625
|
}, this.id = t2.id, this.start = null === (e2 = t2.video.cut) || void 0 === e2 ? void 0 : e2.start, this.end = null === (i2 = t2.video.cut) || void 0 === i2 ? void 0 : i2.end, this.fullscreen = null !== (n2 = t2.video.fullscreen) && void 0 !== n2 && n2, this.container = t2.container, this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
|
|
31624
|
-
const
|
|
31625
|
-
this.videoResource = new Vh.w(
|
|
31626
|
-
let
|
|
31627
|
-
this.ctx.loaderDelegate && (
|
|
31626
|
+
const h2 = t2.video.src;
|
|
31627
|
+
this.videoResource = new Vh.w(h2, { autoLoad: true, autoPlay: false, updateFPS: 30, crossorigin: true }), null === (r2 = this.videoElement) || void 0 === r2 || r2.addEventListener("stalled", this.onVideoStalled), null === (o2 = this.videoElement) || void 0 === o2 || o2.addEventListener("loadedmetadata", this.onVideoResourceLoaded), this.url = t2.video.src;
|
|
31628
|
+
let u2 = t2.video.src.replace(/4$/, "3");
|
|
31629
|
+
this.ctx.loaderDelegate && (u2 = this.ctx.loaderDelegate.redirectMedia(u2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${u2} by delegate.`, t2.ctx.taskId)), window.__pcmProxy ? null === (s2 = this.videoElement) || void 0 === s2 || s2.addEventListener("playing", () => {
|
|
31630
|
+
console.log("use pcm proxy"), this.pcmSource = window.__pcmProxy.connect(this.videoElement);
|
|
31631
|
+
}, { once: true }) : (this.rtcAudio = new d_(u2, t2.ctx.runningAudio, { start: null === (a2 = t2.video.cut) || void 0 === a2 ? void 0 : a2.start, end: null === (l2 = t2.video.cut) || void 0 === l2 ? void 0 : l2.end }, { enableWebAudio: t2.ctx.enableWebAudio }), this.rtcAudio.on("timeupdate", (t3) => {
|
|
31628
31632
|
if (this.videoElement) {
|
|
31629
31633
|
const e3 = this.videoElement.currentTime;
|
|
31630
31634
|
Math.abs(e3 - t3) > 0.5 && (this.videoElement.currentTime = t3);
|
|
@@ -31636,14 +31640,14 @@ void main(void){
|
|
|
31636
31640
|
(null === (t4 = this.rtcAudio) || void 0 === t4 ? void 0 : t4.isPaused) || null === (e3 = this.videoElement) || void 0 === e3 || e3.play();
|
|
31637
31641
|
}, 200);
|
|
31638
31642
|
}));
|
|
31639
|
-
const { video:
|
|
31640
|
-
this.controller = new u_({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, width:
|
|
31641
|
-
this.sprite.width =
|
|
31643
|
+
const { video: c2, width: d2, height: p2, target: f2 } = t2;
|
|
31644
|
+
this.controller = new u_({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, width: d2, height: p2, target: f2, media: this, info: c2, canvasElement: t2.canvasElement }), this.controller.addPlayCallBack(() => {
|
|
31645
|
+
this.sprite.width = d2, this.sprite.height = p2, this.ctx.clock.setTimeout(() => {
|
|
31642
31646
|
this.sprite.visible = true;
|
|
31643
31647
|
}, 50);
|
|
31644
31648
|
});
|
|
31645
|
-
const
|
|
31646
|
-
|
|
31649
|
+
const m2 = new Vh.c(null, { height: p2, width: d2 });
|
|
31650
|
+
m2.resource = this.videoResource, this.videoResource.bind(m2), this.sprite = new ep(), this.sprite.visible = false, this.sprite.texture = new Vh.t(m2), this.sprite.interactive = true, this.container.addChild(this.sprite), this.sprite.on("mouseover", (t3) => {
|
|
31647
31651
|
t3.stopPropagation(), this.controller.show();
|
|
31648
31652
|
}), this.sprite.on("mouseout", (t3) => {
|
|
31649
31653
|
t3.stopPropagation(), this.controller.hide();
|
|
@@ -36212,9 +36216,9 @@ void main(void){
|
|
|
36212
36216
|
}
|
|
36213
36217
|
var vT = { 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" }, _T = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, yT = "";
|
|
36214
36218
|
try {
|
|
36215
|
-
yT = "1.4.
|
|
36219
|
+
yT = "1.4.31-alpha.0";
|
|
36216
36220
|
} catch (t2) {
|
|
36217
|
-
yT = "dev";
|
|
36221
|
+
yT = "-dev-";
|
|
36218
36222
|
}
|
|
36219
36223
|
var xT = null;
|
|
36220
36224
|
try {
|
|
@@ -39501,7 +39505,7 @@ class SlidePreviewer {
|
|
|
39501
39505
|
}
|
|
39502
39506
|
}
|
|
39503
39507
|
const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
|
|
39504
|
-
const version = "0.2.
|
|
39508
|
+
const version = "0.2.71-alpha.2";
|
|
39505
39509
|
const SlideApp = {
|
|
39506
39510
|
kind: "Slide",
|
|
39507
39511
|
setup(context) {
|