cloudinary-video-player 3.12.1 → 3.12.2-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.
Files changed (86) hide show
  1. package/dist/134.min.js +8 -0
  2. package/dist/309.min.js +6 -0
  3. package/dist/adaptive-streaming.js +9 -9
  4. package/dist/adaptive-streaming.min.js +2 -2
  5. package/dist/chapters.js +4 -4
  6. package/dist/chapters.min.js +3 -3
  7. package/dist/cld-player-core.js +37 -0
  8. package/dist/cld-player-core.min.js +6 -0
  9. package/dist/cld-video-player-lazy.js +494 -0
  10. package/dist/cld-video-player-lazy.min.js +6 -0
  11. package/dist/cld-video-player.css +2 -2
  12. package/dist/cld-video-player.js +366 -332
  13. package/dist/cld-video-player.light.js +366 -332
  14. package/dist/cld-video-player.light.min.js +4 -4
  15. package/dist/cld-video-player.min.css +2 -2
  16. package/dist/cld-video-player.min.js +4 -4
  17. package/dist/colors.js +4 -4
  18. package/dist/colors.min.js +2 -2
  19. package/dist/dash.js +6 -6
  20. package/dist/dash.min.js +2 -2
  21. package/dist/debug.js +8 -8
  22. package/dist/debug.min.js +3 -3
  23. package/dist/ima.js +9 -9
  24. package/dist/ima.min.js +2 -2
  25. package/dist/interaction-areas.js +11 -11
  26. package/dist/interaction-areas.min.js +2 -2
  27. package/dist/node_modules_lodash_throttle_js.js +8 -8
  28. package/dist/playlist.js +31 -31
  29. package/dist/playlist.min.js +3 -3
  30. package/dist/recommendations-overlay.js +10 -10
  31. package/dist/recommendations-overlay.min.js +2 -2
  32. package/dist/schema.json +19 -0
  33. package/dist/share.js +5 -5
  34. package/dist/share.min.js +3 -3
  35. package/dist/shoppable.js +12 -12
  36. package/dist/shoppable.min.js +2 -2
  37. package/dist/utils_fetch-config_js.js +81 -0
  38. package/dist/video-player_js.js +3111 -0
  39. package/dist/visual-search.js +7 -7
  40. package/dist/visual-search.min.js +2 -2
  41. package/lib/_commonjsHelpers.js +7 -0
  42. package/lib/_videojs-proxy.js +30294 -0
  43. package/lib/abr-strategies.js +31 -0
  44. package/lib/adaptive-streaming.js +468 -2
  45. package/lib/all.js +25 -2
  46. package/lib/chapters.js +205 -1
  47. package/lib/cld-video-player.min.css +5 -22
  48. package/lib/colors.js +59 -1
  49. package/lib/{schema.json → config/configSchema.json} +19 -0
  50. package/lib/dash.js +69943 -2
  51. package/lib/debug.js +322 -1
  52. package/lib/document.js +770 -0
  53. package/lib/download-button.js +48 -0
  54. package/lib/fetch-config.js +93 -0
  55. package/lib/ima.js +6851 -1
  56. package/lib/index.js +27 -0
  57. package/lib/interaction-areas.const.js +24 -0
  58. package/lib/interaction-areas.service.js +469 -0
  59. package/lib/lazy.js +20 -0
  60. package/lib/noop.js +33 -0
  61. package/lib/player-api.js +469 -0
  62. package/lib/player.js +7 -2
  63. package/lib/playlist-panel.js +602 -0
  64. package/lib/playlist.js +637 -1
  65. package/lib/querystring.js +81 -0
  66. package/lib/recommendations-overlay.js +320 -1
  67. package/lib/share.js +129 -1
  68. package/lib/shoppable-post-widget.js +572 -0
  69. package/lib/shoppable-widget.js +77 -0
  70. package/lib/throttle.js +318 -0
  71. package/lib/toNumber.js +134 -0
  72. package/lib/validators-functions.js +485 -0
  73. package/lib/video-player.js +16241 -0
  74. package/lib/videoPlayer.js +7 -2
  75. package/lib/videojs-contrib-hlsjs.js +37638 -0
  76. package/lib/visual-search.js +235 -1
  77. package/package.json +31 -15
  78. package/lib/adaptive-streaming.js.LICENSE.txt +0 -3
  79. package/lib/all.js.LICENSE.txt +0 -25
  80. package/lib/cld-video-player.js +0 -2
  81. package/lib/cld-video-player.js.LICENSE.txt +0 -21
  82. package/lib/dash.js.LICENSE.txt +0 -1842
  83. package/lib/interaction-areas.js +0 -1
  84. package/lib/player.js.LICENSE.txt +0 -21
  85. package/lib/shoppable.js +0 -1
  86. package/lib/videoPlayer.js.LICENSE.txt +0 -21
