cloudinary-video-player 3.1.2-edge.3 → 3.1.2-edge.4

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.
Files changed (52) hide show
  1. package/dist/adaptive-streaming.js +18 -36920
  2. package/dist/adaptive-streaming.min.js +3 -4
  3. package/dist/chapters.js +13 -217
  4. package/dist/chapters.min.js +3 -4
  5. package/dist/cld-video-player.css +2 -4
  6. package/dist/cld-video-player.js +307 -46341
  7. package/dist/cld-video-player.light.js +307 -46341
  8. package/dist/cld-video-player.light.min.js +4 -5
  9. package/dist/cld-video-player.min.css +3 -4
  10. package/dist/cld-video-player.min.js +4 -5
  11. package/dist/colors.js +13 -67
  12. package/dist/colors.min.js +3 -4
  13. package/dist/dash.js +15 -69999
  14. package/dist/dash.min.js +3 -4
  15. package/dist/debug.js +17 -378
  16. package/dist/debug.min.js +3 -4
  17. package/dist/ima.js +24 -7049
  18. package/dist/ima.min.js +3 -4
  19. package/dist/interaction-areas.js +20 -640
  20. package/dist/interaction-areas.min.js +3 -4
  21. package/dist/node_modules_lodash_throttle_js.js +17 -395
  22. package/dist/playlist.js +40 -1504
  23. package/dist/playlist.min.js +3 -4
  24. package/dist/recommendations-overlay.js +19 -391
  25. package/dist/recommendations-overlay.min.js +3 -4
  26. package/dist/share.js +14 -195
  27. package/dist/share.min.js +3 -4
  28. package/dist/shoppable.js +21 -762
  29. package/dist/shoppable.min.js +3 -4
  30. package/dist/srt-text-tracks.js +13 -189
  31. package/dist/srt-text-tracks.min.js +3 -4
  32. package/dist/visual-search.js +16 -271
  33. package/dist/visual-search.min.js +3 -4
  34. package/lib/adaptive-streaming.js +1 -2
  35. package/lib/all.js +1 -2
  36. package/lib/chapters.js +1 -2
  37. package/lib/cld-video-player.js +1 -2
  38. package/lib/cld-video-player.min.css +0 -2
  39. package/lib/colors.js +1 -2
  40. package/lib/dash.js +1 -2
  41. package/lib/debug.js +1 -2
  42. package/lib/ima.js +1 -2
  43. package/lib/interaction-areas.js +1 -2
  44. package/lib/player.js +1 -2
  45. package/lib/playlist.js +1 -2
  46. package/lib/recommendations-overlay.js +1 -2
  47. package/lib/share.js +1 -2
  48. package/lib/shoppable.js +1 -2
  49. package/lib/srt-text-tracks.js +1 -2
  50. package/lib/videoPlayer.js +1 -2
  51. package/lib/visual-search.js +1 -2
  52. package/package.json +2 -3
