1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-23 02:04:34 +02:00
video.js/test
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
..
api refactor: remove internal Map, Set, and WeakMap shams, assume window.performance and requestAnimationFrame support (#7775) 2022-11-23 09:49:24 -05:00
require feat: built-in HLS playback support (#5057) 2018-03-30 14:01:16 -04:00
unit feat: Seek bar smooth seeking (#8287) 2024-01-02 13:11:55 -05:00
karma.conf.js fix: Replace Object.values with ponyfill (#8267) 2023-05-11 18:57:13 -04:00
sinon.js fix: properly return promise from requestFullscreen and exitFullscreen (#7299) 2021-07-06 14:56:02 -04:00