videojs: fix startup exception
https://github.com/videojs/http-streaming/pull/1439 Signed-off-by: Varun Patil <radialapps@gmail.com>pull/900/head
parent
e4b8f21b1a
commit
2ad35bfe13
1
Makefile
1
Makefile
|
@ -34,6 +34,7 @@ patch-external:
|
||||||
patch -p1 -N < patches/scroller-perf.patch || true
|
patch -p1 -N < patches/scroller-perf.patch || true
|
||||||
patch -p1 -N < patches/scroller-sticky.patch || true
|
patch -p1 -N < patches/scroller-sticky.patch || true
|
||||||
patch -p1 -N < patches/plyr-wrap.patch || true
|
patch -p1 -N < patches/plyr-wrap.patch || true
|
||||||
|
patch -p1 -N < patches/videojs-vhs-1439.patch || true
|
||||||
|
|
||||||
watch-js:
|
watch-js:
|
||||||
npm run watch
|
npm run watch
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
--- ./node_modules/video.js/dist/video.es.js 2023-10-27 02:56:03.617235084 -0700
|
||||||
|
+++ ./node_modules/video.js/dist/video.es.js 2023-10-27 02:55:57.048971664 -0700
|
||||||
|
@@ -48232,7 +48232,9 @@
|
||||||
|
|
||||||
|
resetMainLoaderReplaceSegments() {
|
||||||
|
const buffered = this.tech_.buffered();
|
||||||
|
- const bufferedEnd = buffered.end(buffered.length - 1); // Set the replace segments flag to the buffered end, this forces fetchAtBuffer
|
||||||
|
+ // https://github.com/videojs/http-streaming/pull/1439
|
||||||
|
+ const bufferedEnd = buffered.length ? buffered.end(buffered.length - 1) : 0;
|
||||||
|
+ // Set the replace segments flag to the buffered end, this forces fetchAtBuffer
|
||||||
|
// on the main loader to remain, false after the resetLoader call, until we have
|
||||||
|
// replaced all content buffered ahead of the currentTime.
|
||||||
|
|
|
@ -424,6 +424,7 @@ class VideoContentSetup {
|
||||||
// Changing the quality sometimes throws strange
|
// Changing the quality sometimes throws strange
|
||||||
// DOMExceptions when initializing; don't let this stop
|
// DOMExceptions when initializing; don't let this stop
|
||||||
// Plyr from being constructed altogether.
|
// Plyr from being constructed altogether.
|
||||||
|
// https://github.com/videojs/http-streaming/pull/1439
|
||||||
try {
|
try {
|
||||||
const qualityList = content.videojs?.qualityLevels?.();
|
const qualityList = content.videojs?.qualityLevels?.();
|
||||||
if (!qualityList || !content.videojs) return;
|
if (!qualityList || !content.videojs) return;
|
||||||
|
|
Loading…
Reference in New Issue