cloudinary-video-player 4.1.0 → 4.1.1-edge.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/309.min.js +2 -2
- package/dist/526.min.js +6 -0
- package/dist/689.min.js +2 -2
- package/dist/801.min.js +3 -3
- package/dist/adaptive-streaming.js +2 -2
- package/dist/adaptive-streaming.min.js +2 -2
- package/dist/chapters.js +2 -2
- package/dist/chapters.min.js +2 -2
- package/dist/cld-player-core.js +11 -22
- package/dist/cld-player-core.min.js +3 -3
- package/dist/cld-poster-url.js +2 -2
- package/dist/cld-poster-url.min.js +2 -2
- package/dist/cld-video-player.css +2 -154
- package/dist/cld-video-player.js +11 -22
- package/dist/cld-video-player.light.js +11 -22
- package/dist/cld-video-player.light.min.js +3 -3
- package/dist/cld-video-player.min.css +3 -3
- package/dist/cld-video-player.min.js +3 -3
- package/dist/colors.js +2 -2
- package/dist/colors.min.js +2 -2
- package/dist/dash.js +2 -2
- package/dist/dash.min.js +2 -2
- package/dist/debug.js +3 -3
- package/dist/debug.min.js +3 -3
- package/dist/ima.js +2 -2
- package/dist/ima.min.js +2 -2
- package/dist/interaction-areas.js +2 -2
- package/dist/interaction-areas.min.js +2 -2
- package/dist/node_modules_lodash_throttle_js.js +2 -2
- package/dist/player-full.js +11 -22
- package/dist/player-full.min.js +3 -3
- package/dist/player.css +2 -154
- package/dist/player.js +2 -2
- package/dist/player.min.css +3 -3
- package/dist/player.min.js +3 -3
- package/dist/playlist.js +2 -2
- package/dist/playlist.min.js +2 -2
- package/dist/recommendations-overlay.js +2 -2
- package/dist/recommendations-overlay.min.js +2 -2
- package/dist/schema.json +21 -4
- package/dist/share.js +2 -2
- package/dist/share.min.js +2 -2
- package/dist/shoppable.js +2 -2
- package/dist/shoppable.min.js +2 -2
- package/dist/utils_fetch-config_js.js +2 -2
- package/dist/utils_schedule_js.js +2 -2
- package/lib/cld-video-player.min.css +3 -3
- package/lib/debug.js +0 -1
- package/lib/index2.js +1 -2
- package/lib/player.min.css +3 -3
- package/lib/schema.json +21 -4
- package/lib/video-player.const.js +1 -1
- package/lib/video-player.js +16 -44
- package/package.json +1 -1
- package/dist/149.min.js +0 -6
- package/dist/visual-search.js +0 -67
- package/dist/visual-search.min.js +0 -6
- package/lib/visual-search.js +0 -235
|
@@ -379,7 +379,7 @@ var isStringExports = requireIsString();
|
|
|
379
379
|
var isString = /*@__PURE__*/getDefaultExportFromCjs(isStringExports);
|
|
380
380
|
|
|
381
381
|
// Parameters that can be passed to source configuration (inherited by source method)
|
|
382
|
-
const SOURCE_PARAMS = ['adaptiveStreaming', 'allowUsageReport', 'aspectRatio', 'autoShowRecommendations', 'breakpoints', 'chapters', 'cropMode', 'cropPadColor', 'cloudinaryConfig', 'description', 'download', 'hdr', 'info', 'interactionAreas', 'maxDpr', 'poster', 'posterOptions', 'publicId', 'rawTransformation', 'recommendations', 'resourceType', 'shoppable', 'source', 'sourceTransformation', 'sourceTypes', 'textTracks', 'title', 'transformation', 'type', '
|
|
382
|
+
const SOURCE_PARAMS = ['adaptiveStreaming', 'allowUsageReport', 'aspectRatio', 'autoShowRecommendations', 'breakpoints', 'chapters', 'cropMode', 'cropPadColor', 'cloudinaryConfig', 'description', 'download', 'hdr', 'info', 'interactionAreas', 'maxDpr', 'poster', 'posterOptions', 'publicId', 'rawTransformation', 'recommendations', 'resourceType', 'shoppable', 'source', 'sourceTransformation', 'sourceTypes', 'textTracks', 'title', 'transformation', 'type', 'withCredentials', 'videoSources'];
|
|
383
383
|
|
|
384
384
|
// All parameters that can be passed to player constructor
|
|
385
385
|
const PLAYER_PARAMS = SOURCE_PARAMS.concat(['_internalAnalyticsMetadata', 'ads', 'aiHighlightsGraph', 'analytics', 'autoplayMode', 'chaptersButton', 'cloudinaryAnalytics', 'colors', 'debug', 'fetchErrorUsingGet', 'floatingWhenNotVisible', 'fluid', 'fontFace', 'hideContextMenu', 'ima', 'pictureInPictureToggle', 'playedEventPercents', 'playedEventTimes', 'playlistWidget', 'profile', 'qualitySelector', 'queryParams', 'seekThumbnails', 'showJumpControls', 'videoConfig', 'schedule', 'lazy']);
|
package/lib/video-player.js
CHANGED
|
@@ -561,7 +561,7 @@ class TitleBar extends Component {
|
|
|
561
561
|
const metadataUrl = appendQueryParams(`${urlPrefix}/_applet_/video_service/video_metadata/${deliveryType}/${utf8ToBase64(publicId)}.json`, source.queryParams());
|
|
562
562
|
fetch(metadataUrl, {
|
|
563
563
|
headers: {
|
|
564
|
-
'X-Cld-Video-Player-Version': "4.1.
|
|
564
|
+
'X-Cld-Video-Player-Version': "4.1.1-edge.1"
|
|
565
565
|
}
|
|
566
566
|
}).then(response => {
|
|
567
567
|
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
@@ -3196,7 +3196,7 @@ class CloudinaryAnalytics {
|
|
|
3196
3196
|
}, {
|
|
3197
3197
|
...(isPlainObject(this.analyticsOptions) ? this.analyticsOptions : {}),
|
|
3198
3198
|
videoPlayerType: 'cloudinary video player',
|
|
3199
|
-
videoPlayerVersion: "4.1.
|
|
3199
|
+
videoPlayerVersion: "4.1.1-edge.1"
|
|
3200
3200
|
});
|
|
3201
3201
|
} else if (this.currentVideoMetadata.cloudName !== metadata.cloudName || this.currentVideoMetadata.publicId !== metadata.publicId) {
|
|
3202
3202
|
this.cloudinaryAnalytics.stopManualTracking();
|
|
@@ -4189,18 +4189,6 @@ async function lazyShoppablePlugin(player, options) {
|
|
|
4189
4189
|
new ShoppableWidget(player, options.shoppable).init();
|
|
4190
4190
|
}
|
|
4191
4191
|
|
|
4192
|
-
async function lazyVisualSearchPlugin(options) {
|
|
4193
|
-
const player = this;
|
|
4194
|
-
try {
|
|
4195
|
-
const {
|
|
4196
|
-
default: initPlugin
|
|
4197
|
-
} = await import(/* webpackChunkName: "visual-search" */'./visual-search.js');
|
|
4198
|
-
player.ready(() => initPlugin(options, player));
|
|
4199
|
-
} catch (error) {
|
|
4200
|
-
console.error('Failed to load plugin:', error);
|
|
4201
|
-
}
|
|
4202
|
-
}
|
|
4203
|
-
|
|
4204
4192
|
async function lazySharePlugin(options) {
|
|
4205
4193
|
const player = this;
|
|
4206
4194
|
try {
|
|
@@ -4753,7 +4741,6 @@ const plugins = {
|
|
|
4753
4741
|
playlist: lazyPlugin,
|
|
4754
4742
|
shoppable: lazyShoppablePlugin,
|
|
4755
4743
|
interactionAreas: lazyInteractionAreasPlugin,
|
|
4756
|
-
visualSearch: lazyVisualSearchPlugin,
|
|
4757
4744
|
share: lazySharePlugin,
|
|
4758
4745
|
adaptiveStreaming: lazyAdaptiveStreamingPlugin,
|
|
4759
4746
|
textTracksManager
|
|
@@ -4906,7 +4893,7 @@ const splitOptions = flatOptions => {
|
|
|
4906
4893
|
delete playerOptions.cloudinaryConfig;
|
|
4907
4894
|
}
|
|
4908
4895
|
|
|
4909
|
-
// Source-level config (
|
|
4896
|
+
// Source-level config (chapters, textTracks, etc.)
|
|
4910
4897
|
playerOptions.sourceOptions = Utils.sliceAndUnsetProperties(playerOptions, ...SOURCE_PARAMS);
|
|
4911
4898
|
|
|
4912
4899
|
// Allow explicitly passing options to videojs using the `videojs` namespace, in order
|
|
@@ -4980,7 +4967,6 @@ const getSourceOptions = function () {
|
|
|
4980
4967
|
if (sourceOptions.chapters) return 'inline-chapters';
|
|
4981
4968
|
return undefined;
|
|
4982
4969
|
})(),
|
|
4983
|
-
visualSearch: sourceOptions.visualSearch,
|
|
4984
4970
|
download: sourceOptions.download === true ? true : undefined,
|
|
4985
4971
|
hdr: sourceOptions.hdr === true ? true : undefined,
|
|
4986
4972
|
recommendations: sourceOptions.recommendations && sourceOptions.recommendations.length,
|
|
@@ -5194,7 +5180,7 @@ class VideoPlayer {
|
|
|
5194
5180
|
const analyticsData = getAnalyticsFromPlayerOptions(options);
|
|
5195
5181
|
const analyticsParams = new URLSearchParams(analyticsData).toString();
|
|
5196
5182
|
const baseParams = new URLSearchParams({
|
|
5197
|
-
vpVersion: "4.1.
|
|
5183
|
+
vpVersion: "4.1.1-edge.1",
|
|
5198
5184
|
vpInstanceId: this.getVPInstanceId(),
|
|
5199
5185
|
cloudName: options.cloudinary.cloud_name,
|
|
5200
5186
|
...internalAnalyticsMetadata
|
|
@@ -5271,7 +5257,6 @@ class VideoPlayer {
|
|
|
5271
5257
|
this._initAnalytics();
|
|
5272
5258
|
this._initCloudinaryAnalytics();
|
|
5273
5259
|
this._initFloatingPlayer();
|
|
5274
|
-
this._initVisualSearch();
|
|
5275
5260
|
this._initShare();
|
|
5276
5261
|
this._initColors();
|
|
5277
5262
|
this._initTextTracks();
|
|
@@ -5404,25 +5389,12 @@ class VideoPlayer {
|
|
|
5404
5389
|
}
|
|
5405
5390
|
});
|
|
5406
5391
|
}
|
|
5407
|
-
_initVisualSearch() {
|
|
5408
|
-
// Listen for source changes to apply visual search based on source config
|
|
5409
|
-
this.videojs.on(PLAYER_EVENT.CLD_SOURCE_CHANGED, (e, _ref4) => {
|
|
5410
|
-
let {
|
|
5411
|
-
source
|
|
5412
|
-
} = _ref4;
|
|
5413
|
-
if (source?._visualSearch && this.videojs.visualSearch) {
|
|
5414
|
-
isFunction(this.videojs.visualSearch) ? this.videojs.visualSearch(source._visualSearch) : this.videojs.visualSearch.createSearchUI(source._visualSearch);
|
|
5415
|
-
} else if (!source?._visualSearch && this.videojs.visualSearch?.clearUI) {
|
|
5416
|
-
this.videojs.visualSearch.clearUI();
|
|
5417
|
-
}
|
|
5418
|
-
});
|
|
5419
|
-
}
|
|
5420
5392
|
_initShare() {
|
|
5421
5393
|
// Listen for source changes to apply Share plugin based on source config
|
|
5422
|
-
this.videojs.on(PLAYER_EVENT.CLD_SOURCE_CHANGED, (e,
|
|
5394
|
+
this.videojs.on(PLAYER_EVENT.CLD_SOURCE_CHANGED, (e, _ref4) => {
|
|
5423
5395
|
let {
|
|
5424
5396
|
source
|
|
5425
|
-
} =
|
|
5397
|
+
} = _ref4;
|
|
5426
5398
|
if (!this.videojs.share) {
|
|
5427
5399
|
return;
|
|
5428
5400
|
}
|
|
@@ -5452,10 +5424,10 @@ class VideoPlayer {
|
|
|
5452
5424
|
}
|
|
5453
5425
|
_initTextTracks() {
|
|
5454
5426
|
this.textTracksManager = this.videojs.textTracksManager();
|
|
5455
|
-
this.videojs.on(PLAYER_EVENT.CLD_SOURCE_CHANGED, (e,
|
|
5427
|
+
this.videojs.on(PLAYER_EVENT.CLD_SOURCE_CHANGED, (e, _ref5) => {
|
|
5456
5428
|
let {
|
|
5457
5429
|
source
|
|
5458
|
-
} =
|
|
5430
|
+
} = _ref5;
|
|
5459
5431
|
if (source?._textTracks) {
|
|
5460
5432
|
this.setTextTracks(source._textTracks);
|
|
5461
5433
|
}
|
|
@@ -5519,10 +5491,10 @@ class VideoPlayer {
|
|
|
5519
5491
|
}
|
|
5520
5492
|
_initSourceSwitcher() {
|
|
5521
5493
|
this.sourceSwitcher = this.videojs.sourceSwitcher();
|
|
5522
|
-
this.videojs.on(PLAYER_EVENT.CLD_SOURCE_CHANGED, (e,
|
|
5494
|
+
this.videojs.on(PLAYER_EVENT.CLD_SOURCE_CHANGED, (e, _ref6) => {
|
|
5523
5495
|
let {
|
|
5524
5496
|
source
|
|
5525
|
-
} =
|
|
5497
|
+
} = _ref6;
|
|
5526
5498
|
const videoSources = source.videoSources?.();
|
|
5527
5499
|
const isSourcesListAvailable = Array.isArray(videoSources) ? !!videoSources.length : false;
|
|
5528
5500
|
if (this.videojs.controlBar) {
|
|
@@ -5533,20 +5505,20 @@ class VideoPlayer {
|
|
|
5533
5505
|
}
|
|
5534
5506
|
}
|
|
5535
5507
|
if (isSourcesListAvailable) {
|
|
5536
|
-
const selectedIndex = videoSources.findIndex(
|
|
5508
|
+
const selectedIndex = videoSources.findIndex(_ref7 => {
|
|
5537
5509
|
let {
|
|
5538
5510
|
publicId
|
|
5539
|
-
} =
|
|
5511
|
+
} = _ref7;
|
|
5540
5512
|
return publicId === source.publicId();
|
|
5541
5513
|
});
|
|
5542
5514
|
this.sourceSwitcher.reInit({
|
|
5543
5515
|
sources: videoSources,
|
|
5544
5516
|
selectedIndex: selectedIndex === -1 ? 0 : selectedIndex,
|
|
5545
|
-
onSourceChange:
|
|
5517
|
+
onSourceChange: _ref8 => {
|
|
5546
5518
|
let {
|
|
5547
5519
|
publicId,
|
|
5548
5520
|
...newSourceOptions
|
|
5549
|
-
} =
|
|
5521
|
+
} = _ref8;
|
|
5550
5522
|
return this.source(publicId, {
|
|
5551
5523
|
...newSourceOptions,
|
|
5552
5524
|
videoSources
|
|
@@ -5651,11 +5623,11 @@ class VideoPlayer {
|
|
|
5651
5623
|
volumeBar.removeAttribute('aria-live');
|
|
5652
5624
|
}
|
|
5653
5625
|
}
|
|
5654
|
-
_onSourceChange(e,
|
|
5626
|
+
_onSourceChange(e, _ref9) {
|
|
5655
5627
|
let {
|
|
5656
5628
|
source,
|
|
5657
5629
|
sourceOptions
|
|
5658
|
-
} =
|
|
5630
|
+
} = _ref9;
|
|
5659
5631
|
this._sendInternalAnalytics({
|
|
5660
5632
|
...(sourceOptions && {
|
|
5661
5633
|
sourceOptions
|