This fixes an issue with requirejs where global/window and
global/document were being marked as dependencies. Instead, this makes
sure that the module gets inlines properly and not worked as a dep for
requirejs.
Fixes#6443, #6272, #6212, #5680.
This needs to be cast before exporting so users
can confidently pass it into their videojs config
and not worry about videojs internals doing strict
equality checks against true/false.
Co-authored-by: Kevin Kipp <kkipp@cloudflare.com>
Allows the editing of a track's label after its creation. Menu buttons will listen for the labelchange event and update their content accordingly.
This is technically divergent from the spec, which says it's readonly, but it can be useful for Video.js users.
Co-authored-by: Claudia Hinkle <chinkle@chinkle-mn1.linkedin.biz>
Skipping the tabIndex property on created elements due to #6145
optimizations blocks them from receiving keyboard events, due to not
being focusable; for example this breaks closing ModalDialog elements by
pressing Escape.
Fix this by always setting tabIndex, as the element may return the same
value even though the property has not been explicitly set.
Fixes#6870
For whatever reason, when the font size for text tracks is changed in
the text track settings dialog, we set a bottom of 2px on the cue.
This was added as part of the initial vtt work for Video.js in
4e5c28cc56 (diff-8169d53aa7eee6cab5f85b6641ef3117R176).
However, this doesn't seem to be doing anything right now and having it
means that when font-size is changed, multiple cues end up with a button
value of 2px causing them to overlap and obscure each other.
This works fine if the cues are positioned away from each other,
however, if multiple cues are positioned by default and a large font
size is used, while they will now stay on their lines, they may
partially obscure each other. This does not fix that issue and may
require modification (addition of overrides) to vtt.js to properly
support.
From my understand, in the changes #5773, the Y position of all the
boxes is already calculated and accounted for in the offsetY value we
get. However, because the HTML coordinate system has Y=0 at the top,
when we do offsetY/boxH, we get a position relative to the top of the
element. However, we expect that position relative to the "start" of the
slider, or the bottom of it. Therefore, we want to get the inverse
value, which is '1 - clamp(offsetY/boxH)'.
Fixes#6863
This uses offsetX and offsetY on the MouseEvents which helps account for transforms on the player. Unfortunately, this isn't available on TouchEvents, so, while this helps desktop devices with using a mouse, it doesn't help mobile devices using touch.
Fixes#6726, fixes#1102.
As part of #6588, we started using the crossOrigin method. However, it's
possible that a tech doesn't support this. Notably, the Flash tech. We
should instead have an abstract method on Tech that returns nothing so
we don't fail on those browsers.
Following https://en.wikipedia.org/wiki/HTML5_audio#Supported_audio_coding_formats
and https://hpr.dogphilosophy.net/test/index.php . These are formats that are supported
on some (most?) browsers.
Tested with a patched version of seafile. The flac and wav files correctly plays on
chromium on my Linux laptop and the caf file plays on my iPad.
(Chromium appears to play the caf file just fine but claim to not support it.)
Of course not all browsers support these but according to #5982 and my test result
I assume the browser detection is implemented somewhere else already.
When `debug(true)` is called, it will fire a `debugon` event that plugins and components can then use to do extra logging or anything else that's helpful to for debugging. It will also set the log level to debug.
When `debug(false)` is called, it will fire a `debugoff` event that plugins and components can then use to stop doing extra logging or helpful debugging. It will reset the log level to whatever it was previously.
Co-authored-by: ipadilla4 <ipadilla@brightcove.com>
The Fullscreen API is unsupported in iOS, so self.fsApi_.fullscreenerror and self.fsApi_.fullscreenchange are undefined, which was breaking the player after entering fullscreen by removing all bound player events.
Fixes#6707, fixes#6684, fixes#6645.