- Fixes issue with baseTime 0
- Initial support for CEA 708 captions
- Support for SIDX v1 boxes
- opus/flac support in fmp4 playlists
Closes#1001, fixes#909
This is particularly important for Chrome, where, if unencrypted
content is appended before encrypted content and the key session
has not been created, a MEDIA_ERR_DECODE will be thrown once the
encrypted content is reached during playback.
It's possible that a subtitle track will have segments without any text
in them depending on how the subtitles and captions were created.
Therefor, we should ignore it in the playback-watcher where we're
checking for excessive downloads.
This is a followup to #886. There, I noticed that if we get sustained bad network we will time out because we will an opportunity for earlyabort. At first, I tried working around by delaying earlyabort in that case (#966) but as I was getting that ready I kept finding edge cases that we needed to account for. Specifically, the issue is that we only run our ABR algorithm on progress and bandwidthchange events from the segment loader. This means that if the download stalls, we stop run our algorithm and will eventually stall playback. Instead, we should remove earlyabort altogether (f897dde) and set up an interval (currently 250ms) to re-run our ABR algorithm. This means that if the network becomes bad for a sustained period, we will drop down once the buffer allows us but if the network recovers, we will switch up appropriately as well.
Also, the interval is stopped while we're paused.
Fixes#964.
appendsdone may cause an abort in segmentloaders which can then cause pendingSegment to be null after we just null checked it. Instead we should check if we have a pendingSegment then trigger appends done and see if an abort happens.
We also want to make sure that if audio contains multiple id3 sections, we support playing back to it as we did in previos versions of VHS.
A failed poster image may trigger an error event from the tech. This shouldn't cause us to pause our loaders, though.
Instead, we should verify that there's an actual error object on the tech before proceeding with pausing the loaders.
This adds a new option `experimentalBufferBasedABR` which turns it on. It uses a moving average playlist selector along with forward buffer checks that gate up and down switching. Right now it is turned off, and we are likely to fiddle with the implementation of this so it should not be relied on right now. We hope to eventually ship what this turns into as the new default ABR for VHS.
Co-authored-by: brandonocasey <brandonocasey@gmail.com>
We should noop handleData in vtt segment loader so that any captions which we don't support the type of, such as stpp.ttml.im1t from tears of steal widevine unified streaming do not attempt to append to sourceBuffers and cause a player append error.
This fixes a bug caused by an oversight in #942. If the MPD@minimumUpdatePeriod is 0 in the first dynamic MPD we load, we should use the media's target duration as the MPD refresh interval, however we need to wait until a playlist has been selected before we can know DashPlaylistLoader.media().targetDuration, otherwise we get a TypeError.
This is part of a set of upcoming changes to add support for live DASH playback. Specifically, this PR differentiates the handling of 2 cases which were formerly conflated:
- The MPD@minimumUpdatePeriod attribute has a value of 0, indicating that the MPD has no validity after the moment it was retrieved.
- The MPD@minimumUpdatePeriod attribute is absent, indicating the MPD has infinite validity and will never be updated
Currently, we ran into an issue with roundSignificantDigit because it is rounding integer whole numbers when it seems like it was only made to round floats. This can cause us to download multiple duplicate segments on slow connections. Instead, only round by TIME_FUDGE_FACTOR here. This will prevent us from having to do any rounding at all.
This is particularly used in DASH as the NAME is set from the Representation's ID which is specified to be unique per period and that across periods, the representations with the same ID should be functionally equivalent.
This is important because in DASH, across periods, it's possible for Representations to be re-ordered, and we want to make sure that the reference doesn't get messed up when the period updates.
It still sets up a reference to the playlist via the old name but if the ordering is changed it'll reference the incorrect playlist as it does now.