@gcorevideo/player 2.20.20 → 2.20.22
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 +4 -2
- package/dist/index.css +539 -539
- package/dist/index.js +22 -13
- package/dist/plugins/index.css +569 -569
- package/dist/plugins/index.js +19 -12
- package/lib/playback/HTML5Video.d.ts.map +1 -1
- package/lib/playback/HTML5Video.js +4 -2
- 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 +4 -2
- 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
|
@@ -42670,12 +42670,14 @@ class HTML5Video extends BasePlayback {
|
|
|
42670
42670
|
ended: this.ended,
|
|
42671
42671
|
});
|
|
42672
42672
|
this.stallTimerId = null;
|
|
42673
|
-
this.createError({
|
|
42673
|
+
const error = this.createError({
|
|
42674
42674
|
code: PlaybackErrorCode.MediaSourceUnavailable,
|
|
42675
42675
|
level: PlayerError.Levels.FATAL,
|
|
42676
42676
|
message: 'Stall timeout',
|
|
42677
42677
|
description: 'Playback stalled for too long',
|
|
42678
42678
|
});
|
|
42679
|
+
this.trigger(Events$1.PLAYBACK_ERROR, error);
|
|
42680
|
+
setTimeout(() => this.stop(), 0);
|
|
42679
42681
|
}, STALL_TIMEOUT);
|
|
42680
42682
|
}
|
|
42681
42683
|
super._handleBufferingEvents();
|
|
@@ -43169,7 +43171,7 @@ class Player {
|
|
|
43169
43171
|
}
|
|
43170
43172
|
}
|
|
43171
43173
|
|
|
43172
|
-
var version$1 = "2.20.
|
|
43174
|
+
var version$1 = "2.20.22";
|
|
43173
43175
|
|
|
43174
43176
|
var packages = {
|
|
43175
43177
|
"node_modules/@clappr/core": {
|
|
@@ -50606,6 +50608,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50606
50608
|
template = tmpl(spinnerHTML);
|
|
50607
50609
|
hasFatalError = false;
|
|
50608
50610
|
hasBuffering = false;
|
|
50611
|
+
_showOnError = false;
|
|
50609
50612
|
constructor(container) {
|
|
50610
50613
|
super(container);
|
|
50611
50614
|
this.listenTo(this.container, Events$1.CONTAINER_STATE_BUFFERING, this.onBuffering);
|
|
@@ -50616,6 +50619,9 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50616
50619
|
this.listenTo(this.container, Events$1.CONTAINER_ERROR, this.onError);
|
|
50617
50620
|
this.listenTo(this.container, Events$1.CONTAINER_READY, this.render);
|
|
50618
50621
|
}
|
|
50622
|
+
showOnError() {
|
|
50623
|
+
this._showOnError = true;
|
|
50624
|
+
}
|
|
50619
50625
|
onBuffering() {
|
|
50620
50626
|
this.hasBuffering = true;
|
|
50621
50627
|
this._show();
|
|
@@ -50632,27 +50638,28 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50632
50638
|
}
|
|
50633
50639
|
onStop() {
|
|
50634
50640
|
trace(`${T$4} onStop`, {
|
|
50635
|
-
showOnError: this.
|
|
50641
|
+
showOnError: this._showOnError,
|
|
50636
50642
|
hasFatalError: this.hasFatalError,
|
|
50637
50643
|
});
|
|
50638
|
-
if (!(this.hasFatalError && this.
|
|
50639
|
-
|
|
50640
|
-
}
|
|
50644
|
+
// if (!(this.hasFatalError && this._showOnError)) {
|
|
50645
|
+
// this._hide()
|
|
50646
|
+
// }
|
|
50647
|
+
this._hide();
|
|
50641
50648
|
}
|
|
50642
50649
|
onError(e) {
|
|
50643
50650
|
this.hasFatalError = e.code === PlaybackErrorCode.MediaSourceUnavailable;
|
|
50644
50651
|
trace(`${T$4} onError`, {
|
|
50645
50652
|
e,
|
|
50646
|
-
showOnError: this.
|
|
50653
|
+
showOnError: this._showOnError,
|
|
50647
50654
|
hasFatalError: this.hasFatalError,
|
|
50648
50655
|
error: e.code,
|
|
50649
50656
|
});
|
|
50650
|
-
if (this.
|
|
50651
|
-
|
|
50652
|
-
}
|
|
50653
|
-
|
|
50654
|
-
|
|
50655
|
-
|
|
50657
|
+
// if (this._showOnError) {
|
|
50658
|
+
// this._show()
|
|
50659
|
+
// } else {
|
|
50660
|
+
// this._hide()
|
|
50661
|
+
// }
|
|
50662
|
+
this._hide();
|
|
50656
50663
|
}
|
|
50657
50664
|
/**
|
|
50658
50665
|
* Shows the spinner.
|
|
@@ -50697,6 +50704,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50697
50704
|
* @internal
|
|
50698
50705
|
*/
|
|
50699
50706
|
render() {
|
|
50707
|
+
// TODO control via sourcecontroller instead
|
|
50700
50708
|
const showOnStart = this.options.spinner?.showOnStart;
|
|
50701
50709
|
trace(`${T$4} render`, {
|
|
50702
50710
|
buffering: this.container.buffering,
|
|
@@ -50824,6 +50832,7 @@ class SourceController extends CorePlugin {
|
|
|
50824
50832
|
onCoreReady() {
|
|
50825
50833
|
trace(`${T$3} onCoreReady`);
|
|
50826
50834
|
this.core.getPlugin('error_screen')?.disable(); // TODO test
|
|
50835
|
+
// this.core.getPlugin('spinner')?.showOnError()
|
|
50827
50836
|
}
|
|
50828
50837
|
onActiveContainerChanged() {
|
|
50829
50838
|
trace(`${T$3} onActiveContainerChanged`, {
|