@netless/app-slide 0.2.71-alpha.4 → 0.2.71

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.es.js CHANGED
@@ -31507,7 +31507,7 @@ void main(void){
31507
31507
  this.emit("pause");
31508
31508
  }), this.pcmSource = window.__pcmProxy.connect(this.domAudio), this.domAudio.addEventListener("playing", () => {
31509
31509
  this.emit("load"), this.startTimeChangeEmit(), this.emit("play");
31510
- }), 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", () => {
31510
+ })) : (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
31511
  this.isHowlLoadEmit = true, this.emit("load");
31512
31512
  }), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => {
31513
31513
  this.isHowlLoadEmit || this.emit("load"), this.isHowlEnd = false, this.startTimeChangeEmit(), this.emit("play");
@@ -31610,7 +31610,7 @@ void main(void){
31610
31610
  }
31611
31611
  constructor(t2) {
31612
31612
  var e2, i2, n2, r2, o2, s2, a2;
31613
- 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 = () => {
31613
+ super(), this.type = "video", this.sprite = new ep(), this.rtcAudio = null, this.isPlaying = false, this.isGlobalPause = false, this.fullscreen = false, this.url = "", this.isLoaded = false, this.onVideoResourceLoaded = () => {
31614
31614
  this.isLoaded = true;
31615
31615
  }, this.onVideoStalled = () => {
31616
31616
  this.ctx.logger.warn(this.url + ", Failed to fetch data, but trying.", this.ctx.taskId);
@@ -31624,7 +31624,7 @@ void main(void){
31624
31624
  const l2 = t2.video.src;
31625
31625
  this.videoResource = new Vh.w(l2, { 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;
31626
31626
  let h2 = t2.video.src.replace(/4$/, "3");
31627
- this.ctx.loaderDelegate && (h2 = this.ctx.loaderDelegate.redirectMedia(h2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${h2} by delegate.`, t2.ctx.taskId)), window.__pcmProxy ? this.videoElement && (this.videoElement.crossOrigin = "anonymous", console.log("connect pcm proxy"), this.pcmSource = window.__pcmProxy.connect(this.videoElement)) : (this.rtcAudio = new d_(h2, t2.ctx.runningAudio, { start: null === (s2 = t2.video.cut) || void 0 === s2 ? void 0 : s2.start, end: null === (a2 = t2.video.cut) || void 0 === a2 ? void 0 : a2.end }, { enableWebAudio: t2.ctx.enableWebAudio }), this.rtcAudio.on("timeupdate", (t3) => {
31627
+ this.ctx.loaderDelegate && (h2 = this.ctx.loaderDelegate.redirectMedia(h2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${h2} by delegate.`, t2.ctx.taskId)), this.rtcAudio = new d_(h2, t2.ctx.runningAudio, { start: null === (s2 = t2.video.cut) || void 0 === s2 ? void 0 : s2.start, end: null === (a2 = t2.video.cut) || void 0 === a2 ? void 0 : a2.end }, { enableWebAudio: t2.ctx.enableWebAudio }), this.rtcAudio.on("timeupdate", (t3) => {
31628
31628
  if (this.videoElement) {
31629
31629
  const e3 = this.videoElement.currentTime;
31630
31630
  Math.abs(e3 - t3) > 0.5 && (this.videoElement.currentTime = t3);
@@ -31635,7 +31635,7 @@ void main(void){
31635
31635
  var t4, e3;
31636
31636
  (null === (t4 = this.rtcAudio) || void 0 === t4 ? void 0 : t4.isPaused) || null === (e3 = this.videoElement) || void 0 === e3 || e3.play();
31637
31637
  }, 200);
31638
- }));
31638
+ });
31639
31639
  const { video: u2, width: c2, height: d2, target: p2 } = t2;
31640
31640
  this.controller = new u_({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, width: c2, height: d2, target: p2, media: this, info: u2, canvasElement: t2.canvasElement }), this.controller.addPlayCallBack(() => {
31641
31641
  this.sprite.width = c2, this.sprite.height = d2, this.ctx.clock.setTimeout(() => {
@@ -31712,8 +31712,8 @@ void main(void){
31712
31712
  this.ctx.globalEventHub.emit("requestCancelFullscreen", { targetId: this.id, index: this.ctx.slideIndex });
31713
31713
  }
31714
31714
  destroy() {
31715
- var t2, e2, i2, n2, r2;
31716
- this.ctx.volumeAdjuster.removeListener("update", this.updateVolume), this.ctx.globalEventHub.removeListener("syncFullscreenVideoState", this.syncFullscreenVideoState), null === (t2 = this.videoElement) || void 0 === t2 || t2.removeEventListener("stalled", this.onVideoStalled), null === (e2 = this.videoElement) || void 0 === e2 || e2.removeEventListener("loadedmetadata", this.onVideoResourceLoaded), this.sprite.interactive = false, this.sprite.destroy({ texture: true, baseTexture: true }), null === (i2 = this.videoResource) || void 0 === i2 || i2.destroy(), null === (n2 = this.rtcAudio) || void 0 === n2 || n2.destroy(), this.stop(), this.controller.destroy(), this.ctx.activeMedia.delete(this), null === (r2 = this.pcmSource) || void 0 === r2 || r2.disconnect();
31715
+ var t2, e2, i2, n2;
31716
+ this.ctx.volumeAdjuster.removeListener("update", this.updateVolume), this.ctx.globalEventHub.removeListener("syncFullscreenVideoState", this.syncFullscreenVideoState), null === (t2 = this.videoElement) || void 0 === t2 || t2.removeEventListener("stalled", this.onVideoStalled), null === (e2 = this.videoElement) || void 0 === e2 || e2.removeEventListener("loadedmetadata", this.onVideoResourceLoaded), this.sprite.interactive = false, this.sprite.destroy({ texture: true, baseTexture: true }), null === (i2 = this.videoResource) || void 0 === i2 || i2.destroy(), null === (n2 = this.rtcAudio) || void 0 === n2 || n2.destroy(), this.stop(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31717
31717
  }
31718
31718
  fadeIn(t2, e2) {
31719
31719
  var i2;
@@ -36212,7 +36212,7 @@ void main(void){
36212
36212
  }
36213
36213
  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
36214
  try {
36215
- yT = "1.4.31-alpha.1";
36215
+ yT = "1.4.31-alpha.3";
36216
36216
  } catch (t2) {
36217
36217
  yT = "-dev";
36218
36218
  }
@@ -39501,7 +39501,7 @@ class SlidePreviewer {
39501
39501
  }
39502
39502
  }
39503
39503
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
39504
- const version = "0.2.71-alpha.4";
39504
+ const version = "0.2.71";
39505
39505
  const SlideApp = {
39506
39506
  kind: "Slide",
39507
39507
  setup(context) {