cloudinary-video-player 3.13.1 → 3.13.2-edge.0
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/134.min.js +4 -4
- package/dist/309.min.js +3 -3
- package/dist/350.min.js +6 -0
- package/dist/689.min.js +6 -0
- package/dist/adaptive-streaming.js +2 -2
- package/dist/adaptive-streaming.min.js +2 -2
- package/dist/chapters.js +2 -2
- package/dist/chapters.min.js +2 -2
- package/dist/cld-player-core.js +2 -2
- package/dist/cld-player-core.min.js +2 -2
- package/dist/cld-poster-url.js +57 -0
- package/dist/cld-poster-url.min.js +6 -0
- package/dist/cld-video-player-lazy.js +10 -66
- package/dist/cld-video-player-lazy.min.js +3 -3
- package/dist/cld-video-player.css +6 -2
- package/dist/cld-video-player.js +33 -43
- package/dist/cld-video-player.light.js +33 -43
- package/dist/cld-video-player.light.min.js +4 -4
- package/dist/cld-video-player.min.css +3 -3
- package/dist/cld-video-player.min.js +4 -4
- package/dist/colors.js +2 -2
- package/dist/colors.min.js +2 -2
- package/dist/dash.js +2 -2
- package/dist/dash.min.js +2 -2
- package/dist/debug.js +3 -3
- package/dist/debug.min.js +3 -3
- package/dist/ima.js +2 -2
- package/dist/ima.min.js +2 -2
- package/dist/interaction-areas.js +2 -2
- package/dist/interaction-areas.min.js +2 -2
- package/dist/node_modules_lodash_throttle_js.js +2 -2
- package/dist/playlist.js +2 -2
- package/dist/playlist.min.js +2 -2
- package/dist/{plugins_cloudinary_url-helpers_js-utils_object_js-utils_querystring_js-utils_utf8Base64_js-vi-555007.js → plugins_cloudinary_url-helpers_js-utils_cloudinary-config-from-options_js-utils_querystring_j-adfe37.js} +48 -4
- package/dist/recommendations-overlay.js +2 -2
- package/dist/recommendations-overlay.min.js +2 -2
- package/dist/schema.json +16 -0
- package/dist/share.js +2 -2
- package/dist/share.min.js +2 -2
- package/dist/shoppable.js +2 -2
- package/dist/shoppable.min.js +2 -2
- package/dist/utils_fetch-config_js.js +3 -3
- package/dist/utils_schedule_js.js +27 -0
- package/dist/video-player_js.js +9 -9
- package/dist/visual-search.js +2 -2
- package/dist/visual-search.min.js +2 -2
- package/lib/all.js +3 -2
- package/lib/chapters.js +2 -2
- package/lib/cld-video-player.min.css +3 -3
- package/lib/{object.js → cloudinary-config-from-options.js} +10 -2
- package/lib/cloudinary-url-prefix.js +91 -0
- package/lib/colors.js +2 -2
- package/lib/config/configSchema.json +16 -0
- package/lib/debug.js +1 -0
- package/lib/fetch-config.js +4 -11
- package/lib/index.js +3 -2
- package/lib/interaction-areas.service.js +2 -2
- package/lib/lazy.js +0 -1
- package/lib/player-api.js +171 -413
- package/lib/player.js +2 -1
- package/lib/playlist.js +2 -2
- package/lib/poster-url.js +46 -0
- package/lib/recommendations-overlay.js +2 -2
- package/lib/schedule.js +153 -0
- package/lib/share.js +2 -2
- package/lib/shoppable-widget.js +2 -2
- package/lib/toNumber.js +1 -1
- package/lib/video-player.const.js +1 -1
- package/lib/video-player.js +17 -9
- package/lib/videoPlayer.js +2 -1
- package/package.json +1 -1
- package/types/cld-video-player.d.ts +6 -0
- package/dist/19.min.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cloudinary Video Player v3.13.
|
|
3
|
-
* Built on 2026-04-
|
|
2
|
+
* Cloudinary Video Player v3.13.2-edge.0
|
|
3
|
+
* Built on 2026-04-07T06:05:12.546Z
|
|
4
4
|
* https://github.com/cloudinary/cloudinary-video-player
|
|
5
5
|
*/
|
|
6
6
|
/*
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* or disable the default devtool with "devtool: false".
|
|
12
12
|
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
13
13
|
*/
|
|
14
|
-
(self["cloudinaryVideoPlayerChunkLoading"] = self["cloudinaryVideoPlayerChunkLoading"] || []).push([["plugins_cloudinary_url-helpers_js-
|
|
14
|
+
(self["cloudinaryVideoPlayerChunkLoading"] = self["cloudinaryVideoPlayerChunkLoading"] || []).push([["plugins_cloudinary_url-helpers_js-utils_cloudinary-config-from-options_js-utils_querystring_j-adfe37"],{
|
|
15
15
|
|
|
16
16
|
/***/ "./plugins/cloudinary/models/video-source/video-source.const.js"
|
|
17
17
|
/*!**********************************************************************!*\
|
|
@@ -35,6 +35,28 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
35
35
|
|
|
36
36
|
/***/ },
|
|
37
37
|
|
|
38
|
+
/***/ "./utils/cloudinary-config-from-options.js"
|
|
39
|
+
/*!*************************************************!*\
|
|
40
|
+
!*** ./utils/cloudinary-config-from-options.js ***!
|
|
41
|
+
\*************************************************/
|
|
42
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
43
|
+
|
|
44
|
+
"use strict";
|
|
45
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getCloudinaryConfigFromOptions: () => (/* binding */ getCloudinaryConfigFromOptions)\n/* harmony export */ });\n/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/pick */ \"../node_modules/lodash/pick.js\");\n/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _video_player_const__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../video-player.const */ \"./video-player.const.js\");\n/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./object */ \"./utils/object.js\");\n\n\n\nconst getCloudinaryConfigFromOptions = options => {\n if (options.cloudinaryConfig) {\n return options.cloudinaryConfig;\n }\n const snakeCaseCloudinaryConfig = lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()((0,_object__WEBPACK_IMPORTED_MODULE_2__.convertKeysToSnakeCase)(options), _video_player_const__WEBPACK_IMPORTED_MODULE_1__.CLOUDINARY_CONFIG_PARAM);\n return Object.assign({}, snakeCaseCloudinaryConfig);\n};\n\n//# sourceURL=webpack:///./utils/cloudinary-config-from-options.js?\n}");
|
|
46
|
+
|
|
47
|
+
/***/ },
|
|
48
|
+
|
|
49
|
+
/***/ "./utils/cloudinary-url-prefix.js"
|
|
50
|
+
/*!****************************************!*\
|
|
51
|
+
!*** ./utils/cloudinary-url-prefix.js ***!
|
|
52
|
+
\****************************************/
|
|
53
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
54
|
+
|
|
55
|
+
"use strict";
|
|
56
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getCloudinaryUrlPrefix: () => (/* binding */ getCloudinaryUrlPrefix)\n/* harmony export */ });\n/* harmony import */ var _cloudinary_url_gen_backwards_utils_unsigned_url_prefix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @cloudinary/url-gen/backwards/utils/unsigned_url_prefix */ \"../node_modules/@cloudinary/url-gen/backwards/utils/unsigned_url_prefix.js\");\n\nconst getCloudinaryUrlPrefix = cloudinaryConfig => {\n return (0,_cloudinary_url_gen_backwards_utils_unsigned_url_prefix__WEBPACK_IMPORTED_MODULE_0__.unsigned_url_prefix)(null, cloudinaryConfig.cloud_name, cloudinaryConfig.private_cdn, cloudinaryConfig.cdn_subdomain, cloudinaryConfig.secure_cdn_subdomain, cloudinaryConfig.cname, cloudinaryConfig.secure ?? true, cloudinaryConfig.secure_distribution);\n};\n\n//# sourceURL=webpack:///./utils/cloudinary-url-prefix.js?\n}");
|
|
57
|
+
|
|
58
|
+
/***/ },
|
|
59
|
+
|
|
38
60
|
/***/ "./utils/object.js"
|
|
39
61
|
/*!*************************!*\
|
|
40
62
|
!*** ./utils/object.js ***!
|
|
@@ -75,7 +97,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
75
97
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
76
98
|
|
|
77
99
|
"use strict";
|
|
78
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ADS_IN_PLAYLIST: () => (/* binding */ ADS_IN_PLAYLIST),\n/* harmony export */ AUTO_PLAY_MODE: () => (/* binding */ AUTO_PLAY_MODE),\n/* harmony export */ CLOUDINARY_CONFIG_PARAM: () => (/* binding */ CLOUDINARY_CONFIG_PARAM),\n/* harmony export */ CROP_MODE: () => (/* binding */ CROP_MODE),\n/* harmony export */ FLOATING_TO: () => (/* binding */ FLOATING_TO),\n/* harmony export */ FLUID_CLASS_NAME: () => (/* binding */ FLUID_CLASS_NAME),\n/* harmony export */ PLAYER_PARAMS: () => (/* binding */ PLAYER_PARAMS),\n/* harmony export */ PRELOAD: () => (/* binding */ PRELOAD),\n/* harmony export */ SOURCE_PARAMS: () => (/* binding */ SOURCE_PARAMS)\n/* harmony export */ });\n// Parameters that can be passed to source configuration (inherited by source method)\nconst SOURCE_PARAMS = ['adaptiveStreaming', 'allowUsageReport', 'aspectRatio', 'autoShowRecommendations', 'breakpoints', 'chapters', 'cropMode', 'cropPadColor', 'cloudinaryConfig', 'description', 'download', 'hdr', 'info', 'interactionAreas', 'maxDpr', 'poster', 'posterOptions', 'publicId', 'rawTransformation', 'recommendations', 'resourceType', 'shoppable', 'source', 'sourceTransformation', 'sourceTypes', 'textTracks', 'title', 'transformation', 'type', 'visualSearch', 'withCredentials', 'videoSources'];\n\n// All parameters that can be passed to player constructor\nconst PLAYER_PARAMS = SOURCE_PARAMS.concat(['_internalAnalyticsMetadata', 'ads', 'aiHighlightsGraph', 'analytics', 'autoplayMode', 'chaptersButton', 'cloudinaryAnalytics', 'colors', 'debug', 'fetchErrorUsingGet', 'floatingWhenNotVisible', 'fluid', 'fontFace', 'hideContextMenu', 'ima', 'pictureInPictureToggle', 'playedEventPercents', 'playedEventTimes', 'playlistWidget', 'profile', 'qualitySelector', 'queryParams', 'seekThumbnails', 'showJumpControls', 'videoConfig', 'schedule']);\n\n// We support both camelCase and snake_case for cloudinary SDK params\nconst CLOUDINARY_CONFIG_PARAM = ['api_secret', 'auth_token', 'cdn_subdomain', 'cloud_name', 'cname', 'private_cdn', 'secure', 'secure_cdn_subdomain', 'secure_distribution', 'shorten', 'sign_url', 'url_suffix', 'use_root_path'];\nconst FLUID_CLASS_NAME = 'cld-fluid';\nconst AUTO_PLAY_MODE = {\n ALWAYS: 'always',\n ON_SCROLL: 'on-scroll',\n NEVER: 'never'\n};\nconst FLOATING_TO = {\n LEFT: 'left',\n RIGHT: 'right',\n NONE: 'none'\n};\nconst ADS_IN_PLAYLIST = {\n FIRST_VIDEO: 'first-video',\n EVERY_VIDEO: 'every-video'\n};\nconst PRELOAD = {\n AUTO: 'auto',\n METADATA: 'metadata',\n NONE: 'none'\n};\nconst CROP_MODE = {\n FILL: 'fill',\n PAD: 'pad',\n SMART: 'smart'\n};\n\n//# sourceURL=webpack:///./video-player.const.js?\n}");
|
|
100
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ADS_IN_PLAYLIST: () => (/* binding */ ADS_IN_PLAYLIST),\n/* harmony export */ AUTO_PLAY_MODE: () => (/* binding */ AUTO_PLAY_MODE),\n/* harmony export */ CLOUDINARY_CONFIG_PARAM: () => (/* binding */ CLOUDINARY_CONFIG_PARAM),\n/* harmony export */ CROP_MODE: () => (/* binding */ CROP_MODE),\n/* harmony export */ FLOATING_TO: () => (/* binding */ FLOATING_TO),\n/* harmony export */ FLUID_CLASS_NAME: () => (/* binding */ FLUID_CLASS_NAME),\n/* harmony export */ PLAYER_PARAMS: () => (/* binding */ PLAYER_PARAMS),\n/* harmony export */ PRELOAD: () => (/* binding */ PRELOAD),\n/* harmony export */ SOURCE_PARAMS: () => (/* binding */ SOURCE_PARAMS)\n/* harmony export */ });\n// Parameters that can be passed to source configuration (inherited by source method)\nconst SOURCE_PARAMS = ['adaptiveStreaming', 'allowUsageReport', 'aspectRatio', 'autoShowRecommendations', 'breakpoints', 'chapters', 'cropMode', 'cropPadColor', 'cloudinaryConfig', 'description', 'download', 'hdr', 'info', 'interactionAreas', 'maxDpr', 'poster', 'posterOptions', 'publicId', 'rawTransformation', 'recommendations', 'resourceType', 'shoppable', 'source', 'sourceTransformation', 'sourceTypes', 'textTracks', 'title', 'transformation', 'type', 'visualSearch', 'withCredentials', 'videoSources'];\n\n// All parameters that can be passed to player constructor\nconst PLAYER_PARAMS = SOURCE_PARAMS.concat(['_internalAnalyticsMetadata', 'ads', 'aiHighlightsGraph', 'analytics', 'autoplayMode', 'chaptersButton', 'cloudinaryAnalytics', 'colors', 'debug', 'fetchErrorUsingGet', 'floatingWhenNotVisible', 'fluid', 'fontFace', 'hideContextMenu', 'ima', 'pictureInPictureToggle', 'playedEventPercents', 'playedEventTimes', 'playlistWidget', 'profile', 'qualitySelector', 'queryParams', 'seekThumbnails', 'showJumpControls', 'videoConfig', 'schedule', 'lazy']);\n\n// We support both camelCase and snake_case for cloudinary SDK params\nconst CLOUDINARY_CONFIG_PARAM = ['api_secret', 'auth_token', 'cdn_subdomain', 'cloud_name', 'cname', 'private_cdn', 'secure', 'secure_cdn_subdomain', 'secure_distribution', 'shorten', 'sign_url', 'url_suffix', 'use_root_path'];\nconst FLUID_CLASS_NAME = 'cld-fluid';\nconst AUTO_PLAY_MODE = {\n ALWAYS: 'always',\n ON_SCROLL: 'on-scroll',\n NEVER: 'never'\n};\nconst FLOATING_TO = {\n LEFT: 'left',\n RIGHT: 'right',\n NONE: 'none'\n};\nconst ADS_IN_PLAYLIST = {\n FIRST_VIDEO: 'first-video',\n EVERY_VIDEO: 'every-video'\n};\nconst PRELOAD = {\n AUTO: 'auto',\n METADATA: 'metadata',\n NONE: 'none'\n};\nconst CROP_MODE = {\n FILL: 'fill',\n PAD: 'pad',\n SMART: 'smart'\n};\n\n//# sourceURL=webpack:///./video-player.const.js?\n}");
|
|
79
101
|
|
|
80
102
|
/***/ },
|
|
81
103
|
|
|
@@ -947,6 +969,28 @@ eval("{var baseToString = __webpack_require__(/*! ./_baseToString */ \"../node_m
|
|
|
947
969
|
|
|
948
970
|
eval("{var asciiWords = __webpack_require__(/*! ./_asciiWords */ \"../node_modules/lodash/_asciiWords.js\"),\n hasUnicodeWord = __webpack_require__(/*! ./_hasUnicodeWord */ \"../node_modules/lodash/_hasUnicodeWord.js\"),\n toString = __webpack_require__(/*! ./toString */ \"../node_modules/lodash/toString.js\"),\n unicodeWords = __webpack_require__(/*! ./_unicodeWords */ \"../node_modules/lodash/_unicodeWords.js\");\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\n\nmodule.exports = words;\n\n\n//# sourceURL=webpack:///../node_modules/lodash/words.js?\n}");
|
|
949
971
|
|
|
972
|
+
/***/ },
|
|
973
|
+
|
|
974
|
+
/***/ "../node_modules/@cloudinary/url-gen/backwards/consts.js"
|
|
975
|
+
/*!***************************************************************!*\
|
|
976
|
+
!*** ../node_modules/@cloudinary/url-gen/backwards/consts.js ***!
|
|
977
|
+
\***************************************************************/
|
|
978
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
979
|
+
|
|
980
|
+
"use strict";
|
|
981
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AKAMAI_SHARED_CDN: () => (/* binding */ AKAMAI_SHARED_CDN),\n/* harmony export */ CF_SHARED_CDN: () => (/* binding */ CF_SHARED_CDN),\n/* harmony export */ LAYER_KEYWORD_PARAMS: () => (/* binding */ LAYER_KEYWORD_PARAMS),\n/* harmony export */ LEGACY_CONDITIONAL_OPERATORS: () => (/* binding */ LEGACY_CONDITIONAL_OPERATORS),\n/* harmony export */ LEGACY_PREDEFINED_VARS: () => (/* binding */ LEGACY_PREDEFINED_VARS),\n/* harmony export */ NUMBER_PATTERN: () => (/* binding */ NUMBER_PATTERN),\n/* harmony export */ OFFSET_ANY_PATTERN: () => (/* binding */ OFFSET_ANY_PATTERN),\n/* harmony export */ OFFSET_ANY_PATTERN_RE: () => (/* binding */ OFFSET_ANY_PATTERN_RE),\n/* harmony export */ OLD_AKAMAI_SHARED_CDN: () => (/* binding */ OLD_AKAMAI_SHARED_CDN),\n/* harmony export */ RANGE_VALUE_RE: () => (/* binding */ RANGE_VALUE_RE),\n/* harmony export */ SHARED_CDN: () => (/* binding */ SHARED_CDN)\n/* harmony export */ });\nconst LEGACY_CONDITIONAL_OPERATORS = {\n \"=\": 'eq',\n \"!=\": 'ne',\n \"<\": 'lt',\n \">\": 'gt',\n \"<=\": 'lte',\n \">=\": 'gte',\n \"&&\": 'and',\n \"||\": 'or',\n \"*\": \"mul\",\n \"/\": \"div\",\n \"+\": \"add\",\n \"-\": \"sub\",\n \"^\": \"pow\"\n};\nconst CF_SHARED_CDN = \"d3jpl91pxevbkh.cloudfront.net\";\nconst OLD_AKAMAI_SHARED_CDN = \"cloudinary-a.akamaihd.net\";\nconst AKAMAI_SHARED_CDN = \"res.cloudinary.com\";\nconst SHARED_CDN = AKAMAI_SHARED_CDN;\nconst LEGACY_PREDEFINED_VARS = {\n \"aspect_ratio\": \"ar\",\n \"aspectRatio\": \"ar\",\n \"current_page\": \"cp\",\n \"currentPage\": \"cp\",\n \"duration\": \"du\",\n \"face_count\": \"fc\",\n \"faceCount\": \"fc\",\n \"height\": \"h\",\n \"initial_aspect_ratio\": \"iar\",\n \"initial_height\": \"ih\",\n \"initial_width\": \"iw\",\n \"initialAspectRatio\": \"iar\",\n \"initialHeight\": \"ih\",\n \"initialWidth\": \"iw\",\n \"initial_duration\": \"idu\",\n \"initialDuration\": \"idu\",\n \"page_count\": \"pc\",\n \"page_x\": \"px\",\n \"page_y\": \"py\",\n \"pageCount\": \"pc\",\n \"pageX\": \"px\",\n \"pageY\": \"py\",\n \"tags\": \"tags\",\n \"width\": \"w\"\n};\nconst NUMBER_PATTERN = \"([0-9]*)\\\\.([0-9]+)|([0-9]+)\";\nconst OFFSET_ANY_PATTERN = `(${NUMBER_PATTERN})([%pP])?`;\nconst RANGE_VALUE_RE = RegExp(`^${OFFSET_ANY_PATTERN}$`);\nconst OFFSET_ANY_PATTERN_RE = RegExp(`(${OFFSET_ANY_PATTERN})\\\\.\\\\.(${OFFSET_ANY_PATTERN})`);\nconst LAYER_KEYWORD_PARAMS = {\n font_weight: \"normal\",\n font_style: \"normal\",\n text_decoration: \"none\",\n text_align: '',\n stroke: \"none\"\n};\n\n\n//# sourceURL=webpack:///../node_modules/@cloudinary/url-gen/backwards/consts.js?\n}");
|
|
982
|
+
|
|
983
|
+
/***/ },
|
|
984
|
+
|
|
985
|
+
/***/ "../node_modules/@cloudinary/url-gen/backwards/utils/unsigned_url_prefix.js"
|
|
986
|
+
/*!**********************************************************************************!*\
|
|
987
|
+
!*** ../node_modules/@cloudinary/url-gen/backwards/utils/unsigned_url_prefix.js ***!
|
|
988
|
+
\**********************************************************************************/
|
|
989
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
990
|
+
|
|
991
|
+
"use strict";
|
|
992
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ unsigned_url_prefix: () => (/* binding */ unsigned_url_prefix)\n/* harmony export */ });\n/* harmony import */ var _consts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../consts.js */ \"../node_modules/@cloudinary/url-gen/backwards/consts.js\");\n\nfunction unsigned_url_prefix(source, cloud_name, private_cdn, cdn_subdomain, secure_cdn_subdomain, cname, secure, secure_distribution) {\n let prefix;\n if (cloud_name.indexOf(\"/\") === 0) {\n return '/res' + cloud_name;\n }\n let shared_domain = !private_cdn;\n if (secure) {\n if ((secure_distribution == null) || secure_distribution === _consts_js__WEBPACK_IMPORTED_MODULE_0__.OLD_AKAMAI_SHARED_CDN) {\n secure_distribution = private_cdn ? cloud_name + \"-res.cloudinary.com\" : _consts_js__WEBPACK_IMPORTED_MODULE_0__.SHARED_CDN;\n }\n if (shared_domain == null) {\n shared_domain = secure_distribution === _consts_js__WEBPACK_IMPORTED_MODULE_0__.SHARED_CDN;\n }\n prefix = 'https://' + secure_distribution;\n }\n else if (cname) {\n // let subdomain = cdn_subdomain ? 'a' + ((crc32(source) % 5) + 1) + '.' : '';\n prefix = 'http://' + cname;\n }\n else {\n let cdn_part = private_cdn ? cloud_name + '-' : '';\n let host = [cdn_part, 'res', '.cloudinary.com'].join('');\n prefix = 'http://' + host;\n }\n if (shared_domain) {\n prefix += '/' + cloud_name;\n }\n return prefix;\n}\n\n\n//# sourceURL=webpack:///../node_modules/@cloudinary/url-gen/backwards/utils/unsigned_url_prefix.js?\n}");
|
|
993
|
+
|
|
950
994
|
/***/ }
|
|
951
995
|
|
|
952
996
|
}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cloudinary Video Player v3.13.
|
|
3
|
-
* Built on 2026-04-
|
|
2
|
+
* Cloudinary Video Player v3.13.2-edge.0
|
|
3
|
+
* Built on 2026-04-07T06:04:56.115Z
|
|
4
4
|
* https://github.com/cloudinary/cloudinary-video-player
|
|
5
5
|
*/
|
|
6
6
|
"use strict";(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[410],{7604(e,t,s){s.r(t),s.d(t,{default:()=>k});var i=s(6673),n=s.n(i);const o=n().getComponent("ClickableComponent");const r=class extends o{setItem(e){const{action:t,source:s}=e;this.source=s;const i=s.info();this.setTitle(i.title||s.publicId()),this.setPoster(this.source.poster().url({transformation:{aspect_ratio:"16:9",crop:"pad",background:"black"}})),this.setAction(t)}setTitle(e){this.title.innerText=e}setAction(e){this.action=e}handleClick(){super.handleClick(),this.player().trigger("recommendationshide"),this.action()}};var a=s(7878),c=s.n(a);const l=n().dom||n();const h=class extends r{setItem(e){super.setItem(e);const t=this.source.info();if(this.setTitle(t.title),this.setSubtitle(t.subtitle),t.description){const e=300,s=t.description.length>e?t.description.substring(0,e)+"...":t.description;this.setDescription(s)}}setPoster(e){this.poster.style.backgroundImage=`url('${e}')`}setTitle(e){c().setText(this.title,e),this.setAriaCheck(this.title,!!e)}setSubtitle(e){c().setText(this.subtitle,e),this.setAriaCheck(this.subtitle,!!e)}setDescription(e){c().setText(this.description,e),this.setAriaCheck(this.description,!!e)}setAriaCheck(e){!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden","true")}clearItem(){this.setTitle(""),this.setSubtitle(""),this.setDescription(""),this.poster.style.backgroundImage=null}createEl(){const e=super.createEl("div",{className:"vjs-recommendations-overlay-item vjs-recommendations-overlay-item-primary"});return this.poster=l.createEl("div",{className:"vjs-recommendations-overlay-item-primary-image"}),this.title=l.createEl("h2",{ariaLabel:"Recmmendation Title"}),this.setAriaCheck(this.title,!1),this.title.innerHTML="",this.subtitle=l.createEl("h3",{ariaLabel:"Recmmendation Subtitle"}),this.setAriaCheck(this.subtitle,!1),this.subtitle.innerHTML="",this.description=l.createEl("p"),this.setAriaCheck(this.description,!1),this.description.innerHTML="",this.content=l.createEl("div",{className:"vjs-recommendations-overlay-item-info vjs-recommendations-overlay-item-primary-content"}),this.content.appendChild(this.title),this.content.appendChild(this.subtitle),this.content.appendChild(this.description),e.appendChild(this.poster),e.appendChild(this.content),e}},d=n().dom||n();const m=class extends r{setItem(e){super.setItem(e),this.setDuration("")}setPoster(e){this.el().style.backgroundImage=`url('${e}')`}setDuration(e){this.duration.innerText=e}createEl(){const e=super.createEl("div",{className:"vjs-recommendations-overlay-item vjs-recommendations-overlay-item-secondary"});this.title=d.createEl("span",{className:"vjs-recommendations-overlay-item-secondary-title"}),this.title.innerHTML="",this.duration=d.createEl("span",{className:"vjs-recommendations-overlay-item-secondary-duration"}),this.duration.innerHTML="";const t=d.createEl("div",{className:"vjs-recommendations-overlay-item-info"});return t.appendChild(this.title),t.appendChild(this.duration),e.appendChild(t),e}handleClick(){super.handleClick(),this.action()}},p=n().getComponent("Component");const u=class extends p{setItems(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];this.clearItems(),t&&t.forEach(e=>{const t=new m(this.player());t.setItem(e),this.addChild(t)})}clearItems(){this.children().forEach(()=>{this.removeChild(this.children()[0])})}createEl(){return super.createEl("div",{className:"vjs-recommendations-overlay-item-secondary-container"})}},v=n().getComponent("Component");class y extends v{constructor(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];super(e,...s),this._primary=new h(e),this._secondaryContainer=new u(e),this.addChild(this._primary),this.addChild(this._secondaryContainer)}setItems(e){this._primary.setItem(e);for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this._secondaryContainer.setItems(...s)}createEl(){return super.createEl("div",{className:"aspect-ratio-content"})}}const C=class extends v{constructor(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];super(e,...s),this._content=new y(e),this.addChild(this._content)}setItems(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this._content.setItems(e,...s)}clearItems(){this._content._primary.clearItem(),this._content._secondaryContainer.clearItems()}createEl(){return super.createEl("div",{className:"vjs-recommendations-overlay-content"})}},g=n().getComponent("ClickableComponent");const I=class extends g{createEl(){return super.createEl("span",{className:"vjs-recommendations-overlay-hide vjs-icon-close"})}handleClick(){this.options_.clickHandler()}},b=n().getComponent("Component");class E extends b{constructor(e,t){for(var s=arguments.length,i=new Array(s>2?s-2:0),n=2;n<s;n++)i[n-2]=arguments[n];super(e,...i),this._content=new C(e),this.addChild(this._content),this.addChild(new I(e,{clickHandler:()=>{this.close()}},...i)),this.setEvents(e),this.doNotOpen=!1}setEvents(e){this.on(e,"recommendationschanged",(e,t)=>{this.setItems(...t.items)}),this.on(e,"recommendationsnoshow",this.setDoNotOpen),this.on(e,"recommendationsshow",this.open),this.on(e,"recommendationshide",this.close),this.on(e,"cldsourcechanged",()=>{this.clearItems(),this.close()})}setDoNotOpen(){this.doNotOpen=!0}open(){this.doNotOpen||(this._showControlsOnClose=this.player().controls(),this.player().controls(!1),this.el().style.visibility="visible")}clearItems(){this._content.clearItems()}close(){this.el().style.visibility="hidden",this._showControlsOnClose&&this.player().controls(!0)}createEl(){const e="vjs-recommendations-overlay",t=super.createEl("div",{className:e});return n().dom.addClass(t,e),t}setItems(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this.doNotOpen=!1,s=s.slice(0,3),this._content.setItems(e,...s)}handleClick(){this.stopPropagation()}dispose(){super.dispose()}}n().registerComponent("recommendationsOverlay",E);const k=E}}]);
|
package/dist/schema.json
CHANGED
|
@@ -578,6 +578,22 @@
|
|
|
578
578
|
},
|
|
579
579
|
"default": {}
|
|
580
580
|
},
|
|
581
|
+
"lazy": {
|
|
582
|
+
"oneOf": [
|
|
583
|
+
{
|
|
584
|
+
"type": "boolean",
|
|
585
|
+
"default": false
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"type": "object",
|
|
589
|
+
"properties": {
|
|
590
|
+
"loadOnScroll": { "type": "boolean", "default": false }
|
|
591
|
+
},
|
|
592
|
+
"additionalProperties": false
|
|
593
|
+
}
|
|
594
|
+
],
|
|
595
|
+
"default": false
|
|
596
|
+
},
|
|
581
597
|
"videoSources": {
|
|
582
598
|
"type": "array",
|
|
583
599
|
"items": {
|
package/dist/share.js
CHANGED
package/dist/share.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cloudinary Video Player v3.13.
|
|
3
|
-
* Built on 2026-04-
|
|
2
|
+
* Cloudinary Video Player v3.13.2-edge.0
|
|
3
|
+
* Built on 2026-04-07T06:04:56.115Z
|
|
4
4
|
* https://github.com/cloudinary/cloudinary-video-player
|
|
5
5
|
*/
|
|
6
6
|
"use strict";(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[976],{2130(o,e,t){t.d(e,{default:()=>c});var n=t(6673),a=t.n(n);const r=a().getComponent("ClickableComponent");class i extends r{constructor(o){super(o,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}handleClick(o){super.handleClick(o),this.player().share&&"function"==typeof this.player().share.download&&this.player().share.download()}createEl(){const o=a().dom.createEl("button",{className:"vjs-control vjs-share-download-button vjs-button",ariaLabel:"Download video",title:"Download video"}),e=a().dom.createEl("span",{className:"vjs-icon-file-download vjs-icon-placeholder"});o.appendChild(e);const t=a().dom.createEl("span",{className:"vjs-loading-spinner"});return o.appendChild(t),o}setPreparing(o){const e=this.el();o?(e.classList.add("vjs-waiting"),e.setAttribute("title","Download is being prepared")):(e.classList.remove("vjs-waiting"),e.setAttribute("title","Download video"))}}a().registerComponent("ShareDownloadButton",i);var d=t(5770),l=t(4319),s=t.n(l);const c=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=(arguments.length>1?arguments[1]:void 0)||this;e.addClass("vjs-share");const t=()=>{const o=e.getChild("ControlBar");if(!o||o.getChild("ShareDownloadButton"))return;const t=o.children().findIndex(o=>"FullscreenToggle"===o.name_);o.addChild("ShareDownloadButton",{},-1!==t?t:void 0)};o.download&&t(),e.share={download:()=>{const o=(()=>{const o=e.currentSource?.();if(!o)return null;const t=["format","video_codec","streaming_profile"],n=o=>{if(Array.isArray(o))return o.map(n);if(o&&"object"==typeof o){const e=s()(o,t);return Object.keys(e).forEach(o=>{e[o]=n(e[o])}),e}return o},a=n(e.cloudinary.transformation()||{}),r=e.cloudinary.currentPublicId()?.split("/")?.pop(),i={...e.cloudinary.cloudinaryConfig(),...a,resource_type:"video",format:"mp4",video_codec:"h264",flags:`streaming_attachment:${r}`};return o.isAdaptive&&Object.assign(i,{crop:"limit",width:1920,height:1920}),"AudioSource"===e.cloudinary.source()?.getType()&&Object.assign(i,{format:"mp3",video_codec:void 0}),(0,d.KA)(e.cloudinary.currentPublicId(),i)})();if(!o)return void console.warn("Share plugin: Unable to resolve download URL.");const t=[423],n=e.controlBar?.getChild("ShareDownloadButton"),a=o=>{n?.setPreparing?.(o)},r=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const n=await fetch(o,{method:"HEAD"});if(t.includes(n.status)&&e<60)return await(i=1e4,new Promise(o=>setTimeout(o,i))),r(e+1);var i;a(!1),(()=>{const e=document.createElement("a");e.href=o,e.download="",document.body.appendChild(e),e.click(),document.body.removeChild(e)})()};a(!0),r()},addDownloadButton:t,removeDownloadButton:()=>{if(!e.controlBar)return;const o=e.controlBar.getChild("ShareDownloadButton");o&&e.controlBar.removeChild(o)}}}}}]);
|
package/dist/shoppable.js
CHANGED
package/dist/shoppable.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cloudinary Video Player v3.13.
|
|
3
|
-
* Built on 2026-04-
|
|
2
|
+
* Cloudinary Video Player v3.13.2-edge.0
|
|
3
|
+
* Built on 2026-04-07T06:04:56.115Z
|
|
4
4
|
* https://github.com/cloudinary/cloudinary-video-player
|
|
5
5
|
*/
|
|
6
6
|
(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[525],{9987(t,e,s){"use strict";s.d(e,{default:()=>Z});var o=s(6673),a=s.n(o);const i=function(t){const[e,s,o]=t.split(":").reverse();let a=null;return isNaN(e)||(a=60*(+o||0)*60+60*(+s||0)+ +e),a};var r=s(9339);const n={location:"right",toggleIcon:"",width:"20%",startState:"openOnPlay",autoClose:2,transformation:{quality:"auto",width:"auto",fetch_format:"auto",crop:"scale"},products:[],showPostPlayOverlay:!1},l="goto",c="seek",p="overlay",d="shoppable-panel-visible",h="shoppable-panel-hidden",u="shoppable-products-overlay",m="cld-spbl-panel",g="cld-spbl-toggle",_="cld-spbl-toggle-icon",y="cld-spbl-bar-inner",f="animate",v="cld-spbl-item",b="cld-spbl-img";var C=s(1104);const E=a().dom||a(),T=a().getComponent("Component");class N extends T{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.options_=e,this.player_=t,this.player_.on(C.f.SHOW_PRODUCTS_OVERLAY,this.renderProducts),this.dispose=()=>{this.layout_.dispose()}}renderProducts=()=>{this.player_.removeClass(d),this.player_.addClass(h),this.player_.addClass(u),this.layout_.innerHTML="";const t=this.player_.currentTime();this.options_.products.filter(e=>e.hotspots&&e.hotspots.some(e=>i(e.time)===t)).forEach(e=>{const s=(0,r.I)(e.hotspots,e=>i(e.time)===t),o=E.createEl("div",{className:"cld-spbl-product-hotspot-name"},{},e.productName),a=E.createEl("div",{className:"cld-spbl-product-tooltip cld-spbl-product-tooltip-"+s.tooltipPosition},{},o),n=E.createEl("a",{className:"cld-spbl-product-hotspot accent-color-text",href:s.clickUrl,target:"_blank"},{style:"left:"+s.x+"; top:"+s.y+";"},a);this.layout_.appendChild(n)}),this.player_.one(C.f.SEEKING,this.clearLayout),this.player_.one(C.f.PLAY,this.clearLayout)};clearLayout=()=>{this.layout_.innerHTML="",this.player_.removeClass(u)};createEl(){const t=this.player_.currentDimensions();return this.layout_=E.createEl("div",{className:"cld-spbl-products-overlay",style:`padding-top: ${t.height/t.width*100}%;`}),this.layout_}}a().registerComponent("ShoppableProductsOverlay",N);const P=N,L=a().dom||a(),x=a().getComponent("ClickableComponent");class w extends x{constructor(t,e){super(t,e),this.options_=e}handleClick(t){t.preventDefault(),t.stopPropagation(),this.options_.clickHandler()}createEl(){let t={},e={};this.options_.toggleIcon?(t={className:`${_} cld-spbl-toggle-custom-icon vjs-icon-close`},e={style:`background-image: url(${this.options_.toggleIcon})`}):t={className:`${_} vjs-icon-cart`};const s=L.createEl("span",t,e),o=super.createEl("a",{className:`${g} base-color-bg`});return o.appendChild(s),this.player_.on(C.f.PRODUCT_BAR_MIN,()=>{setTimeout(()=>{s.classList.add(f),setTimeout(()=>{s.classList.remove(f)},1e3)},500)}),o}}a().registerComponent("shoppablePanelToggle",w);const k=w,I=a().dom||a(),A=a().getComponent("Component");class H extends A{constructor(t,e){super(t,e),this.player_=t,this.player().addClass("cld-shoppable-panel"),this.player().addClass(h),this.contentWrpEl_=I.createEl("div",{className:"cld-spbl-bar"}),this.contentBannerEl_=I.createEl("div",{className:"cld-spbl-banner-msg base-color-text"},{},this.options_.bannerMsg||"Shop the Video"),this.contentWrpEl_.appendChild(this.contentBannerEl_);const s=new P(this.player_,this.options_);this.contentWrpEl_.appendChild(s.el_),this.contentEl_=I.createEl("div",{className:y}),this.contentWrpEl_.appendChild(this.contentEl_),this.player().el().appendChild(this.contentWrpEl_),this.addChild(new k(this.player_,{toggleIcon:this.options_.toggleIcon,clickHandler:()=>{this.togglePanel()}})),this.addChild("ShoppablePanel",this.options_),this.dispose=()=>{this.removeLayout(),super.dispose()},this.togglePanel=t=>{!0===t?(this.player().removeClass(h),this.player().addClass(d)):!1===t?(this.player().removeClass(d),this.player().addClass(h)):(this.player().toggleClass(h),this.player().toggleClass(d));let e=this.player().hasClass(d)?"productBarMax":"productBarMin";this.player().trigger(e)},"open"===this.options_.startState&&this.togglePanel(!0),this.player_.on(C.f.PLAY,()=>{this.player_.currentTime()<.01&&("openOnPlay"===this.options_.startState&&this.togglePanel(!0,this.options_.autoClose),this.options_.autoClose&&-1!==this.options_.startState.indexOf("open")&&setTimeout(()=>{this.contentEl_.matches(":hover")?this.contentEl_.addEventListener("mouseleave",()=>{this.togglePanel(!1)},{once:!0}):this.togglePanel(!1)},1e3*this.options_.autoClose))})}createEl(){return super.createEl("div")}}a().registerComponent("shoppableBarLayout",H);const M=H;var S=s(2858),$=s.n(S),O=s(4650);const D=a().getComponent("ClickableComponent"),W=a().dom||a(),j={width:132};class B extends D{constructor(t,e){super(t,e),this.options_=e,this.isDragged=!1}handleClick(t){t.preventDefault(),t.stopPropagation(),this.el_.matches(`.dragged .${v}`)||this.options_.clickHandler(t),this.isDragged=!1}getTitle(){return this.options_.conf.title}createEl(){const t=super.createEl("a",{className:`${v} base-color-bg accent-color-text`,href:"#"});t.setAttribute("data-product-id",this.options_.conf.productId||""),t.setAttribute("data-product-name",this.options_.conf.productName||""),this.options_.conf.onHover&&R(t,this.options_.conf.onHover,this.options_.item.cloudinaryConfig()),this.options_.conf.onClick&&z(t,this.options_.conf.onClick);const e=super.createEl("img",{className:b},{src:this.options_.item.url(j)});if(t.appendChild(e),this.getTitle()){const e=W.createEl("div",{className:"cld-spbl-item-info base-color-semi-bg text-color-text"}),s=W.createEl("span",{className:"cld-spbl-item-title"},{},this.getTitle());e.appendChild(s),t.appendChild(e)}return t}}const R=(t,e,s)=>{if(t.setAttribute("data-hover-action",e.action),e.action===p){const s=W.createEl("span",{className:"cld-spbl-overlay-text base-color-text"},{},e.args),o=W.createEl("span",{className:"cld-spbl-overlay text-color-semi-bg base-color-text"},{title:e.args},s);t.appendChild(o)}else{const o=new O.A(e.args.publicId,{cloudinaryConfig:s,transformation:e.args.transformation}),a=W.createEl("img",{className:`${b} cld-spbl-hover-img`},{src:o.url(j)});t.appendChild(a)}},z=(t,e)=>{t.setAttribute("data-click-action",e.action),t.setAttribute("data-pause",e.pause),e.action===c?t.setAttribute("data-seek",e.args.time):e.action===l&&t.setAttribute("data-goto-url",e.args.url)};a().registerComponent("shoppablePanelItem",B);const U=B,V=a().getComponent("Component");class X extends V{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.options=e;const s=()=>{this.render()};t.on(C.f.SHOPPABLE_ITEM_CHANGED,s),this.render(),this.dispose=()=>{super.dispose(),t.off(C.f.SHOPPABLE_ITEM_CHANGED,s)}}createEl(){const t=super.createEl();return[m,"base-color-bg"].map(e=>t.classList.add(e)),t}removeAll(){const t=this.children();for(let e=t.length-1;e>=0;--e)this.removeChild(t[e])}getItems(){const t=this.player_.cloudinary.cloudinaryConfig();return this.options.products.map(e=>{e.onHover&&"object"==typeof e.onHover.args&&(e.onHover.args.transformation=Object.assign({},this.options.transformation,e.onHover.args.transformation));const s={productId:e.productId,productName:e.productName,title:e.title,onHover:e.onHover,onClick:e.onClick,startTime:e.startTime,endTime:e.endTime};return{imageSrc:new O.A(e.publicId,{cloudinaryConfig:t,transformation:Object.assign({},this.options.transformation,e.transformation)}),conf:s}})}scrollToActiveItem(){const t=this.el_.getElementsByClassName("active");if(t.length>0){const e=t[0].offsetTop-12;"scrollBehavior"in document.documentElement.style?this.el_.scrollTo({top:e,behavior:"smooth"}):this.el_.scrollTop=e}}render(){this.removeAll();const t=this.getItems(),e=$()(()=>this.scrollToActiveItem(),1e3);t.forEach((t,s)=>{const o=new U(this.player(),{item:t.imageSrc,conf:t.conf,next:1===s,current:0===s,clickHandler:t=>{let e=t.currentTarget||t.target,s=this.player_.ended()?"productClickPost":"productClick";if(this.player_.trigger(s,{productId:e.dataset.productId,productName:e.dataset.productName}),e.dataset.clickAction===l)window.open(e.dataset.gotoUrl,"_blank");else if(e.dataset.clickAction===c){const t=i(e.dataset.seek);null!==t&&(this.player_.addClass("vjs-has-started"),this.player_.postModal&&this.player_.postModal.close(),this.player_.currentTime(t),this.player_.removeClass(d),this.player_.addClass(h),this.player_.addClass(u),this.player_.one("seeked",()=>this.player_.trigger("showProductsOverlay")))}"false"!==e.dataset.pause&&(this.player_.pause(),i(e.dataset.pause)&&setTimeout(()=>{this.player_.play()},1e3*i(e.dataset.pause)))}});o.on("mouseover",t=>{let e=t.currentTarget||t.target,s=this.player_.ended()?"productHoverPost":"productHover";this.player_.trigger(s,{productId:e.dataset.productId,productName:e.dataset.productName})}),void 0!==t.conf.startTime&&void 0!==t.conf.endTime&&this.player_.on(C.f.TIME_UPDATE,()=>{const s=this.player_.currentTime();s>=t.conf.startTime&&s<t.conf.endTime?(o.el_.classList.add("active"),e()):o.el_.classList.contains("active")&&o.el_.classList.remove("active")}),this.addChild(o)})}}a().registerComponent("shoppablePanel",X);const G=X,Y=a().dom||a();const q=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.options_={...e,postPlay:!0},this.player_=t,this.render(),this.handleDragToScroll(),this.dispose=()=>{this.layout_.dispose()}}handleDragToScroll(){const t=this.player_.postModal.el_.querySelector(`.${m}`);let e=!1,s=0,o=0;t.addEventListener("mousedown",a=>{e=!0,s=a.pageX-t.offsetLeft,o=t.scrollLeft}),document.addEventListener("mouseup",o=>{e=!1,setTimeout(()=>{t.classList.remove("dragged")},300);const a=o.pageX-t.offsetLeft-s;Math.abs(a)>5&&o.preventDefault()}),document.addEventListener("mousemove",a=>{if(!e)return;a.preventDefault();const i=a.pageX-t.offsetLeft-s;t.scrollLeft=o-i,Math.abs(i)>5&&!t.classList.contains("dragged")&&t.classList.add("dragged")})}render(){this.player_.postModal=null;const t=Y.createEl("div",{className:"cld-spbl-post-play"}),e=new G(this.player_,this.options_),s=Y.createEl("div",{className:"cld-spbl-post-title base-color-text"},{},this.options_.bannerMsg||"Shop the Video"),o=this.player_.cloudinary.currentPoster();o.transformation([o.transformation().toOptions?o.transformation().toOptions():{},{effect:"blur:3000"}]);const a=Y.createEl("div",{className:"cld-spbl-post-play-bg",style:`background-image: url("${o.url()}")`}),i=Y.createEl("button",{className:"cld-spbl-replay-btn base-color-bg vjs-icon-replay",onclick:()=>{this.player_.trigger("replay"),this.player_.postModal.close(),this.player_.play()}},{},"Replay");t.appendChild(a),t.appendChild(s),t.appendChild(e.el()),t.appendChild(i),this.player_.postModal=this.player_.createModal(t,{name:"postModal",uncloseable:!0}),this.player_.addClass("cld-spbl-post-modal"),this.player_.postModal.on("beforemodalclose",()=>{this.player_.removeClass("cld-spbl-post-modal")})}};const Z=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.options_=a().obj.merge(n,e),this.player_=t,this.options_.showPostPlayOverlay&&this.player_.on(C.f.ENDED,()=>{this.player_.addChild(new q(this.player_,this.options_))});const s=this.options_.width;this._injectCSS(`\n .${y} {\n transform: translateX(${s});\n }\n .${d} .vjs-control-bar {\n width: calc(100% - ${s});\n }\n .${g} {\n right: ${s};\n }\n .${m}{\n width: ${s};\n }\n `),this._setListeners()}_setListeners(){const t=this._resizeHandler.bind(this);this.player_.on(C.f.RESIZE,t),window.addEventListener("resize",t),this.dispose=()=>{this.player_.off(C.f.RESIZE,t),window.removeEventListener("resize",t),this.layout_.dispose()}}_injectCSS(t){const e=document.createElement("style");e.innerHTML=t,this.player_.el_.appendChild(e)}_resizeHandler(){const t=[["sm",0,80],["md",81,110],["lg",111,170]],e=parseFloat(this.options_.width)/100*this.player_.el_.clientWidth;let s=!1;if(e){for(const[o,a,i]of t)e>a&&e<=i&&(this.layout_.contentWrpEl_.setAttribute("size",o),s=o);s||this.layout_.contentWrpEl_.removeAttribute("size")}}init(){this.render()}render(){this.layout_=new M(this.player_,this.options_)}}},8812(t,e,s){var o=s(2140),a=/^\s+/;t.exports=function(t){return t?t.slice(0,o(t)+1).replace(a,""):t}},2140(t){var e=/\s/;t.exports=function(t){for(var s=t.length;s--&&e.test(t.charAt(s)););return s}},6177(t,e,s){var o=s(8953),a=s(3664),i=s(5378),r=Math.max,n=Math.min;t.exports=function(t,e,s){var l,c,p,d,h,u,m=0,g=!1,_=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var s=l,o=c;return l=c=void 0,m=e,d=t.apply(o,s)}function v(t){var s=t-u;return void 0===u||s>=e||s<0||_&&t-m>=p}function b(){var t=a();if(v(t))return C(t);h=setTimeout(b,function(t){var s=e-(t-u);return _?n(s,p-(t-m)):s}(t))}function C(t){return h=void 0,y&&l?f(t):(l=c=void 0,d)}function E(){var t=a(),s=v(t);if(l=arguments,c=this,u=t,s){if(void 0===h)return function(t){return m=t,h=setTimeout(b,e),g?f(t):d}(u);if(_)return clearTimeout(h),h=setTimeout(b,e),f(u)}return void 0===h&&(h=setTimeout(b,e)),d}return e=i(e)||0,o(s)&&(g=!!s.leading,p=(_="maxWait"in s)?r(i(s.maxWait)||0,e):p,y="trailing"in s?!!s.trailing:y),E.cancel=function(){void 0!==h&&clearTimeout(h),m=0,l=u=c=h=void 0},E.flush=function(){return void 0===h?d:C(a())},E}},3664(t,e,s){var o=s(1433);t.exports=function(){return o.Date.now()}},2858(t,e,s){var o=s(6177),a=s(8953);t.exports=function(t,e,s){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return a(s)&&(i="leading"in s?!!s.leading:i,r="trailing"in s?!!s.trailing:r),o(t,e,{leading:i,maxWait:e,trailing:r})}},5378(t,e,s){var o=s(8812),a=s(8953),i=s(5414),r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(a(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=a(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=o(t);var s=n.test(t);return s||l.test(t)?c(t.slice(2),s?2:8):r.test(t)?NaN:+t}}}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cloudinary Video Player v3.13.
|
|
3
|
-
* Built on 2026-04-
|
|
2
|
+
* Cloudinary Video Player v3.13.2-edge.0
|
|
3
|
+
* Built on 2026-04-07T06:05:12.546Z
|
|
4
4
|
* https://github.com/cloudinary/cloudinary-video-player
|
|
5
5
|
*/
|
|
6
6
|
/*
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
21
21
|
|
|
22
22
|
"use strict";
|
|
23
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fetchAndMergeConfig: () => (/* binding */ fetchAndMergeConfig)\n/* harmony export */ });\n/* harmony import */ var
|
|
23
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fetchAndMergeConfig: () => (/* binding */ fetchAndMergeConfig)\n/* harmony export */ });\n/* harmony import */ var cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cloudinary-video-player-profiles */ \"../node_modules/cloudinary-video-player-profiles/dist/index.js\");\n/* harmony import */ var cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _plugins_cloudinary_url_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../plugins/cloudinary/url-helpers */ \"./plugins/cloudinary/url-helpers.js\");\n/* harmony import */ var _utils_utf8Base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/utf8Base64 */ \"./utils/utf8Base64.js\");\n/* harmony import */ var _querystring__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./querystring */ \"./utils/querystring.js\");\n/* harmony import */ var _cloudinary_config_from_options__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cloudinary-config-from-options */ \"./utils/cloudinary-config-from-options.js\");\n\n\n\n\n\nconst isDefaultProfile = profileName => !!cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0__.defaultProfiles.find(_ref => {\n let {\n name\n } = _ref;\n return profileName === name;\n});\nconst getDefaultProfileConfig = profileName => {\n const profile = cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0__.defaultProfiles.find(_ref2 => {\n let {\n name\n } = _ref2;\n return profileName === name;\n });\n if (!profile) {\n throw new Error(`Default profile with name ${profileName} does not exist`);\n }\n return profile.config;\n};\nconst fetchConfig = async options => {\n const {\n profile,\n publicId,\n type = 'upload',\n videoConfig,\n allowUsageReport = true\n } = options;\n if (profile && isDefaultProfile(profile)) {\n return getDefaultProfileConfig(profile);\n }\n const cloudinaryConfig = (0,_cloudinary_config_from_options__WEBPACK_IMPORTED_MODULE_4__.getCloudinaryConfigFromOptions)(options);\n const urlPrefix = (0,_plugins_cloudinary_url_helpers__WEBPACK_IMPORTED_MODULE_1__.getCloudinaryUrlPrefix)(cloudinaryConfig) + '/_applet_/video_service';\n const queryParams = allowUsageReport ? {\n _s: `vp-${\"3.13.2-edge.0\"}`\n } : null;\n let configUrl;\n if (profile) {\n configUrl = (0,_plugins_cloudinary_url_helpers__WEBPACK_IMPORTED_MODULE_1__.isRawUrl)(profile) ? profile : (0,_querystring__WEBPACK_IMPORTED_MODULE_3__.appendQueryParams)(`${urlPrefix}/video_player_profiles/${profile.replaceAll(' ', '+')}.json`, queryParams);\n } else if (publicId && videoConfig !== false) {\n configUrl = (0,_querystring__WEBPACK_IMPORTED_MODULE_3__.appendQueryParams)(`${urlPrefix}/video_player_config/video/${type}/${(0,_utils_utf8Base64__WEBPACK_IMPORTED_MODULE_2__.utf8ToBase64)(publicId)}.json`, queryParams);\n } else {\n return {};\n }\n return fetch(configUrl, {\n method: 'GET'\n }).then(res => {\n if (!res.ok) {\n // fail silently\n return {};\n }\n return res.json();\n });\n};\nconst fetchAndMergeConfig = async options => {\n const profileOptions = await fetchConfig(options);\n const fetchedConfig = profileOptions.playerOptions ? Object.keys(profileOptions.playerOptions) : [];\n const profileAnalytics = {\n _internalAnalyticsMetadata: {\n newPlayerMethod: true,\n ...(options.profile ? {\n profile: isDefaultProfile(options.profile) ? options.profile : true\n } : {}),\n ...(!options.profile && options.videoConfig !== false && options.publicId ? {\n videoConfig: true\n } : {}),\n ...(fetchedConfig.length > 0 ? {\n fetchedConfig: fetchedConfig.join(',')\n } : {})\n }\n };\n return Object.assign({}, profileOptions.playerOptions || {}, profileOptions.sourceOptions || {}, options, profileAnalytics);\n};\n\n//# sourceURL=webpack:///./utils/fetch-config.js?\n}");
|
|
24
24
|
|
|
25
25
|
/***/ },
|
|
26
26
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Cloudinary Video Player v3.13.2-edge.0
|
|
3
|
+
* Built on 2026-04-07T06:05:12.546Z
|
|
4
|
+
* https://github.com/cloudinary/cloudinary-video-player
|
|
5
|
+
*/
|
|
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
|
+
*/
|
|
15
|
+
(self["cloudinaryVideoPlayerChunkLoading"] = self["cloudinaryVideoPlayerChunkLoading"] || []).push([["utils_schedule_js"],{
|
|
16
|
+
|
|
17
|
+
/***/ "./utils/schedule.js"
|
|
18
|
+
/*!***************************!*\
|
|
19
|
+
!*** ./utils/schedule.js ***!
|
|
20
|
+
\***************************/
|
|
21
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
22
|
+
|
|
23
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getElementForSchedule: () => (/* reexport safe */ _lazy_player__WEBPACK_IMPORTED_MODULE_0__.getVideoElement),\n/* harmony export */ isWithinSchedule: () => (/* binding */ isWithinSchedule),\n/* harmony export */ parseDay: () => (/* binding */ parseDay),\n/* harmony export */ renderScheduleImage: () => (/* reexport safe */ _lazy_player__WEBPACK_IMPORTED_MODULE_0__.preparePlayerPlaceholder),\n/* harmony export */ scheduleBootstrap: () => (/* binding */ scheduleBootstrap),\n/* harmony export */ shouldUseScheduleBootstrap: () => (/* binding */ shouldUseScheduleBootstrap)\n/* harmony export */ });\n/* harmony import */ var _lazy_player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lazy-player */ \"./utils/lazy-player.js\");\n/**\n * Schedule utilities: weekly time-range parsing and bootstrap.\n * Outside-schedule bootstrap reuses lazy placeholder DOM + deferred load helpers.\n * Uses browser local time. No videojs dependency for the bootstrap path.\n */\n\n\nconst INTERNAL_ANALYTICS_URL = 'https://analytics-api-s.cloudinary.com';\nconst sendScheduleImageAnalytics = options => {\n const allowReport = options?.sourceOptions?.allowUsageReport ?? options?.allowUsageReport;\n if (allowReport === false) return;\n try {\n const params = new URLSearchParams({\n scheduleImageRendered: 'true',\n cloudName: options?.cloudName || options?.cloudinaryConfig?.cloud_name || ''\n }).toString();\n fetch(`${INTERNAL_ANALYTICS_URL}/video_player_source?${params}`);\n } catch {\n // noop\n }\n};\nconst getCloudNameFromOptions = options => options?.cloudName || options?.cloud_name || options?.cloudinaryConfig?.cloud_name;\nconst getPublicIdFromOptions = options => options?.publicId || options?.sourceOptions?.publicId;\n\n/**\n * Returns true when schedule.weekly is configured and current time is outside the schedule.\n * @param {object} options - player options\n * @returns {boolean}\n */\nconst shouldUseScheduleBootstrap = options => {\n const schedule = options?.schedule;\n const weekly = schedule?.weekly;\n return Array.isArray(weekly) && weekly.length > 0 && !isWithinSchedule(schedule, new Date());\n};\n\n/**\n * Bootstrap path when outside schedule: render poster, return stub with loadPlayer().\n * @param {string|HTMLElement} elem - Element id or video element\n * @param {object} options - player options\n * @param {function} [ready] - Video.js ready callback (passed when full player loads)\n * @returns {object} Stub with source() and loadPlayer()\n */\nconst scheduleBootstrap = async (elem, options, ready) => {\n const videoElement = (0,_lazy_player__WEBPACK_IMPORTED_MODULE_0__.getVideoElement)(elem);\n const cloudName = getCloudNameFromOptions(options);\n const publicId = getPublicIdFromOptions(options);\n if (!cloudName || !publicId) {\n throw new Error('schedule.weekly requires cloudName and publicId when outside schedule');\n }\n const {\n buildPosterUrl\n } = await __webpack_require__.e(/*! import() */ \"cld-poster-url\").then(__webpack_require__.bind(__webpack_require__, /*! ./poster-url */ \"./utils/poster-url.js\"));\n const cloudinaryConfig = options?.cloudinaryConfig || {\n cloud_name: cloudName\n };\n const posterUrl = buildPosterUrl(cloudName, publicId, cloudinaryConfig);\n const fluid = options?.fluid !== false;\n const {\n videoElement: vEl,\n hadControls\n } = (0,_lazy_player__WEBPACK_IMPORTED_MODULE_0__.preparePlayerPlaceholder)(videoElement, posterUrl, {\n fluid,\n width: options?.width,\n height: options?.height,\n cropMode: options?.sourceOptions?.cropMode,\n sourceOptions: options?.sourceOptions,\n aspectRatio: options?.aspectRatio\n });\n sendScheduleImageAnalytics(options);\n const stub = {\n source: () => stub,\n loadPlayer: () => {\n if (hadControls) vEl.setAttribute('controls', '');\n return (0,_lazy_player__WEBPACK_IMPORTED_MODULE_0__.loadPlayer)({\n videoElement: vEl,\n options,\n ready\n });\n }\n };\n return stub;\n};\nconst DAY_MAP = {\n sunday: 0,\n sun: 0,\n monday: 1,\n mon: 1,\n tuesday: 2,\n tue: 2,\n tues: 2,\n wednesday: 3,\n wed: 3,\n thursday: 4,\n thu: 4,\n thur: 4,\n thurs: 4,\n friday: 5,\n fri: 5,\n saturday: 6,\n sat: 6\n};\n\n/**\n * Parse readable day-of-week string to JS Date.getDay() value (0=Sun .. 6=Sat).\n * @param {string} day - Full or abbreviated day name (case-insensitive)\n * @returns {number|null} 0-6, or null if invalid\n */\nconst parseDay = day => {\n if (typeof day !== 'string') return null;\n const key = day.toLowerCase().trim();\n return DAY_MAP[key] ?? null;\n};\n\n/**\n * Parse \"HH:mm\" string to minutes since midnight.\n * @param {string} timeStr - \"09:00\" or \"17:30\"\n * @returns {number|null} minutes, or null if invalid\n */\nconst parseTime = timeStr => {\n if (typeof timeStr !== 'string') return null;\n const match = timeStr.trim().match(/^(\\d{1,2}):(\\d{2})$/);\n if (!match) return null;\n const h = parseInt(match[1], 10);\n const m = parseInt(match[2], 10);\n if (h < 0 || h > 23 || m < 0 || m > 59) return null;\n return h * 60 + m;\n};\n\n/**\n * Check if a date falls within any configured weekly slot (local time).\n * @param {{ weekly?: Array<{ day: string, start: string, duration: number }> }} schedule - schedule config\n * @param {Date} date - date to check (uses local time)\n * @returns {boolean} true if within a slot\n */\nconst isWithinSchedule = (schedule, date) => {\n const weekly = schedule?.weekly;\n if (!Array.isArray(weekly) || weekly.length === 0) return true;\n const WEEK = 7 * 1440;\n const nowInWeek = date.getDay() * 1440 + date.getHours() * 60 + date.getMinutes();\n for (const slot of weekly) {\n const slotDay = parseDay(slot.day);\n if (slotDay === null) continue;\n const startMin = parseTime(slot.start);\n if (startMin === null || typeof slot.duration !== 'number' || slot.duration <= 0) continue;\n const slotStart = slotDay * 1440 + startMin;\n const durationMin = slot.duration * 60;\n const elapsed = (nowInWeek - slotStart + WEEK) % WEEK;\n if (elapsed < durationMin) return true;\n }\n return false;\n};\n\n\n//# sourceURL=webpack:///./utils/schedule.js?\n}");
|
|
24
|
+
|
|
25
|
+
/***/ }
|
|
26
|
+
|
|
27
|
+
}]);
|