@gcorevideo/player 2.20.17 → 2.20.18

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/core.js CHANGED
@@ -42535,7 +42535,10 @@ HlsPlayback.canPlay = function (resource, mimeType) {
42535
42535
  };
42536
42536
 
42537
42537
  const T$1 = 'playback.html5_video';
42538
+ const STALL_TIMEOUT = 15000;
42538
42539
  class HTML5Video extends BasePlayback {
42540
+ stallTimerId = null;
42541
+ statllTimerId = null;
42539
42542
  /**
42540
42543
  * @internal
42541
42544
  */
@@ -42565,8 +42568,42 @@ class HTML5Video extends BasePlayback {
42565
42568
  }
42566
42569
  _onEnded() {
42567
42570
  trace(`${T$1} _onEnded`);
42571
+ if (this.stallTimerId) {
42572
+ clearTimeout(this.stallTimerId);
42573
+ this.stallTimerId = null;
42574
+ }
42568
42575
  super._onEnded();
42569
42576
  }
42577
+ _handleBufferingEvents() {
42578
+ trace(`${T$1} _handleBufferingEvents`, {
42579
+ networkState: this.el.networkState,
42580
+ });
42581
+ if (!this.statllTimerId) {
42582
+ this.statllTimerId = setTimeout(() => {
42583
+ trace(`${T$1} _handleBufferingEvents stall timeout`, {
42584
+ buffering: this.buffering,
42585
+ ended: this.ended,
42586
+ isPlaying: this.isPlaying,
42587
+ });
42588
+ this.statllTimerId = null;
42589
+ if (!this.isPlaying) {
42590
+ this.createError({
42591
+ code: PlaybackErrorCode.MediaSourceUnavailable,
42592
+ message: 'Stall timeout',
42593
+ });
42594
+ }
42595
+ }, STALL_TIMEOUT);
42596
+ }
42597
+ super._handleBufferingEvents();
42598
+ }
42599
+ _onPlaying() {
42600
+ trace(`${T$1} _onPlaying`);
42601
+ if (this.stallTimerId) {
42602
+ clearTimeout(this.stallTimerId);
42603
+ this.stallTimerId = null;
42604
+ }
42605
+ super._onPlaying();
42606
+ }
42570
42607
  }
42571
42608
 
42572
42609
  // TODO consider allowing the variation of the order of playback modules
@@ -43040,7 +43077,7 @@ class Player {
43040
43077
  }
43041
43078
  }
43042
43079
 
43043
- var version$1 = "2.20.17";
43080
+ var version$1 = "2.20.18";
43044
43081
 
43045
43082
  var packages = {
43046
43083
  "node_modules/@clappr/core": {