package/dist/chapters.js CHANGED
@@ -1,9 +1,17 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.1.2-edge.3
3
- * Built on 2025-08-06T14:15:40.534Z
2
+ * Cloudinary Video Player v3.1.2-edge.4
3
+ * Built on 2025-08-11T06:41:19.174Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  "use strict";
7
+ /*
8
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
9
+ * This devtool is neither made for production nor for readable output files.
10
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
11
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
12
+ * or disable the default devtool with "devtool: false".
13
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
14
+ */
7
15
  (self["cloudinaryVideoPlayerChunkLoading"] = self["cloudinaryVideoPlayerChunkLoading"] || []).push([["chapters"],{
8
16
 
9
17
  /***/ "./plugins/chapters/chapters.js":
@@ -12,216 +20,7 @@
12
20
  \**************************************/
13
21
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14
22
 
15
- __webpack_require__.r(__webpack_exports__);
16
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
18
- /* harmony export */ });
19
- /* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ "../node_modules/video.js/dist/alt/video.core-exposed.js");
20
- /* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);
21
- /* harmony import */ var _chapters_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chapters.scss */ "./plugins/chapters/chapters.scss");
22
- /* harmony import */ var _cloudinary_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cloudinary/common */ "./plugins/cloudinary/common.js");
23
- /* harmony import */ var _utils_utf8Base64__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/utf8Base64 */ "./utils/utf8Base64.js");
24
-
25
-
26
-
27
-
28
-
29
- /**
30
- * Chapters plugin.
31
- *
32
- * @function chapters
33
- * @param {Object} [options={}]
34
- * An object of options left to the plugin author to define.
35
- * @param {Player} player
36
- * A Video.js player object.
37
- */
38
- const chapters = function chapters(options, player) {
39
- player.addClass('vjs-chapters');
40
- player.chapters = new ChaptersPlugin(player, options);
41
- };
42
-
43
- /**
44
- * Chapters
45
- */
46
- const ChaptersPlugin = function () {
47
- /**
48
- * Plugin class constructor, called by videojs on
49
- * ready event.
50
- *
51
- * @function constructor
52
- * @param {Player} player
53
- * A Video.js player object.
54
- *
55
- * @param {Object} [options={}]
56
- * A plain object containing options for the plugin.
57
- */
58
- function ChaptersPlugin(player, options) {
59
- this.player = player;
60
- this.options = options;
61
- this.player.one('loadedmetadata', this.initializeChapters.bind(this));
62
- return this;
63
- }
64
- ChaptersPlugin.prototype.src = function src(options) {
65
- this.resetPlugin();
66
- this.options = options;
67
- this.player.one('loadedmetadata', this.initializeChapters.bind(this));
68
- };
69
- ChaptersPlugin.prototype.detach = function detach() {
70
- this.resetPlugin();
71
- };
72
- ChaptersPlugin.prototype.resetPlugin = function resetPlugin() {
73
- if (this.chaptersTrack) {
74
- this.player.$('.vjs-control-bar-chapter-display').remove();
75
- this.player.$('.vjs-chapter-display').remove();
76
- this.player.$$('.vjs-chapter-marker').forEach(el => el.remove());
77
- this.player.removeRemoteTextTrack(this.chaptersTrack);
78
- delete this.chaptersTrack;
79
- }
80
- };
81
- ChaptersPlugin.prototype.getChaptersFileUrlByName = function getChaptersFileUrlByName() {
82
- const currentPublicId = this.player.cloudinary.currentPublicId();
83
- if (!currentPublicId) {
84
- return null;
85
- }
86
- const {
87
- type: deliveryType
88
- } = this.player.cloudinary.source().resourceConfig();
89
- const urlPrefix = (0,_cloudinary_common__WEBPACK_IMPORTED_MODULE_2__.getCloudinaryUrlPrefix)(this.player.cloudinary.cloudinaryConfig());
90
- const fullUrl = `${urlPrefix}/_applet_/video_service/chapters/${deliveryType}/${(0,_utils_utf8Base64__WEBPACK_IMPORTED_MODULE_3__.utf8ToBase64)(currentPublicId)}.vtt`;
91
- return `${fullUrl}?t=${Date.now()}`;
92
- };
93
-
94
- /**
95
- * Bootstrap the plugin.
96
- */
97
- ChaptersPlugin.prototype.initializeChapters = async function initializeChapters() {
98
- const chaptersUrl = this.options === true ? this.getChaptersFileUrlByName() : this.options.url;
99
- if (chaptersUrl) {
100
- // Fetch chapters VTT from URL
101
- const chaptersTrack = {
102
- kind: 'chapters',
103
- src: chaptersUrl,
104
- default: true
105
- };
106
- const textTrack = this.player.addRemoteTextTrack(chaptersTrack);
107
- textTrack.addEventListener('load', () => {
108
- this.chaptersTrack = textTrack.track;
109
- this.setupChaptersDisplays();
110
- });
111
- } else if (Object.entries(this.options).length) {
112
- // Setup chapters from options
113
- const textTrack = this.player.addRemoteTextTrack({
114
- kind: 'chapters',
115
- default: true
116
- });
117
- const end = this.player.duration();
118
- Object.entries(this.options).forEach((entry, index, arr) => {
119
- const cue = new VTTCue(parseFloat(entry[0]), parseFloat(arr[index + 1] ? arr[index + 1][0] : end), entry[1]);
120
- textTrack.track.addCue(cue);
121
- });
122
- this.chaptersTrack = textTrack.track;
123
- this.setupChaptersDisplays();
124
- if (this.player.controlBar.chaptersButton) {
125
- this.player.controlBar.chaptersButton.update();
126
- }
127
- }
128
- };
129
-
130
- /**
131
- * Setup chapter displays.
132
- */
133
- ChaptersPlugin.prototype.setupChaptersDisplays = function initializeChapters() {
134
- this.setupProgressBarMarkers();
135
- this.setupProgressBarChapter();
136
- this.setupControlBarChapter();
137
- };
138
-
139
- /**
140
- * Setup the controlbar chapter display.
141
- */
142
- ChaptersPlugin.prototype.setupControlBarChapter = function setupControlBarChapter() {
143
- const controlBarChapterHolder = this.player.$('.vjs-control-bar-chapter-display') || document.createElement('div');
144
- controlBarChapterHolder.setAttribute('class', 'vjs-control-bar-chapter-display');
145
- const wrapper = this.player.$('.vjs-control-bar .vjs-spacer');
146
- wrapper.innerHTML = '';
147
- wrapper.classList.add('vjs-control-bar-chapter-wrapper');
148
- wrapper.appendChild(controlBarChapterHolder);
149
- this.chaptersTrack.addEventListener('cuechange', () => {
150
- const activeCues = Array.from(this.chaptersTrack.activeCues); // Safari needs Array.from()
151
- controlBarChapterHolder.innerText = activeCues.length > 0 ? activeCues[0].text : '';
152
- });
153
- };
154
-
155
- /**
156
- * Setup the progress bar markers.
157
- */
158
- ChaptersPlugin.prototype.setupProgressBarMarkers = function setupProgressBarMarkers() {
159
- const total = this.player.duration();
160
- const {
161
- seekBar
162
- } = this.player.controlBar.progressControl;
163
- Array.from(this.chaptersTrack.cues).forEach(marker => {
164
- // Safari needs Array.from()
165
- if (marker.startTime !== 0) {
166
- const markerTime = marker.startTime;
167
- const left = markerTime / total * 100 + '%';
168
- const markerEl = video_js__WEBPACK_IMPORTED_MODULE_0___default().dom.createEl('div', undefined, {
169
- class: 'vjs-chapter-marker',
170
- style: `left: ${left}`
171
- });
172
- seekBar.el().append(markerEl);
173
- }
174
- });
175
- };
176
-
177
- /**
178
- * Setup the progrees bar on-hover chapter display.
179
- */
180
- ChaptersPlugin.prototype.setupProgressBarChapter = function setupProgressBarChapter() {
181
- const chapterEl = video_js__WEBPACK_IMPORTED_MODULE_0___default().dom.createEl('div', undefined, {
182
- class: 'vjs-chapter-display',
183
- style: `max-width: ${this.player.$('.vjs-vtt-thumbnail-display') ? this.player.$('.vjs-vtt-thumbnail-display').style.width : '160px'}`
184
- });
185
- const mouseTimeDisplay = this.player.getDescendant(['controlBar', 'progressControl', 'seekBar', 'mouseTimeDisplay']);
186
- const timeTooltip = mouseTimeDisplay.getDescendant(['timeTooltip']);
187
- timeTooltip.el().parentElement.prepend(chapterEl);
188
- const getChapterFromPoint = point => {
189
- const total = this.player.duration();
190
- const seekBarTime = point * total;
191
- const chapter = Array.from(this.chaptersTrack?.cues || []).find(marker => {
192
- return seekBarTime >= marker.startTime && seekBarTime <= marker.endTime;
193
- });
194
- return chapter ? chapter.text : '';
195
- };
196
- timeTooltip.update = function (seekBarRect, seekBarPoint, content) {
197
- const originalUpdateFn = Object.getPrototypeOf(this).update;
198
- originalUpdateFn.call(this, seekBarRect, seekBarPoint, content);
199
- chapterEl.innerText = getChapterFromPoint(seekBarPoint);
200
- };
201
-
202
- // Handle case of no seek-thumbnails
203
- if (typeof this.player.vttThumbnails !== 'object') {
204
- mouseTimeDisplay.update = function (seekBarRect, seekBarPoint) {
205
- const time = seekBarPoint * this.player_.duration();
206
- const width = seekBarRect.width;
207
- const size = chapterEl.clientWidth / 2;
208
- timeTooltip.updateTime(seekBarRect, seekBarPoint, time, () => {
209
- // Make sure it doesn't exit the player
210
- if (seekBarRect.width * seekBarPoint < size) {
211
- this.el_.style.left = `${size}px`;
212
- } else if (seekBarRect.width * seekBarPoint + size > width) {
213
- this.el_.style.left = `${seekBarRect.width - size}px`;
214
- } else {
215
- this.el_.style.left = `${seekBarRect.width * seekBarPoint}px`;
216
- }
217
- });
218
- timeTooltip.write(video_js__WEBPACK_IMPORTED_MODULE_0___default().time.formatTime(time));
219
- };
220
- }
221
- };
222
- return ChaptersPlugin;
223
- }();
224
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (chapters);
23
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _chapters_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chapters.scss */ \"./plugins/chapters/chapters.scss\");\n/* harmony import */ var _cloudinary_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cloudinary/common */ \"./plugins/cloudinary/common.js\");\n/* harmony import */ var _utils_utf8Base64__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/utf8Base64 */ \"./utils/utf8Base64.js\");\n\n\n\n\n\n/**\n * Chapters plugin.\n *\n * @function chapters\n * @param {Object} [options={}]\n * An object of options left to the plugin author to define.\n * @param {Player} player\n * A Video.js player object.\n */\nconst chapters = function chapters(options, player) {\n player.addClass('vjs-chapters');\n player.chapters = new ChaptersPlugin(player, options);\n};\n\n/**\n * Chapters\n */\nconst ChaptersPlugin = function () {\n /**\n * Plugin class constructor, called by videojs on\n * ready event.\n *\n * @function constructor\n * @param {Player} player\n * A Video.js player object.\n *\n * @param {Object} [options={}]\n * A plain object containing options for the plugin.\n */\n function ChaptersPlugin(player, options) {\n this.player = player;\n this.options = options;\n this.player.one('loadedmetadata', this.initializeChapters.bind(this));\n return this;\n }\n ChaptersPlugin.prototype.src = function src(options) {\n this.resetPlugin();\n this.options = options;\n this.player.one('loadedmetadata', this.initializeChapters.bind(this));\n };\n ChaptersPlugin.prototype.detach = function detach() {\n this.resetPlugin();\n };\n ChaptersPlugin.prototype.resetPlugin = function resetPlugin() {\n if (this.chaptersTrack) {\n this.player.$('.vjs-control-bar-chapter-display').remove();\n this.player.$('.vjs-chapter-display').remove();\n this.player.$$('.vjs-chapter-marker').forEach(el => el.remove());\n this.player.removeRemoteTextTrack(this.chaptersTrack);\n delete this.chaptersTrack;\n }\n };\n ChaptersPlugin.prototype.getChaptersFileUrlByName = function getChaptersFileUrlByName() {\n const currentPublicId = this.player.cloudinary.currentPublicId();\n if (!currentPublicId) {\n return null;\n }\n const {\n type: deliveryType\n } = this.player.cloudinary.source().resourceConfig();\n const urlPrefix = (0,_cloudinary_common__WEBPACK_IMPORTED_MODULE_2__.getCloudinaryUrlPrefix)(this.player.cloudinary.cloudinaryConfig());\n const fullUrl = `${urlPrefix}/_applet_/video_service/chapters/${deliveryType}/${(0,_utils_utf8Base64__WEBPACK_IMPORTED_MODULE_3__.utf8ToBase64)(currentPublicId)}.vtt`;\n return `${fullUrl}?t=${Date.now()}`;\n };\n\n /**\n * Bootstrap the plugin.\n */\n ChaptersPlugin.prototype.initializeChapters = async function initializeChapters() {\n const chaptersUrl = this.options === true ? this.getChaptersFileUrlByName() : this.options.url;\n if (chaptersUrl) {\n // Fetch chapters VTT from URL\n const chaptersTrack = {\n kind: 'chapters',\n src: chaptersUrl,\n default: true\n };\n const textTrack = this.player.addRemoteTextTrack(chaptersTrack);\n textTrack.addEventListener('load', () => {\n this.chaptersTrack = textTrack.track;\n this.setupChaptersDisplays();\n });\n } else if (Object.entries(this.options).length) {\n // Setup chapters from options\n const textTrack = this.player.addRemoteTextTrack({\n kind: 'chapters',\n default: true\n });\n const end = this.player.duration();\n Object.entries(this.options).forEach((entry, index, arr) => {\n const cue = new VTTCue(parseFloat(entry[0]), parseFloat(arr[index + 1] ? arr[index + 1][0] : end), entry[1]);\n textTrack.track.addCue(cue);\n });\n this.chaptersTrack = textTrack.track;\n this.setupChaptersDisplays();\n if (this.player.controlBar.chaptersButton) {\n this.player.controlBar.chaptersButton.update();\n }\n }\n };\n\n /**\n * Setup chapter displays.\n */\n ChaptersPlugin.prototype.setupChaptersDisplays = function initializeChapters() {\n this.setupProgressBarMarkers();\n this.setupProgressBarChapter();\n this.setupControlBarChapter();\n };\n\n /**\n * Setup the controlbar chapter display.\n */\n ChaptersPlugin.prototype.setupControlBarChapter = function setupControlBarChapter() {\n const controlBarChapterHolder = this.player.$('.vjs-control-bar-chapter-display') || document.createElement('div');\n controlBarChapterHolder.setAttribute('class', 'vjs-control-bar-chapter-display');\n const wrapper = this.player.$('.vjs-control-bar .vjs-spacer');\n wrapper.innerHTML = '';\n wrapper.classList.add('vjs-control-bar-chapter-wrapper');\n wrapper.appendChild(controlBarChapterHolder);\n this.chaptersTrack.addEventListener('cuechange', () => {\n const activeCues = Array.from(this.chaptersTrack.activeCues); // Safari needs Array.from()\n controlBarChapterHolder.innerText = activeCues.length > 0 ? activeCues[0].text : '';\n });\n };\n\n /**\n * Setup the progress bar markers.\n */\n ChaptersPlugin.prototype.setupProgressBarMarkers = function setupProgressBarMarkers() {\n const total = this.player.duration();\n const {\n seekBar\n } = this.player.controlBar.progressControl;\n Array.from(this.chaptersTrack.cues).forEach(marker => {\n // Safari needs Array.from()\n if (marker.startTime !== 0) {\n const markerTime = marker.startTime;\n const left = markerTime / total * 100 + '%';\n const markerEl = video_js__WEBPACK_IMPORTED_MODULE_0___default().dom.createEl('div', undefined, {\n class: 'vjs-chapter-marker',\n style: `left: ${left}`\n });\n seekBar.el().append(markerEl);\n }\n });\n };\n\n /**\n * Setup the progrees bar on-hover chapter display.\n */\n ChaptersPlugin.prototype.setupProgressBarChapter = function setupProgressBarChapter() {\n const chapterEl = video_js__WEBPACK_IMPORTED_MODULE_0___default().dom.createEl('div', undefined, {\n class: 'vjs-chapter-display',\n style: `max-width: ${this.player.$('.vjs-vtt-thumbnail-display') ? this.player.$('.vjs-vtt-thumbnail-display').style.width : '160px'}`\n });\n const mouseTimeDisplay = this.player.getDescendant(['controlBar', 'progressControl', 'seekBar', 'mouseTimeDisplay']);\n const timeTooltip = mouseTimeDisplay.getDescendant(['timeTooltip']);\n timeTooltip.el().parentElement.prepend(chapterEl);\n const getChapterFromPoint = point => {\n const total = this.player.duration();\n const seekBarTime = point * total;\n const chapter = Array.from(this.chaptersTrack?.cues || []).find(marker => {\n return seekBarTime >= marker.startTime && seekBarTime <= marker.endTime;\n });\n return chapter ? chapter.text : '';\n };\n timeTooltip.update = function (seekBarRect, seekBarPoint, content) {\n const originalUpdateFn = Object.getPrototypeOf(this).update;\n originalUpdateFn.call(this, seekBarRect, seekBarPoint, content);\n chapterEl.innerText = getChapterFromPoint(seekBarPoint);\n };\n\n // Handle case of no seek-thumbnails\n if (typeof this.player.vttThumbnails !== 'object') {\n mouseTimeDisplay.update = function (seekBarRect, seekBarPoint) {\n const time = seekBarPoint * this.player_.duration();\n const width = seekBarRect.width;\n const size = chapterEl.clientWidth / 2;\n timeTooltip.updateTime(seekBarRect, seekBarPoint, time, () => {\n // Make sure it doesn't exit the player\n if (seekBarRect.width * seekBarPoint < size) {\n this.el_.style.left = `${size}px`;\n } else if (seekBarRect.width * seekBarPoint + size > width) {\n this.el_.style.left = `${seekBarRect.width - size}px`;\n } else {\n this.el_.style.left = `${seekBarRect.width * seekBarPoint}px`;\n }\n });\n timeTooltip.write(video_js__WEBPACK_IMPORTED_MODULE_0___default().time.formatTime(time));\n };\n }\n };\n return ChaptersPlugin;\n}();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (chapters);\n\n//# sourceURL=webpack://cloudinary-video-player/./plugins/chapters/chapters.js?");
225
24
 
