cloudinary-video-player 2.1.0 → 2.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.
@@ -1,2 +1,2 @@
1
- "use strict";(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[625],{9234:(t,e,r)=>{r.d(e,{default:()=>n});var s=r(6673),a=r.n(s),i=r(8033);const o=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;return`${(0,i.KA)(`${t}-chapters.vtt`,(0,i.lP)(this.player.cloudinary.cloudinaryConfig(),{resource_type:"raw",version:"1"}))}?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});await new Promise((t=>setTimeout(t,100)));const 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}(),n=function(t,e){e.addClass("vjs-chapters"),e.chapters=new o(e,t)}}}]);
1
+ "use strict";(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[625],{9234:(t,e,r)=>{r.d(e,{default:()=>n});var s=r(6673),a=r.n(s),i=r(9388);const o=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;return`${(0,i.KA)(`${t}-chapters.vtt`,(0,i.lP)(this.player.cloudinary.cloudinaryConfig(),{resource_type:"raw",version:"1"}))}?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});await new Promise((t=>setTimeout(t,100)));const 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}(),n=function(t,e){e.addClass("vjs-chapters"),e.chapters=new o(e,t)}}}]);
2
2
  //# sourceMappingURL=chapters.light.min.js.map
@@ -1,2 +1,2 @@
1
- "use strict";(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[625],{9234:(t,e,r)=>{r.d(e,{default:()=>n});var s=r(7938),a=r.n(s),i=r(8033);const o=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;return`${(0,i.KA)(`${t}-chapters.vtt`,(0,i.lP)(this.player.cloudinary.cloudinaryConfig(),{resource_type:"raw",version:"1"}))}?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});await new Promise((t=>setTimeout(t,100)));const 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}(),n=function(t,e){e.addClass("vjs-chapters"),e.chapters=new o(e,t)}}}]);
1
+ "use strict";(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[625],{9234:(t,e,r)=>{r.d(e,{default:()=>n});var s=r(7938),a=r.n(s),i=r(9388);const o=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;return`${(0,i.KA)(`${t}-chapters.vtt`,(0,i.lP)(this.player.cloudinary.cloudinaryConfig(),{resource_type:"raw",version:"1"}))}?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});await new Promise((t=>setTimeout(t,100)));const 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}(),n=function(t,e){e.addClass("vjs-chapters"),e.chapters=new o(e,t)}}}]);
2
2
  //# sourceMappingURL=chapters.min.js.map
@@ -502,9 +502,6 @@
502
502
  .cld-video-player .vjs-text-track-display > div {
503
503
  margin: 3% !important;
504
504
  }
505
- .cld-video-player .vjs-text-track-display.cld-paced-text-tracks b {
506
- color: var(--color-accent);
507
- }
508
505
  .cld-video-player .vjs-text-track-cue {
509
506
  top: auto !important;
510
507
  bottom: 3.4rem !important;
@@ -8448,7 +8448,6 @@ __webpack_require__.r(__webpack_exports__);
8448
8448
  /* harmony export */ player: () => (/* binding */ player),
8449
8449
  /* harmony export */ players: () => (/* binding */ players),
8450
8450
  /* harmony export */ videoPlayer: () => (/* binding */ videoPlayer),
8451
- /* harmony export */ videoPlayerWithProfile: () => (/* binding */ videoPlayerWithProfile),
8452
8451
  /* harmony export */ videoPlayers: () => (/* binding */ videoPlayers)
8453
8452
  /* harmony export */ });
8454
8453
  /* harmony import */ var assets_styles_main_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! assets/styles/main.scss */ "./assets/styles/main.scss");
@@ -8484,10 +8483,6 @@ const getPlayers = config => (selector, playerOptions, ready) => {
8484
8483
  };
8485
8484
  const videoPlayer = getVideoPlayer();
8486
8485
  const videoPlayers = getVideoPlayers();
8487
- const videoPlayerWithProfile = (id, playerOptions, ready) => {
8488
- console.warn('videoPlayerWithProfile method is DEPRECATED and will be removed soon, please use new `player` method instead');
8489
- return getPlayer()(id, playerOptions, ready);
8490
- };
8491
8486
  const player = getPlayer();
