Browse Source
fix: only save timeline mappings for main loader (#839)
fix: only save timeline mappings for main loader (#839)
- fix: only save timeline mappings for main loader Timeline mappings should only be saved for the main loader. This is for multiple reasons: 1) Only one mapping is saved per timeline, meaning that if both the audio loader and the main loader try to save the timeline mapping, whichever comes later will overwrite the first. In theory this is OK, as the mappings should be the same, however, it breaks for (2) 2) In the event of a live stream, the initial live point will make for a somewhat arbitrary mapping. If audio and video streams are not perfectly in-sync, then the mapping will be off for one of the streams, dependent on which one was first saved (see (1)). 3) Primary timing goes by video in VHS, so the mapping should be video. Since the audio loader will wait for the main loader to load the first segment, the main loader will save the first timeline mapping, and ensure that there won't be a case where audio loads two segments without saving a mapping (thus leading to missing segment timing info). - Add playback watcher check to correct cases where seek point ends up just before content. If audio and video streams are not perfectly aligned, a seek can result in the buffer starting just after the seek position. In that event, playback watcher should seek into the buffered contents to resume playback.pull/840/head

committed by
GitHub

No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 296 additions and 17 deletions
-
56src/playback-watcher.js
-
22src/segment-loader.js
-
37src/sync-controller.js
-
129test/playback-watcher.test.js
-
56test/segment-loader.test.js
-
6test/sync-controller.test.js
-
7test/vtt-segment-loader.test.js
Write
Preview
Loading…
Cancel
Save
Reference in new issue