Download init segments in parallel#7867
Conversation
… chart & address issue with length assignment
robwalch
left a comment
There was a problem hiding this comment.
Amazing! Progress gate is difficult for me to understand at this hour without stepping through it in the debugger. I'll have another look in the morning ☕.
The idea is to ensure that if we're loading media with progressive: true, then we need to make sure that progress callbacks don't start streaming the data to the transmuxer before the init segment loading has completed. Once done, any progress events that were deferred by the gate, can then be flushed and provided to the transmuxer. I just added a comment int the code to help with code clarity with the function gateProgress. |
This PR will enable parallel downloads for init & media segments, which will decrease the time it takes to start video.
Why is this Pull Request needed?
Currently init & media segments are downloaded sequentially. Given latency is incurred by network as well as at CDN, oftentimes it is best to fetch these in parallel, which can reduce the time it takes to prepare video.
Are there any points in the code the reviewer needs to double check?
Resolves issues:
#7675
Checklist