eb-player 2.0.7 → 2.0.8
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.
|
@@ -4284,6 +4284,15 @@
|
|
|
4284
4284
|
video.addEventListener('ended', () => {
|
|
4285
4285
|
state.playbackState = 'ended';
|
|
4286
4286
|
}, { signal });
|
|
4287
|
+
// Safety net: clear stale 'buffering' state when playback is clearly advancing.
|
|
4288
|
+
// In some edge cases (live stream segment boundaries), the browser fires 'waiting'
|
|
4289
|
+
// but never fires 'playing' even though video resumes from buffer. The timeupdate
|
|
4290
|
+
// event fires reliably while time advances, so we use it to recover.
|
|
4291
|
+
video.addEventListener('timeupdate', () => {
|
|
4292
|
+
if (state.playbackState === 'buffering' && !video.paused && video.readyState >= 3) {
|
|
4293
|
+
state.playbackState = 'playing';
|
|
4294
|
+
}
|
|
4295
|
+
}, { signal });
|
|
4287
4296
|
}
|
|
4288
4297
|
/**
|
|
4289
4298
|
* Seek to a specific time. Default implementation sets video.currentTime.
|