1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-10 11:10:19 +02:00
Commit Graph

1445 Commits

Author SHA1 Message Date
Gary Katsevman
4585c08bdb
fix(player): silence rejected fullscreen promise (#5970)
The fullscreen API now returns a promise. If the player is inside an
iframe that doesn't allow fullscreen, the promise will reject and cause
an error to be logged. Instead, we should silence this promise.

Fixes #5918
2019-04-29 15:13:56 -04:00
Thijs Triemstra
629594ece5 fix: use performance.now() when possible (#5870) 2019-04-24 11:29:22 -04:00
Owen Edwards
f4154b9de0 Add role='application' to the video element on Chrome on Windows, to work around a JAWS screen reader bug (#5863) 2019-04-23 13:45:27 -04:00
Owen Edwards
322dae44b5 feat(middleware): allow middleware to handle volume setter and getter (#5906)
Allow middleware to handle volume setter and getter. This supports things like ducking the playback volume programmatically, without affecting the player's UI volume control.
2019-04-23 13:42:52 -04:00
Evan Farina
5973a62f67 fix: call reset if we are paused or no promises, otherwise wait for play promise to resolve (#5876)
Calling video.load while the video is trying to play (that is between play and playing event) throws an error. Instead, just wait for playback to happen before resetting.

Fixes #5875
2019-04-11 15:53:31 -04:00
Brandon Casey
ad53b80b8a fix: correctly resolve play promise when terminated via middleware (#5895) 2019-04-11 14:29:27 -04:00
Thomas
1844482bf5 fix: fix bug preventing control bar from hiding on mobile (#5836) 2019-04-11 13:57:56 -04:00
Richard Bushell
22d0514257 fix: fix fullscreen detection when player is nested within document fullscreen (#5912) 2019-04-11 13:57:19 -04:00
Pat O'Neill
458a5ead44
fix: explicitly remove all document-level listeners on player dispose (#5929) 2019-04-11 13:52:36 -04:00
Pat O'Neill
55b37524a3
fix: hide the progress control and show the subs-caps button when using Live UI at extra small size (#5915) 2019-04-11 13:35:57 -04:00
Pat O'Neill
c85bc00df2
fix: always show the mute button by default in responsive mode (#5914) 2019-04-11 12:37:52 -04:00
mister-ben
b2eae7bdbf docs(ModalDialog): add missing documentation for pauseOnOpen (#5908) 2019-04-03 11:46:58 -04:00
Brandon Casey
511f729b7a perf(live-tracker): disable live tracker on IE11 when document is hidden (#5896)
Disable the live tracker on IE11 when the document is hidden to fix the slow down and eventual crashing of web pages on IE11.

After #5879 was completed, we noticed that live streams still have an issue. This is because the live tracker we have also uses setInterval. Unfortunately, just disabling setInterval in the live tracker was not enough. Instead, we decided the best course of action is to just disable the live tracker altogether.
2019-03-28 18:19:07 -04:00
Brandon Casey
3dc6fbf6e7 fix: fix audio and video track selection (#5890)
Fixes #5887
2019-03-25 12:02:33 -04:00
Brandon Casey
142cc678cb perf: Fix memory leaks in safari, edge, and ie (#5880)
1. We were not always able to clean up `resize` on the `ResizeManager`, as the iframe
contentWindow can disappear before dispose
2. Native Tracks on Safari do not have an `off` so we have to deal with
event listeners manually

Fixes #5878
2019-03-22 12:03:52 -04:00
Gary Katsevman
894dd9eb74
perf(seek-bar): don't update play progress when document is hidden (#5879)
The seek bar updates on a 30ms interval to have a nice, smooth transition as time ticks forward. Unfortunately, IE11 has some performance issues with interval when the document is hidden. This doesn't appear to be an issue when using setTimeout but using a setTimeout was causing the play progress to appear very jerky in comparison.
Instead, we should just not update the play progress when the document is hidden. Besides solving the issue in IE11, it makes sense to do as no one could be seeing the progress bar. In addition, update() is now a no-op if the seek-bar element isn't visible.

Fixes #5575
2019-03-22 10:47:26 -04:00
Brandon Casey
6e173b017f test: check dom-data to verify we aren't leaking memory and event handlers (#5862) 2019-03-19 15:05:48 -04:00
marguinbc
d07f97dc94 fix: do a null check for tech when checking if we can toggle mute (#5857)
If the mute toggle checks whether mute can be set before the tech is ready, it may throw an error and cause issues. Instead, add a null check.
2019-03-18 16:35:09 -04:00
Brandon Casey
c632b24364 perf(player): turn off all track list listeners on dispose (#5867) 2019-03-18 15:54:55 -04:00
Chuck Wilson
92c66ad77e chore(text-track): fix it's/its typo (#5868) 2019-03-18 15:53:11 -04:00
Brandon Casey
f01d6f4e23 perf: fix more memory leaks (#5860) 2019-03-18 15:44:44 -04:00
Brandon Casey
20bf42d8b9 perf: fix an event target memory leak (#5855) 2019-03-18 15:40:55 -04:00
Brandon Casey
6eb9fd3dfb fix(resize-manager): call super.dispose() in dispose method (#5853) 2019-03-18 15:33:51 -04:00
Brandon Casey
a2431ce74c perf: Remove playerEvent and extra timeupdate handler in SeekBar (#5852) 2019-03-18 15:32:08 -04:00
Gary Katsevman
4169ddd9b7
fix: use ownerDocument.body.contains for IE11 (#5872)
Issue #5831 made the not-in-DOM warning work with elements from other
documents. This works in modern browsers but IE11 doesn't include a
contains method on the document. Instead, we should check to see if the
body contains the element.
2019-03-18 15:15:15 -04:00
Evan Farina
e248286fb6 fix: ensure that durationDisplay and remainingTimeDisplay exist before calling their 'updateContent' method during reset() (#5839)
The resetProgressBar_ method was calling 'updateContent' on the durationDisplay and remainingTimeDisplay controls without checking to make sure they exist

Fixes #5838
2019-03-18 14:54:14 -04:00
Richard Bushell
3fbc4f501b fix: update fullscreen detection when player is nested within another fullscreen element (#5830) 2019-03-18 14:48:40 -04:00
Kevin Brogan
237b68b561 fix: warn on element not in DOM even when from another document (#5831) 2019-03-18 14:42:38 -04:00
Gary Katsevman
f8b7dd4ed3
fix: if play is delayed till loadstart, call load (#5822)
In Safari, if we call play early and we are going to be waiting till
loadstart, it's possible this will take too long for the user activition
flag to still be available. In this case, we should call load() on the
player to prime the video element so for when loadstart happens.
2019-03-18 14:33:55 -04:00
Grzegorz Blaszczyk
d5a3234082 fix: change max height of menus based on responsive classes. (#5806)
Fixes #5524
2019-03-18 14:32:25 -04:00
Samuel Burbano Ramos
a72d861a95 fix: add inactivityTimeout to reset cache method (#5788) 2019-02-12 10:10:09 -05:00
Grzegorz Blaszczyk
65beb5a79c docs: fixes the return value type of the loop method. (#5789) 2019-02-11 14:07:34 -05:00
Vladimir
a359b6a462 fix icon pos (#5785) 2019-02-11 14:04:17 -05:00
Liu Ruen-shen
259ce71ee7 fix: remove event handlers when menu item is removed (#5748) 2019-01-25 14:26:36 -05:00
Owen Edwards
e8909231bd feat(player): add option to disable or override double-click handling. (#5611)
`userActions.doubleClick` can be set to false to disable double click to fullscreen. Can be set to a function to override behavior.

Fixes #5604.
2019-01-25 14:18:33 -05:00
Owen Edwards
61053bf674 feat: add hotkeys support ("m", "f", "k", and Space) (#5571)
Extend keyboard support for the SeekBar, and pass unhandled keydown events from components back to the player.
Switch from raw keycodes to the keycode module.

Using `userActions.hotkeys`, which can either be a function to match the hotkeys plugin, or an object with properties like `fullscreenKey`, see the documentation for more info.

This is currently off by default, we will consider turning it on by default in the future, see #5765.

Fixes #4048, fixes #3022.
2019-01-25 14:10:29 -05:00
Evan Farina
d94771f9bd fix(resize-manager): Prevent tabbing into RM and hide from Screen Readers (#5754)
The ResizeManager's iframe element is able to be focused via tabbing, which results in a bad user experience for users that rely on a screen reader to navigate the video and its sibling elements. The fix is to set the tabIndex to "-1", and the aria-hidden property to true for good measure.
2019-01-22 16:36:20 -05:00
Gary Katsevman
1c0fa32b3a
fix(fs): fix double fullscreenchange event (#5756)
This reverts the previous fix (2bc90a1)
and also simplifies handling. Seems like this works a lot better while
also ensuring that the vjs-fullscreen class is still on the player.

Fixes #5685, fixes #5745
2019-01-22 16:34:26 -05:00
chrisboustead
2f0834f43f fix(menu-button): make menu button title a component (#5722)
Fixes #3612, fixes #5759
2019-01-18 14:56:58 -05:00
Pat O'Neill
b27f71347e fix: TextTrackMenuItem components should not disable text tracks of different kind(s). (#5741) 2019-01-10 14:24:15 -05:00
Henrique Lima
175f773253 feat: reset player ui on Player#reset (#5684)
Fixes #4683
2019-01-08 14:15:51 -05:00
dustin71728
dd63cf94d5 fix: remove child from old parent when moving to new parent via addChild (#5702)
A child component may have been assigned to another
parent before assigning that child component to the
new parent via "addChild" method. In this case, the
original parent should remove the child then it can
be safely added back to the new parent. This commit
will keep the parent's "children_" and its DOM
element's child nodes in the consistent state.
2019-01-08 14:14:46 -05:00
Gary Katsevman
f02fb1b801
fix(seekbar): don't disable if live tracker's seekable is infinity (#5721)
This was done to make the behavior on Android with HLS live streams better but the it's opening us up to too many potential issues, like a user not being able to properly disable the control bar, that we should just back it out.
2019-01-08 14:13:50 -05:00
Gary Katsevman
544ed9df34
fix(player): remove vjs-ended class on seeked (#5728)
Whenever we seek after the video has ended, we are no longer ended and
therefore we should remove the vjs-ended class.

Fixes #5654.
2019-01-08 11:28:44 -05:00
Gary Katsevman
2f00a68a51
fix(fs): make sure there's only one fullscreenchange event (#5686)
Before the fullscreen API was un-prefixed, we listened to triggered a
`fullscreenchange` event on the player manually. This worked fine
because a prefixed `fullscreenchange` event was triggered on the player
element itself. But when it was unprefixed, we ended up with two events
now, the unprefixed event and the one we triggered.

Instead, we should listen the event the browser supports and re-trigger
it as the unprefixed event as necessary.

We also make sure that the handler gets calls when the document level
fullscreenchange handler gets called so that it is cancelled properly.

Fixes #5685.
2019-01-07 16:38:47 -05:00
Beatriz Mendes
9a8376e1f4 fix(remaining-time-display): make the '-' be visual and not readable by screen readers (#5671)
Fixes #5168
2019-01-04 18:15:25 -05:00
Pat O'Neill
4c9e09d460 fix: make sure sources, volume, and playback rate are reset along with the player (#5676)
Clear out the player cache_ on reset.

Fixes #5675
2019-01-03 15:14:54 -05:00
Tiago Fragoso
b02181b9fc feat: Add vjs-touch-enabled class for touch supporting devices (#5663)
Fixes #2999
2019-01-03 13:50:48 -05:00
Pat O'Neill
874cc21a4e feat: Add loadMedia and getMedia methods (#5652)
`loadMedia` accepts a MediaObject and an optional ready handler. It'll reset the player -- including text tracks, poster, and source -- before setting the new provided media, which include sources, poster, text tracks.
`getMedia` will return either the provided media object or the currently set values for sources, text tracks, and poster.

Fixes #4342
2019-01-03 13:49:34 -05:00
Luis
0e69ce96c3 fix: css animation shorthand property order (#5687) 2018-12-26 13:04:16 -05:00