@netless/app-slide 0.2.34-beta.2 → 0.2.34

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
@@ -31363,7 +31363,7 @@ void main(void){
31363
31363
  var l_ = i(120);
31364
31364
  class h_ extends Za.a {
31365
31365
  constructor(t2, e2) {
31366
- super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.isHowlEnd = false, this.isHowlLoadEmit = false, this.url = t2, this.runningAudio = e2, jy.RtcAudioClazz ? (this.rctClient = new jy.RtcAudioClazz(t2), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => this.emit("play"))) : (this.howl = new l_.Howl({ src: [t2] }), this.howl.load(), this.howl.on("load", () => {
31366
+ super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.isHowlEnd = false, this.isHowlLoadEmit = false, this.staticEventId = 1001, this.url = t2, this.runningAudio = e2, jy.RtcAudioClazz ? (this.rctClient = new jy.RtcAudioClazz(t2), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => this.emit("play"))) : (this.howl = new l_.Howl({ src: [t2] }), [this.staticEventId] = this.howl._getSoundIds(), this.howl.load(), this.howl.on("load", () => {
31367
31367
  this.isHowlLoadEmit = true, this.emit("load");
31368
31368
  }), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => {
31369
31369
  this.isHowlLoadEmit || this.emit("load"), this.isHowlEnd = false, this.emit("play");
@@ -31376,11 +31376,11 @@ void main(void){
31376
31376
  }
31377
31377
  play() {
31378
31378
  var t2, e2, i2;
31379
- this.runningAudio.has(this.url) && ((t2 = this.runningAudio.get(this.url)) === null || t2 === void 0 || t2.stop(), this.runningAudio.delete(this.url)), this.isHowlEnd = false, this.lastTime = -1, (e2 = this.howl) === null || e2 === void 0 || e2.play(), (i2 = this.rctClient) === null || i2 === void 0 || i2.play(), this.startTimeChangeEmit(), this.runningAudio.set(this.url, this);
31379
+ this.runningAudio.has(this.url) && ((t2 = this.runningAudio.get(this.url)) === null || t2 === void 0 || t2.stop(), this.runningAudio.delete(this.url)), this.isHowlEnd = false, this.lastTime = -1, (e2 = this.howl) === null || e2 === void 0 || e2.play(this.staticEventId), (i2 = this.rctClient) === null || i2 === void 0 || i2.play(), this.startTimeChangeEmit(), this.runningAudio.set(this.url, this);
31380
31380
  }
31381
31381
  pause() {
31382
31382
  var t2, e2;
31383
- (t2 = this.howl) === null || t2 === void 0 || t2.pause(), (e2 = this.rctClient) === null || e2 === void 0 || e2.pause(), this.runningAudio.has(this.url) && this.runningAudio.delete(this.url);
31383
+ (t2 = this.howl) === null || t2 === void 0 || t2.pause(this.staticEventId), (e2 = this.rctClient) === null || e2 === void 0 || e2.pause(), this.runningAudio.has(this.url) && this.runningAudio.delete(this.url);
31384
31384
  }
31385
31385
  globalPause() {
31386
31386
  this.isPaused || (this.isGlobalPause = true, this.pause());
@@ -31390,26 +31390,26 @@ void main(void){
31390
31390
  }
31391
31391
  stop() {
31392
31392
  var t2;
31393
- (t2 = this.howl) === null || t2 === void 0 || t2.stop(), this.rctClient && (this.rctClient.pause(), this.rctClient.currentTime = 0), this.runningAudio.has(this.url) && this.runningAudio.delete(this.url);
31393
+ (t2 = this.howl) === null || t2 === void 0 || t2.pause(this.staticEventId), this.rctClient && (this.rctClient.pause(), this.rctClient.currentTime = 0), this.runningAudio.has(this.url) && this.runningAudio.delete(this.url);
31394
31394
  }
31395
31395
  destroy() {
31396
31396
  var t2, e2, i2, n2, r2, o2, s2;
31397
- (t2 = this.howl) === null || t2 === void 0 || t2.pause(), (e2 = this.howl) === null || e2 === void 0 || e2.unload(), (i2 = this.rctClient) === null || i2 === void 0 || i2.pause(), (n2 = this.rctClient) === null || n2 === void 0 || n2.destroy(), (r2 = this.rctClient) === null || r2 === void 0 || r2.removeAllListeners("load"), (o2 = this.rctClient) === null || o2 === void 0 || o2.removeAllListeners("play"), (s2 = this.rctClient) === null || s2 === void 0 || s2.removeAllListeners("pause"), this.runningAudio.has(this.url) && this.runningAudio.delete(this.url);
31397
+ (t2 = this.howl) === null || t2 === void 0 || t2.stop(this.staticEventId), (e2 = this.howl) === null || e2 === void 0 || e2.unload(), (i2 = this.rctClient) === null || i2 === void 0 || i2.pause(), (n2 = this.rctClient) === null || n2 === void 0 || n2.destroy(), (r2 = this.rctClient) === null || r2 === void 0 || r2.removeAllListeners("load"), (o2 = this.rctClient) === null || o2 === void 0 || o2.removeAllListeners("play"), (s2 = this.rctClient) === null || s2 === void 0 || s2.removeAllListeners("pause"), this.runningAudio.has(this.url) && this.runningAudio.delete(this.url);
31398
31398
  }
31399
31399
  get currentTime() {
31400
- return this.rctClient ? this.rctClient.currentTime : this.howl ? this.howl.seek() : -1;
31400
+ return this.rctClient ? this.rctClient.currentTime : this.howl ? this.howl.seek(this.staticEventId) : -1;
31401
31401
  }
31402
31402
  set currentTime(t2) {
31403
- this.rctClient ? this.rctClient.currentTime = t2 : this.howl && this.howl.seek(t2);
31403
+ this.rctClient ? this.rctClient.currentTime = t2 : this.howl && this.howl.seek(t2, this.staticEventId);
31404
31404
  }
31405
31405
  get duration() {
31406
- return this.rctClient ? this.rctClient.duration : this.howl ? this.howl.duration() : 0;
31406
+ return this.rctClient ? this.rctClient.duration : this.howl ? this.howl.duration(this.staticEventId) : 0;
31407
31407
  }
31408
31408
  get isEnded() {
31409
31409
  return this.howl ? this.isHowlEnd : Math.abs(this.currentTime - this.duration) < 1e-3;
31410
31410
  }
31411
31411
  get isPaused() {
31412
- return this.rctClient ? this.rctClient.isPaused : !!this.howl && this.howl.playing();
31412
+ return this.rctClient ? this.rctClient.isPaused : !!this.howl && this.howl.playing(this.staticEventId);
31413
31413
  }
31414
31414
  volume(t2) {
31415
31415
  this.rctClient ? this.rctClient.volume(t2) : this.howl && this.howl.volume(t2);
@@ -35737,7 +35737,7 @@ void main(void){
35737
35737
  }
35738
35738
  var hT = { 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" }, uT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, cT = "";
35739
35739
  try {
35740
- cT = "1.0.0";
35740
+ cT = "1.0.1-beta.1";
35741
35741
  } catch (t2) {
35742
35742
  cT = "-dev";
35743
35743
  }
@@ -38822,7 +38822,7 @@ class SlidePreviewer {
38822
38822
  }
38823
38823
  }
38824
38824
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
38825
- const version = "0.2.34-beta.2";
38825
+ const version = "0.2.34";
38826
38826
  const SlideApp = {
38827
38827
  kind: "Slide",
38828
38828
  setup(context) {