cloudinary-video-player 3.1.2-edge.2 → 3.1.2-edge.3
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/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-video-player.css +24 -2
- package/dist/cld-video-player.js +73 -13
- package/dist/cld-video-player.light.js +73 -13
- package/dist/cld-video-player.light.min.js +4 -4
- package/dist/cld-video-player.min.css +3 -3
- package/dist/cld-video-player.min.js +4 -4
- 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 -2
- 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/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/share.js +228 -0
- package/dist/share.min.js +7 -0
- package/dist/shoppable.js +2 -2
- package/dist/shoppable.min.js +2 -2
- package/dist/srt-text-tracks.js +2 -2
- package/dist/srt-text-tracks.min.js +2 -2
- package/dist/visual-search.js +2 -2
- package/dist/visual-search.min.js +2 -2
- package/lib/all.js +1 -1
- package/lib/cld-video-player.js +1 -1
- package/lib/cld-video-player.min.css +1 -0
- package/lib/debug.js +1 -1
- package/lib/player.js +1 -1
- package/lib/share.js +2 -0
- package/lib/videoPlayer.js +1 -1
- package/package.json +1 -1
package/dist/chapters.js
CHANGED
package/dist/chapters.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cloudinary Video Player v3.1.2-edge.
|
|
3
|
-
* Built on 2025-
|
|
2
|
+
* Cloudinary Video Player v3.1.2-edge.3
|
|
3
|
+
* Built on 2025-08-06T14:15:21.113Z
|
|
4
4
|
* https://github.com/cloudinary/cloudinary-video-player
|
|
5
5
|
*/
|
|
6
6
|
"use strict";(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[625],{9234:(t,e,r)=>{r.d(e,{default:()=>p});var s=r(6673),a=r.n(s),i=r(8033),o=r(2415);const n=function(){function t(t,e){return this.player=t,this.options=e,this.player.one("loadedmetadata",this.initializeChapters.bind(this)),this}return t.prototype.src=function(t){this.resetPlugin(),this.options=t,this.player.one("loadedmetadata",this.initializeChapters.bind(this))},t.prototype.detach=function(){this.resetPlugin()},t.prototype.resetPlugin=function(){this.chaptersTrack&&(this.player.$(".vjs-control-bar-chapter-display").remove(),this.player.$(".vjs-chapter-display").remove(),this.player.$$(".vjs-chapter-marker").forEach((t=>t.remove())),this.player.removeRemoteTextTrack(this.chaptersTrack),delete this.chaptersTrack)},t.prototype.getChaptersFileUrlByName=function(){const t=this.player.cloudinary.currentPublicId();if(!t)return null;const{type:e}=this.player.cloudinary.source().resourceConfig();return`${`${(0,i.k$)(this.player.cloudinary.cloudinaryConfig())}/_applet_/video_service/chapters/${e}/${(0,o.G)(t)}.vtt`}?t=${Date.now()}`},t.prototype.initializeChapters=async function(){const t=!0===this.options?this.getChaptersFileUrlByName():this.options.url;if(t){const e={kind:"chapters",src:t,default:!0},r=this.player.addRemoteTextTrack(e);r.addEventListener("load",(()=>{this.chaptersTrack=r.track,this.setupChaptersDisplays()}))}else if(Object.entries(this.options).length){const t=this.player.addRemoteTextTrack({kind:"chapters",default:!0}),e=this.player.duration();Object.entries(this.options).forEach(((r,s,a)=>{const i=new VTTCue(parseFloat(r[0]),parseFloat(a[s+1]?a[s+1][0]:e),r[1]);t.track.addCue(i)})),this.chaptersTrack=t.track,this.setupChaptersDisplays(),this.player.controlBar.chaptersButton&&this.player.controlBar.chaptersButton.update()}},t.prototype.setupChaptersDisplays=function(){this.setupProgressBarMarkers(),this.setupProgressBarChapter(),this.setupControlBarChapter()},t.prototype.setupControlBarChapter=function(){const t=this.player.$(".vjs-control-bar-chapter-display")||document.createElement("div");t.setAttribute("class","vjs-control-bar-chapter-display");const e=this.player.$(".vjs-control-bar .vjs-spacer");e.innerHTML="",e.classList.add("vjs-control-bar-chapter-wrapper"),e.appendChild(t),this.chaptersTrack.addEventListener("cuechange",(()=>{const e=Array.from(this.chaptersTrack.activeCues);t.innerText=e.length>0?e[0].text:""}))},t.prototype.setupProgressBarMarkers=function(){const t=this.player.duration(),{seekBar:e}=this.player.controlBar.progressControl;Array.from(this.chaptersTrack.cues).forEach((r=>{if(0!==r.startTime){const s=r.startTime/t*100+"%",i=a().dom.createEl("div",void 0,{class:"vjs-chapter-marker",style:`left: ${s}`});e.el().append(i)}}))},t.prototype.setupProgressBarChapter=function(){const t=a().dom.createEl("div",void 0,{class:"vjs-chapter-display",style:`max-width: ${this.player.$(".vjs-vtt-thumbnail-display")?this.player.$(".vjs-vtt-thumbnail-display").style.width:"160px"}`}),e=this.player.getDescendant(["controlBar","progressControl","seekBar","mouseTimeDisplay"]),r=e.getDescendant(["timeTooltip"]);r.el().parentElement.prepend(t);const s=t=>{const e=t*this.player.duration(),r=Array.from(this.chaptersTrack?.cues||[]).find((t=>e>=t.startTime&&e<=t.endTime));return r?r.text:""};r.update=function(e,r,a){Object.getPrototypeOf(this).update.call(this,e,r,a),t.innerText=s(r)},"object"!=typeof this.player.vttThumbnails&&(e.update=function(e,s){const i=s*this.player_.duration(),o=e.width,n=t.clientWidth/2;r.updateTime(e,s,i,(()=>{e.width*s<n?this.el_.style.left=`${n}px`:e.width*s+n>o?this.el_.style.left=e.width-n+"px":this.el_.style.left=e.width*s+"px"})),r.write(a().time.formatTime(i))})},t}(),p=function(t,e){e.addClass("vjs-chapters"),e.chapters=new n(e,t)}}}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cloudinary Video Player v3.1.2-edge.
|
|
3
|
-
* Built on 2025-
|
|
2
|
+
* Cloudinary Video Player v3.1.2-edge.3
|
|
3
|
+
* Built on 2025-08-06T14:15:40.534Z
|
|
4
4
|
* https://github.com/cloudinary/cloudinary-video-player
|
|
5
5
|
*/
|
|
6
6
|
/*!*************************************************************************************************!*\
|
|
@@ -2629,5 +2629,27 @@
|
|
|
2629
2629
|
transform: rotate(360deg);
|
|
2630
2630
|
}
|
|
2631
2631
|
}
|
|
2632
|
+
/*!*********************************************************************************************************************!*\
|
|
2633
|
+
!*** css ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./plugins/share/share.scss ***!
|
|
2634
|
+
\*********************************************************************************************************************/
|
|
2635
|
+
.vjs-share-download-button {
|
|
2636
|
+
position: relative;
|
|
2637
|
+
}
|
|
2638
|
+
.vjs-share-download-button > .vjs-loading-spinner {
|
|
2639
|
+
display: none;
|
|
2640
|
+
width: 1.4em;
|
|
2641
|
+
height: 1.4em;
|
|
2642
|
+
border-width: 0.2em;
|
|
2643
|
+
position: absolute;
|
|
2644
|
+
left: 50%;
|
|
2645
|
+
top: 50%;
|
|
2646
|
+
transform: translateX(-50%) translateY(-50%);
|
|
2647
|
+
}
|
|
2648
|
+
.vjs-share-download-button.vjs-waiting > .vjs-icon-file-download {
|
|
2649
|
+
display: none;
|
|
2650
|
+
}
|
|
2651
|
+
.vjs-share-download-button.vjs-waiting > .vjs-loading-spinner {
|
|
2652
|
+
display: flex;
|
|
2653
|
+
}
|
|
2632
2654
|
|
|
2633
2655
|
/*# sourceMappingURL=cld-video-player.css.map*/
|
package/dist/cld-video-player.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cloudinary Video Player v3.1.2-edge.
|
|
3
|
-
* Built on 2025-
|
|
2
|
+
* Cloudinary Video Player v3.1.2-edge.3
|
|
3
|
+
* Built on 2025-08-06T14:15:40.534Z
|
|
4
4
|
* https://github.com/cloudinary/cloudinary-video-player
|
|
5
5
|
*/
|
|
6
6
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -379,6 +379,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
379
379
|
seekThumbnails: true,
|
|
380
380
|
aiHighlightsGraph: false,
|
|
381
381
|
visualSearch: false,
|
|
382
|
+
download: false,
|
|
382
383
|
preload: _video_player_const__WEBPACK_IMPORTED_MODULE_2__.PRELOAD.AUTO,
|
|
383
384
|
textTrackSettings: false,
|
|
384
385
|
loop: false,
|
|
@@ -1486,7 +1487,7 @@ class CloudinaryAnalytics {
|
|
|
1486
1487
|
}, {
|
|
1487
1488
|
...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
|
|
1488
1489
|
videoPlayerType: 'cloudinary video player',
|
|
1489
|
-
videoPlayerVersion: "3.1.2-edge.
|
|
1490
|
+
videoPlayerVersion: "3.1.2-edge.3"
|
|
1490
1491
|
});
|
|
1491
1492
|
} else if (this.currentVideoMetadata.cloudName !== metadata.cloudName || this.currentVideoMetadata.publicId !== metadata.publicId) {
|
|
1492
1493
|
this.cloudinaryAnalytics.stopManualTracking();
|
|
@@ -1849,6 +1850,7 @@ class CloudinaryContext {
|
|
|
1849
1850
|
unsetRecommendations();
|
|
1850
1851
|
}
|
|
1851
1852
|
_source = src;
|
|
1853
|
+
_transformation = src.transformation();
|
|
1852
1854
|
const isDash = options.sourceTypes && options.sourceTypes.some(s => s.includes('dash')) || typeof source === 'string' && source.endsWith('.mpd');
|
|
1853
1855
|
const isHls = options.sourceTypes && options.sourceTypes.some(s => s.includes('hls')) || typeof source === 'string' && source.endsWith('.m3u8');
|
|
1854
1856
|
const isAdaptiveStreamingRequired = isDash || isHls;
|
|
@@ -1887,7 +1889,7 @@ class CloudinaryContext {
|
|
|
1887
1889
|
options.sourceTypes = options.sourceTypes || _this.sourceTypes();
|
|
1888
1890
|
options.poster = options.poster || posterOptionsForCurrent();
|
|
1889
1891
|
options.queryParams = Object.assign(options.queryParams || {}, options.allowUsageReport ? {
|
|
1890
|
-
_s: `vp-${"3.1.2-edge.
|
|
1892
|
+
_s: `vp-${"3.1.2-edge.3"}`
|
|
1891
1893
|
} : {});
|
|
1892
1894
|
if (options.sourceTypes.indexOf('audio') > -1) {
|
|
1893
1895
|
builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
|
|
@@ -2883,7 +2885,7 @@ const contextMenuContent = player => {
|
|
|
2883
2885
|
const isFullscreen = player.isFullscreen();
|
|
2884
2886
|
const aboutMenuItem = {
|
|
2885
2887
|
class: 'player-version',
|
|
2886
|
-
label: 'Cloudinary Player v' + "3.1.2-edge.
|
|
2888
|
+
label: 'Cloudinary Player v' + "3.1.2-edge.3"
|
|
2887
2889
|
};
|
|
2888
2890
|
if (!player.controls()) {
|
|
2889
2891
|
return [aboutMenuItem];
|
|
@@ -3456,7 +3458,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3456
3458
|
/* harmony import */ var _shoppable_plugin__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./shoppable-plugin */ "./plugins/shoppable-plugin/index.js");
|
|
3457
3459
|
/* harmony import */ var _srt_text_tracks__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./srt-text-tracks */ "./plugins/srt-text-tracks/index.js");
|
|
3458
3460
|
/* harmony import */ var _visual_search__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./visual-search */ "./plugins/visual-search/index.js");
|
|
3459
|
-
/* harmony import */ var
|
|
3461
|
+
/* harmony import */ var _share__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./share */ "./plugins/share/index.js");
|
|
3462
|
+
/* harmony import */ var _adaptive_streaming__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./adaptive-streaming */ "./plugins/adaptive-streaming/index.js");
|
|
3460
3463
|
|
|
3461
3464
|
|
|
3462
3465
|
|
|
@@ -3479,6 +3482,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3479
3482
|
|
|
3480
3483
|
|
|
3481
3484
|
|
|
3485
|
+
|
|
3482
3486
|
const plugins = {
|
|
3483
3487
|
aiHighlightsGraph: _ai_highlights_graph__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
3484
3488
|
analytics: _analytics__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
@@ -3499,7 +3503,8 @@ const plugins = {
|
|
|
3499
3503
|
srtTextTracks: _srt_text_tracks__WEBPACK_IMPORTED_MODULE_17__["default"],
|
|
3500
3504
|
interactionAreas: _interaction_areas__WEBPACK_IMPORTED_MODULE_14__["default"],
|
|
3501
3505
|
visualSearch: _visual_search__WEBPACK_IMPORTED_MODULE_18__["default"],
|
|
3502
|
-
|
|
3506
|
+
share: _share__WEBPACK_IMPORTED_MODULE_19__["default"],
|
|
3507
|
+
adaptiveStreaming: _adaptive_streaming__WEBPACK_IMPORTED_MODULE_20__["default"]
|
|
3503
3508
|
};
|
|
3504
3509
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugins);
|
|
3505
3510
|
|
|
@@ -3703,6 +3708,31 @@ async function lazyPlugin(options) {
|
|
|
3703
3708
|
|
|
3704
3709
|
/***/ }),
|
|
3705
3710
|
|
|
3711
|
+
/***/ "./plugins/share/index.js":
|
|
3712
|
+
/*!********************************!*\
|
|
3713
|
+
!*** ./plugins/share/index.js ***!
|
|
3714
|
+
\********************************/
|
|
3715
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3716
|
+
|
|
3717
|
+
"use strict";
|
|
3718
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3719
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3720
|
+
/* harmony export */ "default": () => (/* binding */ lazySharePlugin)
|
|
3721
|
+
/* harmony export */ });
|
|
3722
|
+
async function lazySharePlugin(options) {
|
|
3723
|
+
const player = this;
|
|
3724
|
+
try {
|
|
3725
|
+
const {
|
|
3726
|
+
default: initPlugin
|
|
3727
|
+
} = await Promise.all(/*! import() | share */[__webpack_require__.e("styles"), __webpack_require__.e("share")]).then(__webpack_require__.bind(__webpack_require__, /*! ./share */ "./plugins/share/share.js"));
|
|
3728
|
+
player.ready(() => initPlugin(options, player));
|
|
3729
|
+
} catch (error) {
|
|
3730
|
+
console.error('Failed to load share plugin:', error);
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
|
|
3734
|
+
/***/ }),
|
|
3735
|
+
|
|
3706
3736
|
/***/ "./plugins/shoppable-plugin/index.js":
|
|
3707
3737
|
/*!*******************************************!*\
|
|
3708
3738
|
!*** ./plugins/shoppable-plugin/index.js ***!
|
|
@@ -4701,6 +4731,7 @@ const getSourceOptions = function () {
|
|
|
4701
4731
|
sourceTypes: sourceOptions.sourceTypes,
|
|
4702
4732
|
chapters: sourceOptions.chapters && (sourceOptions.chapters.url ? 'url' : 'inline-chapters'),
|
|
4703
4733
|
visualSearch: hasConfig(sourceOptions.visualSearch),
|
|
4734
|
+
download: hasConfig(sourceOptions.download),
|
|
4704
4735
|
recommendations: sourceOptions.recommendations && sourceOptions.recommendations.length,
|
|
4705
4736
|
...(sourceOptions.adaptiveStreaming ? {
|
|
4706
4737
|
abrStrategy: sourceOptions?.adaptiveStreaming?.strategy
|
|
@@ -5180,7 +5211,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5180
5211
|
/* harmony export */ SOURCE_PARAMS: () => (/* binding */ SOURCE_PARAMS)
|
|
5181
5212
|
/* harmony export */ });
|
|
5182
5213
|
// Parameters that can be passed to source configuration (inherited by source method)
|
|
5183
|
-
const SOURCE_PARAMS = ['adaptiveStreaming', 'autoShowRecommendations', 'chapters', 'cloudinaryConfig', 'description', 'info', 'interactionAreas', 'poster', 'posterOptions', 'publicId', 'rawTransformation', 'recommendations', 'shoppable', 'source', 'sourceTransformation', 'sourceTypes', 'textTracks', 'title', 'transformation', 'type', 'visualSearch', 'withCredentials'];
|
|
5214
|
+
const SOURCE_PARAMS = ['adaptiveStreaming', 'autoShowRecommendations', 'chapters', 'cloudinaryConfig', 'description', 'download', 'info', 'interactionAreas', 'poster', 'posterOptions', 'publicId', 'rawTransformation', 'recommendations', 'shoppable', 'source', 'sourceTransformation', 'sourceTypes', 'textTracks', 'title', 'transformation', 'type', 'visualSearch', 'withCredentials'];
|
|
5184
5215
|
|
|
5185
5216
|
// All parameters that can be passed to player constructor
|
|
5186
5217
|
const PLAYER_PARAMS = SOURCE_PARAMS.concat(['_internalAnalyticsMetadata', 'ads', 'aiHighlightsGraph', 'allowUsageReport', 'analytics', 'autoplayMode', 'chaptersButton', 'cloudinaryAnalytics', 'colors', 'debug', 'fetchErrorUsingGet', 'floatingWhenNotVisible', 'fluid', 'fontFace', 'hideContextMenu', 'ima', 'pictureInPictureToggle', 'playedEventPercents', 'playedEventTimes', 'playlistWidget', 'qualitySelector', 'queryParams', 'seekThumbnails', 'showJumpControls']);
|
|
@@ -5349,7 +5380,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5349
5380
|
const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
|
|
5350
5381
|
const analyticsParams = new URLSearchParams(analyticsData).toString();
|
|
5351
5382
|
const baseParams = new URLSearchParams({
|
|
5352
|
-
vpVersion: "3.1.2-edge.
|
|
5383
|
+
vpVersion: "3.1.2-edge.3",
|
|
5353
5384
|
vpInstanceId: this.getVPInstanceId(),
|
|
5354
5385
|
cloudName: options.cloudinary.cloudinaryConfig.cloud_name,
|
|
5355
5386
|
...internalAnalyticsMetadata
|
|
@@ -5418,6 +5449,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5418
5449
|
this._initCloudinaryAnalytics();
|
|
5419
5450
|
this._initFloatingPlayer();
|
|
5420
5451
|
this._initVisualSearch();
|
|
5452
|
+
this._initShare();
|
|
5421
5453
|
this._initColors();
|
|
5422
5454
|
this._initTextTracks();
|
|
5423
5455
|
this._initHighlightsGraph();
|
|
@@ -5566,6 +5598,32 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5566
5598
|
}
|
|
5567
5599
|
});
|
|
5568
5600
|
}
|
|
5601
|
+
_initShare() {
|
|
5602
|
+
// Listen for source changes to apply Share plugin based on source config
|
|
5603
|
+
this.videojs.on(_utils_consts__WEBPACK_IMPORTED_MODULE_17__.PLAYER_EVENT.CLD_SOURCE_CHANGED, (e, _ref5) => {
|
|
5604
|
+
let {
|
|
5605
|
+
source
|
|
5606
|
+
} = _ref5;
|
|
5607
|
+
if (!this.videojs.share) {
|
|
5608
|
+
return;
|
|
5609
|
+
}
|
|
5610
|
+
|
|
5611
|
+
// First time: initialise plugin if necessary
|
|
5612
|
+
if (source?._download && lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(this.videojs.share)) {
|
|
5613
|
+
this.videojs.share({
|
|
5614
|
+
download: true
|
|
5615
|
+
});
|
|
5616
|
+
}
|
|
5617
|
+
if (!lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(this.videojs.share)) {
|
|
5618
|
+
// Plugin already initialised – update UI accordingly
|
|
5619
|
+
if (source?._download) {
|
|
5620
|
+
this.videojs.share.addDownloadButton?.();
|
|
5621
|
+
} else {
|
|
5622
|
+
this.videojs.share.removeDownloadButton?.();
|
|
5623
|
+
}
|
|
5624
|
+
}
|
|
5625
|
+
});
|
|
5626
|
+
}
|
|
5569
5627
|
_initColors() {
|
|
5570
5628
|
if (this.playerOptions.colors) {
|
|
5571
5629
|
this.videojs.colors({
|
|
@@ -5574,10 +5632,10 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5574
5632
|
}
|
|
5575
5633
|
}
|
|
5576
5634
|
_initTextTracks() {
|
|
5577
|
-
this.videojs.on(_utils_consts__WEBPACK_IMPORTED_MODULE_17__.PLAYER_EVENT.CLD_SOURCE_CHANGED, (e,
|
|
5635
|
+
this.videojs.on(_utils_consts__WEBPACK_IMPORTED_MODULE_17__.PLAYER_EVENT.CLD_SOURCE_CHANGED, (e, _ref6) => {
|
|
5578
5636
|
let {
|
|
5579
5637
|
source
|
|
5580
|
-
} =
|
|
5638
|
+
} = _ref6;
|
|
5581
5639
|
if (source?._textTracks) {
|
|
5582
5640
|
this.setTextTracks(source._textTracks);
|
|
5583
5641
|
}
|
|
@@ -5702,11 +5760,11 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5702
5760
|
this.source(source, sourceOptions);
|
|
5703
5761
|
}
|
|
5704
5762
|
}
|
|
5705
|
-
_onSourceChange(e,
|
|
5763
|
+
_onSourceChange(e, _ref7) {
|
|
5706
5764
|
let {
|
|
5707
5765
|
source,
|
|
5708
5766
|
sourceOptions
|
|
5709
|
-
} =
|
|
5767
|
+
} = _ref7;
|
|
5710
5768
|
this._sendInternalAnalytics({
|
|
5711
5769
|
...(sourceOptions && {
|
|
5712
5770
|
sourceOptions
|
|
@@ -5777,8 +5835,10 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5777
5835
|
|
|
5778
5836
|
// Inherit source parameters from player options (source options take precedence)
|
|
5779
5837
|
const inherited = lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(this.playerOptions, _video_player_const__WEBPACK_IMPORTED_MODULE_15__.SOURCE_PARAMS);
|
|
5838
|
+
const inheritedNested = this.playerOptions.cloudinary ? lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(this.playerOptions.cloudinary, _video_player_const__WEBPACK_IMPORTED_MODULE_15__.SOURCE_PARAMS) : {};
|
|
5780
5839
|
options = {
|
|
5781
5840
|
...inherited,
|
|
5841
|
+
...inheritedNested,
|
|
5782
5842
|
...options
|
|
5783
5843
|
};
|
|
5784
5844
|
if (options.shoppable && this.videojs.shoppable) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
console.warn('[Cloudinary] The "light" video-player is deprecated and will be removed in a future release. The main player is now light by default. Please use that instead.');
|
|
2
2
|
/*!
|
|
3
|
-
* Cloudinary Video Player v3.1.2-edge.
|
|
4
|
-
* Built on 2025-
|
|
3
|
+
* Cloudinary Video Player v3.1.2-edge.3
|
|
4
|
+
* Built on 2025-08-06T14:15:40.534Z
|
|
5
5
|
* https://github.com/cloudinary/cloudinary-video-player
|
|
6
6
|
*/
|
|
7
7
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -380,6 +380,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
380
380
|
seekThumbnails: true,
|
|
381
381
|
aiHighlightsGraph: false,
|
|
382
382
|
visualSearch: false,
|
|
383
|
+
download: false,
|
|
383
384
|
preload: _video_player_const__WEBPACK_IMPORTED_MODULE_2__.PRELOAD.AUTO,
|
|
384
385
|
textTrackSettings: false,
|
|
385
386
|
loop: false,
|
|
@@ -1487,7 +1488,7 @@ class CloudinaryAnalytics {
|
|
|
1487
1488
|
}, {
|
|
1488
1489
|
...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
|
|
1489
1490
|
videoPlayerType: 'cloudinary video player',
|
|
1490
|
-
videoPlayerVersion: "3.1.2-edge.
|
|
1491
|
+
videoPlayerVersion: "3.1.2-edge.3"
|
|
1491
1492
|
});
|
|
1492
1493
|
} else if (this.currentVideoMetadata.cloudName !== metadata.cloudName || this.currentVideoMetadata.publicId !== metadata.publicId) {
|
|
1493
1494
|
this.cloudinaryAnalytics.stopManualTracking();
|
|
@@ -1850,6 +1851,7 @@ class CloudinaryContext {
|
|
|
1850
1851
|
unsetRecommendations();
|
|
1851
1852
|
}
|
|
1852
1853
|
_source = src;
|
|
1854
|
+
_transformation = src.transformation();
|
|
1853
1855
|
const isDash = options.sourceTypes && options.sourceTypes.some(s => s.includes('dash')) || typeof source === 'string' && source.endsWith('.mpd');
|
|
1854
1856
|
const isHls = options.sourceTypes && options.sourceTypes.some(s => s.includes('hls')) || typeof source === 'string' && source.endsWith('.m3u8');
|
|
1855
1857
|
const isAdaptiveStreamingRequired = isDash || isHls;
|
|
@@ -1888,7 +1890,7 @@ class CloudinaryContext {
|
|
|
1888
1890
|
options.sourceTypes = options.sourceTypes || _this.sourceTypes();
|
|
1889
1891
|
options.poster = options.poster || posterOptionsForCurrent();
|
|
1890
1892
|
options.queryParams = Object.assign(options.queryParams || {}, options.allowUsageReport ? {
|
|
1891
|
-
_s: `vp-${"3.1.2-edge.
|
|
1893
|
+
_s: `vp-${"3.1.2-edge.3"}`
|
|
1892
1894
|
} : {});
|
|
1893
1895
|
if (options.sourceTypes.indexOf('audio') > -1) {
|
|
1894
1896
|
builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
|
|
@@ -2884,7 +2886,7 @@ const contextMenuContent = player => {
|
|
|
2884
2886
|
const isFullscreen = player.isFullscreen();
|
|
2885
2887
|
const aboutMenuItem = {
|
|
2886
2888
|
class: 'player-version',
|
|
2887
|
-
label: 'Cloudinary Player v' + "3.1.2-edge.
|
|
2889
|
+
label: 'Cloudinary Player v' + "3.1.2-edge.3"
|
|
2888
2890
|
};
|
|
2889
2891
|
if (!player.controls()) {
|
|
2890
2892
|
return [aboutMenuItem];
|
|
@@ -3457,7 +3459,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3457
3459
|
/* harmony import */ var _shoppable_plugin__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./shoppable-plugin */ "./plugins/shoppable-plugin/index.js");
|
|
3458
3460
|
/* harmony import */ var _srt_text_tracks__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./srt-text-tracks */ "./plugins/srt-text-tracks/index.js");
|
|
3459
3461
|
/* harmony import */ var _visual_search__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./visual-search */ "./plugins/visual-search/index.js");
|
|
3460
|
-
/* harmony import */ var
|
|
3462
|
+
/* harmony import */ var _share__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./share */ "./plugins/share/index.js");
|
|
3463
|
+
/* harmony import */ var _adaptive_streaming__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./adaptive-streaming */ "./plugins/adaptive-streaming/index.js");
|
|
3461
3464
|
|
|
3462
3465
|
|
|
3463
3466
|
|
|
@@ -3480,6 +3483,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3480
3483
|
|
|
3481
3484
|
|
|
3482
3485
|
|
|
3486
|
+
|
|
3483
3487
|
const plugins = {
|
|
3484
3488
|
aiHighlightsGraph: _ai_highlights_graph__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
3485
3489
|
analytics: _analytics__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
@@ -3500,7 +3504,8 @@ const plugins = {
|
|
|
3500
3504
|
srtTextTracks: _srt_text_tracks__WEBPACK_IMPORTED_MODULE_17__["default"],
|
|
3501
3505
|
interactionAreas: _interaction_areas__WEBPACK_IMPORTED_MODULE_14__["default"],
|
|
3502
3506
|
visualSearch: _visual_search__WEBPACK_IMPORTED_MODULE_18__["default"],
|
|
3503
|
-
|
|
3507
|
+
share: _share__WEBPACK_IMPORTED_MODULE_19__["default"],
|
|
3508
|
+
adaptiveStreaming: _adaptive_streaming__WEBPACK_IMPORTED_MODULE_20__["default"]
|
|
3504
3509
|
};
|
|
3505
3510
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugins);
|
|
3506
3511
|
|
|
@@ -3704,6 +3709,31 @@ async function lazyPlugin(options) {
|
|
|
3704
3709
|
|
|
3705
3710
|
/***/ }),
|
|
3706
3711
|
|
|
3712
|
+
/***/ "./plugins/share/index.js":
|
|
3713
|
+
/*!********************************!*\
|
|
3714
|
+
!*** ./plugins/share/index.js ***!
|
|
3715
|
+
\********************************/
|
|
3716
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3717
|
+
|
|
3718
|
+
"use strict";
|
|
3719
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3720
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3721
|
+
/* harmony export */ "default": () => (/* binding */ lazySharePlugin)
|
|
3722
|
+
/* harmony export */ });
|
|
3723
|
+
async function lazySharePlugin(options) {
|
|
3724
|
+
const player = this;
|
|
3725
|
+
try {
|
|
3726
|
+
const {
|
|
3727
|
+
default: initPlugin
|
|
3728
|
+
} = await Promise.all(/*! import() | share */[__webpack_require__.e("styles"), __webpack_require__.e("share")]).then(__webpack_require__.bind(__webpack_require__, /*! ./share */ "./plugins/share/share.js"));
|
|
3729
|
+
player.ready(() => initPlugin(options, player));
|
|
3730
|
+
} catch (error) {
|
|
3731
|
+
console.error('Failed to load share plugin:', error);
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
|
|
3735
|
+
/***/ }),
|
|
3736
|
+
|
|
3707
3737
|
/***/ "./plugins/shoppable-plugin/index.js":
|
|
3708
3738
|
/*!*******************************************!*\
|
|
3709
3739
|
!*** ./plugins/shoppable-plugin/index.js ***!
|
|
@@ -4702,6 +4732,7 @@ const getSourceOptions = function () {
|
|
|
4702
4732
|
sourceTypes: sourceOptions.sourceTypes,
|
|
4703
4733
|
chapters: sourceOptions.chapters && (sourceOptions.chapters.url ? 'url' : 'inline-chapters'),
|
|
4704
4734
|
visualSearch: hasConfig(sourceOptions.visualSearch),
|
|
4735
|
+
download: hasConfig(sourceOptions.download),
|
|
4705
4736
|
recommendations: sourceOptions.recommendations && sourceOptions.recommendations.length,
|
|
4706
4737
|
...(sourceOptions.adaptiveStreaming ? {
|
|
4707
4738
|
abrStrategy: sourceOptions?.adaptiveStreaming?.strategy
|
|
@@ -5181,7 +5212,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5181
5212
|
/* harmony export */ SOURCE_PARAMS: () => (/* binding */ SOURCE_PARAMS)
|
|
5182
5213
|
/* harmony export */ });
|
|
5183
5214
|
// Parameters that can be passed to source configuration (inherited by source method)
|
|
5184
|
-
const SOURCE_PARAMS = ['adaptiveStreaming', 'autoShowRecommendations', 'chapters', 'cloudinaryConfig', 'description', 'info', 'interactionAreas', 'poster', 'posterOptions', 'publicId', 'rawTransformation', 'recommendations', 'shoppable', 'source', 'sourceTransformation', 'sourceTypes', 'textTracks', 'title', 'transformation', 'type', 'visualSearch', 'withCredentials'];
|
|
5215
|
+
const SOURCE_PARAMS = ['adaptiveStreaming', 'autoShowRecommendations', 'chapters', 'cloudinaryConfig', 'description', 'download', 'info', 'interactionAreas', 'poster', 'posterOptions', 'publicId', 'rawTransformation', 'recommendations', 'shoppable', 'source', 'sourceTransformation', 'sourceTypes', 'textTracks', 'title', 'transformation', 'type', 'visualSearch', 'withCredentials'];
|
|
5185
5216
|
|
|
5186
5217
|
// All parameters that can be passed to player constructor
|
|
5187
5218
|
const PLAYER_PARAMS = SOURCE_PARAMS.concat(['_internalAnalyticsMetadata', 'ads', 'aiHighlightsGraph', 'allowUsageReport', 'analytics', 'autoplayMode', 'chaptersButton', 'cloudinaryAnalytics', 'colors', 'debug', 'fetchErrorUsingGet', 'floatingWhenNotVisible', 'fluid', 'fontFace', 'hideContextMenu', 'ima', 'pictureInPictureToggle', 'playedEventPercents', 'playedEventTimes', 'playlistWidget', 'qualitySelector', 'queryParams', 'seekThumbnails', 'showJumpControls']);
|
|
@@ -5350,7 +5381,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5350
5381
|
const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
|
|
5351
5382
|
const analyticsParams = new URLSearchParams(analyticsData).toString();
|
|
5352
5383
|
const baseParams = new URLSearchParams({
|
|
5353
|
-
vpVersion: "3.1.2-edge.
|
|
5384
|
+
vpVersion: "3.1.2-edge.3",
|
|
5354
5385
|
vpInstanceId: this.getVPInstanceId(),
|
|
5355
5386
|
cloudName: options.cloudinary.cloudinaryConfig.cloud_name,
|
|
5356
5387
|
...internalAnalyticsMetadata
|
|
@@ -5419,6 +5450,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5419
5450
|
this._initCloudinaryAnalytics();
|
|
5420
5451
|
this._initFloatingPlayer();
|
|
5421
5452
|
this._initVisualSearch();
|
|
5453
|
+
this._initShare();
|
|
5422
5454
|
this._initColors();
|
|
5423
5455
|
this._initTextTracks();
|
|
5424
5456
|
this._initHighlightsGraph();
|
|
@@ -5567,6 +5599,32 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5567
5599
|
}
|
|
5568
5600
|
});
|
|
5569
5601
|
}
|
|
5602
|
+
_initShare() {
|
|
5603
|
+
// Listen for source changes to apply Share plugin based on source config
|
|
5604
|
+
this.videojs.on(_utils_consts__WEBPACK_IMPORTED_MODULE_17__.PLAYER_EVENT.CLD_SOURCE_CHANGED, (e, _ref5) => {
|
|
5605
|
+
let {
|
|
5606
|
+
source
|
|
5607
|
+
} = _ref5;
|
|
5608
|
+
if (!this.videojs.share) {
|
|
5609
|
+
return;
|
|
5610
|
+
}
|
|
5611
|
+
|
|
5612
|
+
// First time: initialise plugin if necessary
|
|
5613
|
+
if (source?._download && lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(this.videojs.share)) {
|
|
5614
|
+
this.videojs.share({
|
|
5615
|
+
download: true
|
|
5616
|
+
});
|
|
5617
|
+
}
|
|
5618
|
+
if (!lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(this.videojs.share)) {
|
|
5619
|
+
// Plugin already initialised – update UI accordingly
|
|
5620
|
+
if (source?._download) {
|
|
5621
|
+
this.videojs.share.addDownloadButton?.();
|
|
5622
|
+
} else {
|
|
5623
|
+
this.videojs.share.removeDownloadButton?.();
|
|
5624
|
+
}
|
|
5625
|
+
}
|
|
5626
|
+
});
|
|
5627
|
+
}
|
|
5570
5628
|
_initColors() {
|
|
5571
5629
|
if (this.playerOptions.colors) {
|
|
5572
5630
|
this.videojs.colors({
|
|
@@ -5575,10 +5633,10 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5575
5633
|
}
|
|
5576
5634
|
}
|
|
5577
5635
|
_initTextTracks() {
|
|
5578
|
-
this.videojs.on(_utils_consts__WEBPACK_IMPORTED_MODULE_17__.PLAYER_EVENT.CLD_SOURCE_CHANGED, (e,
|
|
5636
|
+
this.videojs.on(_utils_consts__WEBPACK_IMPORTED_MODULE_17__.PLAYER_EVENT.CLD_SOURCE_CHANGED, (e, _ref6) => {
|
|
5579
5637
|
let {
|
|
5580
5638
|
source
|
|
5581
|
-
} =
|
|
5639
|
+
} = _ref6;
|
|
5582
5640
|
if (source?._textTracks) {
|
|
5583
5641
|
this.setTextTracks(source._textTracks);
|
|
5584
5642
|
}
|
|
@@ -5703,11 +5761,11 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5703
5761
|
this.source(source, sourceOptions);
|
|
5704
5762
|
}
|
|
5705
5763
|
}
|
|
5706
|
-
_onSourceChange(e,
|
|
5764
|
+
_onSourceChange(e, _ref7) {
|
|
5707
5765
|
let {
|
|
5708
5766
|
source,
|
|
5709
5767
|
sourceOptions
|
|
5710
|
-
} =
|
|
5768
|
+
} = _ref7;
|
|
5711
5769
|
this._sendInternalAnalytics({
|
|
5712
5770
|
...(sourceOptions && {
|
|
5713
5771
|
sourceOptions
|
|
@@ -5778,8 +5836,10 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5778
5836
|
|
|
5779
5837
|
// Inherit source parameters from player options (source options take precedence)
|
|
5780
5838
|
const inherited = lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(this.playerOptions, _video_player_const__WEBPACK_IMPORTED_MODULE_15__.SOURCE_PARAMS);
|
|
5839
|
+
const inheritedNested = this.playerOptions.cloudinary ? lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(this.playerOptions.cloudinary, _video_player_const__WEBPACK_IMPORTED_MODULE_15__.SOURCE_PARAMS) : {};
|
|
5781
5840
|
options = {
|
|
5782
5841
|
...inherited,
|
|
5842
|
+
...inheritedNested,
|
|
5783
5843
|
...options
|
|
5784
5844
|
};
|
|
5785
5845
|
if (options.shoppable && this.videojs.shoppable) {
|