You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A live streaming environment.
In the m3u8 playback situation above, suppose there are some stacked segments in a1 and a2 due to a few quality changes.
There is an issue with segment updates when stopping and restarting a1.
If the interval between stops and starts gets longer, there will be no matching segments and you won't be able to pull map data from the previous segment.
exportconstupdateSegments=(original,update,offset)=>{constoldSegments=original.slice();constnewSegments=update.slice();offset=offset||0;constresult=[];letcurrentMap;// never allocatedfor(letnewIndex=0;newIndex<newSegments.length;newIndex++){constoldSegment=oldSegments[newIndex+offset];constnewSegment=newSegments[newIndex];if(oldSegment){currentMap=oldSegment.map||currentMap;result.push(updateSegment(oldSegment,newSegment));}else{if(currentMap&&!newSegment.map){// llhls uses a skip querystring, so you need to get the map value from the previous segment.// but map is not allocatednewSegment.map=currentMap;}result.push(newSegment);}}returnresult;};
and the handleSegmentBytes function will throw an error.
Uncaught TypeError: Cannot read properties of undefined (reading 'tracks')
at Dh (video.min.js:38:91026)
at i (video.min.js:38:94224)
at Oh.i.activeXhrs (video.min.js:38:94670)
at video.min.js:38:96100
at Pd (video.min.js:37:20244)
at Object.callback (video.min.js:37:20950)
at n (video.min.js:12:44288)
at XMLHttpRequest.e (video.min.js:12:45067)
at XMLHttpRequest.sentryWrapped (helpers.ts:85:17)
Sources
I've come up with two possible solutions.
but I'm not familiar with the structure of the http-streaming project, so bear with me.
constupdateSegments=(original,update,offset)=>{constoldSegments=original.slice();constnewSegments=update.slice();offset=offset||0;constresult=[];letcurrentMap;// added part, save the map of the last segment if there is no overlapif(oldSegments.length<=offset){for(letoldIndex=oldSegments.length-1;oldIndex>=0;oldIndex--){constoldSegment=oldSegments[oldIndex];if(oldSegment.map){currentMap=oldSegment.map;break;}}}for(letnewIndex=0;newIndex<newSegments.length;newIndex++){constoldSegment=oldSegments[newIndex+offset];constnewSegment=newSegments[newIndex];if(oldSegment){currentMap=oldSegment.map||currentMap;result.push(updateSegment(oldSegment,newSegment));}else{if(currentMap&&!newSegment.map){newSegment.map=currentMap;}result.push(newSegment);}}returnresult;};
load(shouldDelay){if(this.mediaUpdateTimeout){window.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=null;}constmedia=this.media();if(shouldDelay){constdelay=media ? ((media.partTargetDuration||media.targetDuration)/2)*1000 : 5*1000;this.mediaUpdateTimeout=window.setTimeout(()=>{this.mediaUpdateTimeout=null;this.load();},delay);return;}if(!this.started){this.start();// When onGroupChanged occurs, the this.start function is executed to get the new full segment and make the update work properly.return;}if(media&&!media.endList){this.trigger('mediaupdatetimeout');}else{this.trigger('loadedplaylist');}}
(playlist-loader.js)
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
An audio playlist is working again after a long pause.
Results
Expected
Hopefully, the above issues have been resolved and LLHLS videos play smoothly despite frequent quality changes.
Error output
Uncaught TypeError: Cannot read properties of undefined (reading 'tracks')
at Dh (video.min.js:38:91026)
at i (video.min.js:38:94224)
at Oh.i.activeXhrs (video.min.js:38:94670)
at video.min.js:38:96100
at Pd (video.min.js:37:20244)
at Object.callback (video.min.js:37:20950)
at n (video.min.js:12:44288)
at XMLHttpRequest.e (video.min.js:12:45067)
at XMLHttpRequest.sentryWrapped (helpers.ts:85:17)
Additional Information
Please include any additional information necessary here. Including the following:
videojs-http-streaming version
what version of videojs-http-streaming does this occur with?
videojs-http-streaming x.y.z
videojs version
what version of videojs does this occur with?
video.js x.y.z
Browsers
what browsers are affected? please include browser and version for each
*
Platforms
what platforms are affected? please include operating system and version or device and version for each
*
Other Plugins
are any other videojs plugins being used on the page? If so, please list them with version below.
*
Other JavaScript
are you using any other javascript libraries or frameworks on the page? if so please list them below.
*
The text was updated successfully, but these errors were encountered:
Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:
If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
Please do not delete the template, by filling out the required information we can investigate your issue more quickly.
Before opening an issue see if your problem can be resolved with the troubleshooting guide.
Description
A live streaming environment.
In the m3u8 playback situation above, suppose there are some stacked segments in a1 and a2 due to a few quality changes.
There is an issue with segment updates when stopping and restarting a1.
If the interval between stops and starts gets longer, there will be no matching segments and you won't be able to pull map data from the previous segment.
and the handleSegmentBytes function will throw an error.
Sources
I've come up with two possible solutions.
but I'm not familiar with the structure of the http-streaming project, so bear with me.
(playlist-loader.js)
(add method playlist-loader.js)
(media-groups.js)
(playlist-loader.js)
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
Results
Expected
Hopefully, the above issues have been resolved and LLHLS videos play smoothly despite frequent quality changes.
Error output
Additional Information
Please include any additional information necessary here. Including the following:
videojs-http-streaming version
what version of videojs-http-streaming does this occur with?
videojs-http-streaming x.y.z
videojs version
what version of videojs does this occur with?
video.js x.y.z
Browsers
what browsers are affected? please include browser and version for each
*
Platforms
what platforms are affected? please include operating system and version or device and version for each
*
Other Plugins
are any other videojs plugins being used on the page? If so, please list them with version below.
*
Other JavaScript
are you using any other javascript libraries or frameworks on the page? if so please list them below.
*
The text was updated successfully, but these errors were encountered: