@netless/app-slide 0.2.53-alpha.3 → 0.2.53

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
@@ -31258,7 +31258,7 @@ void main(void){
31258
31258
  t3.stopPropagation(), this.hide();
31259
31259
  }, this.mediaTimeUpdate = () => o_(this, void 0, void 0, function* () {
31260
31260
  const t3 = this.media.currentTime - this.start;
31261
- if (console.log("duration", this.duration, "current", t3), this.duration > 0 && (Math.abs(t3 - this.duration) < 0.3 || t3 > this.duration) && (yield this.onStopPlay(), this.onClickCancelFullScreenButtonHandle()), this.currentTime.innerText = l_.formatTime(t3), this.currentProgress.style.flex = (t3 / this.duration).toString(), this.bookmarkList && this.bookmarkList.length > 0) {
31261
+ if (console.log("duration", this.duration, "current", t3), this.duration > 0 && (Math.abs(t3 - this.duration) < 0.3 || t3 > this.duration) && (yield this.pauseMedia(), this.medianIsEnd = true, this.jumpToTime(), this.ctx.eventHub.emit(zy.mediaStop, { id: this.targetId }), this.onClickCancelFullScreenButtonHandle()), this.currentTime.innerText = l_.formatTime(t3), this.currentProgress.style.flex = (t3 / this.duration).toString(), this.bookmarkList && this.bookmarkList.length > 0) {
31262
31262
  const t4 = this.bookmarkList[this.pickBookmarkIndex];
31263
31263
  t4 && t4.time.toFixed(0) === this.media.currentTime.toFixed(0) && (this.ctx.timingEventHub.emit(`shape ${this.shapeId} onMediaBookmark ${t4.name}`), this.pickBookmarkIndex += 1);
31264
31264
  }
@@ -31360,11 +31360,6 @@ void main(void){
31360
31360
  const e2 = document.createElement("div");
31361
31361
  s_(e2, { background: "#D9D9D9", position: "relative", height: "10px", display: "flex" }), this.progress.appendChild(e2), s_(this.currentProgress, { background: "#4F4F4F", top: "0px", left: "0", height: "10px", flex: "0" }), e2.appendChild(this.currentProgress);
31362
31362
  }
31363
- onStopPlay() {
31364
- return o_(this, void 0, void 0, function* () {
31365
- yield this.pauseMedia(), this.media.localPause(), this.medianIsEnd = true, this.jumpToTime(), this.ctx.eventHub.emit(zy.mediaStop, { id: this.targetId }), this.onClickCancelFullScreenButtonHandle();
31366
- });
31367
- }
31368
31363
  fadeHit(t2) {
31369
31364
  if (!this.info.fade)
31370
31365
  return;
@@ -31617,30 +31612,10 @@ void main(void){
31617
31612
  return this.videoResource.load();
31618
31613
  }
31619
31614
  pause() {
31620
- return c_(this, void 0, void 0, function* () {
31621
- return new Promise((t2) => {
31622
- 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);
31623
- const e2 = new Promise(() => {
31624
- this.rtcAudio.once("pause", () => {
31625
- t2();
31626
- });
31627
- });
31628
- this.rtcAudio.pause();
31629
- const i2 = new Promise(() => {
31630
- setTimeout(() => {
31631
- t2();
31632
- }, 500);
31633
- });
31634
- return Promise.race([e2, i2]).then(() => {
31635
- var t3;
31636
- (t3 = this.videoElement) === null || t3 === void 0 || t3.pause();
31637
- });
31638
- });
31639
- });
31640
- }
31641
- localPause() {
31642
- var t2;
31643
- (t2 = this.videoElement) === null || t2 === void 0 || t2.pause();
31615
+ 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.once("pause", () => {
31616
+ var t2;
31617
+ (t2 = this.videoElement) === null || t2 === void 0 || t2.pause();
31618
+ }), this.rtcAudio.pause();
31644
31619
  }
31645
31620
  globalPause() {
31646
31621
  this.isPlaying && (this.isGlobalPause = true, this.pause());
@@ -31747,12 +31722,7 @@ void main(void){
31747
31722
  });
31748
31723
  }
31749
31724
  pause() {
31750
- return p_(this, void 0, void 0, function* () {
31751
- this.ctx.isPlayerPaused() ? this.ctx.logger.info("Audio player prevent pause event with paused state", this.ctx.taskId) : (this.isPlaying = false, this.audioPlayer.pause());
31752
- });
31753
- }
31754
- localPause() {
31755
- this.audioPlayer.pause();
31725
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Audio player prevent pause event with paused state", this.ctx.taskId) : (this.isPlaying = false, this.audioPlayer.pause());
31756
31726
  }
31757
31727
  globalPause() {
31758
31728
  this.isPlaying && (this.isGlobalPause = true, this.pause());
@@ -36038,7 +36008,7 @@ void main(void){
36038
36008
  }
36039
36009
  var fT = { 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" }, mT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, gT = "";
36040
36010
  try {
36041
- gT = "1.2.2-alpha.4";
36011
+ gT = "1.2.2-alpha.6";
36042
36012
  } catch (t2) {
36043
36013
  gT = "dev -";
36044
36014
  }
@@ -39191,7 +39161,7 @@ class SlidePreviewer {
39191
39161
  }
39192
39162
  }
39193
39163
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
39194
- const version = "0.2.53-alpha.3";
39164
+ const version = "0.2.53";
39195
39165
  const SlideApp = {
39196
39166
  kind: "Slide",
39197
39167
  setup(context) {