226
25
  /***/ }),
227
26
 
@@ -231,11 +30,8 @@ const ChaptersPlugin = function () {
231
30
  \****************************************/
232
31
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
233
32
 
234
- __webpack_require__.r(__webpack_exports__);
235
- // extracted by mini-css-extract-plugin
236
-
33
+ eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://cloudinary-video-player/./plugins/chapters/chapters.scss?");
237
34
 
238
35
  /***/ })
239
36
 
240
- }]);
241
- //# sourceMappingURL=chapters.js.map
37
+ }]);
@@ -1,7 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.1.2-edge.3
3
- * Built on 2025-08-06T14:15:21.113Z
2
+ * Cloudinary Video Player v3.1.2-edge.4
3
+ * Built on 2025-08-11T06:41:01.308Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
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)}}}]);
7
- //# sourceMappingURL=chapters.min.js.map
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
3
- * Built on 2025-08-06T14:15:40.534Z
2
+ * Cloudinary Video Player v3.1.2-edge.4
3
+ * Built on 2025-08-11T06:41:19.174Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  /*!*************************************************************************************************!*\
@@ -2651,5 +2651,3 @@
2651
2651
  .vjs-share-download-button.vjs-waiting > .vjs-loading-spinner {
2652
2652
  display: flex;
2653
2653
  }
2654
-
2655
- /*# sourceMappingURL=cld-video-player.css.map*/