1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-23 02:04:34 +02:00
Commit Graph

746 Commits

Author SHA1 Message Date
Alex Barstow
1299daf16c refactor: remove extend() and tests (#7950)
BREAKING CHANGE: This removes the videojs.extend() method, please use ES6 classes instead.
2022-11-23 09:49:30 -05:00
mister-ben
f2aa0d7d13 feat: Use picture el for poster (#7865)
BREAKING CHANGE: This changes the DOM structure used for the video poster.
2022-11-23 09:49:29 -05:00
Gary Katsevman
b0101a6b9b feat: Enable sourceset by default (#7879)
Can still be disabled with enableSourceset: false
2022-11-23 09:49:29 -05:00
Gary Katsevman
d4559b1ebe feat: make retryOnError be the default (#7868)
This means that a retryOnError is removed and is no longer needed for
this behavior, which means that during source selection, if a source
fails, it'll try the next source that's available, to match the video
element.

BREAKING CHANGE: remove retryOnError option, turn it on by default
2022-11-23 09:49:28 -05:00
Grzegorz Blaszczyk
9b3d9415aa feat: addClass and removeClass method supports adding/removing multiple classes (#7798) 2022-11-23 09:49:27 -05:00
Roman Pougatchev
f46b83002e feature: Remove support for setting nonstandard attributes as props (#7857)
* remove statement that handles attributes in props argument

* clean up function

* add unit test

* add unit test

* remove duplicate set attr

* revert function cleanup
2022-11-23 09:49:26 -05:00
Roman Pougatchev
706983caa3 feat: Remove references and logic related to Flash and SWF (#7852)
* remove flash references, update comments & tests

* remove references to swf & stageclick listener
2022-11-23 09:49:26 -05:00
Pat O'Neill
a5e7222353 feat(lang): use less ambiguous text for the fullscreen button when in fullscreen mode (#7856) 2022-11-23 09:49:25 -05:00
Pat O'Neill
5d165dc33c feat: add a new title bar component (#7788) 2022-11-23 09:49:25 -05:00
Pat O'Neill
a0fd14894c feat: playback rate button now opens the menu rather than changing the playback rate (#7779)
BREAKING CHANGE: This changes the behavior of the playback rate button.
2022-11-23 09:49:24 -05:00
Pat O'Neill
cc84ff4f80 refactor: remove internal Map, Set, and WeakMap shams, assume window.performance and requestAnimationFrame support (#7775) 2022-11-23 09:49:24 -05:00
Pat O'Neill
28029d93f4 feat: update exposed utility functions and deprecate several top-level methods of the videojs global (#7761) 2022-11-23 09:49:23 -05:00
Alex Barstow
bd8aebb827 refactor: remove ie-specific code (#7701)
BREAKING CHANGE: This will cause Video.js to fail in many cases in all versions of Internet Explorer.
2022-11-23 09:48:13 -05:00
Alex Barstow
dd1b478e4d feat: assume native promises, remove promise option and workarounds (#7715)
BREAKING CHANGE: Removes support for Promise class option and assumes native Promise is available. Will break in older browsers or devices.
2022-11-23 09:48:13 -05:00
Alex Barstow
f99ace0fba revert: revert #7067 so we throw an error for invalid event types (#7719)
BREAKING CHANGE: Instead of logging an error message, invalid events will now trigger an `Error` which will terminate the call stack.
2022-11-23 09:48:13 -05:00
hugorogz
c190b21de7 feat: remove the firstplay event (#7707)
Co-authored-by: Hugo Rodriguez <hrodriguez@brightcove.com>

BREAKING CHANGE: Removes the firstplay event. Use one('play') instead.
2022-11-23 09:48:12 -05:00
Alex Barstow
1281d68d78 chore: Update preset env, drop IE11 and older browser support (#7708) 2022-11-23 09:48:11 -05:00
Alex Barstow
3faa866834 feat: Change addRemoteTextTrack's manualCleanup option default value to false (#7588) 2022-11-23 09:48:11 -05:00
mister-ben
d736541ba6
fix: allow for techs that init slowly in rvfc (#7864)
Don't call tech.paused() in the requestVideoFrameCallback fallback if the tech is not ready. I've seen this is an issue in the Flash tech, as its methods are set up after the swf loads. Yes, Flash, it's 2022, but in theory another tech could be impacted if it's also async.
2022-09-09 13:52:34 -04:00
mister-ben
9b81afee80
fix: Use timeupdate as well as rvfc/raf for cues (#7918)
Use the timeupdate event as well as the rvfc and raf callbacks to check cues. This is a bit overkill for "usual" playback but avoids edge cases. If the more preceise callback trigger first the cue will update but the timeupdate event should catch any that were missed, notwithstanding that timeupdate was always somewhat unpredictable.

Fixes #7910 (audio in video els and Samsung being weird) and fixes #7902 (no updates off screen).
2022-09-09 13:50:21 -04:00
mister-ben
d178d9ae3c
fix: Conditional requestVideoFrameCallback on Safari (#7854)
Safari's requestVideoFrameCallback is (intentionally?) broken when DRM is playing, so in that case use the fallback with requestAnimationFrame instead.
2022-07-28 14:20:46 -04:00
Joe Flateau
b22a08aad0
fix: need to determine featuresVideoFrameCallback before setting source (#7812)
the tech needs to know whether or not the underlying element supports requestVideoFrameCallback before calling setSource

Fixes #7807
2022-06-28 16:01:00 -04:00
mister-ben
27f22efe6b
fix: Don't copy deprecated Event.path (#7782) 2022-05-31 15:51:12 -04:00
mister-ben
a14ace202b
fix: HTML5 tech with audio tag shouldn't use requestVideoFrameCallback (#7778) 2022-05-31 15:50:51 -04:00
Pat O'Neill
50ffd57a8e
test: stop running placeholder el test in IE and Safari to prevent errors (#7769) 2022-05-20 13:21:14 -04:00
mister-ben
3ec2ac7f99
feat: Player can be replaced with original el after dispose() (#7722) 2022-05-18 10:59:17 -04:00
try2beth3b3st
7e2b9ec411
fix: reset() should null check the controlBar (#7692)
Fixes #7689

Co-authored-by: alex <try2betheb3st@gmail.com>
Co-authored-by: Pat O'Neill <pgoneill@gmail.com>
2022-05-04 11:43:52 -04:00
Noemite
b7cb9d06d6
fix(accessibility): fix broken aria menu (#7699)
* fix(accessibility): fix broken aria menu

* Update src/js/menu/menu-button.js

Co-authored-by: mister-ben <git@misterben.me>

* add tests

Co-authored-by: Noémie Macault <noemie.macault@capgemini.com>
Co-authored-by: mister-ben <git@misterben.me>
2022-04-15 12:56:29 -04:00
Pat O'Neill
58a8bd01b2
test(text-track-controls): fix failing test caused by incompatibility between PRs (#7686) 2022-03-21 14:20:18 -04:00
mister-ben
5af81cad2e
fix: generate chapters menu only when needed and don't create orphaned event listeners (#7604) 2022-03-21 13:05:50 -04:00
mister-ben
28bdc7d590
feat: easier configuration of buttons and components via options (#7611) 2022-03-21 12:21:26 -04:00
Harisha Rajam Swaminathan
eeff79c5e8
refactor: Unify audioOnly mode and audioPoster mode (#7678)
Co-authored-by: Alex Barstow <alexander.barstow@gmail.com>
2022-03-17 17:10:33 -04:00
Alex Barstow
ebb2d09d17
fix: async audio only tests (#7673) 2022-03-11 12:24:50 -05:00
Alex Barstow
762e7bc751
feat: Audio Only Mode (#7647)
* audioOnlyMode wip

* fix incorrect logs

* add tests

* minor code changes and add another test

* update docs

* fix formatting

* fix typo

* Consolidate conditions

Co-authored-by: Pat O'Neill <pgoneill@gmail.com>

* Compare objects instead of name string

Co-authored-by: Pat O'Neill <pgoneill@gmail.com>

* code review changes

* remove unnecessary equivalence check

Co-authored-by: Gary Katsevman <git@gkatsev.com>

* replace height() with currentHeight()

Co-authored-by: Gary Katsevman <git@gkatsev.com>

* rewrite for async pip and fs handling

* asyncify tests

* update doc

* add test

Co-authored-by: Pat O'Neill <pgoneill@gmail.com>
Co-authored-by: Gary Katsevman <git@gkatsev.com>
2022-03-10 13:13:49 -05:00
mister-ben
1179826cbc
feat: Greater text track precision using requestVideoFrameCallback (#7633) 2022-03-02 10:34:13 -05:00
Harisha Rajam Swaminathan
64e55f5492
feat: Add audioPosterMode option (#7629) 2022-03-01 15:50:46 -05:00
Bruce Rodrigues
50fe5f659b
fix: Fix playback rate iteration if rates are not in the ascending order (#7618) 2022-02-23 12:28:14 -05:00
mister-ben
f16d73b528
fix: Guard against Safari adding native controls after fullscreen (#7634) 2022-02-23 12:17:49 -05:00
mister-ben
67e6ed6fd6
feat: make negative sign on remaining time optional (#7571)
Add a new `displayNegative` option on the remaining time display to not show a negative sign in front of the time.
The default value is true to maintain current behavior.

Closes #7565
2021-12-20 15:37:33 -05:00
Gary Katsevman
df927de320
fix: don't always use fastSeek when available. (#7527)
We were always setting `scrubbing(true)` on mouse down. This means, that
we'd use `fastSeek` even when seeking while clicking, rather than only
when scrubbing.

The main fix involves knowing in `handleMouseMove` whether we were
called directly as a `mousemove` handler or whether it was called from
`handleMouseDown`. This means that when `handleMouseMove` is called via
`handleMouseDown` we can skip setting `scrubbing(true)` and only do it
when we are scrubbing directly.
2021-11-17 15:59:01 -05:00
Gary Katsevman
6c67c3084b
fix: improve enabling liveui when switching sources (#7510)
We try and enable the liveui on canplay, however, we only do it the first time after the LiveTracker is enabled. This means that if you change sources, we may not catch that the liveui should be enabled. This is particularly important for browsers where native playback is used, like Safari, as the metadata may not be available until canplay.

This is a follow-up from #7114 which enabled listening to canplay but didn't account for switching videos in the same player.
2021-11-10 22:21:11 -05:00
Gary Katsevman
8abe438b08
test: add tests for the click user action (#7507)
Follow up on #7495
2021-11-10 14:17:19 -05:00
Gary Katsevman
e9e894ffa0
fix: enable liveui on more livestreams (#7502)
Some live streams with a 30s live window can actually fluctuate between below and above the 30s threshold we have. Instead, we should have a slightly lower default to have those streams get the liveui.
2021-11-09 10:13:51 -05:00
Owen Edwards
f326cf3449
fix: set the 'lang' attribute on text track display elements, if the language of the track is known (#7493)
Fixes #7487

Co-authored-by: Gary Katsevman <git@gkatsev.com>
2021-11-02 15:59:03 -04:00
Brandon Casey
ada25c4c76
fix: evented should cleanup dom data (#7350) 2021-07-28 15:55:35 -04:00
Gary Katsevman
774f9e7f45
feat(hooks): Error hooks (#7349)
Adding beforeerror and error hooks that make it easier to know when errors occurred on all players and allows intercepting and modifying errors.
2021-07-28 13:32:38 -04:00
Gary Katsevman
ad9546cad8
feat(time-ranges): make TimeRanges iteratable if Symbol.iterator exists (#7330) 2021-07-27 12:33:45 -04:00
Gary Katsevman
b3acf66364
fix: remove IE8 url parsing workaround (#7334) 2021-07-22 13:14:26 -04:00
Gary Katsevman
3921b7febf
fix: properly return promise from requestFullscreen and exitFullscreen (#7299)
Mapping the promise returned from the helpers to the executor's resolve, and reject
methods. We also need to catch the error in the promise chain that's
created inside exitFullscreenHelper_.

Fixes #7298.
2021-07-06 14:56:02 -04:00
Roman Pougatchev
f9fb1d3f51
fix: throw error on muted resolution rejection during autoplay (#7293)
Previously, when autoplay was set to any or muted, we would accidentally swallow the autoplay rejection when we reset the muted state back to what it was. Instead, we want to re-throw the error.
To get it working, we also had to update our tests to try/catch in our fake promise.
2021-06-30 12:28:41 -04:00