@gcorevideo/player 2.20.19 → 2.20.21
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 +18 -14
- package/dist/index.css +1227 -1227
- package/dist/index.js +36 -25
- package/dist/plugins/index.css +600 -600
- package/dist/plugins/index.js +19 -12
- package/lib/playback/HTML5Video.d.ts +1 -1
- package/lib/playback/HTML5Video.d.ts.map +1 -1
- package/lib/playback/HTML5Video.js +17 -13
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +1 -0
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +2 -0
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +17 -11
- package/package.json +1 -1
- package/src/playback/HTML5Video.ts +18 -13
- package/src/plugins/source-controller/SourceController.ts +1 -0
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +19 -10
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -42624,7 +42624,6 @@ const T$h = 'playback.html5_video';
|
|
|
42624
42624
|
const STALL_TIMEOUT = 15000;
|
|
42625
42625
|
class HTML5Video extends BasePlayback {
|
|
42626
42626
|
stallTimerId = null;
|
|
42627
|
-
statllTimerId = null;
|
|
42628
42627
|
/**
|
|
42629
42628
|
* @internal
|
|
42630
42629
|
*/
|
|
@@ -42664,22 +42663,19 @@ class HTML5Video extends BasePlayback {
|
|
|
42664
42663
|
trace(`${T$h} _handleBufferingEvents`, {
|
|
42665
42664
|
networkState: this.el.networkState,
|
|
42666
42665
|
});
|
|
42667
|
-
if (!this.
|
|
42668
|
-
this.
|
|
42666
|
+
if (!this.stallTimerId) {
|
|
42667
|
+
this.stallTimerId = setTimeout(() => {
|
|
42669
42668
|
trace(`${T$h} _handleBufferingEvents stall timeout`, {
|
|
42670
42669
|
buffering: this.buffering,
|
|
42671
42670
|
ended: this.ended,
|
|
42672
|
-
isPlaying: this.isPlaying,
|
|
42673
42671
|
});
|
|
42674
|
-
this.
|
|
42675
|
-
|
|
42676
|
-
|
|
42677
|
-
|
|
42678
|
-
|
|
42679
|
-
|
|
42680
|
-
|
|
42681
|
-
});
|
|
42682
|
-
}
|
|
42672
|
+
this.stallTimerId = null;
|
|
42673
|
+
this.createError({
|
|
42674
|
+
code: PlaybackErrorCode.MediaSourceUnavailable,
|
|
42675
|
+
level: PlayerError.Levels.FATAL,
|
|
42676
|
+
message: 'Stall timeout',
|
|
42677
|
+
description: 'Playback stalled for too long',
|
|
42678
|
+
});
|
|
42683
42679
|
}, STALL_TIMEOUT);
|
|
42684
42680
|
}
|
|
42685
42681
|
super._handleBufferingEvents();
|
|
@@ -42692,6 +42688,14 @@ class HTML5Video extends BasePlayback {
|
|
|
42692
42688
|
}
|
|
42693
42689
|
super._onPlaying();
|
|
42694
42690
|
}
|
|
42691
|
+
_onPause() {
|
|
42692
|
+
trace(`${T$h} _onPause`);
|
|
42693
|
+
super._onPause();
|
|
42694
|
+
if (this.stallTimerId) {
|
|
42695
|
+
clearTimeout(this.stallTimerId);
|
|
42696
|
+
this.stallTimerId = null;
|
|
42697
|
+
}
|
|
42698
|
+
}
|
|
42695
42699
|
}
|
|
42696
42700
|
|
|
42697
42701
|
// TODO consider allowing the variation of the order of playback modules
|
|
@@ -43165,7 +43169,7 @@ class Player {
|
|
|
43165
43169
|
}
|
|
43166
43170
|
}
|
|
43167
43171
|
|
|
43168
|
-
var version$1 = "2.20.
|
|
43172
|
+
var version$1 = "2.20.21";
|
|
43169
43173
|
|
|
43170
43174
|
var packages = {
|
|
43171
43175
|
"node_modules/@clappr/core": {
|
|
@@ -50602,6 +50606,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50602
50606
|
template = tmpl(spinnerHTML);
|
|
50603
50607
|
hasFatalError = false;
|
|
50604
50608
|
hasBuffering = false;
|
|
50609
|
+
_showOnError = false;
|
|
50605
50610
|
constructor(container) {
|
|
50606
50611
|
super(container);
|
|
50607
50612
|
this.listenTo(this.container, Events$1.CONTAINER_STATE_BUFFERING, this.onBuffering);
|
|
@@ -50612,6 +50617,9 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50612
50617
|
this.listenTo(this.container, Events$1.CONTAINER_ERROR, this.onError);
|
|
50613
50618
|
this.listenTo(this.container, Events$1.CONTAINER_READY, this.render);
|
|
50614
50619
|
}
|
|
50620
|
+
showOnError() {
|
|
50621
|
+
this._showOnError = true;
|
|
50622
|
+
}
|
|
50615
50623
|
onBuffering() {
|
|
50616
50624
|
this.hasBuffering = true;
|
|
50617
50625
|
this._show();
|
|
@@ -50628,27 +50636,28 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50628
50636
|
}
|
|
50629
50637
|
onStop() {
|
|
50630
50638
|
trace(`${T$4} onStop`, {
|
|
50631
|
-
showOnError: this.
|
|
50639
|
+
showOnError: this._showOnError,
|
|
50632
50640
|
hasFatalError: this.hasFatalError,
|
|
50633
50641
|
});
|
|
50634
|
-
if (!(this.hasFatalError && this.
|
|
50635
|
-
|
|
50636
|
-
}
|
|
50642
|
+
// if (!(this.hasFatalError && this._showOnError)) {
|
|
50643
|
+
// this._hide()
|
|
50644
|
+
// }
|
|
50645
|
+
this._hide();
|
|
50637
50646
|
}
|
|
50638
50647
|
onError(e) {
|
|
50639
50648
|
this.hasFatalError = e.code === PlaybackErrorCode.MediaSourceUnavailable;
|
|
50640
50649
|
trace(`${T$4} onError`, {
|
|
50641
50650
|
e,
|
|
50642
|
-
showOnError: this.
|
|
50651
|
+
showOnError: this._showOnError,
|
|
50643
50652
|
hasFatalError: this.hasFatalError,
|
|
50644
50653
|
error: e.code,
|
|
50645
50654
|
});
|
|
50646
|
-
if (this.
|
|
50647
|
-
|
|
50648
|
-
}
|
|
50649
|
-
|
|
50650
|
-
|
|
50651
|
-
|
|
50655
|
+
// if (this._showOnError) {
|
|
50656
|
+
// this._show()
|
|
50657
|
+
// } else {
|
|
50658
|
+
// this._hide()
|
|
50659
|
+
// }
|
|
50660
|
+
this._hide();
|
|
50652
50661
|
}
|
|
50653
50662
|
/**
|
|
50654
50663
|
* Shows the spinner.
|
|
@@ -50693,6 +50702,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50693
50702
|
* @internal
|
|
50694
50703
|
*/
|
|
50695
50704
|
render() {
|
|
50705
|
+
// TODO control via sourcecontroller instead
|
|
50696
50706
|
const showOnStart = this.options.spinner?.showOnStart;
|
|
50697
50707
|
trace(`${T$4} render`, {
|
|
50698
50708
|
buffering: this.container.buffering,
|
|
@@ -50820,6 +50830,7 @@ class SourceController extends CorePlugin {
|
|
|
50820
50830
|
onCoreReady() {
|
|
50821
50831
|
trace(`${T$3} onCoreReady`);
|
|
50822
50832
|
this.core.getPlugin('error_screen')?.disable(); // TODO test
|
|
50833
|
+
// this.core.getPlugin('spinner')?.showOnError()
|
|
50823
50834
|
}
|
|
50824
50835
|
onActiveContainerChanged() {
|
|
50825
50836
|
trace(`${T$3} onActiveContainerChanged`, {
|