cloudinary-video-player 3.0.1-edge.1 → 3.0.1-edge.2

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/chapters.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.0.1-edge.1
3
- * Built on 2025-06-09T17:56:13.518Z
2
+ * Cloudinary Video Player v3.0.1-edge.2
3
+ * Built on 2025-06-09T18:00:00.730Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.0.1-edge.1
3
- * Built on 2025-06-09T17:55:54.085Z
2
+ * Cloudinary Video Player v3.0.1-edge.2
3
+ * Built on 2025-06-09T17:59:41.337Z
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:()=>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}),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,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.0.1-edge.1
3
- * Built on 2025-06-09T17:56:13.518Z
2
+ * Cloudinary Video Player v3.0.1-edge.2
3
+ * Built on 2025-06-09T18:00:00.730Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  /*!*************************************************************************************************!*\
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.0.1-edge.1
3
- * Built on 2025-06-09T17:56:13.518Z
2
+ * Cloudinary Video Player v3.0.1-edge.2
3
+ * Built on 2025-06-09T18:00:00.730Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -1455,7 +1455,7 @@ class CloudinaryAnalytics {
1455
1455
  }, {
1456
1456
  ...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
1457
1457
  videoPlayerType: 'cloudinary video player',
1458
- videoPlayerVersion: "3.0.1-edge.1"
1458
+ videoPlayerVersion: "3.0.1-edge.2"
1459
1459
  });
1460
1460
  } else if (this.currentVideoMetadata.cloudName !== metadata.cloudName || this.currentVideoMetadata.publicId !== metadata.publicId) {
1461
1461
  this.cloudinaryAnalytics.stopManualTracking();
@@ -1850,7 +1850,7 @@ class CloudinaryContext {
1850
1850
  options.sourceTypes = options.sourceTypes || _this.sourceTypes();
1851
1851
  options.poster = options.poster || posterOptionsForCurrent();
1852
1852
  options.queryParams = Object.assign(options.queryParams || {}, options.allowUsageReport ? {
1853
- _s: `vp-${"3.0.1-edge.1"}`
1853
+ _s: `vp-${"3.0.1-edge.2"}`
1854
1854
  } : {});
1855
1855
  if (options.sourceTypes.indexOf('audio') > -1) {
1856
1856
  builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
@@ -2473,7 +2473,9 @@ class VideoSource extends _base_source__WEBPACK_IMPORTED_MODULE_7__["default"] {
2473
2473
  // BaseSource method
2474
2474
  'transformation',
2475
2475
  // BaseSource method
2476
- 'queryParams' // BaseSource method
2476
+ 'queryParams',
2477
+ // BaseSource method
2478
+ 'type' // BaseSource handles getType()
2477
2479
  ];
2478
2480
  const SIMPLE_PROPERTIES = video_player_const__WEBPACK_IMPORTED_MODULE_3__.SOURCE_PARAMS.filter(param => !EXCLUDED_PROPERTIES.includes(param));
2479
2481
 
@@ -2830,7 +2832,7 @@ const contextMenuContent = player => {
2830
2832
  const isFullscreen = player.isFullscreen();
2831
2833
  const aboutMenuItem = {
2832
2834
  class: 'player-version',
2833
- label: 'Cloudinary Player v' + "3.0.1-edge.1"
2835
+ label: 'Cloudinary Player v' + "3.0.1-edge.2"
2834
2836
  };
2835
2837
  if (!player.controls()) {
2836
2838
  return [aboutMenuItem];
@@ -5269,7 +5271,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
5269
5271
  const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
5270
5272
  const analyticsParams = new URLSearchParams(analyticsData).toString();
5271
5273
  const baseParams = new URLSearchParams({
5272
- vpVersion: "3.0.1-edge.1",
5274
+ vpVersion: "3.0.1-edge.2",
5273
5275
  vpInstanceId: this.getVPInstanceId(),
5274
5276
  cloudName: options.cloudinary.cloudinaryConfig.cloud_name,
5275
5277
  ...internalAnalyticsMetadata
@@ -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.0.1-edge.1
4
- * Built on 2025-06-09T17:56:13.518Z
3
+ * Cloudinary Video Player v3.0.1-edge.2
4
+ * Built on 2025-06-09T18:00:00.730Z
5
5
  * https://github.com/cloudinary/cloudinary-video-player
6
6
  */
7
7
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -1456,7 +1456,7 @@ class CloudinaryAnalytics {
1456
1456
  }, {
1457
1457
  ...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
1458
1458
  videoPlayerType: 'cloudinary video player',
1459
- videoPlayerVersion: "3.0.1-edge.1"
1459
+ videoPlayerVersion: "3.0.1-edge.2"
1460
1460
  });
1461
1461
  } else if (this.currentVideoMetadata.cloudName !== metadata.cloudName || this.currentVideoMetadata.publicId !== metadata.publicId) {
1462
1462
  this.cloudinaryAnalytics.stopManualTracking();
@@ -1851,7 +1851,7 @@ class CloudinaryContext {
1851
1851
  options.sourceTypes = options.sourceTypes || _this.sourceTypes();
1852
1852
  options.poster = options.poster || posterOptionsForCurrent();
1853
1853
  options.queryParams = Object.assign(options.queryParams || {}, options.allowUsageReport ? {
1854
- _s: `vp-${"3.0.1-edge.1"}`
1854
+ _s: `vp-${"3.0.1-edge.2"}`
1855
1855
  } : {});
1856
1856
  if (options.sourceTypes.indexOf('audio') > -1) {
1857
1857
  builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
@@ -2474,7 +2474,9 @@ class VideoSource extends _base_source__WEBPACK_IMPORTED_MODULE_7__["default"] {
2474
2474
  // BaseSource method
2475
2475
  'transformation',
2476
2476
  // BaseSource method
2477
- 'queryParams' // BaseSource method
2477
+ 'queryParams',
2478
+ // BaseSource method
2479
+ 'type' // BaseSource handles getType()
2478
2480
  ];
2479
2481
  const SIMPLE_PROPERTIES = video_player_const__WEBPACK_IMPORTED_MODULE_3__.SOURCE_PARAMS.filter(param => !EXCLUDED_PROPERTIES.includes(param));
2480
2482
 
@@ -2831,7 +2833,7 @@ const contextMenuContent = player => {
2831
2833
  const isFullscreen = player.isFullscreen();
2832
2834
  const aboutMenuItem = {
2833
2835
  class: 'player-version',
2834
- label: 'Cloudinary Player v' + "3.0.1-edge.1"
2836
+ label: 'Cloudinary Player v' + "3.0.1-edge.2"
2835
2837
  };
2836
2838
  if (!player.controls()) {
2837
2839
  return [aboutMenuItem];
@@ -5270,7 +5272,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
5270
5272
  const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
5271
5273
  const analyticsParams = new URLSearchParams(analyticsData).toString();
5272
5274
  const baseParams = new URLSearchParams({
5273
- vpVersion: "3.0.1-edge.1",
5275
+ vpVersion: "3.0.1-edge.2",
5274
5276
  vpInstanceId: this.getVPInstanceId(),
5275
5277
  cloudName: options.cloudinary.cloudinaryConfig.cloud_name,
5276
5278
  ...internalAnalyticsMetadata