@@ -0,0 +1,318 @@
1
+ import { g as getDefaultExportFromCjs } from './_commonjsHelpers.js';
2
+ import { a as require_root, r as requireIsObject } from './validators-functions.js';
3
+ import { r as requireToNumber } from './toNumber.js';
4
+
5
+ var now_1;
6
+ var hasRequiredNow;
7
+
8
+ function requireNow () {
9
+ if (hasRequiredNow) return now_1;
10
+ hasRequiredNow = 1;
11
+ var root = require_root();
12
+
13
+ /**
14
+ * Gets the timestamp of the number of milliseconds that have elapsed since
15
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
16
+ *
17
+ * @static
18
+ * @memberOf _
19
+ * @since 2.4.0
20
+ * @category Date
21
+ * @returns {number} Returns the timestamp.
22
+ * @example
23
+ *
24
+ * _.defer(function(stamp) {
25
+ * console.log(_.now() - stamp);
26
+ * }, _.now());
27
+ * // => Logs the number of milliseconds it took for the deferred invocation.
28
+ */
29
+ var now = function() {
30
+ return root.Date.now();
31
+ };
32
+
33
+ now_1 = now;
34
+ return now_1;
35
+ }
36
+
37
+ var debounce_1;
38
+ var hasRequiredDebounce;
39
+
40
+ function requireDebounce () {
41
+ if (hasRequiredDebounce) return debounce_1;
42
+ hasRequiredDebounce = 1;
43
+ var isObject = requireIsObject(),
44
+ now = requireNow(),
45
+ toNumber = requireToNumber();
46
+
47
+ /** Error message constants. */
48
+ var FUNC_ERROR_TEXT = 'Expected a function';
49
+
50
+ /* Built-in method references for those with the same name as other `lodash` methods. */
51
+ var nativeMax = Math.max,
52
+ nativeMin = Math.min;
53
+
54
+ /**
55
+ * Creates a debounced function that delays invoking `func` until after `wait`
56
+ * milliseconds have elapsed since the last time the debounced function was
57
+ * invoked. The debounced function comes with a `cancel` method to cancel
58
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
59
+ * Provide `options` to indicate whether `func` should be invoked on the
60
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
61
+ * with the last arguments provided to the debounced function. Subsequent
62
+ * calls to the debounced function return the result of the last `func`
63
+ * invocation.
64
+ *
65
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
66
+ * invoked on the trailing edge of the timeout only if the debounced function
67
+ * is invoked more than once during the `wait` timeout.
68
+ *
69
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
70
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
71
+ *
72
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
73
+ * for details over the differences between `_.debounce` and `_.throttle`.
74
+ *
75
+ * @static
76
+ * @memberOf _
77
+ * @since 0.1.0
78
+ * @category Function
79
+ * @param {Function} func The function to debounce.
80
+ * @param {number} [wait=0] The number of milliseconds to delay.
81
+ * @param {Object} [options={}] The options object.
82
+ * @param {boolean} [options.leading=false]
83
+ * Specify invoking on the leading edge of the timeout.
84
+ * @param {number} [options.maxWait]
85
+ * The maximum time `func` is allowed to be delayed before it's invoked.
86
+ * @param {boolean} [options.trailing=true]
87
+ * Specify invoking on the trailing edge of the timeout.
88
+ * @returns {Function} Returns the new debounced function.
89
+ * @example
90
+ *
91
+ * // Avoid costly calculations while the window size is in flux.
92
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
93
+ *
94
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
95
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
96
+ * 'leading': true,
97
+ * 'trailing': false
98
+ * }));
99
+ *
100
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
101
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
102
+ * var source = new EventSource('/stream');
103
+ * jQuery(source).on('message', debounced);
104
+ *
105
+ * // Cancel the trailing debounced invocation.
106
+ * jQuery(window).on('popstate', debounced.cancel);
107
+ */
108
+ function debounce(func, wait, options) {
109
+ var lastArgs,
110
+ lastThis,
111
+ maxWait,
112
+ result,
113
+ timerId,
114
+ lastCallTime,
115
+ lastInvokeTime = 0,
116
+ leading = false,
117
+ maxing = false,
118
+ trailing = true;
119
+
120
+ if (typeof func != 'function') {
121
+ throw new TypeError(FUNC_ERROR_TEXT);
122
+ }
123
+ wait = toNumber(wait) || 0;
124
+ if (isObject(options)) {
125
+ leading = !!options.leading;
126
+ maxing = 'maxWait' in options;
127
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
128
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
129
+ }
130
+
131
+ function invokeFunc(time) {
132
+ var args = lastArgs,
133
+ thisArg = lastThis;
134
+
135
+ lastArgs = lastThis = undefined;
136
+ lastInvokeTime = time;
137
+ result = func.apply(thisArg, args);
138
+ return result;
139
+ }
140
+
141
+ function leadingEdge(time) {
142
+ // Reset any `maxWait` timer.
143
+ lastInvokeTime = time;
144
+ // Start the timer for the trailing edge.
145
+ timerId = setTimeout(timerExpired, wait);
146
+ // Invoke the leading edge.
147
+ return leading ? invokeFunc(time) : result;
148
+ }
149
+
150
+ function remainingWait(time) {
151
+ var timeSinceLastCall = time - lastCallTime,
152
+ timeSinceLastInvoke = time - lastInvokeTime,
153
+ timeWaiting = wait - timeSinceLastCall;
154
+
155
+ return maxing
156
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
157
+ : timeWaiting;
158
+ }
159
+
160
+ function shouldInvoke(time) {
161
+ var timeSinceLastCall = time - lastCallTime,
162
+ timeSinceLastInvoke = time - lastInvokeTime;
163
+
164
+ // Either this is the first call, activity has stopped and we're at the
165
+ // trailing edge, the system time has gone backwards and we're treating
166
+ // it as the trailing edge, or we've hit the `maxWait` limit.
167
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
168
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
169
+ }
170
+
171
+ function timerExpired() {
172
+ var time = now();
173
+ if (shouldInvoke(time)) {
174
+ return trailingEdge(time);
175
+ }
176
+ // Restart the timer.
177
+ timerId = setTimeout(timerExpired, remainingWait(time));
178
+ }
179
+
180
+ function trailingEdge(time) {
181
+ timerId = undefined;
182
+
183
+ // Only invoke if we have `lastArgs` which means `func` has been
184
+ // debounced at least once.
185
+ if (trailing && lastArgs) {
186
+ return invokeFunc(time);
187
+ }
188
+ lastArgs = lastThis = undefined;
189
+ return result;
190
+ }
191
+
192
+ function cancel() {
193
+ if (timerId !== undefined) {
194
+ clearTimeout(timerId);
195
+ }
196
+ lastInvokeTime = 0;
197
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
198
+ }
199
+
200
+ function flush() {
201
+ return timerId === undefined ? result : trailingEdge(now());
202
+ }
203
+
204
+ function debounced() {
205
+ var time = now(),
206
+ isInvoking = shouldInvoke(time);
207
+
208
+ lastArgs = arguments;
209
+ lastThis = this;
210
+ lastCallTime = time;
211
+
212
+ if (isInvoking) {
213
+ if (timerId === undefined) {
214
+ return leadingEdge(lastCallTime);
215
+ }
216
+ if (maxing) {
217
+ // Handle invocations in a tight loop.
218
+ clearTimeout(timerId);
219
+ timerId = setTimeout(timerExpired, wait);
220
+ return invokeFunc(lastCallTime);
221
+ }
222
+ }
223
+ if (timerId === undefined) {
224
+ timerId = setTimeout(timerExpired, wait);
225
+ }
226
+ return result;
227
+ }
228
+ debounced.cancel = cancel;
229
+ debounced.flush = flush;
230
+ return debounced;
231
+ }
232
+
233
+ debounce_1 = debounce;
234
+ return debounce_1;
235
+ }
236
+
237
+ var throttle_1;
238
+ var hasRequiredThrottle;
239
+
240
+ function requireThrottle () {
241
+ if (hasRequiredThrottle) return throttle_1;
242
+ hasRequiredThrottle = 1;
243
+ var debounce = requireDebounce(),
244
+ isObject = requireIsObject();
245
+
246
+ /** Error message constants. */
247
+ var FUNC_ERROR_TEXT = 'Expected a function';
248
+
249
+ /**
250
+ * Creates a throttled function that only invokes `func` at most once per
251
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
252
+ * method to cancel delayed `func` invocations and a `flush` method to
253
+ * immediately invoke them. Provide `options` to indicate whether `func`
254
+ * should be invoked on the leading and/or trailing edge of the `wait`
255
+ * timeout. The `func` is invoked with the last arguments provided to the
256
+ * throttled function. Subsequent calls to the throttled function return the
257
+ * result of the last `func` invocation.
258
+ *
259
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
260
+ * invoked on the trailing edge of the timeout only if the throttled function
261
+ * is invoked more than once during the `wait` timeout.
262
+ *
263
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
264
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
265
+ *
266
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
267
+ * for details over the differences between `_.throttle` and `_.debounce`.
268
+ *
269
+ * @static
270
+ * @memberOf _
271
+ * @since 0.1.0
272
+ * @category Function
273
+ * @param {Function} func The function to throttle.
274
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
275
+ * @param {Object} [options={}] The options object.
276
+ * @param {boolean} [options.leading=true]
277
+ * Specify invoking on the leading edge of the timeout.
278
+ * @param {boolean} [options.trailing=true]
279
+ * Specify invoking on the trailing edge of the timeout.
280
+ * @returns {Function} Returns the new throttled function.
281
+ * @example
282
+ *
283
+ * // Avoid excessively updating the position while scrolling.
284
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
285
+ *
286
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
287
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
288
+ * jQuery(element).on('click', throttled);
289
+ *
290
+ * // Cancel the trailing throttled invocation.
291
+ * jQuery(window).on('popstate', throttled.cancel);
292
+ */
293
+ function throttle(func, wait, options) {
294
+ var leading = true,
295
+ trailing = true;
296
+
297
+ if (typeof func != 'function') {
298
+ throw new TypeError(FUNC_ERROR_TEXT);
299
+ }
300
+ if (isObject(options)) {
301
+ leading = 'leading' in options ? !!options.leading : leading;
302
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
303
+ }
304
+ return debounce(func, wait, {
305
+ 'leading': leading,
306
+ 'maxWait': wait,
307
+ 'trailing': trailing
308
+ });
309
+ }
310
+
311
+ throttle_1 = throttle;
312
+ return throttle_1;
313
+ }
314
+
315
+ var throttleExports = requireThrottle();
316
+ var throttle = /*@__PURE__*/getDefaultExportFromCjs(throttleExports);
317
+
318
+ export { throttle as t };
@@ -0,0 +1,134 @@
1
+ import { r as requireIsObject } from './validators-functions.js';
2
+ import { r as requireIsSymbol } from './video-player.js';
3
+
4
+ /** Used to match a single whitespace character. */
5
+
6
+ var _trimmedEndIndex;
7
+ var hasRequired_trimmedEndIndex;
8
+
9
+ function require_trimmedEndIndex () {
10
+ if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
11
+ hasRequired_trimmedEndIndex = 1;
12
+ var reWhitespace = /\s/;
13
+
14
+ /**
15
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
16
+ * character of `string`.
17
+ *
18
+ * @private
19
+ * @param {string} string The string to inspect.
20
+ * @returns {number} Returns the index of the last non-whitespace character.
21
+ */
22
+ function trimmedEndIndex(string) {
23
+ var index = string.length;
24
+
25
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
26
+ return index;
27
+ }
28
+
29
+ _trimmedEndIndex = trimmedEndIndex;
30
+ return _trimmedEndIndex;
31
+ }
32
+
33
+ var _baseTrim;
34
+ var hasRequired_baseTrim;
35
+
36
+ function require_baseTrim () {
37
+ if (hasRequired_baseTrim) return _baseTrim;
38
+ hasRequired_baseTrim = 1;
39
+ var trimmedEndIndex = require_trimmedEndIndex();
40
+
41
+ /** Used to match leading whitespace. */
42
+ var reTrimStart = /^\s+/;
43
+
44
+ /**
45
+ * The base implementation of `_.trim`.
46
+ *
47
+ * @private
48
+ * @param {string} string The string to trim.
49
+ * @returns {string} Returns the trimmed string.
50
+ */
51
+ function baseTrim(string) {
52
+ return string
53
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
54
+ : string;
55
+ }
56
+
57
+ _baseTrim = baseTrim;
58
+ return _baseTrim;
59
+ }
60
+
61
+ var toNumber_1;
62
+ var hasRequiredToNumber;
63
+
64
+ function requireToNumber () {
65
+ if (hasRequiredToNumber) return toNumber_1;
66
+ hasRequiredToNumber = 1;
67
+ var baseTrim = require_baseTrim(),
68
+ isObject = requireIsObject(),
69
+ isSymbol = requireIsSymbol();
70
+
71
+ /** Used as references for various `Number` constants. */
72
+ var NAN = 0 / 0;
73
+
74
+ /** Used to detect bad signed hexadecimal string values. */
75
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
76
+
77
+ /** Used to detect binary string values. */
78
+ var reIsBinary = /^0b[01]+$/i;
79
+
80
+ /** Used to detect octal string values. */
81
+ var reIsOctal = /^0o[0-7]+$/i;
82
+
83
+ /** Built-in method references without a dependency on `root`. */
84
+ var freeParseInt = parseInt;
85
+
86
+ /**
87
+ * Converts `value` to a number.
88
+ *
89
+ * @static
90
+ * @memberOf _
91
+ * @since 4.0.0
92
+ * @category Lang
93
+ * @param {*} value The value to process.
94
+ * @returns {number} Returns the number.
95
+ * @example
96
+ *
97
+ * _.toNumber(3.2);
98
+ * // => 3.2
99
+ *
100
+ * _.toNumber(Number.MIN_VALUE);
101
+ * // => 5e-324
102
+ *
103
+ * _.toNumber(Infinity);
104
+ * // => Infinity
105
+ *
106
+ * _.toNumber('3.2');
107
+ * // => 3.2
108
+ */
109
+ function toNumber(value) {
110
+ if (typeof value == 'number') {
111
+ return value;
112
+ }
113
+ if (isSymbol(value)) {
114
+ return NAN;
115
+ }
116
+ if (isObject(value)) {
117
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
118
+ value = isObject(other) ? (other + '') : other;
119
+ }
120
+ if (typeof value != 'string') {
121
+ return value === 0 ? value : +value;
122
+ }
123
+ value = baseTrim(value);
124
+ var isBinary = reIsBinary.test(value);
125
+ return (isBinary || reIsOctal.test(value))
126
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
127
+ : (reIsBadHex.test(value) ? NAN : +value);
128
+ }
129
+
130
+ toNumber_1 = toNumber;
131
+ return toNumber_1;
132
+ }
133
+
134
+ export { requireToNumber as r };