cloudinary-video-player 2.4.1-edge.8 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cld-video-player.css +2 -2
- package/dist/cld-video-player.js +360 -182
- package/dist/cld-video-player.light.css +2 -2
- package/dist/cld-video-player.light.js +159 -57
- package/dist/cld-video-player.light.min.css +1 -1
- package/dist/cld-video-player.light.min.js +1 -1
- package/dist/cld-video-player.light.min.js.LICENSE.txt +1 -1
- package/dist/cld-video-player.min.css +1 -1
- package/dist/cld-video-player.min.js +1 -1
- package/dist/cld-video-player.min.js.LICENSE.txt +1 -1
- package/lib/all.js +1 -1
- package/lib/all.js.LICENSE.txt +1 -1
- package/lib/cld-video-player.js +1 -1
- package/lib/cld-video-player.js.LICENSE.txt +1 -1
- package/lib/cld-video-player.min.css +2 -2
- package/lib/light/cld-video-player.light.min.css +2 -2
- package/lib/light/index.js +1 -1
- package/lib/light/index.js.LICENSE.txt +1 -1
- package/lib/player.js +1 -1
- package/lib/player.js.LICENSE.txt +1 -1
- package/lib/videoPlayer.js +1 -1
- package/lib/videoPlayer.js.LICENSE.txt +1 -1
- package/package.json +5 -5
|
@@ -1418,7 +1418,7 @@ class CloudinaryAnalytics {
|
|
|
1418
1418
|
this.cloudinaryAnalytics.startManualTracking(metadata, {
|
|
1419
1419
|
...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
|
|
1420
1420
|
videoPlayerType: 'cloudinary video player',
|
|
1421
|
-
videoPlayerVersion: "2.4.1
|
|
1421
|
+
videoPlayerVersion: "2.4.1"
|
|
1422
1422
|
});
|
|
1423
1423
|
} else if (this.currentVideMetadata.cloudName !== metadata.cloudName || this.currentVideMetadata.publicId !== metadata.publicId) {
|
|
1424
1424
|
this.cloudinaryAnalytics.stopManualTracking();
|
|
@@ -1791,7 +1791,7 @@ class CloudinaryContext {
|
|
|
1791
1791
|
options.sourceTypes = options.sourceTypes || _this.sourceTypes();
|
|
1792
1792
|
options.poster = options.poster || posterOptionsForCurrent();
|
|
1793
1793
|
options.queryParams = Object.assign(options.queryParams || {}, options.usageReport ? {
|
|
1794
|
-
_s: `vp-${"2.4.1
|
|
1794
|
+
_s: `vp-${"2.4.1"}`
|
|
1795
1795
|
} : {});
|
|
1796
1796
|
if (options.sourceTypes.indexOf('audio') > -1) {
|
|
1797
1797
|
builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
|
|
@@ -3058,7 +3058,7 @@ const contextMenuContent = player => {
|
|
|
3058
3058
|
const isFullscreen = player.isFullscreen();
|
|
3059
3059
|
const aboutMenuItem = {
|
|
3060
3060
|
class: 'player-version',
|
|
3061
|
-
label: 'Cloudinary Player v' + "2.4.1
|
|
3061
|
+
label: 'Cloudinary Player v' + "2.4.1"
|
|
3062
3062
|
};
|
|
3063
3063
|
if (!player.controls()) {
|
|
3064
3064
|
return [aboutMenuItem];
|
|
@@ -5553,7 +5553,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5553
5553
|
const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
|
|
5554
5554
|
const analyticsParams = new URLSearchParams(analyticsData).toString();
|
|
5555
5555
|
const baseParams = new URLSearchParams({
|
|
5556
|
-
vpVersion: "2.4.1
|
|
5556
|
+
vpVersion: "2.4.1",
|
|
5557
5557
|
vpInstanceId: this.getVPInstanceId(),
|
|
5558
5558
|
// #if (process.env.WEBPACK_BUILD_LIGHT)
|
|
5559
5559
|
vpLightBuild: true,
|
|
@@ -13217,7 +13217,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13217
13217
|
|
|
13218
13218
|
/**
|
|
13219
13219
|
* @license
|
|
13220
|
-
* Video.js 8.
|
|
13220
|
+
* Video.js 8.23.3 <http://videojs.com/>
|
|
13221
13221
|
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
|
|
13222
13222
|
* Available under Apache License Version 2.0
|
|
13223
13223
|
* <https://github.com/videojs/video.js/blob/main/LICENSE>
|
|
@@ -13232,7 +13232,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13232
13232
|
0;
|
|
13233
13233
|
})(this, (function () { 'use strict';
|
|
13234
13234
|
|
|
13235
|
-
var version = "8.
|
|
13235
|
+
var version = "8.23.3";
|
|
13236
13236
|
|
|
13237
13237
|
/**
|
|
13238
13238
|
* An Object that contains lifecycle hooks as keys which point to an array
|
|
@@ -18583,10 +18583,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18583
18583
|
|
|
18584
18584
|
// If we have players that were disposed, then their name will still be
|
|
18585
18585
|
// in Players.players. So, we must loop through and verify that the value
|
|
18586
|
-
// for each item is
|
|
18586
|
+
// for each item is null. This allows registration of the Player component
|
|
18587
18587
|
// after all players have been disposed or before any were created.
|
|
18588
|
-
if (players && playerNames.length > 0
|
|
18589
|
-
|
|
18588
|
+
if (players && playerNames.length > 0) {
|
|
18589
|
+
for (let i = 0; i < playerNames.length; i++) {
|
|
18590
|
+
if (players[playerNames[i]] !== null) {
|
|
18591
|
+
throw new Error('Can not register Player component after player has been created.');
|
|
18592
|
+
}
|
|
18593
|
+
}
|
|
18590
18594
|
}
|
|
18591
18595
|
}
|
|
18592
18596
|
Component.components_[name] = ComponentToRegister;
|
|
@@ -19165,7 +19169,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19165
19169
|
* A serializable javascript representation of the TextTrack.
|
|
19166
19170
|
* @private
|
|
19167
19171
|
*/
|
|
19168
|
-
const
|
|
19172
|
+
const trackToJson = function (track) {
|
|
19169
19173
|
const ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce((acc, prop, i) => {
|
|
19170
19174
|
if (track[prop]) {
|
|
19171
19175
|
acc[prop] = track[prop];
|
|
@@ -19200,7 +19204,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19200
19204
|
const trackEls = tech.$$('track');
|
|
19201
19205
|
const trackObjs = Array.prototype.map.call(trackEls, t => t.track);
|
|
19202
19206
|
const tracks = Array.prototype.map.call(trackEls, function (trackEl) {
|
|
19203
|
-
const json =
|
|
19207
|
+
const json = trackToJson(trackEl.track);
|
|
19204
19208
|
if (trackEl.src) {
|
|
19205
19209
|
json.src = trackEl.src;
|
|
19206
19210
|
}
|
|
@@ -19208,7 +19212,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19208
19212
|
});
|
|
19209
19213
|
return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) {
|
|
19210
19214
|
return trackObjs.indexOf(track) === -1;
|
|
19211
|
-
}).map(
|
|
19215
|
+
}).map(trackToJson));
|
|
19212
19216
|
};
|
|
19213
19217
|
|
|
19214
19218
|
/**
|
|
@@ -19234,7 +19238,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19234
19238
|
var textTrackConverter = {
|
|
19235
19239
|
textTracksToJson,
|
|
19236
19240
|
jsonToTextTracks,
|
|
19237
|
-
|
|
19241
|
+
trackToJson
|
|
19238
19242
|
};
|
|
19239
19243
|
|
|
19240
19244
|
/**
|
|
@@ -20198,6 +20202,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20198
20202
|
}
|
|
20199
20203
|
}
|
|
20200
20204
|
}
|
|
20205
|
+
|
|
20206
|
+
/**
|
|
20207
|
+
* Creates a serializable array of objects that contains serialized copies
|
|
20208
|
+
* of each text track.
|
|
20209
|
+
*
|
|
20210
|
+
* @return {Object[]} A serializable list of objects for the text track list
|
|
20211
|
+
*/
|
|
20212
|
+
toJSON() {
|
|
20213
|
+
return this.tracks_.map(track => track.toJSON());
|
|
20214
|
+
}
|
|
20201
20215
|
}
|
|
20202
20216
|
|
|
20203
20217
|
/**
|
|
@@ -20631,11 +20645,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20631
20645
|
*/
|
|
20632
20646
|
const getFileExtension = function (path) {
|
|
20633
20647
|
if (typeof path === 'string') {
|
|
20634
|
-
const
|
|
20635
|
-
const
|
|
20636
|
-
|
|
20637
|
-
return pathParts.pop().toLowerCase();
|
|
20638
|
-
}
|
|
20648
|
+
const cleanPath = path.split('?')[0].replace(/\/+$/, '');
|
|
20649
|
+
const match = cleanPath.match(/\.([^.\/]+)$/);
|
|
20650
|
+
return match ? match[1].toLowerCase() : '';
|
|
20639
20651
|
}
|
|
20640
20652
|
return '';
|
|
20641
20653
|
};
|
|
@@ -21637,6 +21649,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21637
21649
|
this.cues.setCues_(this.cues_);
|
|
21638
21650
|
}
|
|
21639
21651
|
|
|
21652
|
+
/**
|
|
21653
|
+
* Creates a copy of the text track and makes it serializable
|
|
21654
|
+
* by removing circular dependencies.
|
|
21655
|
+
*
|
|
21656
|
+
* @return {Object} The track information as a serializable object
|
|
21657
|
+
*/
|
|
21658
|
+
toJSON() {
|
|
21659
|
+
return textTrackConverter.trackToJson(this);
|
|
21660
|
+
}
|
|
21661
|
+
|
|
21640
21662
|
/**
|
|
21641
21663
|
* Remove a cue from our internal list
|
|
21642
21664
|
*
|
|
@@ -25561,7 +25583,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25561
25583
|
/** @import Player from './player' */
|
|
25562
25584
|
|
|
25563
25585
|
// The number of seconds the `step*` functions move the timeline.
|
|
25564
|
-
const STEP_SECONDS
|
|
25586
|
+
const STEP_SECONDS = 5;
|
|
25565
25587
|
|
|
25566
25588
|
/**
|
|
25567
25589
|
* Spatial Navigation in Video.js enhances user experience and accessibility on smartTV devices,
|
|
@@ -25695,10 +25717,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25695
25717
|
}
|
|
25696
25718
|
break;
|
|
25697
25719
|
case 'ff':
|
|
25698
|
-
this.userSeek_(this.player_.currentTime() + STEP_SECONDS
|
|
25720
|
+
this.userSeek_(this.player_.currentTime() + STEP_SECONDS);
|
|
25699
25721
|
break;
|
|
25700
25722
|
case 'rw':
|
|
25701
|
-
this.userSeek_(this.player_.currentTime() - STEP_SECONDS
|
|
25723
|
+
this.userSeek_(this.player_.currentTime() - STEP_SECONDS);
|
|
25702
25724
|
break;
|
|
25703
25725
|
}
|
|
25704
25726
|
}
|
|
@@ -26755,6 +26777,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26755
26777
|
this.updateDisplay(e);
|
|
26756
26778
|
};
|
|
26757
26779
|
player.on('loadstart', e => this.toggleDisplay(e));
|
|
26780
|
+
player.on('useractive', updateDisplayTextHandler);
|
|
26781
|
+
player.on('userinactive', updateDisplayTextHandler);
|
|
26758
26782
|
player.on('texttrackchange', updateDisplayTextHandler);
|
|
26759
26783
|
player.on('loadedmetadata', e => {
|
|
26760
26784
|
this.updateDisplayOverlay();
|
|
@@ -26883,11 +26907,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26883
26907
|
}
|
|
26884
26908
|
|
|
26885
26909
|
/**
|
|
26886
|
-
* Update the displayed TextTrack when
|
|
26887
|
-
* a {@link Player#fullscreenchange}
|
|
26910
|
+
* Update the displayed {@link TextTrack} when either a {@link Player#texttrackchange},
|
|
26911
|
+
* a {@link Player#fullscreenchange}, a {@link Player#useractive}, or a
|
|
26912
|
+
* {@link Player#userinactive} is fired.
|
|
26888
26913
|
*
|
|
26889
26914
|
* @listens Player#texttrackchange
|
|
26890
26915
|
* @listens Player#fullscreenchange
|
|
26916
|
+
* @listens Player#useractive
|
|
26917
|
+
* @listens Player#userinactive
|
|
26891
26918
|
*/
|
|
26892
26919
|
updateDisplay() {
|
|
26893
26920
|
const tracks = this.player_.textTracks();
|
|
@@ -27309,8 +27336,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27309
27336
|
handleClick(event) {
|
|
27310
27337
|
const playPromise = this.player_.play();
|
|
27311
27338
|
|
|
27312
|
-
// exit early if clicked via the mouse
|
|
27313
|
-
if (this.mouseused_ && 'clientX' in event && 'clientY' in event) {
|
|
27339
|
+
// exit early if tapped or clicked via the mouse
|
|
27340
|
+
if (event.type === 'tap' || this.mouseused_ && 'clientX' in event && 'clientY' in event) {
|
|
27314
27341
|
silencePromise(playPromise);
|
|
27315
27342
|
if (this.player_.tech(true)) {
|
|
27316
27343
|
this.player_.tech(true).focus();
|
|
@@ -27775,6 +27802,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27775
27802
|
let time;
|
|
27776
27803
|
if (this.player_.ended()) {
|
|
27777
27804
|
time = this.player_.duration();
|
|
27805
|
+
} else if (event && event.target && typeof event.target.pendingSeekTime === 'function') {
|
|
27806
|
+
time = event.target.pendingSeekTime();
|
|
27778
27807
|
} else {
|
|
27779
27808
|
time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();
|
|
27780
27809
|
}
|
|
@@ -28521,6 +28550,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28521
28550
|
event.stopPropagation();
|
|
28522
28551
|
this.stepForward();
|
|
28523
28552
|
} else {
|
|
28553
|
+
if (this.pendingSeekTime()) {
|
|
28554
|
+
this.pendingSeekTime(null);
|
|
28555
|
+
this.userSeek_(this.player_.currentTime());
|
|
28556
|
+
}
|
|
28524
28557
|
super.handleKeyDown(event);
|
|
28525
28558
|
}
|
|
28526
28559
|
|
|
@@ -28906,13 +28939,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28906
28939
|
* @param {number} seekBarPoint
|
|
28907
28940
|
* A number from 0 to 1, representing a horizontal reference point
|
|
28908
28941
|
* from the left edge of the {@link SeekBar}
|
|
28942
|
+
*
|
|
28943
|
+
* @param {Event} [event]
|
|
28944
|
+
* The `timeupdate` event that caused this function to run.
|
|
28909
28945
|
*/
|
|
28910
|
-
update(seekBarRect, seekBarPoint) {
|
|
28946
|
+
update(seekBarRect, seekBarPoint, event) {
|
|
28911
28947
|
const timeTooltip = this.getChild('timeTooltip');
|
|
28912
28948
|
if (!timeTooltip) {
|
|
28913
28949
|
return;
|
|
28914
28950
|
}
|
|
28915
|
-
|
|
28951
|
+
|
|
28952
|
+
// Combined logic: if an event with a valid pendingSeekTime getter exists, use it.
|
|
28953
|
+
const time = event && event.target && typeof event.target.pendingSeekTime === 'function' ? event.target.pendingSeekTime() : this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();
|
|
28916
28954
|
timeTooltip.updateTime(seekBarRect, seekBarPoint, time);
|
|
28917
28955
|
}
|
|
28918
28956
|
}
|
|
@@ -29006,12 +29044,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29006
29044
|
* @file seek-bar.js
|
|
29007
29045
|
*/
|
|
29008
29046
|
|
|
29009
|
-
// The number of seconds the `step*` functions move the timeline.
|
|
29010
|
-
const STEP_SECONDS = 5;
|
|
29011
|
-
|
|
29012
|
-
// The multiplier of STEP_SECONDS that PgUp/PgDown move the timeline.
|
|
29013
|
-
const PAGE_KEY_MULTIPLIER = 12;
|
|
29014
|
-
|
|
29015
29047
|
/**
|
|
29016
29048
|
* Seek bar and container for the progress bars. Uses {@link PlayProgressBar}
|
|
29017
29049
|
* as its `bar`.
|
|
@@ -29027,20 +29059,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29027
29059
|
*
|
|
29028
29060
|
* @param {Object} [options]
|
|
29029
29061
|
* The key/value store of player options.
|
|
29062
|
+
* @param {number} [options.stepSeconds=5]
|
|
29063
|
+
* The number of seconds to increment on keyboard control
|
|
29064
|
+
* @param {number} [options.pageMultiplier=12]
|
|
29065
|
+
* The multiplier of stepSeconds that PgUp/PgDown move the timeline.
|
|
29030
29066
|
*/
|
|
29031
29067
|
constructor(player, options) {
|
|
29032
29068
|
options = merge(SeekBar.prototype.options_, options);
|
|
29033
29069
|
|
|
29034
29070
|
// Avoid mutating the prototype's `children` array by creating a copy
|
|
29035
29071
|
options.children = [...options.children];
|
|
29036
|
-
const
|
|
29072
|
+
const shouldDisableSeekWhileScrubbing = player.options_.disableSeekWhileScrubbingOnMobile && (IS_IOS || IS_ANDROID) || player.options_.disableSeekWhileScrubbingOnSTV;
|
|
29037
29073
|
|
|
29038
29074
|
// Add the TimeTooltip as a child if we are on desktop, or on mobile with `disableSeekWhileScrubbingOnMobile: true`
|
|
29039
|
-
if (!IS_IOS && !IS_ANDROID ||
|
|
29075
|
+
if (!IS_IOS && !IS_ANDROID || shouldDisableSeekWhileScrubbing) {
|
|
29040
29076
|
options.children.splice(1, 0, 'mouseTimeDisplay');
|
|
29041
29077
|
}
|
|
29042
29078
|
super(player, options);
|
|
29043
|
-
this.
|
|
29079
|
+
this.shouldDisableSeekWhileScrubbing_ = shouldDisableSeekWhileScrubbing;
|
|
29044
29080
|
this.pendingSeekTime_ = null;
|
|
29045
29081
|
this.setEventHandlers_();
|
|
29046
29082
|
}
|
|
@@ -29157,7 +29193,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29157
29193
|
|
|
29158
29194
|
// update the progress bar time tooltip with the current time
|
|
29159
29195
|
if (this.bar) {
|
|
29160
|
-
this.bar.update(getBoundingClientRect(this.el()), this.getProgress());
|
|
29196
|
+
this.bar.update(getBoundingClientRect(this.el()), this.getProgress(), event);
|
|
29161
29197
|
}
|
|
29162
29198
|
});
|
|
29163
29199
|
return percent;
|
|
@@ -29190,6 +29226,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29190
29226
|
return this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();
|
|
29191
29227
|
}
|
|
29192
29228
|
|
|
29229
|
+
/**
|
|
29230
|
+
* Getter and setter for pendingSeekTime.
|
|
29231
|
+
* Ensures the value is clamped between 0 and duration.
|
|
29232
|
+
*
|
|
29233
|
+
* @param {number|null} [time] - Optional. The new pending seek time, can be a number or null.
|
|
29234
|
+
* @return {number|null} - The current pending seek time.
|
|
29235
|
+
*/
|
|
29236
|
+
pendingSeekTime(time) {
|
|
29237
|
+
if (time !== undefined) {
|
|
29238
|
+
if (time !== null) {
|
|
29239
|
+
const duration = this.player_.duration();
|
|
29240
|
+
this.pendingSeekTime_ = Math.max(0, Math.min(time, duration));
|
|
29241
|
+
} else {
|
|
29242
|
+
this.pendingSeekTime_ = null;
|
|
29243
|
+
}
|
|
29244
|
+
}
|
|
29245
|
+
return this.pendingSeekTime_;
|
|
29246
|
+
}
|
|
29247
|
+
|
|
29193
29248
|
/**
|
|
29194
29249
|
* Get the percentage of media played so far.
|
|
29195
29250
|
*
|
|
@@ -29199,8 +29254,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29199
29254
|
getPercent() {
|
|
29200
29255
|
// If we have a pending seek time, we are scrubbing on mobile and should set the slider percent
|
|
29201
29256
|
// to reflect the current scrub location.
|
|
29202
|
-
if (this.
|
|
29203
|
-
return this.
|
|
29257
|
+
if (this.pendingSeekTime() !== null) {
|
|
29258
|
+
return this.pendingSeekTime() / this.player_.duration();
|
|
29204
29259
|
}
|
|
29205
29260
|
const currentTime = this.getCurrentTime_();
|
|
29206
29261
|
let percent;
|
|
@@ -29237,7 +29292,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29237
29292
|
|
|
29238
29293
|
// Don't pause if we are on mobile and `disableSeekWhileScrubbingOnMobile: true`.
|
|
29239
29294
|
// In that case, playback should continue while the player scrubs to a new location.
|
|
29240
|
-
if (!this.
|
|
29295
|
+
if (!this.shouldDisableSeekWhileScrubbing_) {
|
|
29241
29296
|
this.player_.pause();
|
|
29242
29297
|
}
|
|
29243
29298
|
super.handleMouseDown(event);
|
|
@@ -29298,8 +29353,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29298
29353
|
}
|
|
29299
29354
|
|
|
29300
29355
|
// if on mobile and `disableSeekWhileScrubbingOnMobile: true`, keep track of the desired seek point but we won't initiate the seek until 'touchend'
|
|
29301
|
-
if (this.
|
|
29302
|
-
this.
|
|
29356
|
+
if (this.shouldDisableSeekWhileScrubbing_) {
|
|
29357
|
+
this.pendingSeekTime(newTime);
|
|
29303
29358
|
} else {
|
|
29304
29359
|
this.userSeek_(newTime);
|
|
29305
29360
|
}
|
|
@@ -29342,9 +29397,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29342
29397
|
this.player_.scrubbing(false);
|
|
29343
29398
|
|
|
29344
29399
|
// If we have a pending seek time, then we have finished scrubbing on mobile and should initiate a seek.
|
|
29345
|
-
if (this.
|
|
29346
|
-
this.userSeek_(this.
|
|
29347
|
-
this.
|
|
29400
|
+
if (this.pendingSeekTime() !== null) {
|
|
29401
|
+
this.userSeek_(this.pendingSeekTime());
|
|
29402
|
+
this.pendingSeekTime(null);
|
|
29348
29403
|
}
|
|
29349
29404
|
|
|
29350
29405
|
/**
|
|
@@ -29368,18 +29423,46 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29368
29423
|
}
|
|
29369
29424
|
}
|
|
29370
29425
|
|
|
29426
|
+
/**
|
|
29427
|
+
* Handles pending seek time when `disableSeekWhileScrubbingOnSTV` is enabled.
|
|
29428
|
+
*
|
|
29429
|
+
* @param {number} stepAmount - The number of seconds to step (positive for forward, negative for backward).
|
|
29430
|
+
*/
|
|
29431
|
+
handlePendingSeek_(stepAmount) {
|
|
29432
|
+
if (!this.player_.paused()) {
|
|
29433
|
+
this.player_.pause();
|
|
29434
|
+
}
|
|
29435
|
+
const currentPos = this.pendingSeekTime() !== null ? this.pendingSeekTime() : this.player_.currentTime();
|
|
29436
|
+
this.pendingSeekTime(currentPos + stepAmount);
|
|
29437
|
+
this.player_.trigger({
|
|
29438
|
+
type: 'timeupdate',
|
|
29439
|
+
target: this,
|
|
29440
|
+
manuallyTriggered: true
|
|
29441
|
+
});
|
|
29442
|
+
}
|
|
29443
|
+
|
|
29371
29444
|
/**
|
|
29372
29445
|
* Move more quickly fast forward for keyboard-only users
|
|
29373
29446
|
*/
|
|
29374
29447
|
stepForward() {
|
|
29375
|
-
|
|
29448
|
+
// if `disableSeekWhileScrubbingOnSTV: true`, keep track of the desired seek point but we won't initiate the seek
|
|
29449
|
+
if (this.shouldDisableSeekWhileScrubbing_) {
|
|
29450
|
+
this.handlePendingSeek_(this.options().stepSeconds);
|
|
29451
|
+
} else {
|
|
29452
|
+
this.userSeek_(this.player_.currentTime() + this.options().stepSeconds);
|
|
29453
|
+
}
|
|
29376
29454
|
}
|
|
29377
29455
|
|
|
29378
29456
|
/**
|
|
29379
29457
|
* Move more quickly rewind for keyboard-only users
|
|
29380
29458
|
*/
|
|
29381
29459
|
stepBack() {
|
|
29382
|
-
|
|
29460
|
+
// if `disableSeekWhileScrubbingOnSTV: true`, keep track of the desired seek point but we won't initiate the seek
|
|
29461
|
+
if (this.shouldDisableSeekWhileScrubbing_) {
|
|
29462
|
+
this.handlePendingSeek_(-this.options().stepSeconds);
|
|
29463
|
+
} else {
|
|
29464
|
+
this.userSeek_(this.player_.currentTime() - this.options().stepSeconds);
|
|
29465
|
+
}
|
|
29383
29466
|
}
|
|
29384
29467
|
|
|
29385
29468
|
/**
|
|
@@ -29391,6 +29474,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29391
29474
|
*
|
|
29392
29475
|
*/
|
|
29393
29476
|
handleAction(event) {
|
|
29477
|
+
if (this.pendingSeekTime() !== null) {
|
|
29478
|
+
this.userSeek_(this.pendingSeekTime());
|
|
29479
|
+
this.pendingSeekTime(null);
|
|
29480
|
+
}
|
|
29394
29481
|
if (this.player_.paused()) {
|
|
29395
29482
|
this.player_.play();
|
|
29396
29483
|
} else {
|
|
@@ -29444,11 +29531,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29444
29531
|
} else if (event.key === 'PageDown') {
|
|
29445
29532
|
event.preventDefault();
|
|
29446
29533
|
event.stopPropagation();
|
|
29447
|
-
this.userSeek_(this.player_.currentTime() -
|
|
29534
|
+
this.userSeek_(this.player_.currentTime() - this.options().stepSeconds * this.options().pageMultiplier);
|
|
29448
29535
|
} else if (event.key === 'PageUp') {
|
|
29449
29536
|
event.preventDefault();
|
|
29450
29537
|
event.stopPropagation();
|
|
29451
|
-
this.userSeek_(this.player_.currentTime() +
|
|
29538
|
+
this.userSeek_(this.player_.currentTime() + this.options().stepSeconds * this.options().pageMultiplier);
|
|
29452
29539
|
} else {
|
|
29453
29540
|
// Pass keydown handling up for unsupported keys
|
|
29454
29541
|
super.handleKeyDown(event);
|
|
@@ -29481,7 +29568,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29481
29568
|
*/
|
|
29482
29569
|
SeekBar.prototype.options_ = {
|
|
29483
29570
|
children: ['loadProgressBar', 'playProgressBar'],
|
|
29484
|
-
barName: 'playProgressBar'
|
|
29571
|
+
barName: 'playProgressBar',
|
|
29572
|
+
stepSeconds: 5,
|
|
29573
|
+
pageMultiplier: 12
|
|
29485
29574
|
};
|
|
29486
29575
|
Component.registerComponent('SeekBar', SeekBar);
|
|
29487
29576
|
|
|
@@ -33768,22 +33857,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
33768
33857
|
super(player, options);
|
|
33769
33858
|
|
|
33770
33859
|
// Create DOM elements
|
|
33771
|
-
const defaultsDescription = this.localize('restore all settings to the default values');
|
|
33772
33860
|
const resetButton = new Button(player, {
|
|
33773
|
-
controlText:
|
|
33861
|
+
controlText: this.localize('restore all settings to the default values'),
|
|
33774
33862
|
className: 'vjs-default-button'
|
|
33775
33863
|
});
|
|
33776
33864
|
resetButton.el().classList.remove('vjs-control', 'vjs-button');
|
|
33777
33865
|
resetButton.el().textContent = this.localize('Reset');
|
|
33778
33866
|
this.addChild(resetButton);
|
|
33867
|
+
const doneText = this.localize('Done');
|
|
33779
33868
|
const doneButton = new Button(player, {
|
|
33780
|
-
controlText:
|
|
33869
|
+
controlText: doneText,
|
|
33781
33870
|
className: 'vjs-done-button'
|
|
33782
33871
|
});
|
|
33783
33872
|
|
|
33784
33873
|
// Remove unrequired style classes
|
|
33785
33874
|
doneButton.el().classList.remove('vjs-control', 'vjs-button');
|
|
33786
|
-
doneButton.el().textContent =
|
|
33875
|
+
doneButton.el().textContent = doneText;
|
|
33787
33876
|
this.addChild(doneButton);
|
|
33788
33877
|
}
|
|
33789
33878
|
|
|
@@ -37121,8 +37210,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
37121
37210
|
* @file player.js
|
|
37122
37211
|
*/
|
|
37123
37212
|
|
|
37124
|
-
/** @import
|
|
37213
|
+
/** @import AudioTrackList from './tracks/audio-track-list' */
|
|
37125
37214
|
/** @import HtmlTrackElement from './tracks/html-track-element' */
|
|
37215
|
+
/** @import HtmlTrackElementList from './tracks/html-track-element-list' */
|
|
37216
|
+
/** @import TextTrackList from './tracks/text-track-list' */
|
|
37217
|
+
/** @import { TimeRange } from './utils/time' */
|
|
37218
|
+
/** @import VideoTrackList from './tracks/video-track-list' */
|
|
37126
37219
|
|
|
37127
37220
|
/**
|
|
37128
37221
|
* @callback PlayerReadyCallback
|
|
@@ -42112,6 +42205,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42112
42205
|
*
|
|
42113
42206
|
* @method Player.prototype.videoTracks
|
|
42114
42207
|
*/
|
|
42208
|
+
Player.prototype.videoTracks = () => {};
|
|
42115
42209
|
|
|
42116
42210
|
/**
|
|
42117
42211
|
* Get the {@link AudioTrackList}
|
|
@@ -42123,6 +42217,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42123
42217
|
*
|
|
42124
42218
|
* @method Player.prototype.audioTracks
|
|
42125
42219
|
*/
|
|
42220
|
+
Player.prototype.audioTracks = () => {};
|
|
42126
42221
|
|
|
42127
42222
|
/**
|
|
42128
42223
|
* Get the {@link TextTrackList}
|
|
@@ -42134,6 +42229,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42134
42229
|
*
|
|
42135
42230
|
* @method Player.prototype.textTracks
|
|
42136
42231
|
*/
|
|
42232
|
+
Player.prototype.textTracks = () => {};
|
|
42137
42233
|
|
|
42138
42234
|
/**
|
|
42139
42235
|
* Get the remote {@link TextTrackList}
|
|
@@ -42143,6 +42239,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42143
42239
|
*
|
|
42144
42240
|
* @method Player.prototype.remoteTextTracks
|
|
42145
42241
|
*/
|
|
42242
|
+
Player.prototype.remoteTextTracks = () => {};
|
|
42146
42243
|
|
|
42147
42244
|
/**
|
|
42148
42245
|
* Get the remote {@link HtmlTrackElementList} tracks.
|
|
@@ -42152,7 +42249,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42152
42249
|
*
|
|
42153
42250
|
* @method Player.prototype.remoteTextTrackEls
|
|
42154
42251
|
*/
|
|
42155
|
-
|
|
42252
|
+
Player.prototype.remoteTextTrackEls = () => {};
|
|
42156
42253
|
ALL.names.forEach(function (name) {
|
|
42157
42254
|
const props = ALL[name];
|
|
42158
42255
|
Player.prototype[props.getterName] = function () {
|
|
@@ -42239,7 +42336,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42239
42336
|
},
|
|
42240
42337
|
// Default smooth seeking to false
|
|
42241
42338
|
enableSmoothSeeking: false,
|
|
42242
|
-
disableSeekWhileScrubbingOnMobile: false
|
|
42339
|
+
disableSeekWhileScrubbingOnMobile: false,
|
|
42340
|
+
disableSeekWhileScrubbingOnSTV: false
|
|
42243
42341
|
};
|
|
42244
42342
|
TECH_EVENTS_RETRIGGER.forEach(function (event) {
|
|
42245
42343
|
Player.prototype[`handleTech${toTitleCase(event)}_`] = function () {
|
|
@@ -43331,9 +43429,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
43331
43429
|
* @see https://github.com/Raynos/xhr
|
|
43332
43430
|
*/
|
|
43333
43431
|
videojs.xhr = lib;
|
|
43432
|
+
videojs.TrackList = TrackList;
|
|
43334
43433
|
videojs.TextTrack = TextTrack;
|
|
43434
|
+
videojs.TextTrackList = TextTrackList;
|
|
43335
43435
|
videojs.AudioTrack = AudioTrack;
|
|
43436
|
+
videojs.AudioTrackList = AudioTrackList;
|
|
43336
43437
|
videojs.VideoTrack = VideoTrack;
|
|
43438
|
+
videojs.VideoTrackList = VideoTrackList;
|
|
43337
43439
|
['isEl', 'isTextNode', 'createEl', 'hasClass', 'addClass', 'removeClass', 'toggleClass', 'setAttributes', 'getAttributes', 'emptyEl', 'appendContent', 'insertContent'].forEach(k => {
|
|
43338
43440
|
videojs[k] = function () {
|
|
43339
43441
|
log.warn(`videojs.${k}() is deprecated; use videojs.dom.${k}() instead`);
|