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

783 Commits

Author SHA1 Message Date
André
78310464d5
fix(error-display): update display on consecutive errors (#8485)
When consecutive errors occur, the `ErrorDisplay` component is not updated with the new error message.
This results in an inconsistent state between the `player.error` and `player.errorDisplay.contentEl().textContent`.

|                         | player.error() | player.errorDisplay.content() | player.errorDisplay.contentEl().textContent |
| ----------------------- | -------------- | ----------------------------- | ------------------------------------------- |
| player.error('Error 1') | Error 1 ✔️      | Error 1 ✔️                     | Error 1 ✔️                                   |
| player.error('Error 2') | Error 2 ✔️      | Error 2 ✔️                     | Error 1                                   |

An example of a use case where updating the error message is useful is :
- user tries to play media 1 but the media doestn't exist
- user tries to play media 2 but the media is not compatible

- call the `close` function before each call to the `open` function.
  - if errorDisplay is not **open**, the `close` function does nothing
  - if errorDisplay is **open**, the `close` function executes and triggers the close events, then the open function executes and triggers the open events, ensuring that the content is updated.
2023-11-28 23:11:15 +01:00
André
68f1429d9b
fix(error): chromium reset mediaError when the poster is invalid (#8410)
When both the media URL and the poster return a response other than 200.
The media error is overwritten by an empty error, leaving the player in an inconsistent state.

- add a condition to `handleTechError_` to ensure that the `error` is truthy
- add a test case

Fixes #8409
2023-09-27 10:18:58 +02:00
Dzianis Dashkevich
cf681e0e76
feat: enhanced logger (#8444)
* Added the createNewLogger method, to create a logger without a naming chain.

* Added optional custom delimiter and custom styles.

* Several improvements in jsDoc for proper types(d.ts) generation.

---------

Co-authored-by: Dzianis Dashkevich <ddashkevich@brightcove.com>
2023-09-25 12:50:01 -04:00
mister-ben
6fc1fd4aaf
fix(tests): Fixes for old Safari (#8368) 2023-07-21 19:12:48 +02:00
Walter Seymour
da15810355
fix: Check for VTTCue (#8370) 2023-07-20 11:38:15 -05:00
mister-ben
452a918a42
fix(tests): Skip a test on old Safari (#8356) 2023-07-19 09:10:07 +02:00
mister-ben
c66bf4023f
fix: make compatible with chrome 53 (#8354) 2023-07-12 19:43:17 +02:00
François Beaufort
8dd98f602b
fix: Don't use copyStyleSheets with documentPIP (#8314)
* Don't use copyStyleSheets

* Move to dom.js

* Add tests

* Address feedback
2023-07-07 15:56:54 +02:00
François Beaufort
146008f610
Use pagehide instead of unload for PiP (#8321) 2023-07-04 13:43:09 +02:00
Walter Seymour
6fc0dc783a
feat: Add useSVGIcons option (#8260) 2023-06-12 13:31:06 -05:00
BrainCrumbz
dc1e2bb42a
fix(shadow-dom): prevent warning 'element supplied is not included' (#8192)
Co-authored-by: Giuseppe Piscopo <g.piscopo@braincrumbz.com>
2023-06-06 17:24:30 -04:00
André
b782cb09f4
fix(player): cache_.currentTime is not updated when the current time is set (#8285)
Updating cache_.currentTime as soon as the currentTime is set avoids having to wait for the timeupdate event, which results in:

- making cache_.currentTime more reliable
- updating the progress bar on mouse up after dragging when the media is paused.

See also: #6232, #6234, #6370, #6372
2023-06-01 08:50:29 -04:00
mister-ben
3af36383ca
fix(jsdoc): corrections to jsdoc (#8277) 2023-05-31 11:12:57 -04:00
André
d524e5755d
fix(picture-in-picture-control): hide the component in non-compatible browsers (#7899) 2023-05-31 10:54:51 -04:00
André
35fad1d454
fix(player): load method fails to reset the media element to its initial state when the VHS is used (#8274) 2023-05-31 10:41:44 -04:00
André
07effdf244
fix(skip-forward): error when clicking after player reset (#8258) 2023-05-31 10:30:49 -04:00
André
e73e05db8f
fix(seek-bar): error when scrubbing after player reset (#8257) 2023-05-31 10:30:13 -04:00
André
5151bc5970
fix(player): techGet is undefined (#8256)
Fixes #8255
2023-05-31 10:29:35 -04:00
André
1a1adf3275
fix(player): address loss of crossOrigin value when loadMedia is called (#8085) 2023-05-31 10:25:34 -04:00
André
f1558c660b
fix(videojs): missing return in registerComponent (#8247) 2023-05-12 12:23:27 -04:00
Dzianis Dashkevich
866ef24b79
fix: Replace Object.values with ponyfill (#8267)
Unpin Firefox in BrowserStack tests, which fixes test failures as well.

Fixes #8266.
2023-05-11 18:57:13 -04:00
Grzegorz Blaszczyk
1491d71b26
feat: text track display overlays a video (#8009) 2023-04-11 21:30:18 +02:00
André
71343d1996
fix: reset progress bar fully when player is reset (#8160) 2023-04-04 16:58:57 -04:00
mister-ben
b489bc5c7d
fix: Ensure additional components update on languagechange (#8175) 2023-04-04 16:54:36 -04:00
mister-ben
0c72805500
feat: Add document picture-in-picture support (#8113)
Co-authored-by: François Beaufort <beaufort.francois@gmail.com>
2023-04-04 16:44:16 -04:00
Jon Dufresne
423f7ebd67
Fix several typos in docs and comments (#8110) 2023-03-22 15:00:01 +01:00
Adam Waldron
b7116be725
fix: replay button broken for native playback (#8142)
* fix: replay button broken for native playback

* remove debug logging

* move fix to player

* comment

* add unit test

* add native browser stubs

* reset stubs and test currentTime
2023-03-06 10:32:14 -08:00
Usman Omar
8f3f32cb2b
feat: add skip forward/backward buttons (#8147)
* remove duplicate icons from icon example

* create initial forward and back button classes

* add logic for back/forward buttons on click

* change icon used based on option passed into player

* move logic from forward and back buttons into one component

* add jsdoc comments for clarity

* create initial test file

* refactor button logic into separate files

* update skip button example and add test files

* test both the forward and backward buttons

* test handleClick fns for both forward and backward btns

* update skip buttons example

* update jsdocs for skip backward and forward buttons

* make control text accessible and use seekableEnd/Start when skipping forward/back

* update font version to use updated icons

* set control text only if config is valid

* add link to sandbox page & use localization

* update translations needed
2023-03-06 09:51:59 +00:00
mister-ben
a27ee053bb
fix: Remove img el when there's no poster source (#8130)
* fix: No invalid img el with no poster source

* move dom changes into setSrc
2023-02-20 10:04:39 +01:00
Walter Seymour
b306ce614e
feat: improved text tracks settings labels (#8101) 2023-02-06 13:44:24 -06:00
mister-ben
db882cd49d
fix: remove unnecessary handling of invalid cues (#7956) 2023-02-01 18:08:30 +01:00
Grzegorz Blaszczyk
33b476d7cc
fix: use Screen Orientation API where supported (#8031)
* feat:  introduces Screen Orientation API for detecting orientation change

* feat:  add missing unit tests
2023-02-01 18:05:41 +01:00
Jacob Hamblin
267b5c6bff
fix: Exit PIP if entering fullscreen (#8082)
* exit PIP if entering fullscreen

* assert that entering full screen leaves PiP
2023-02-01 18:03:36 +01:00
mister-ben
509b3d0757
fix: Ensures iOS can use native fullscreen (#8071) 2023-01-24 11:45:49 +01:00
mister-ben
3accbc7c73
fix: Set alt attr on poster img (#8043)
* fix: Set alt attr on poster img

* use null alt instead

* remove debug text
2023-01-24 09:59:27 +01:00
mister-ben
2d96c9d780 feat: Use userAgentData in favour of userAgent (#7979) 2022-11-23 09:49:37 -05:00
Pat O'Neill
b8ee8858f8 refactor: rename fn.bind to fn.bind_ to strongly indicate it should not be used externally (#7940) 2022-11-23 09:49:32 -05:00
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