Build MPEG-DASH Player in JavaScript. However, I had a problem with the search, and there seems to be little help on how to handle it using MSE and the corresponding Source Buffer object.
As far as I can tell, if segments are encoded correctly (I use separate m4s files via SegmentTemplate, not byte ranges), you just need to add a segment for the desired arbitrary point (say, 10 seconds), and then set the VideoElement currentTime parameter to the label. All this works, I can confirm the segment buffers without errors, and the first frame of the segment will even be visually loaded inside the VideoElement. However, it will not play and cleaning is not possible. There are no errors. It just acts like it is waiting for more data.
This is eliminated by adding all the previous segments, up to an arbitrary point, but it is simply impractical. For example, dash.js does not do this (but I can’t pinpoint what it does differently in order to provide the correct search). I assume that I need to dynamically modify the sidx, mfhd and / or tfdt fields to trick the browser into believing that I load segments sequentially, but this seems excessive for such a standard.
Does anyone know how to jump to an arbitrary point and continue playing when it feeds fragmented MP4 segments to the MSE source buffer?
source
share