In the cases where the player isn't ready, or we are in the middle of changing sources, we will wait for `canplay` and then seek to the provided time without requiring Video.js users to handle this themselves.
Co-authored-by: Marco Garay <mgaray@brightcove.com>
It seems we have never triggered change events on remoteTextTrack when we were using native text tracks. This was a problem for VHS, which exclusively uses text tracks.
This makes it so we do trigger the event. Main issue with this change is that it creates a potential for a false positive where a change event was triggered from a non-remote text track but the remoteTextTrack list still received a change event. This issue is mitigated by best practices of looping through the list looking for the modes that you care about.
Co-authored-by: Kevin Kipp <kevin.kipp@gmail.com>
Co-authored-by: Kyle Boutette <kyleveB@gmail.com>
This loosens the regex used for Edge. Still detects legacy Edge but now
also detects the new Edge.
IS_CHROME still returns true for Edgium but I think that it's worth
keeping that as the behavior should be pretty close. If there is a need
to differentiate, can check IS_EDGE and also whether IS_EDGE &&
IS_CHROME is present. Combining with IS_WINDOWS could also be useful as
some capabilities of Edge are only available in Windows.
We had to turn off strict mode (#4551) in Video.js due to a change in vtt.js. That has now been fixed in videojs/vtt.js#40 and released as part of 0.15.2 which will be available via #6333.
Fixesvideojs/vtt.js#15
Any programmatic call to focus when playing back DRMed content on IE/Edge causes the video element to turn black. Instead, don't call focus() in those cases.
Fixes#6270.
iPadOS defaults to desktop mode unless Safari is opened in split screen mode. The only way to detect it is to assume that Safari with Touch enabled is iPad. This is good enough until and if a better way to detect it is made available.
When a player is created without an id on the embed code, Video.js automatically assigns it one based on an auto-incrementing number (a.k.a. a GUID). For the longest time, this has happened to result in the default id of the first player being vjs_video_3.
It was never intended for users to rely on this value being consistent, but users do strange and inadvisable things.
PR #6103 had an unintended side effect in that it changed the default id to vjs_video_2, which we worry could affect some users of Video.js.
Reimplementation of https://github.com/videojs/video.js/pull/2192
on current code. Seems to work but has not been carefully tested,
especially on conditions such as slow networks and complex tracks.
For https://github.com/videojs/video.js/issues/5252
A `preloadTextTracks` tech option is added, set to true by default,
to keep current behavior intact. Alternate behavior can be enabled
by setting this to false.
This delays loading of the VTT cue files until they are selected.
For sites like Wikipedia that tend to have large numbers of
crowdsourced subtitles and can show many files together on one
page, this saves a lot of unnecessary network transfer and API
hits.
Does mean there may be dropped cues while switching to a track
that requires on-demand loading.
Example usage:
videojs(element, {
html5: {
preloadTextTracks: false
}
};
On iOS, when disconnecting the headphones, we may receive a stalled or suspend event. In those case, we may actually still have buffer available for us to play through rather than actually having stalled or suspended. In those cases, we should pause the player to prevent playback issues.