8492
8487
  const players = getPlayers();
8493
8488
  const cloudinaryVideoPlayerLegacyConfig = config => {
@@ -8501,7 +8496,6 @@ const cloudinary = {
8501
8496
  ...(window.cloudinary || {}),
8502
8497
  videoPlayer,
8503
8498
  videoPlayers,
8504
- videoPlayerWithProfile,
8505
8499
  player,
8506
8500
  players,
8507
8501
  Cloudinary: {
@@ -8602,19 +8596,21 @@ __webpack_require__.r(__webpack_exports__);
8602
8596
  /* harmony import */ var _video_player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./video-player */ "./video-player.js");
8603
8597
  /* harmony import */ var _config_profiles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config/profiles */ "./config/profiles/index.js");
8604
8598
  /* harmony import */ var _plugins_cloudinary_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./plugins/cloudinary/common */ "./plugins/cloudinary/common.js");
8599
+ /* harmony import */ var _cloudinary_url_gen_backwards_utils_unsigned_url_prefix__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @cloudinary/url-gen/backwards/utils/unsigned_url_prefix */ "../node_modules/@cloudinary/url-gen/backwards/utils/unsigned_url_prefix.js");
8600
+
8605
8601
 
8606
8602
 
8607
8603
 
8608
- const getProfile = async (cloudName, profile) => {
8609
- if (Object.keys(_config_profiles__WEBPACK_IMPORTED_MODULE_1__.defaultProfiles).includes(profile)) {
8604
+ const isDefaultProfile = profile => Object.keys(_config_profiles__WEBPACK_IMPORTED_MODULE_1__.defaultProfiles).includes(profile);
8605
+ const getProfile = async (profile, initOptions) => {
8606
+ if (isDefaultProfile(profile)) {
8610
8607
  return _config_profiles__WEBPACK_IMPORTED_MODULE_1__.defaultProfiles[profile];
8611
8608
  }
8612
- if ((0,_plugins_cloudinary_common__WEBPACK_IMPORTED_MODULE_2__.isRawUrl)(profile)) {
8613
- return await fetch(profile, {
8614
- method: 'GET'
8615
- }).then(res => res.json());
8616
- }
8617
- throw new Error('Custom profiles will be supported soon, please use one of default profiles: "cldDefault", "cldLooping" or "cldAdaptiveStream"');
8609
+ const urlPrefix = (0,_cloudinary_url_gen_backwards_utils_unsigned_url_prefix__WEBPACK_IMPORTED_MODULE_3__.unsigned_url_prefix)(null, initOptions.cloudName ?? initOptions.cloud_name, initOptions.private_cdn, initOptions.cdn_subdomain, initOptions.secure_cdn_subdomain, initOptions.cname, initOptions.secure ?? true, initOptions.secure_distribution);
8610
+ const profileUrl = (0,_plugins_cloudinary_common__WEBPACK_IMPORTED_MODULE_2__.isRawUrl)(profile) ? profile : `${urlPrefix}/_applet_/video_service/video_player_profiles/${profile.replaceAll(' ', '+')}.json`;
8611
+ return fetch(profileUrl, {
8612
+ method: 'GET'
8613
+ }).then(res => res.json());
8618
8614
  };
8619
8615
  const player = async (elem, initOptions, ready) => {
8620
8616
  const {
@@ -8622,8 +8618,13 @@ const player = async (elem, initOptions, ready) => {
8622
8618
  ...otherInitOptions
8623
8619
  } = initOptions;
8624
8620
  try {
8625
- const profileOptions = profile ? await getProfile(otherInitOptions.cloud_name, profile) : {};
8626
- const options = Object.assign({}, profileOptions.playerOptions, otherInitOptions);
8621
+ const profileOptions = profile ? await getProfile(profile, otherInitOptions) : {};
8622
+ const options = Object.assign({}, profileOptions.playerOptions, otherInitOptions, {
8623
+ _internalAnalyticsMetadata: {
8624
+ newPlayerMethod: true,
8625
+ profile: isDefaultProfile(profile) ? profile : !!profile
8626
+ }
8627
+ });
8627
8628
  const videoPlayer = new _video_player__WEBPACK_IMPORTED_MODULE_0__["default"](elem, options, ready);
8628
8629
  const nativeVideoPlayerSourceMethod = videoPlayer.source;
8629
8630
  videoPlayer.source = (id, options) => {
@@ -9249,7 +9250,7 @@ class CloudinaryAnalytics {
9249
9250
  this.cloudinaryAnalytics.startManualTracking(metadata, {
9250
9251
  ...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
9251
9252
  videoPlayerType: 'cloudinary video player',
9252
- videoPlayerVersion: "2.1.0"
9253
+ videoPlayerVersion: "2.1.1-edge.1"
9253
9254
  });
9254
9255
  } else if (this.currentVideMetadata.cloudName !== metadata.cloudName || this.currentVideMetadata.publicId !== metadata.publicId) {
9255
9256
  this.cloudinaryAnalytics.stopManualTracking();
@@ -9619,7 +9620,7 @@ class CloudinaryContext {
9619
9620
  options.sourceTypes = options.sourceTypes || _this.sourceTypes();
9620
9621
  options.poster = options.poster || posterOptionsForCurrent();
9621
9622
  options.queryParams = Object.assign(options.queryParams || {}, options.usageReport ? {
9622
- _s: `vp-${"2.1.0"}`
9623
+ _s: `vp-${"2.1.1-edge.1"}`
9623
9624
  } : {});
9624
9625
  if (options.sourceTypes.indexOf('audio') > -1) {
9625
9626
  builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
@@ -10883,7 +10884,7 @@ const contextMenuContent = player => {
10883
10884
  const isFullscreen = player.isFullscreen();
10884
10885
  const aboutMenuItem = {
10885
10886
  class: 'player-version',
10886
- label: 'Cloudinary Player v' + "2.1.0"
10887
+ label: 'Cloudinary Player v' + "2.1.1-edge.1"
10887
10888
  };
10888
10889
  if (!player.controls()) {
10889
10890
  return [aboutMenuItem];
@@ -13306,7 +13307,7 @@ __webpack_require__.r(__webpack_exports__);
13306
13307
  /* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);
13307
13308
 
13308
13309
  const CLOUDINARY_PARAMS = ['cloudinaryConfig', 'transformation', 'sourceTypes', 'sourceTransformation', 'posterOptions', 'autoShowRecommendations', 'fontFace', 'secure'];
13309
- const PLAYER_PARAMS = CLOUDINARY_PARAMS.concat(['debug', 'publicId', 'source', 'autoplayMode', 'playedEventPercents', 'playedEventTimes', 'analytics', 'cloudinaryAnalytics', 'allowUsageReport', 'fluid', 'ima', 'playlistWidget', 'hideContextMenu', 'colors', 'floatingWhenNotVisible', 'ads', 'showJumpControls', 'chaptersButton', 'pictureInPictureToggle', 'textTracks', 'qualitySelector', 'fetchErrorUsingGet', 'withCredentials', 'seekThumbnails', 'aiHighlightsGraph', 'chapters', 'queryParams']);
13310
+ const PLAYER_PARAMS = CLOUDINARY_PARAMS.concat(['_internalAnalyticsMetadata', 'debug', 'publicId', 'source', 'autoplayMode', 'playedEventPercents', 'playedEventTimes', 'analytics', 'cloudinaryAnalytics', 'allowUsageReport', 'fluid', 'ima', 'playlistWidget', 'hideContextMenu', 'colors', 'floatingWhenNotVisible', 'ads', 'showJumpControls', 'chaptersButton', 'pictureInPictureToggle', 'textTracks', 'qualitySelector', 'fetchErrorUsingGet', 'withCredentials', 'seekThumbnails', 'aiHighlightsGraph', 'chapters', 'queryParams']);
13310
13311
  const CLOUDINARY_CONFIG_PARAM = ['cloud_name', 'secure', 'private_cdn', 'secure_distribution', 'cdn_subdomain', 'secure_cdn_subdomain', 'cname', 'shorten', 'sign_url', 'api_secret', 'url_suffix', 'use_root_path', 'auth_token'];
13311
13312
  const DEFAULT_HLS_OPTIONS = {
13312
13313
  html5: {
@@ -13476,15 +13477,17 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
13476
13477
  return;
13477
13478
  }
13478
13479
  try {
13480
+ const internalAnalyticsMetadata = options._internalAnalyticsMetadata ?? {};
13479
13481
  const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
13480
13482
  const analyticsParams = new URLSearchParams(analyticsData).toString();
13481
13483
  const baseParams = new URLSearchParams({
13482
- vpVersion: "2.1.0",
13484
+ vpVersion: "2.1.1-edge.1",
13483
13485
  vpInstanceId: this.getVPInstanceId(),
13484
13486
  // #if (process.env.WEBPACK_BUILD_LIGHT)
13485
13487
  // vpLightBuild: true,
13486
13488
  // #endif
13487
- cloudName: options.cloudinary.cloudinaryConfig.cloud_name
13489
+ cloudName: options.cloudinary.cloudinaryConfig.cloud_name,
13490
+ ...internalAnalyticsMetadata
13488
13491
  }).toString();
13489
13492
  fetch(`${INTERNAL_ANALYTICS_URL}/video_player_source?${analyticsParams}&${baseParams}`);
13490
13493
  } catch (e) {
@@ -502,9 +502,6 @@
502
502
  .cld-video-player .vjs-text-track-display > div {
503
503
  margin: 3% !important;
504
504
  }
505
- .cld-video-player .vjs-text-track-display.cld-paced-text-tracks b {
506
- color: var(--color-accent);
507
- }
508
505
  .cld-video-player .vjs-text-track-cue {
509
506
  top: auto !important;
510
507
  bottom: 3.4rem !important;
@@ -612,7 +612,6 @@ __webpack_require__.r(__webpack_exports__);
612
612
  /* harmony export */ player: () => (/* binding */ player),
613
613
  /* harmony export */ players: () => (/* binding */ players),
614
614
  /* harmony export */ videoPlayer: () => (/* binding */ videoPlayer),
615
- /* harmony export */ videoPlayerWithProfile: () => (/* binding */ videoPlayerWithProfile),
616
615
  /* harmony export */ videoPlayers: () => (/* binding */ videoPlayers)
617
616
  /* harmony export */ });
618
617
  /* harmony import */ var assets_styles_main_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! assets/styles/main.scss */ "./assets/styles/main.scss");
@@ -648,10 +647,6 @@ const getPlayers = config => (selector, playerOptions, ready) => {
648
647
  };
649
648
  const videoPlayer = getVideoPlayer();
650
649
  const videoPlayers = getVideoPlayers();
651
- const videoPlayerWithProfile = (id, playerOptions, ready) => {
652
- console.warn('videoPlayerWithProfile method is DEPRECATED and will be removed soon, please use new `player` method instead');
653
- return getPlayer()(id, playerOptions, ready);
654
- };
655
650
  const player = getPlayer();
656
651
  const players = getPlayers();
657
652
  const cloudinaryVideoPlayerLegacyConfig = config => {
@@ -665,7 +660,6 @@ const cloudinary = {
665
660
  ...(window.cloudinary || {}),
666
661
  videoPlayer,
667
662
  videoPlayers,
668
- videoPlayerWithProfile,
669
663
  player,
670
664
  players,
671
665
  Cloudinary: {
@@ -766,19 +760,21 @@ __webpack_require__.r(__webpack_exports__);
766
760
  /* harmony import */ var _video_player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./video-player */ "./video-player.js");
767
761
  /* harmony import */ var _config_profiles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config/profiles */ "./config/profiles/index.js");
768
762
  /* harmony import */ var _plugins_cloudinary_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./plugins/cloudinary/common */ "./plugins/cloudinary/common.js");
763
+ /* harmony import */ var _cloudinary_url_gen_backwards_utils_unsigned_url_prefix__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @cloudinary/url-gen/backwards/utils/unsigned_url_prefix */ "../node_modules/@cloudinary/url-gen/backwards/utils/unsigned_url_prefix.js");
764
+
769
765
 
770
766
 
771
767
 
772
- const getProfile = async (cloudName, profile) => {
773
- if (Object.keys(_config_profiles__WEBPACK_IMPORTED_MODULE_1__.defaultProfiles).includes(profile)) {
768
+ const isDefaultProfile = profile => Object.keys(_config_profiles__WEBPACK_IMPORTED_MODULE_1__.defaultProfiles).includes(profile);
769
+ const getProfile = async (profile, initOptions) => {
770
+ if (isDefaultProfile(profile)) {
774
771
  return _config_profiles__WEBPACK_IMPORTED_MODULE_1__.defaultProfiles[profile];
775
772
  }
776
- if ((0,_plugins_cloudinary_common__WEBPACK_IMPORTED_MODULE_2__.isRawUrl)(profile)) {
777
- return await fetch(profile, {
778
- method: 'GET'
779
- }).then(res => res.json());
780
- }
781
- throw new Error('Custom profiles will be supported soon, please use one of default profiles: "cldDefault", "cldLooping" or "cldAdaptiveStream"');
773
+ const urlPrefix = (0,_cloudinary_url_gen_backwards_utils_unsigned_url_prefix__WEBPACK_IMPORTED_MODULE_3__.unsigned_url_prefix)(null, initOptions.cloudName ?? initOptions.cloud_name, initOptions.private_cdn, initOptions.cdn_subdomain, initOptions.secure_cdn_subdomain, initOptions.cname, initOptions.secure ?? true, initOptions.secure_distribution);
774
+ const profileUrl = (0,_plugins_cloudinary_common__WEBPACK_IMPORTED_MODULE_2__.isRawUrl)(profile) ? profile : `${urlPrefix}/_applet_/video_service/video_player_profiles/${profile.replaceAll(' ', '+')}.json`;
775
+ return fetch(profileUrl, {
776
+ method: 'GET'
777
+ }).then(res => res.json());
782
778
  };
783
779
  const player = async (elem, initOptions, ready) => {
784
780
  const {
@@ -786,8 +782,13 @@ const player = async (elem, initOptions, ready) => {
786
782
  ...otherInitOptions
787
783
  } = initOptions;
788
784
  try {
789
- const profileOptions = profile ? await getProfile(otherInitOptions.cloud_name, profile) : {};
790
- const options = Object.assign({}, profileOptions.playerOptions, otherInitOptions);
785
+ const profileOptions = profile ? await getProfile(profile, otherInitOptions) : {};
786
+ const options = Object.assign({}, profileOptions.playerOptions, otherInitOptions, {
787
+ _internalAnalyticsMetadata: {
788
+ newPlayerMethod: true,
789
+ profile: isDefaultProfile(profile) ? profile : !!profile
790
+ }
791
+ });
791
792
  const videoPlayer = new _video_player__WEBPACK_IMPORTED_MODULE_0__["default"](elem, options, ready);
792
793
  const nativeVideoPlayerSourceMethod = videoPlayer.source;
793
794
  videoPlayer.source = (id, options) => {
@@ -1413,7 +1414,7 @@ class CloudinaryAnalytics {
1413
1414
  this.cloudinaryAnalytics.startManualTracking(metadata, {
1414
1415
  ...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
1415
1416
  videoPlayerType: 'cloudinary video player',
1416
- videoPlayerVersion: "2.1.0"
1417
+ videoPlayerVersion: "2.1.1-edge.1"
1417
1418
  });
1418
1419
  } else if (this.currentVideMetadata.cloudName !== metadata.cloudName || this.currentVideMetadata.publicId !== metadata.publicId) {
1419
1420
  this.cloudinaryAnalytics.stopManualTracking();
@@ -1783,7 +1784,7 @@ class CloudinaryContext {
1783
1784
  options.sourceTypes = options.sourceTypes || _this.sourceTypes();
1784
1785
  options.poster = options.poster || posterOptionsForCurrent();
1785
1786
  options.queryParams = Object.assign(options.queryParams || {}, options.usageReport ? {
1786
- _s: `vp-${"2.1.0"}`
1787
+ _s: `vp-${"2.1.1-edge.1"}`
1787
1788
  } : {});
1788
1789
  if (options.sourceTypes.indexOf('audio') > -1) {
1789
1790
  builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
@@ -3047,7 +3048,7 @@ const contextMenuContent = player => {
3047
3048
  const isFullscreen = player.isFullscreen();
3048
3049
  const aboutMenuItem = {
3049
3050
  class: 'player-version',
3050
- label: 'Cloudinary Player v' + "2.1.0"
3051
+ label: 'Cloudinary Player v' + "2.1.1-edge.1"
3051
3052
  };
3052
3053
  if (!player.controls()) {
3053
3054
  return [aboutMenuItem];
@@ -5181,7 +5182,7 @@ __webpack_require__.r(__webpack_exports__);
5181
5182
  /* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);
5182
5183
 
5183
5184
  const CLOUDINARY_PARAMS = ['cloudinaryConfig', 'transformation', 'sourceTypes', 'sourceTransformation', 'posterOptions', 'autoShowRecommendations', 'fontFace', 'secure'];
5184
- const PLAYER_PARAMS = CLOUDINARY_PARAMS.concat(['debug', 'publicId', 'source', 'autoplayMode', 'playedEventPercents', 'playedEventTimes', 'analytics', 'cloudinaryAnalytics', 'allowUsageReport', 'fluid', 'ima', 'playlistWidget', 'hideContextMenu', 'colors', 'floatingWhenNotVisible', 'ads', 'showJumpControls', 'chaptersButton', 'pictureInPictureToggle', 'textTracks', 'qualitySelector', 'fetchErrorUsingGet', 'withCredentials', 'seekThumbnails', 'aiHighlightsGraph', 'chapters', 'queryParams']);
5185
+ const PLAYER_PARAMS = CLOUDINARY_PARAMS.concat(['_internalAnalyticsMetadata', 'debug', 'publicId', 'source', 'autoplayMode', 'playedEventPercents', 'playedEventTimes', 'analytics', 'cloudinaryAnalytics', 'allowUsageReport', 'fluid', 'ima', 'playlistWidget', 'hideContextMenu', 'colors', 'floatingWhenNotVisible', 'ads', 'showJumpControls', 'chaptersButton', 'pictureInPictureToggle', 'textTracks', 'qualitySelector', 'fetchErrorUsingGet', 'withCredentials', 'seekThumbnails', 'aiHighlightsGraph', 'chapters', 'queryParams']);
5185
5186
  const CLOUDINARY_CONFIG_PARAM = ['cloud_name', 'secure', 'private_cdn', 'secure_distribution', 'cdn_subdomain', 'secure_cdn_subdomain', 'cname', 'shorten', 'sign_url', 'api_secret', 'url_suffix', 'use_root_path', 'auth_token'];
5186
5187
  const DEFAULT_HLS_OPTIONS = {
5187
5188
  html5: {
@@ -5350,15 +5351,17 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
5350
5351
  return;
5351
5352
  }
5352
5353
  try {
5354
+ const internalAnalyticsMetadata = options._internalAnalyticsMetadata ?? {};
5353
5355
  const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
5354
5356
  const analyticsParams = new URLSearchParams(analyticsData).toString();
5355
5357
  const baseParams = new URLSearchParams({
5356
- vpVersion: "2.1.0",
5358
+ vpVersion: "2.1.1-edge.1",
5357
5359
  vpInstanceId: this.getVPInstanceId(),
5358
5360
  // #if (process.env.WEBPACK_BUILD_LIGHT)
5359
5361
  vpLightBuild: true,
5360
5362
  // #endif
5361
- cloudName: options.cloudinary.cloudinaryConfig.cloud_name
5363
+ cloudName: options.cloudinary.cloudinaryConfig.cloud_name,
5364
+ ...internalAnalyticsMetadata
5362
5365
  }).toString();
5363
5366
  fetch(`${INTERNAL_ANALYTICS_URL}/video_player_source?${analyticsParams}&${baseParams}`);
5364
5367
  } catch (e) {