@gcorevideo/player 2.24.9 → 2.24.11

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
@@ -41768,7 +41768,6 @@ class HlsPlayback extends BasePlayback {
41768
41768
  _extrapolatedWindowNumSegments = 0; // TODO
41769
41769
  highDefinition = false;
41770
41770
  _hls = null;
41771
- _isReadyState = false;
41772
41771
  _lastDuration = null;
41773
41772
  _lastTimeUpdate = null;
41774
41773
  _levels = null;
@@ -41785,9 +41784,15 @@ class HlsPlayback extends BasePlayback {
41785
41784
  _recoveredDecodingError = false;
41786
41785
  _segmentTargetDuration = null;
41787
41786
  _timeUpdateTimer = null;
41787
+ /**
41788
+ * @internal
41789
+ */
41788
41790
  get name() {
41789
41791
  return 'hls';
41790
41792
  }
41793
+ /**
41794
+ * @internal
41795
+ */
41791
41796
  get supportedVersion() {
41792
41797
  return { min: CLAPPR_VERSION };
41793
41798
  }
@@ -41797,9 +41802,6 @@ class HlsPlayback extends BasePlayback {
41797
41802
  get currentLevel() {
41798
41803
  return this._currentLevel ?? AUTO;
41799
41804
  }
41800
- get isReady() {
41801
- return this._isReadyState;
41802
- }
41803
41805
  set currentLevel(id) {
41804
41806
  this._currentLevel = id;
41805
41807
  this.trigger(Events$1.PLAYBACK_LEVEL_SWITCH_START);
@@ -41986,6 +41988,7 @@ class HlsPlayback extends BasePlayback {
41986
41988
  const config = $.extend(true, {
41987
41989
  maxBufferLength: 2,
41988
41990
  maxMaxBufferLength: 4,
41991
+ autoStartLoad: false,
41989
41992
  }, this.options.playback.hlsjsConfig);
41990
41993
  trace(`${T$2} _createHLSInstance`, { config });
41991
41994
  this._hls = new Hls(config);
@@ -42004,6 +42007,7 @@ class HlsPlayback extends BasePlayback {
42004
42007
  assert.ok(this._hls, 'HLS.js is not initialized');
42005
42008
  this.options.hlsPlayback.preload && this._hls.loadSource(this.options.src);
42006
42009
  });
42010
+ // TODO drop?
42007
42011
  const onPlaying = () => {
42008
42012
  if (this._hls) {
42009
42013
  this._hls.config.maxBufferLength =
@@ -42014,8 +42018,13 @@ class HlsPlayback extends BasePlayback {
42014
42018
  this.el.removeEventListener('playing', onPlaying);
42015
42019
  };
42016
42020
  this.el.addEventListener('playing', onPlaying);
42017
- this._hls.on(Hls.Events.MANIFEST_PARSED, () => (this._manifestParsed = true));
42018
- this._hls.on(Hls.Events.LEVEL_LOADED, (evt, data) => this._updatePlaybackType(evt, data));
42021
+ this._hls.on(Hls.Events.MANIFEST_PARSED, () => {
42022
+ this._manifestParsed = true;
42023
+ this._hls.startLoad(-1);
42024
+ });
42025
+ this._hls.on(Hls.Events.LEVEL_LOADED, (evt, data) => {
42026
+ this._updatePlaybackType(evt, data);
42027
+ });
42019
42028
  this._hls.on(Hls.Events.LEVEL_UPDATED, (evt, data) => this._onLevelUpdated(evt, data));
42020
42029
  this._hls.on(Hls.Events.LEVEL_SWITCHING, (evt, data) => this._onLevelSwitch(evt, data));
42021
42030
  this._hls.on(Hls.Events.LEVEL_SWITCHED, (evt, data) => this._onLevelSwitched(evt, data));
@@ -42058,12 +42067,13 @@ class HlsPlayback extends BasePlayback {
42058
42067
  return super.render();
42059
42068
  }
42060
42069
  _ready() {
42061
- if (this._isReadyState) {
42062
- return;
42063
- }
42070
+ trace(`${T$2} _ready`, {
42071
+ isReadyState: this._isReadyState, // is defined in HTML5Video
42072
+ });
42064
42073
  !this._hls && this._setup();
42065
- this._isReadyState = true;
42066
- this.trigger(Events$1.PLAYBACK_READY, this.name);
42074
+ // this._isReadyState = true
42075
+ // this.trigger(Events.PLAYBACK_READY, this.name)
42076
+ super._ready();
42067
42077
  }
42068
42078
  _recover(evt, data, error) {
42069
42079
  assert(this._hls, 'HLS.js is not initialized');
@@ -43217,7 +43227,7 @@ class Player {
43217
43227
  }
43218
43228
  }
43219
43229
 
43220
- var version$1 = "2.24.9";
43230
+ var version$1 = "2.24.11";
43221
43231
 
43222
43232
  var packages = {
43223
43233
  "node_modules/@clappr/core": {