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

1762 Commits

Author SHA1 Message Date
Walter Seymour
b59a89b1ce
fix: typo in error const (#8628) 2024-03-04 16:17:25 -06:00
Walter Seymour
7ed47de29d
chore: additional vjs ad errors (#8623) 2024-03-04 13:23:12 -06:00
Walter Seymour
4c1f63b711
chore: update pip enter event with window metadata (#8591) 2024-02-20 11:11:00 -06:00
Walter Seymour
395d608761
chore: update playbackRates jsdoc (#8583) 2024-02-13 11:35:36 -05:00
Harisha Rajam Swaminathan
6eb0230078
fix: error-display (#8529) 2024-01-30 11:32:58 -05:00
Adam Waldron
14b5fde524
fix: browser util flagging smart TV as Safari (#8566) 2024-01-26 09:46:53 -08:00
Walter Seymour
43941a801f
feat: improved error interface (#8564) 2024-01-25 08:57:16 -06:00
mister-ben
46c9907a9b
fix: Fixes form markup in text track settings (#8557) 2024-01-16 17:43:39 +01:00
Carlos Javier Villaseñor Castillo
7345768575
feat(error): remove confusing decorative X from error display modal (#8553)
Modify _error:
-Remove the ‘x’ decorative element from the error display modal.
2024-01-10 14:32:27 -06:00
Peter Petraník
abdfaacd90
feat: expose version from player.version() (#8543)
Add a `Player#version()` method which returns an object with the Video.js version under the `video.js` property name, to match the package name.

This could then be extended to support adding plugin, tech, and source handler versions as part of the version call.

Fixes #8538
2024-01-04 09:35:23 -05:00
André
608a585dcb
feat: Seek bar smooth seeking (#8287)
* refactor(player): decrease the indentation level in the currentTime method

* fix(player): cache_.currentTime is not updated when the current time is set

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

* feat: add an option to handle smooth seeking

Adds a player option called enableSmoothSeeking, which is false by default,
to provide a smoother seeking experience on mobile and desktop devices.

Usage:
```javascript
// Enables the smooth seeking
const player = videojs('player', {enableSmoothSeeking: true});

// Disable the smooth seeking
player.options({enableSmoothSeeking: false});
```

- **player.js** add an `option` called `enableSmoothSeeking`
- **time-display.js** add a listener to the `seeking` event if `enableSmoothSeeking` is `true` allowing to update the `CurrentTimeDisplay` and `RemainingTimeDisplay` in real time
- **seek-bar.js** `update` the seek bar on `mousemove` event  if `enableSmoothSeeking` is `true`
- add test cases
2024-01-02 13:11:55 -05:00
Tsachi Shlidor
af0fca3623
fix(skip-forward): a11y (#8532) 2023-12-21 17:12:59 +01:00
Dzianis Dashkevich
1fff5c0698
chore: update player public interface for types visibility (#8525)
Co-authored-by: Dzianis Dashkevich <ddashkevich@brightcove.com>
2023-12-14 13:07:17 -05:00
André
1866118e6c
fix(loading-spinner): border size costumization (#8369)
Allows to change the border size of the `loading-spinner` component without having to reflect the border size in the pseudo-element margin.

- uses display `flex` to facilitate centering of pseudo-elements
- deletes the pseudo-elements `margin`
2023-12-04 14:26:55 -05:00
André
849098f6c0
fix(player): reset CSS classes at player.reset (#8487)
Allows CSS classes to be reset when `player.reset` is called,
so that the player is close to its initial state.

- remove `vjs-playing`
- add `vjs-paused`
2023-12-04 14:18:11 -05:00
Andrei Filip
a6a0f577e1
fix(types): Minor fix for types (#8466)
* fix 2 minor types

* Update component.js

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

---------

Co-authored-by: mister-ben <git@misterben.me>
2023-12-04 14:10:27 -05:00
André
161a09cae6
fix(title-bar): component remains displayed after player reset (#8481)
When `player.reset` is called the `titleBar` component is not reset.

- Sets the properties `title` and `description` to `undefined` when `player.titleBar.update` is called so that the component is properly reset.
2023-11-29 10:36:56 +01:00
André
6d8af0c892
fix(big-play-button): component remains displayed after an error (#8483)
This issue occurs when the `player` has the class `vjs-show-big-play-button-on-pause`
and playback has started and then been set to `pause` and an `error` occurs.

- Avoids displaying `big-play-button` on error
2023-11-29 10:29:22 +01:00
André
7972c23a55
fix(error-display): component remains displayed after player reset (#8482)
When `player.reset` is called, the `errorDisplay` component is not reset, and neither is `player.error`.

- Sets `player.error` to `null`, so that the `player.errorDisplay` and `player.error` are correctly reset.
- Adds an `error` function to the `testPlayer` stub to prevent tests from failing.
2023-11-28 23:38:41 +01:00
André
92b5e79ba9
fix(big-play-button): component remains displayed when seeking (#8484)
This issue happen when the `player` has the class `vjs-show-big-play-button-on-pause` and a `seek` occurs,
resulting in the `loadingSpinner` being hidden behind the `bigPlayButton`.

- Avoids displaying `bigPlayButton` while `seeking`
2023-11-28 23:22:39 +01:00
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
JJ
d535e163da
bugfix: fix window.navigator.userAgentData may be '{}' (#8474) 2023-10-24 10:03:50 +02:00
mister-ben
2c36d2542a
fix(types): use typeof for registerComponent and registerPlugin (#8451)
* use typeof for registerComponent|Plugin

* separate out addChild changes
2023-10-03 10:19:05 +02:00
Boris Petrov
bad086dad6
chore(types): fix issues in exported types (#8333) 2023-09-28 11:45:04 -04:00
André
473176f268
fix(control-bar): incorrect display when control bar display is locked (#8435)
The control bar is not displayed correctly when the display is locked because `.vjs-lock-showing` uses `display` `block` instead of `flex`.

- use `display` `flex` instead of `display` `block` when the control bar has `.vjs-lock-showing` class
- ensure that the control bar is not displayed if the `player` has classes:
  - `.vjs-controls-disabled`
  - `.vjs-using-native-controls`
  - `.vjs-error`
2023-09-27 10:25:52 +02: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
Grzegorz Blaszczyk
781eb436e3
fix(types): improves quality of typescript definitions (#8218)
* feat(types): improves quality of typescript definitions

* fix: reverts back access modifier for controlText_

* empty commit to force retest

* fix(doc): add missing keyboard event type

---------

Co-authored-by: mister-ben <git@misterben.me>
2023-09-27 10:00:49 +02:00
mister-ben
9267c46576
fix: Resolves captions sizing issue when minified (#8442)
* fix: Resolves captions sizing issue when minified

* Change test for minification
2023-09-27 09:54:29 +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
André
b95cd7a6eb
fix(svg-icons): default icons color (#8382)
Uses the same color as defined by the `color` property of the `video-js` class to apply to `svg icons` for easy customization

- set `fill` property to `currentColor`

Co-authored-by: mister-ben <git@misterben.me>
2023-08-17 21:48:43 +02:00
André
d0408812df
fix(svg-icons): icon size consistency (#8380)
* fix(svg-icons): icon size consistency

The icons have been regenerated from the svg files in `videojs/font` to ensure consistency in size.

- update icons.svg file

* fix(svg-icons): default height and width in css

Uses the same reference value from the font size of `font icons` to define the default height and width of `svg icons`

* fix(big-play-button): default height and width of svg icon

Uses the same size as the big-play-button font size and centers the svg icon

* fix(volume-control): default height and width of svg icon

Uses the same size as the `volume-level` font size and
centers the svg icon for both horizontal and vertical display

* fix(volume-control): mouse-display overlaps the volume-level svg icon

* fix(play-progress): default height and width of svg icon

Uses the same size as the `play-progress` font size and removes the hover effect

* fix(subtitles-button): default height and width of svg icon

Uses the same size as the `subtitles button` font size
2023-08-17 21:30:23 +02:00
André
42e17b23da
fix(error-display): avoids displaying visual components when an error occurs (#8389)
When an error occurs, only the error screen should be displayed to maintain visual consistency.

- Hides the Title Bar
- Hides the Loading Spinner
- Hides the Captions Settings
- Hides the Text Track Display
2023-08-17 21:25:16 +02:00
Pavel Chuchuva
80ae35b6e3
Fix typo (#8399) 2023-08-15 10:37:09 +02:00
Usman Omar
560b81a6d9
fix(text): caption settings typo 2023-08-14 15:13:02 +01: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
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
mister-ben
c11d213453
fix: Fullscreen styles for older Safari (#8346) 2023-07-06 22:55:29 +02:00
François Beaufort
146008f610
Use pagehide instead of unload for PiP (#8321) 2023-07-04 13:43:09 +02:00
André
b34cb2c207
fix(play-toggle): missing svg play icon (#8337)
Svg play icon is missing when player is initialized with class `vjs-has-started`.

- add `setIcon` to the `play-toggle` component constructor

Fixes #8336
2023-07-04 13:03:33 +02:00
André
e06465f9cb
fix(progress): mouse-time-display overlaps the play-progress svg icon (#8338)
When the mouse hovers over the `play-progress` svg icon,
the `mouse-time-display` bar appears above it.

- adds `z-index` to avoid overlap
2023-07-04 12:27:06 +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é
3dece507bc
fix(text-track-settings): fix text track settings responsiveness when default font size is modified (#8294) 2023-06-06 17:24:00 -04:00
André
f0751777a1
fix(loading-spinner): fix loading spinner responsiveness when default font size is modified (#8295) 2023-06-06 17:22:27 -04:00
Pat O'Neill
9e5dd81057
test: fix Safari test failures (#8300) 2023-06-01 15:28:19 -07: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