eb-player 2.0.12 → 2.0.14
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/build/ebplayer.bundle.js +18 -5
- package/dist/build/ebplayer.bundle.js.map +1 -1
- package/dist/build/types/eb-player.d.ts.map +1 -1
- package/dist/build/types/engines/hls.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/build/default.js +0 -1
- package/dist/build/ebplayer-engines.bundle.js +0 -2393
- package/dist/build/ebplayer-engines.bundle.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EBPlayer = {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
var __EB_PLAYER_VERSION__ = "2.0.
|
|
7
|
+
var __EB_PLAYER_VERSION__ = "2.0.14";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Finite State Machine for player playback state transitions.
|
|
@@ -5025,6 +5025,7 @@
|
|
|
5025
5025
|
return;
|
|
5026
5026
|
reportedUnrecoverable.add(errorKey);
|
|
5027
5027
|
console.error(`HLS Retry: Unrecoverable error "${errorKey}" — cannot fix by retrying.`, event, data);
|
|
5028
|
+
engine?.onUnrecoverableError?.(`DRM error: ${errorKey}`);
|
|
5028
5029
|
return;
|
|
5029
5030
|
}
|
|
5030
5031
|
console.warn('HLS Retry: Fatal error, trying to fix now.', event, data);
|
|
@@ -5051,7 +5052,7 @@
|
|
|
5051
5052
|
console.warn(`HLS Retry: Non-fatal error (${retryCount}/${MAX_NON_FATAL_RETRIES}), monitoring.`, event, data);
|
|
5052
5053
|
const errorTime = driver.media?.currentTime;
|
|
5053
5054
|
setTimeout(() => {
|
|
5054
|
-
if (errorTime === driver.media?.currentTime &&
|
|
5055
|
+
if (errorTime === driver.media?.currentTime && !engine?.chromecast_casting) {
|
|
5055
5056
|
console.warn('HLS Retry: Stream is stuck, trying to fix', event, data);
|
|
5056
5057
|
if (data.type === 'mediaError')
|
|
5057
5058
|
driver.recoverMediaError();
|
|
@@ -5363,9 +5364,18 @@
|
|
|
5363
5364
|
this.driver = driver;
|
|
5364
5365
|
// Pitfall 4: apply discontinuity workaround BEFORE attachMedia/loadSource
|
|
5365
5366
|
applyDiscontinuityWorkaround(driver, Hls.Events);
|
|
5366
|
-
// Wire retry handler
|
|
5367
|
+
// Wire retry handler — pass engine context so unrecoverable DRM errors
|
|
5368
|
+
// stop the stall watchdog (prevents useless reload loops) and surface to UI.
|
|
5367
5369
|
if (config.retry) {
|
|
5368
|
-
handleHlsRetry(driver
|
|
5370
|
+
handleHlsRetry(driver, {
|
|
5371
|
+
get chromecast_casting() { return state.isCasting; },
|
|
5372
|
+
onUnrecoverableError: (message) => {
|
|
5373
|
+
this.stopWatchdog();
|
|
5374
|
+
if (this.state) {
|
|
5375
|
+
this.state.error = message;
|
|
5376
|
+
}
|
|
5377
|
+
}
|
|
5378
|
+
});
|
|
5369
5379
|
}
|
|
5370
5380
|
// Bind native video element events to state
|
|
5371
5381
|
this.bindVideoEvents(video, state, signal);
|
|
@@ -6559,6 +6569,9 @@
|
|
|
6559
6569
|
// Get saved selections before close (CommandHandler saved them before emitting request-reload)
|
|
6560
6570
|
const saved = controller.getSavedSelections();
|
|
6561
6571
|
reference.close();
|
|
6572
|
+
// 500ms delay gives the browser time to complete async EME teardown
|
|
6573
|
+
// (setMediaKeys(null) is async and hls.js destroy() doesn't await it).
|
|
6574
|
+
// 100ms was too short and caused "The existing ContentDecryptor" errors.
|
|
6562
6575
|
setTimeout(() => {
|
|
6563
6576
|
reference.open(currentSrc);
|
|
6564
6577
|
// Restore selections after manifest loads (~2s pragmatic delay for async manifest parsing)
|
|
@@ -6569,7 +6582,7 @@
|
|
|
6569
6582
|
activeEngine.setSubtitle(saved.subtitleTrack);
|
|
6570
6583
|
}
|
|
6571
6584
|
}, 2000);
|
|
6572
|
-
},
|
|
6585
|
+
}, 500);
|
|
6573
6586
|
});
|
|
6574
6587
|
// Auto-open the stream if src is provided in config (matches legacy player behaviour
|
|
6575
6588
|
// where consumers call start({ src: '...' }) and expect playback to begin immediately).
|