1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00
Daniel Neto 2024-12-06 16:37:07 -03:00
parent a8e3c8c7a3
commit 43af632a28
2986 changed files with 50716 additions and 116930 deletions

32
node_modules/video.js/CHANGELOG.md generated vendored
View file

@ -1,3 +1,35 @@
<a name="8.21.0"></a>
# [8.21.0](https://github.com/videojs/video.js/compare/v8.20.0...v8.21.0) (2024-12-05)
### Features
* Add option to disable seeking while scrubbing on mobile ([#8903](https://github.com/videojs/video.js/issues/8903)) ([57d6ab6](https://github.com/videojs/video.js/commit/57d6ab6))
### Bug Fixes
* update vhs version ([#8930](https://github.com/videojs/video.js/issues/8930)) ([f87a699](https://github.com/videojs/video.js/commit/f87a699))
### Chores
* update VHS version ([#8933](https://github.com/videojs/video.js/issues/8933)) ([a7ba9f2](https://github.com/videojs/video.js/commit/a7ba9f2))
<a name="8.20.0"></a>
# [8.20.0](https://github.com/videojs/video.js/compare/v8.19.2...v8.20.0) (2024-11-19)
### Chores
* Correct changelog for 8.19.2 ([#8918](https://github.com/videojs/video.js/issues/8918)) ([964c40e](https://github.com/videojs/video.js/commit/964c40e))
* **package:** Update [@videojs](https://github.com/videojs)/http-streaming to 3.16.0 ([#8921](https://github.com/videojs/video.js/issues/8921)) ([7420467](https://github.com/videojs/video.js/commit/7420467)), closes [1000#0](https://github.com/1000/issues/0)
<a name="8.19.2"></a>
## [8.19.2](https://github.com/videojs/video.js/compare/v8.19.1...v8.19.2) (2024-11-14)
### Bug Fixes
* change http to https in examples ([#8905](https://github.com/videojs/video.js/issues/8905)) ([079cbe1](https://github.com/videojs/video.js/commit/079cbe1))
* Fix Escape handling in menus ([#8916](https://github.com/videojs/video.js/issues/8916)) ([d0cf139](https://github.com/videojs/video.js/commit/d0cf139))
* **text-track-settings:** localization not correctly applied ([#8904](https://github.com/videojs/video.js/issues/8904)) ([ecef37c](https://github.com/videojs/video.js/commit/ecef37c))
<a name="8.19.1"></a>
## [8.19.1](https://github.com/videojs/video.js/compare/v8.19.0...v8.19.1) (2024-10-10)

12
node_modules/video.js/README.md generated vendored
View file

@ -22,8 +22,8 @@ Video.js was started in the middle of 2010 and is now used on over ~~50,000~~ ~~
Thanks to the awesome folks over at [Fastly][fastly], there's a free, CDN hosted version of Video.js that anyone can use. Add these tags to your document's `<head>`:
```html
<link href="//vjs.zencdn.net/8.19.1/video-js.min.css" rel="stylesheet">
<script src="//vjs.zencdn.net/8.19.1/video.min.js"></script>
<link href="//vjs.zencdn.net/8.21.0/video-js.min.css" rel="stylesheet">
<script src="//vjs.zencdn.net/8.21.0/video.min.js"></script>
```
Alternatively, you can include Video.js by getting it from [npm](https://videojs.com/getting-started/#install-via-npm), downloading it from [GitHub releases](https://github.com/videojs/video.js/releases) or by including it via [unpkg](https://unpkg.com) or another JavaScript CDN, like CDNjs.
@ -34,12 +34,12 @@ Alternatively, you can include Video.js by getting it from [npm](https://videojs
<script src="https://unpkg.com/video.js/dist/video.min.js"></script>
<!-- unpkg : use a specific version of Video.js (change the version numbers as necessary) -->
<link href="https://unpkg.com/video.js@8.19.1/dist/video-js.min.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@8.19.1/dist/video.min.js"></script>
<link href="https://unpkg.com/video.js@8.21.0/dist/video-js.min.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@8.21.0/dist/video.min.js"></script>
<!-- cdnjs : use a specific version of Video.js (change the version numbers as necessary) -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/8.19.1/video-js.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/8.19.1/video.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/8.21.0/video-js.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/8.21.0/video.min.js"></script>
```
Next, using Video.js is as simple as creating a `<video>` element, but with an additional `data-setup` attribute. At a minimum, this attribute must have a value of `'{}'`, but it can include any Video.js [options][options] - just make sure it contains valid JSON!

64
node_modules/video.js/core.es.js generated vendored
View file

@ -1,6 +1,6 @@
/**
* @license
* Video.js 8.19.1 <http://videojs.com/>
* Video.js 8.21.0 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
@ -15,7 +15,7 @@ import document$1 from 'global/document';
import XHR from '@videojs/xhr';
import vtt from 'videojs-vtt.js';
var version = "8.19.1";
var version = "8.21.0";
/**
* An Object that contains lifecycle hooks as keys which point to an array
@ -13497,7 +13497,19 @@ class SeekBar extends Slider {
* The key/value store of player options.
*/
constructor(player, options) {
options = merge(SeekBar.prototype.options_, options);
// Avoid mutating the prototype's `children` array by creating a copy
options.children = [...options.children];
const shouldDisableSeekWhileScrubbingOnMobile = player.options_.disableSeekWhileScrubbingOnMobile && (IS_IOS || IS_ANDROID);
// Add the TimeTooltip as a child if we are on desktop, or on mobile with `disableSeekWhileScrubbingOnMobile: true`
if (!IS_IOS && !IS_ANDROID || shouldDisableSeekWhileScrubbingOnMobile) {
options.children.splice(1, 0, 'mouseTimeDisplay');
}
super(player, options);
this.shouldDisableSeekWhileScrubbingOnMobile_ = shouldDisableSeekWhileScrubbingOnMobile;
this.pendingSeekTime_ = null;
this.setEventHandlers_();
}
@ -13653,6 +13665,11 @@ class SeekBar extends Slider {
* The percentage of media played so far (0 to 1).
*/
getPercent() {
// If we have a pending seek time, we are scrubbing on mobile and should set the slider percent
// to reflect the current scrub location.
if (this.pendingSeekTime_) {
return this.pendingSeekTime_ / this.player_.duration();
}
const currentTime = this.getCurrentTime_();
let percent;
const liveTracker = this.player_.liveTracker;
@ -13685,7 +13702,12 @@ class SeekBar extends Slider {
// Stop event propagation to prevent double fire in progress-control.js
event.stopPropagation();
this.videoWasPlaying = !this.player_.paused();
this.player_.pause();
// Don't pause if we are on mobile and `disableSeekWhileScrubbingOnMobile: true`.
// In that case, playback should continue while the player scrubs to a new location.
if (!this.shouldDisableSeekWhileScrubbingOnMobile_) {
this.player_.pause();
}
super.handleMouseDown(event);
}
@ -13743,8 +13765,12 @@ class SeekBar extends Slider {
}
}
// Set new time (tell player to seek to new time)
this.userSeek_(newTime);
// if on mobile and `disableSeekWhileScrubbingOnMobile: true`, keep track of the desired seek point but we won't initiate the seek until 'touchend'
if (this.shouldDisableSeekWhileScrubbingOnMobile_) {
this.pendingSeekTime_ = newTime;
} else {
this.userSeek_(newTime);
}
if (this.player_.options_.enableSmoothSeeking) {
this.update();
}
@ -13783,6 +13809,12 @@ class SeekBar extends Slider {
}
this.player_.scrubbing(false);
// If we have a pending seek time, then we have finished scrubbing on mobile and should initiate a seek.
if (this.pendingSeekTime_) {
this.userSeek_(this.pendingSeekTime_);
this.pendingSeekTime_ = null;
}
/**
* Trigger timeupdate because we're done seeking and the time has changed.
* This is particularly useful for if the player is paused to time the time displays.
@ -13919,11 +13951,6 @@ SeekBar.prototype.options_ = {
children: ['loadProgressBar', 'playProgressBar'],
barName: 'playProgressBar'
};
// MouseTimeDisplay tooltips should not be added to a player on mobile devices
if (!IS_IOS && !IS_ANDROID) {
SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');
}
Component.registerComponent('SeekBar', SeekBar);
/**
@ -14048,7 +14075,7 @@ class ProgressControl extends Component {
return;
}
this.off(['mousedown', 'touchstart'], this.handleMouseDownHandler_);
this.off(this.el_, 'mousemove', this.handleMouseMove);
this.off(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);
this.removeListenersAddedOnMousedownAndTouchstart();
this.addClass('disabled');
this.enabled_ = false;
@ -14072,7 +14099,7 @@ class ProgressControl extends Component {
return;
}
this.on(['mousedown', 'touchstart'], this.handleMouseDownHandler_);
this.on(this.el_, 'mousemove', this.handleMouseMove);
this.on(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);
this.removeClass('disabled');
this.enabled_ = true;
}
@ -15952,7 +15979,7 @@ class MenuButton extends Component {
*/
handleKeyDown(event) {
// Escape or Tab unpress the 'button'
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
@ -15983,7 +16010,7 @@ class MenuButton extends Component {
*/
handleMenuKeyUp(event) {
// Escape hides popup menu
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
this.removeClass('vjs-hover');
}
}
@ -16011,7 +16038,7 @@ class MenuButton extends Component {
*/
handleSubmenuKeyDown(event) {
// Escape or Tab unpress the 'button'
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
@ -17899,7 +17926,7 @@ class TextTrackSelect extends Component {
const option = createEl('option', {
id: optionId,
value: this.localize(optionText[0]),
textContent: optionText[1]
textContent: this.localize(optionText[1])
});
option.setAttribute('aria-labelledby', `${this.selectLabelledbyIds} ${optionId}`);
return option;
@ -17989,7 +18016,7 @@ class TextTrackFieldset extends Component {
const label = createEl('label', {
id,
className: 'vjs-label',
textContent: selectConfig.label
textContent: this.localize(selectConfig.label)
});
label.setAttribute('for', guid);
span.appendChild(label);
@ -26679,7 +26706,8 @@ Player.prototype.options_ = {
horizontalSeek: false
},
// Default smooth seeking to false
enableSmoothSeeking: false
enableSmoothSeeking: false,
disableSeekWhileScrubbingOnMobile: false
};
TECH_EVENTS_RETRIGGER.forEach(function (event) {
Player.prototype[`handleTech${toTitleCase(event)}_`] = function () {

64
node_modules/video.js/core.js generated vendored
View file

@ -1,6 +1,6 @@
/**
* @license
* Video.js 8.19.1 <http://videojs.com/>
* Video.js 8.21.0 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
@ -24,7 +24,7 @@ var document__default = /*#__PURE__*/_interopDefaultLegacy(document$1);
var XHR__default = /*#__PURE__*/_interopDefaultLegacy(XHR);
var vtt__default = /*#__PURE__*/_interopDefaultLegacy(vtt);
var version = "8.19.1";
var version = "8.21.0";
/**
* An Object that contains lifecycle hooks as keys which point to an array
@ -13506,7 +13506,19 @@ class SeekBar extends Slider {
* The key/value store of player options.
*/
constructor(player, options) {
options = merge(SeekBar.prototype.options_, options);
// Avoid mutating the prototype's `children` array by creating a copy
options.children = [...options.children];
const shouldDisableSeekWhileScrubbingOnMobile = player.options_.disableSeekWhileScrubbingOnMobile && (IS_IOS || IS_ANDROID);
// Add the TimeTooltip as a child if we are on desktop, or on mobile with `disableSeekWhileScrubbingOnMobile: true`
if (!IS_IOS && !IS_ANDROID || shouldDisableSeekWhileScrubbingOnMobile) {
options.children.splice(1, 0, 'mouseTimeDisplay');
}
super(player, options);
this.shouldDisableSeekWhileScrubbingOnMobile_ = shouldDisableSeekWhileScrubbingOnMobile;
this.pendingSeekTime_ = null;
this.setEventHandlers_();
}
@ -13662,6 +13674,11 @@ class SeekBar extends Slider {
* The percentage of media played so far (0 to 1).
*/
getPercent() {
// If we have a pending seek time, we are scrubbing on mobile and should set the slider percent
// to reflect the current scrub location.
if (this.pendingSeekTime_) {
return this.pendingSeekTime_ / this.player_.duration();
}
const currentTime = this.getCurrentTime_();
let percent;
const liveTracker = this.player_.liveTracker;
@ -13694,7 +13711,12 @@ class SeekBar extends Slider {
// Stop event propagation to prevent double fire in progress-control.js
event.stopPropagation();
this.videoWasPlaying = !this.player_.paused();
this.player_.pause();
// Don't pause if we are on mobile and `disableSeekWhileScrubbingOnMobile: true`.
// In that case, playback should continue while the player scrubs to a new location.
if (!this.shouldDisableSeekWhileScrubbingOnMobile_) {
this.player_.pause();
}
super.handleMouseDown(event);
}
@ -13752,8 +13774,12 @@ class SeekBar extends Slider {
}
}
// Set new time (tell player to seek to new time)
this.userSeek_(newTime);
// if on mobile and `disableSeekWhileScrubbingOnMobile: true`, keep track of the desired seek point but we won't initiate the seek until 'touchend'
if (this.shouldDisableSeekWhileScrubbingOnMobile_) {
this.pendingSeekTime_ = newTime;
} else {
this.userSeek_(newTime);
}
if (this.player_.options_.enableSmoothSeeking) {
this.update();
}
@ -13792,6 +13818,12 @@ class SeekBar extends Slider {
}
this.player_.scrubbing(false);
// If we have a pending seek time, then we have finished scrubbing on mobile and should initiate a seek.
if (this.pendingSeekTime_) {
this.userSeek_(this.pendingSeekTime_);
this.pendingSeekTime_ = null;
}
/**
* Trigger timeupdate because we're done seeking and the time has changed.
* This is particularly useful for if the player is paused to time the time displays.
@ -13928,11 +13960,6 @@ SeekBar.prototype.options_ = {
children: ['loadProgressBar', 'playProgressBar'],
barName: 'playProgressBar'
};
// MouseTimeDisplay tooltips should not be added to a player on mobile devices
if (!IS_IOS && !IS_ANDROID) {
SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');
}
Component.registerComponent('SeekBar', SeekBar);
/**
@ -14057,7 +14084,7 @@ class ProgressControl extends Component {
return;
}
this.off(['mousedown', 'touchstart'], this.handleMouseDownHandler_);
this.off(this.el_, 'mousemove', this.handleMouseMove);
this.off(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);
this.removeListenersAddedOnMousedownAndTouchstart();
this.addClass('disabled');
this.enabled_ = false;
@ -14081,7 +14108,7 @@ class ProgressControl extends Component {
return;
}
this.on(['mousedown', 'touchstart'], this.handleMouseDownHandler_);
this.on(this.el_, 'mousemove', this.handleMouseMove);
this.on(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);
this.removeClass('disabled');
this.enabled_ = true;
}
@ -15961,7 +15988,7 @@ class MenuButton extends Component {
*/
handleKeyDown(event) {
// Escape or Tab unpress the 'button'
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
@ -15992,7 +16019,7 @@ class MenuButton extends Component {
*/
handleMenuKeyUp(event) {
// Escape hides popup menu
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
this.removeClass('vjs-hover');
}
}
@ -16020,7 +16047,7 @@ class MenuButton extends Component {
*/
handleSubmenuKeyDown(event) {
// Escape or Tab unpress the 'button'
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
@ -17908,7 +17935,7 @@ class TextTrackSelect extends Component {
const option = createEl('option', {
id: optionId,
value: this.localize(optionText[0]),
textContent: optionText[1]
textContent: this.localize(optionText[1])
});
option.setAttribute('aria-labelledby', `${this.selectLabelledbyIds} ${optionId}`);
return option;
@ -17998,7 +18025,7 @@ class TextTrackFieldset extends Component {
const label = createEl('label', {
id,
className: 'vjs-label',
textContent: selectConfig.label
textContent: this.localize(selectConfig.label)
});
label.setAttribute('for', guid);
span.appendChild(label);
@ -26688,7 +26715,8 @@ Player.prototype.options_ = {
horizontalSeek: false
},
// Default smooth seeking to false
enableSmoothSeeking: false
enableSmoothSeeking: false,
disableSeekWhileScrubbingOnMobile: false
};
TECH_EVENTS_RETRIGGER.forEach(function (event) {
Player.prototype[`handleTech${toTitleCase(event)}_`] = function () {

View file

@ -1033,7 +1033,8 @@ body.vjs-pip-window .video-js {
margin: 0 10px;
}
.video-js .vjs-progress-control:hover .vjs-progress-holder {
.video-js .vjs-progress-control:hover .vjs-progress-holder,
.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder {
font-size: 1.6666666667em;
}
@ -1107,7 +1108,8 @@ body.vjs-pip-window .video-js {
}
.video-js .vjs-progress-control:hover .vjs-time-tooltip,
.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip {
.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,
.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip {
display: block;
font-size: 0.6em;
visibility: visible;
@ -1130,6 +1132,10 @@ body.vjs-pip-window .video-js {
display: block;
}
.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display {
display: block;
}
.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display {
visibility: hidden;
opacity: 0;

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
/**
* @license
* Video.js 8.19.1 <http://videojs.com/>
* Video.js 8.21.0 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
@ -16,7 +16,7 @@
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.videojs = factory());
})(this, (function () { 'use strict';
var version = "8.19.1";
var version = "8.21.0";
/**
* An Object that contains lifecycle hooks as keys which point to an array
@ -15813,7 +15813,19 @@
* The key/value store of player options.
*/
constructor(player, options) {
options = merge(SeekBar.prototype.options_, options);
// Avoid mutating the prototype's `children` array by creating a copy
options.children = [...options.children];
const shouldDisableSeekWhileScrubbingOnMobile = player.options_.disableSeekWhileScrubbingOnMobile && (IS_IOS || IS_ANDROID);
// Add the TimeTooltip as a child if we are on desktop, or on mobile with `disableSeekWhileScrubbingOnMobile: true`
if (!IS_IOS && !IS_ANDROID || shouldDisableSeekWhileScrubbingOnMobile) {
options.children.splice(1, 0, 'mouseTimeDisplay');
}
super(player, options);
this.shouldDisableSeekWhileScrubbingOnMobile_ = shouldDisableSeekWhileScrubbingOnMobile;
this.pendingSeekTime_ = null;
this.setEventHandlers_();
}
@ -15969,6 +15981,11 @@
* The percentage of media played so far (0 to 1).
*/
getPercent() {
// If we have a pending seek time, we are scrubbing on mobile and should set the slider percent
// to reflect the current scrub location.
if (this.pendingSeekTime_) {
return this.pendingSeekTime_ / this.player_.duration();
}
const currentTime = this.getCurrentTime_();
let percent;
const liveTracker = this.player_.liveTracker;
@ -16001,7 +16018,12 @@
// Stop event propagation to prevent double fire in progress-control.js
event.stopPropagation();
this.videoWasPlaying = !this.player_.paused();
this.player_.pause();
// Don't pause if we are on mobile and `disableSeekWhileScrubbingOnMobile: true`.
// In that case, playback should continue while the player scrubs to a new location.
if (!this.shouldDisableSeekWhileScrubbingOnMobile_) {
this.player_.pause();
}
super.handleMouseDown(event);
}
@ -16059,8 +16081,12 @@
}
}
// Set new time (tell player to seek to new time)
this.userSeek_(newTime);
// if on mobile and `disableSeekWhileScrubbingOnMobile: true`, keep track of the desired seek point but we won't initiate the seek until 'touchend'
if (this.shouldDisableSeekWhileScrubbingOnMobile_) {
this.pendingSeekTime_ = newTime;
} else {
this.userSeek_(newTime);
}
if (this.player_.options_.enableSmoothSeeking) {
this.update();
}
@ -16099,6 +16125,12 @@
}
this.player_.scrubbing(false);
// If we have a pending seek time, then we have finished scrubbing on mobile and should initiate a seek.
if (this.pendingSeekTime_) {
this.userSeek_(this.pendingSeekTime_);
this.pendingSeekTime_ = null;
}
/**
* Trigger timeupdate because we're done seeking and the time has changed.
* This is particularly useful for if the player is paused to time the time displays.
@ -16235,11 +16267,6 @@
children: ['loadProgressBar', 'playProgressBar'],
barName: 'playProgressBar'
};
// MouseTimeDisplay tooltips should not be added to a player on mobile devices
if (!IS_IOS && !IS_ANDROID) {
SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');
}
Component.registerComponent('SeekBar', SeekBar);
/**
@ -16364,7 +16391,7 @@
return;
}
this.off(['mousedown', 'touchstart'], this.handleMouseDownHandler_);
this.off(this.el_, 'mousemove', this.handleMouseMove);
this.off(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);
this.removeListenersAddedOnMousedownAndTouchstart();
this.addClass('disabled');
this.enabled_ = false;
@ -16388,7 +16415,7 @@
return;
}
this.on(['mousedown', 'touchstart'], this.handleMouseDownHandler_);
this.on(this.el_, 'mousemove', this.handleMouseMove);
this.on(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);
this.removeClass('disabled');
this.enabled_ = true;
}
@ -18268,7 +18295,7 @@
*/
handleKeyDown(event) {
// Escape or Tab unpress the 'button'
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
@ -18299,7 +18326,7 @@
*/
handleMenuKeyUp(event) {
// Escape hides popup menu
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
this.removeClass('vjs-hover');
}
}
@ -18327,7 +18354,7 @@
*/
handleSubmenuKeyDown(event) {
// Escape or Tab unpress the 'button'
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
@ -20215,7 +20242,7 @@
const option = createEl('option', {
id: optionId,
value: this.localize(optionText[0]),
textContent: optionText[1]
textContent: this.localize(optionText[1])
});
option.setAttribute('aria-labelledby', `${this.selectLabelledbyIds} ${optionId}`);
return option;
@ -20305,7 +20332,7 @@
const label = createEl('label', {
id,
className: 'vjs-label',
textContent: selectConfig.label
textContent: this.localize(selectConfig.label)
});
label.setAttribute('for', guid);
span.appendChild(label);
@ -28995,7 +29022,8 @@
horizontalSeek: false
},
// Default smooth seeking to false
enableSmoothSeeking: false
enableSmoothSeeking: false,
disableSeekWhileScrubbingOnMobile: false
};
TECH_EVENTS_RETRIGGER.forEach(function (event) {
Player.prototype[`handleTech${toTitleCase(event)}_`] = function () {

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
/**
* @license
* Video.js 8.19.1 <http://videojs.com/>
* Video.js 8.21.0 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
@ -16,7 +16,7 @@
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.videojs = factory());
})(this, (function () { 'use strict';
var version = "8.19.1";
var version = "8.21.0";
/**
* An Object that contains lifecycle hooks as keys which point to an array
@ -14111,7 +14111,19 @@
* The key/value store of player options.
*/
constructor(player, options) {
options = merge(SeekBar.prototype.options_, options);
// Avoid mutating the prototype's `children` array by creating a copy
options.children = [...options.children];
const shouldDisableSeekWhileScrubbingOnMobile = player.options_.disableSeekWhileScrubbingOnMobile && (IS_IOS || IS_ANDROID);
// Add the TimeTooltip as a child if we are on desktop, or on mobile with `disableSeekWhileScrubbingOnMobile: true`
if (!IS_IOS && !IS_ANDROID || shouldDisableSeekWhileScrubbingOnMobile) {
options.children.splice(1, 0, 'mouseTimeDisplay');
}
super(player, options);
this.shouldDisableSeekWhileScrubbingOnMobile_ = shouldDisableSeekWhileScrubbingOnMobile;
this.pendingSeekTime_ = null;
this.setEventHandlers_();
}
@ -14267,6 +14279,11 @@
* The percentage of media played so far (0 to 1).
*/
getPercent() {
// If we have a pending seek time, we are scrubbing on mobile and should set the slider percent
// to reflect the current scrub location.
if (this.pendingSeekTime_) {
return this.pendingSeekTime_ / this.player_.duration();
}
const currentTime = this.getCurrentTime_();
let percent;
const liveTracker = this.player_.liveTracker;
@ -14299,7 +14316,12 @@
// Stop event propagation to prevent double fire in progress-control.js
event.stopPropagation();
this.videoWasPlaying = !this.player_.paused();
this.player_.pause();
// Don't pause if we are on mobile and `disableSeekWhileScrubbingOnMobile: true`.
// In that case, playback should continue while the player scrubs to a new location.
if (!this.shouldDisableSeekWhileScrubbingOnMobile_) {
this.player_.pause();
}
super.handleMouseDown(event);
}
@ -14357,8 +14379,12 @@
}
}
// Set new time (tell player to seek to new time)
this.userSeek_(newTime);
// if on mobile and `disableSeekWhileScrubbingOnMobile: true`, keep track of the desired seek point but we won't initiate the seek until 'touchend'
if (this.shouldDisableSeekWhileScrubbingOnMobile_) {
this.pendingSeekTime_ = newTime;
} else {
this.userSeek_(newTime);
}
if (this.player_.options_.enableSmoothSeeking) {
this.update();
}
@ -14397,6 +14423,12 @@
}
this.player_.scrubbing(false);
// If we have a pending seek time, then we have finished scrubbing on mobile and should initiate a seek.
if (this.pendingSeekTime_) {
this.userSeek_(this.pendingSeekTime_);
this.pendingSeekTime_ = null;
}
/**
* Trigger timeupdate because we're done seeking and the time has changed.
* This is particularly useful for if the player is paused to time the time displays.
@ -14533,11 +14565,6 @@
children: ['loadProgressBar', 'playProgressBar'],
barName: 'playProgressBar'
};
// MouseTimeDisplay tooltips should not be added to a player on mobile devices
if (!IS_IOS && !IS_ANDROID) {
SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');
}
Component.registerComponent('SeekBar', SeekBar);
/**
@ -14662,7 +14689,7 @@
return;
}
this.off(['mousedown', 'touchstart'], this.handleMouseDownHandler_);
this.off(this.el_, 'mousemove', this.handleMouseMove);
this.off(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);
this.removeListenersAddedOnMousedownAndTouchstart();
this.addClass('disabled');
this.enabled_ = false;
@ -14686,7 +14713,7 @@
return;
}
this.on(['mousedown', 'touchstart'], this.handleMouseDownHandler_);
this.on(this.el_, 'mousemove', this.handleMouseMove);
this.on(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);
this.removeClass('disabled');
this.enabled_ = true;
}
@ -16566,7 +16593,7 @@
*/
handleKeyDown(event) {
// Escape or Tab unpress the 'button'
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
@ -16597,7 +16624,7 @@
*/
handleMenuKeyUp(event) {
// Escape hides popup menu
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
this.removeClass('vjs-hover');
}
}
@ -16625,7 +16652,7 @@
*/
handleSubmenuKeyDown(event) {
// Escape or Tab unpress the 'button'
if (event.key === 'Esc' || event.key === 'Tab') {
if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
@ -18513,7 +18540,7 @@
const option = createEl('option', {
id: optionId,
value: this.localize(optionText[0]),
textContent: optionText[1]
textContent: this.localize(optionText[1])
});
option.setAttribute('aria-labelledby', `${this.selectLabelledbyIds} ${optionId}`);
return option;
@ -18603,7 +18630,7 @@
const label = createEl('label', {
id,
className: 'vjs-label',
textContent: selectConfig.label
textContent: this.localize(selectConfig.label)
});
label.setAttribute('for', guid);
span.appendChild(label);
@ -27293,7 +27320,8 @@
horizontalSeek: false
},
// Default smooth seeking to false
enableSmoothSeeking: false
enableSmoothSeeking: false,
disableSeekWhileScrubbingOnMobile: false
};
TECH_EVENTS_RETRIGGER.forEach(function (event) {
Player.prototype[`handleTech${toTitleCase(event)}_`] = function () {

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -5,8 +5,8 @@
<meta charset="utf-8" />
<title>Video.js Text Descriptions, Chapters &amp; Captions Example</title>
<link href="http://vjs.zencdn.net/7.0/video-js.min.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/7.0/video.min.js"></script>
<link href="https://vjs.zencdn.net/7.0/video-js.min.css" rel="stylesheet">
<script src="https://vjs.zencdn.net/7.0/video.min.js"></script>
</head>
<body>

View file

@ -10,9 +10,9 @@
<body>
<video id="example_video_1" class="video-js" controls preload="none" width="640" height="264" poster="http://vjs.zencdn.net/v/oceans.png" data-setup="{}">
<source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
<source src="http://vjs.zencdn.net/v/oceans.webm" type="video/webm">
<source src="http://vjs.zencdn.net/v/oceans.ogv" type="video/ogg">
<source src="https://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
<source src="https://vjs.zencdn.net/v/oceans.webm" type="video/webm">
<source src="https://vjs.zencdn.net/v/oceans.ogv" type="video/ogg">
<track kind="captions" src="../shared/example-captions.vtt" srclang="en" label="English">
<track kind="subtitles" src="../shared/example-captions.vtt" srclang="en" label="English">
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>

View file

@ -6,6 +6,8 @@ export default SeekBar;
* @extends Slider
*/
declare class SeekBar extends Slider {
shouldDisableSeekWhileScrubbingOnMobile_: boolean;
pendingSeekTime_: any;
/**
* Sets the event handlers
*

View file

@ -1 +1 @@
{"version":3,"file":"seek-bar.d.ts","sourceRoot":"","sources":["../../../../src/js/control-bar/progress-control/seek-bar.js"],"names":[],"mappings":";AAwBA;;;;;GAKG;AACH;IAgBE;;;;OAIG;IACH,0BA0BC;IAoDD;;;;;;;;;;;OAWG;IACH,eARW,KAAK,GAKJ,MAAM,CAkDjB;IA7HC,uBAA0B;IAE1B,yCAA4D;IAC5D,0CAA8D;IAahE,gCAaC;IAED,wBAMC;IAED,+BAWC;IAED;;;;;OAKG;IACH,YAHY,OAAO,CASlB;IAmCK,cAAuB;IAevB,kBAA+B;IAC/B,eAAyB;IAY/B;;;;;;OAMG;IACH,cAHW,MAAM,QAShB;IAED;;;;;;;;OAQG;IACH,wBAIC;IAED;;;;;OAKG;IACH,cAHY,MAAM,CAoBjB;IAkBC,yBAA6C;IAM/C;;;;;;;;OAQG;IACH,uBANW,UAAU,cAEV,OAAO,QA4DjB;IA0DD;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,iBAEC;IAED;;;;;;;OAOG;IACH,oBAJW,aAAa,QAUvB;IA6DD,gBAmBC;CACF;mBAhfkB,wBAAwB"}
{"version":3,"file":"seek-bar.d.ts","sourceRoot":"","sources":["../../../../src/js/control-bar/progress-control/seek-bar.js"],"names":[],"mappings":";AAyBA;;;;;GAKG;AACH;IA0BI,kDAAuF;IACvF,sBAA4B;IAK9B;;;;OAIG;IACH,0BA0BC;IAoDD;;;;;;;;;;;OAWG;IACH,eARW,KAAK,GAKJ,MAAM,CAkDjB;IA7HC,uBAA0B;IAE1B,yCAA4D;IAC5D,0CAA8D;IAahE,gCAaC;IAED,wBAMC;IAED,+BAWC;IAED;;;;;OAKG;IACH,YAHY,OAAO,CASlB;IAmCK,cAAuB;IAevB,kBAA+B;IAC/B,eAAyB;IAY/B;;;;;;OAMG;IACH,cAHW,MAAM,QAShB;IAED;;;;;;;;OAQG;IACH,wBAIC;IAED;;;;;OAKG;IACH,cAHY,MAAM,CA0BjB;IAkBC,yBAA6C;IAW/C;;;;;;;;OAQG;IACH,uBANW,UAAU,cAEV,OAAO,QAgEjB;IAiED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,iBAEC;IAED;;;;;;;OAOG;IACH,oBAJW,aAAa,QAUvB;IA6DD,gBAmBC;CACF;mBAvhBkB,wBAAwB"}

View file

@ -1825,6 +1825,7 @@ declare class Player extends Component {
horizontalSeek: boolean;
};
enableSmoothSeeking: boolean;
disableSeekWhileScrubbingOnMobile: boolean;
};
}
declare namespace Player {

File diff suppressed because one or more lines are too long

View file

@ -1033,7 +1033,8 @@ body.vjs-pip-window .video-js {
margin: 0 10px;
}
.video-js .vjs-progress-control:hover .vjs-progress-holder {
.video-js .vjs-progress-control:hover .vjs-progress-holder,
.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder {
font-size: 1.6666666667em;
}
@ -1107,7 +1108,8 @@ body.vjs-pip-window .video-js {
}
.video-js .vjs-progress-control:hover .vjs-time-tooltip,
.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip {
.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,
.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip {
display: block;
font-size: 0.6em;
visibility: visible;
@ -1130,6 +1132,10 @@ body.vjs-pip-window .video-js {
display: block;
}
.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display {
display: block;
}
.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display {
visibility: hidden;
opacity: 0;

File diff suppressed because one or more lines are too long

2453
node_modules/video.js/dist/video.cjs.js generated vendored

File diff suppressed because it is too large Load diff

2453
node_modules/video.js/dist/video.es.js generated vendored

File diff suppressed because it is too large Load diff

2453
node_modules/video.js/dist/video.js generated vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

4
node_modules/video.js/package.json generated vendored
View file

@ -1,7 +1,7 @@
{
"name": "video.js",
"description": "An HTML5 video player that supports HLS and DASH with a common API and skin.",
"version": "8.19.1",
"version": "8.21.0",
"main": "./dist/video.cjs.js",
"module": "./dist/video.es.js",
"style": "./dist/video-js.css",
@ -86,7 +86,7 @@
},
"dependencies": {
"@babel/runtime": "^7.12.5",
"@videojs/http-streaming": "^3.15.0",
"@videojs/http-streaming": "^3.16.2",
"@videojs/vhs-utils": "^4.1.1",
"@videojs/xhr": "2.7.0",
"aes-decrypter": "^4.0.2",

View file

@ -41,7 +41,8 @@
// This increases the size of the progress holder so there is an increased
// hit area for clicks/touches.
.video-js .vjs-progress-control:hover .vjs-progress-holder {
.video-js .vjs-progress-control:hover .vjs-progress-holder,
.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-progress-holder {
font-size: 1.666666666666666666em;
}
@ -143,7 +144,8 @@
}
.video-js .vjs-progress-control:hover .vjs-time-tooltip,
.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip {
.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,
.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-time-tooltip {
display: block;
// Ensure that we maintain a font-size of ~10px.
@ -172,6 +174,10 @@
display: block;
}
.video-js.vjs-scrubbing.vjs-touch-enabled .vjs-progress-control .vjs-mouse-display {
display: block;
}
.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display {
visibility: hidden;
opacity: 0;