* fix: Add exception guard for VTT parsing state if vtt.js is not loaded for any reasons.
* fix: Do not override native for all iOS/iPadOS browsers
* fix: Add guard for vtt-segment-loader to actually load vtt.js in case we do not have it loaded
* chore: fix eslit errors
* chore: Add loadVttJs test
* chore: Add test for parse exception if no vtt.js is loaded for any reason
Co-authored-by: Dzianis Dashkevich <ddashkevich@brightcove.com>
Co-authored-by: Pat O'Neill <pgoneill@gmail.com>
`PlaylistController#excludePlaylist` now takes a single object with 3 properties:
* `playlistToExclude`, defaults to the currently selected playlist
* `error`
* `playlistExclusionDuration`, defaults to the value passed in the constructor
BREAKING CHANGE: This changes the arguments for the `PlaylistController#excludePlaylist` method to take a single object instead of multiple arguments.
If a waitingforkey event is fired, try to set up new key
sessions, as the manifest may have new key information.
Co-authored-by: Gary Katsevman <git@gkatsev.com>
When enabled, if the NetworkInformation API is available, it will be used for bandwidth estimation, If our estimation is greater than 10MBps and the downlink returns 10MBps, then our estimation is used.
Chrome 92 introduced a limit (75) on the number of media elements that can exist in a page at a time and we were going over that limit in our tests, causing them to fail.
Deprecate smoothQualityChange_ on the MPC, but otherwise, always do fast quality change whenever a user requests a rendition change and on fullscreen change
We have the recommended `beforeRequest` method but due to timing, it's not possible to use this to be able to set options for the initial m3u8 manifest as well. This makes it so that the XHR method can be overridden completely.
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.
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.
Deprecate lingering references to hls from the old videojs-contrib-hls
project, as well as dash. Ensure all references use `tech().vhs` instead.
Co-authored-by: Garrett Singer <gesinger@gmail.com>
Co-authored-by: Gary Katsevman <git@gkatsev.com>
Do a check for videojs.browser.IS_ANY_SAFARI and use that for overrideNative so that we use VHS playback on any non-safari browser.
Co-authored-by: ipadilla4 <ipadilla@brightcove.com>
Co-authored-by: Garrett Singer <gesinger@gmail.com>
This change adds two new events to `SegmentLoader`. The first `appendsdone` is fired whenever an append is complete on any main, audio, or subtitle loader. The second `playlistupdate` is fired whenever a playlist is changed on the segment loader.
Using these new events `PlaybackWatcher` watches for the `SegmentLoaders` `buffered_()` function to return a different buffered time range after each append. If it finds that we are not changing the buffered time range after three appends it will exclude the playlist or disable and remove the text track causing the issue.
Finally `PlaybackWatcher` will reset the buffered change counter whenever `playlistupdate` is fired on the `SegmentLoader` or when `seeking`/`seeked` fire on the `Tech`.