@gcorevideo/player 2.20.20 → 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 +1 -1
- package/dist/index.css +557 -557
- package/dist/index.js +19 -12
- package/dist/plugins/index.css +556 -556
- package/dist/plugins/index.js +19 -12
- 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/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
|
@@ -43169,7 +43169,7 @@ class Player {
|
|
|
43169
43169
|
}
|
|
43170
43170
|
}
|
|
43171
43171
|
|
|
43172
|
-
var version$1 = "2.20.
|
|
43172
|
+
var version$1 = "2.20.21";
|
|
43173
43173
|
|
|
43174
43174
|
var packages = {
|
|
43175
43175
|
"node_modules/@clappr/core": {
|
|
@@ -50606,6 +50606,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50606
50606
|
template = tmpl(spinnerHTML);
|
|
50607
50607
|
hasFatalError = false;
|
|
50608
50608
|
hasBuffering = false;
|
|
50609
|
+
_showOnError = false;
|
|
50609
50610
|
constructor(container) {
|
|
50610
50611
|
super(container);
|
|
50611
50612
|
this.listenTo(this.container, Events$1.CONTAINER_STATE_BUFFERING, this.onBuffering);
|
|
@@ -50616,6 +50617,9 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50616
50617
|
this.listenTo(this.container, Events$1.CONTAINER_ERROR, this.onError);
|
|
50617
50618
|
this.listenTo(this.container, Events$1.CONTAINER_READY, this.render);
|
|
50618
50619
|
}
|
|
50620
|
+
showOnError() {
|
|
50621
|
+
this._showOnError = true;
|
|
50622
|
+
}
|
|
50619
50623
|
onBuffering() {
|
|
50620
50624
|
this.hasBuffering = true;
|
|
50621
50625
|
this._show();
|
|
@@ -50632,27 +50636,28 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50632
50636
|
}
|
|
50633
50637
|
onStop() {
|
|
50634
50638
|
trace(`${T$4} onStop`, {
|
|
50635
|
-
showOnError: this.
|
|
50639
|
+
showOnError: this._showOnError,
|
|
50636
50640
|
hasFatalError: this.hasFatalError,
|
|
50637
50641
|
});
|
|
50638
|
-
if (!(this.hasFatalError && this.
|
|
50639
|
-
|
|
50640
|
-
}
|
|
50642
|
+
// if (!(this.hasFatalError && this._showOnError)) {
|
|
50643
|
+
// this._hide()
|
|
50644
|
+
// }
|
|
50645
|
+
this._hide();
|
|
50641
50646
|
}
|
|
50642
50647
|
onError(e) {
|
|
50643
50648
|
this.hasFatalError = e.code === PlaybackErrorCode.MediaSourceUnavailable;
|
|
50644
50649
|
trace(`${T$4} onError`, {
|
|
50645
50650
|
e,
|
|
50646
|
-
showOnError: this.
|
|
50651
|
+
showOnError: this._showOnError,
|
|
50647
50652
|
hasFatalError: this.hasFatalError,
|
|
50648
50653
|
error: e.code,
|
|
50649
50654
|
});
|
|
50650
|
-
if (this.
|
|
50651
|
-
|
|
50652
|
-
}
|
|
50653
|
-
|
|
50654
|
-
|
|
50655
|
-
|
|
50655
|
+
// if (this._showOnError) {
|
|
50656
|
+
// this._show()
|
|
50657
|
+
// } else {
|
|
50658
|
+
// this._hide()
|
|
50659
|
+
// }
|
|
50660
|
+
this._hide();
|
|
50656
50661
|
}
|
|
50657
50662
|
/**
|
|
50658
50663
|
* Shows the spinner.
|
|
@@ -50697,6 +50702,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
|
|
|
50697
50702
|
* @internal
|
|
50698
50703
|
*/
|
|
50699
50704
|
render() {
|
|
50705
|
+
// TODO control via sourcecontroller instead
|
|
50700
50706
|
const showOnStart = this.options.spinner?.showOnStart;
|
|
50701
50707
|
trace(`${T$4} render`, {
|
|
50702
50708
|
buffering: this.container.buffering,
|
|
@@ -50824,6 +50830,7 @@ class SourceController extends CorePlugin {
|
|
|
50824
50830
|
onCoreReady() {
|
|
50825
50831
|
trace(`${T$3} onCoreReady`);
|
|
50826
50832
|
this.core.getPlugin('error_screen')?.disable(); // TODO test
|
|
50833
|
+
// this.core.getPlugin('spinner')?.showOnError()
|
|
50827
50834
|
}
|
|
50828
50835
|
onActiveContainerChanged() {
|
|
50829
50836
|
trace(`${T$3} onActiveContainerChanged`, {
|