UNPKG

cloudinary-video-player

Version:
411 lines (395 loc) 34.4 kB
/*! * Cloudinary Video Player v4.0.3 * Built on 2026-06-07T12:24:04.618Z * https://github.com/cloudinary/cloudinary-video-player */ /* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["cloudinary-video-player"] = factory(); else root["cloudinary-video-player"] = factory(); })(self, () => { return /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "./index.js" /*!******************!*\ !*** ./index.js ***! \******************/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) { eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ player: () => (/* binding */ player),\n/* harmony export */ players: () => (/* binding */ players),\n/* harmony export */ videoPlayer: () => (/* binding */ videoPlayer),\n/* harmony export */ videoPlayers: () => (/* binding */ videoPlayers)\n/* harmony export */ });\n/* harmony import */ var _assets_styles_main_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ~/assets/styles/main.scss */ \"./assets/styles/main.scss\");\n/* harmony import */ var _utils_player_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/player-api */ \"./utils/player-api.js\");\n/* harmony import */ var _utils_deferred_player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/deferred-player */ \"./utils/deferred-player.js\");\n\n\n\nconst importCore = () => Promise.all(/*! import() | cld-player-core */[__webpack_require__.e(\"styles\"), __webpack_require__.e(\"cld-player-core\")]).then(__webpack_require__.bind(__webpack_require__, /*! ./video-player.js */ \"./video-player.js\"));\nconst mergeOpts = function () {\n for (var _len = arguments.length, opts = new Array(_len), _key = 0; _key < _len; _key++) {\n opts[_key] = arguments[_key];\n }\n return Object.assign({}, ...opts, {\n _internalAnalyticsMetadata: Object.assign({}, ...opts.map(opt => opt?._internalAnalyticsMetadata || {}), {\n playerBundle: 'lazy'\n })\n });\n};\nconst videoPlayer = function (id) {\n let playerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let ready = arguments.length > 2 ? arguments[2] : undefined;\n return (0,_utils_deferred_player__WEBPACK_IMPORTED_MODULE_2__.createDeferredPlayer)(importCore().then(m => m.createVideoPlayer(id, mergeOpts(playerOptions), ready)));\n};\nconst videoPlayers = (selector, playerOptions, ready) => (0,_utils_player_api__WEBPACK_IMPORTED_MODULE_1__.createMultipleSync)(selector, playerOptions, ready, videoPlayer);\nconst player = function (id) {\n let playerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let ready = arguments.length > 2 ? arguments[2] : undefined;\n return (0,_utils_player_api__WEBPACK_IMPORTED_MODULE_1__.createAsyncPlayer)(id, playerOptions, ready, async (videoElement, opts, r) => {\n const {\n createPlayerWithConfig\n } = await importCore();\n return createPlayerWithConfig(videoElement, mergeOpts(opts), r);\n });\n};\nconst players = (selector, playerOptions, ready) => (0,_utils_player_api__WEBPACK_IMPORTED_MODULE_1__.createMultiplePlayers)(selector, playerOptions, ready, player);\nconst cloudinaryVideoPlayerLegacyConfig = function () {\n let instanceConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn('Cloudinary.new() is deprecated and will be removed. Please use cloudinary.videoPlayer() instead.');\n return {\n videoPlayer: function (id) {\n let playerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let ready = arguments.length > 2 ? arguments[2] : undefined;\n return (0,_utils_deferred_player__WEBPACK_IMPORTED_MODULE_2__.createDeferredPlayer)(importCore().then(m => m.createVideoPlayer(id, mergeOpts(instanceConfig, playerOptions), ready)));\n },\n videoPlayers: function (selector) {\n let playerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let ready = arguments.length > 2 ? arguments[2] : undefined;\n return (0,_utils_player_api__WEBPACK_IMPORTED_MODULE_1__.createMultipleSync)(selector, mergeOpts(instanceConfig, playerOptions), ready, videoPlayer);\n }\n };\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_player_api__WEBPACK_IMPORTED_MODULE_1__.setupCloudinaryGlobal)({\n videoPlayer,\n videoPlayers,\n player,\n players,\n Cloudinary: {\n new: cloudinaryVideoPlayerLegacyConfig\n }\n}));\n\n//# sourceURL=webpack:///./index.js?\n}"); /***/ }, /***/ "./utils/deferred-player.js" /*!**********************************!*\ !*** ./utils/deferred-player.js ***! \**********************************/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) { eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createDeferredPlayer: () => (/* binding */ createDeferredPlayer)\n/* harmony export */ });\n/**\n * Deferred Player Proxy\n *\n * Returns a synchronous object from videoPlayer() that buffers all method calls\n * while the real VideoPlayer loads asynchronously, then replays them in order.\n *\n * This allows the default entry point to be lightweight (lazy) while preserving\n * the synchronous API contract:\n *\n * const player = cloudinary.videoPlayer('el', { ... });\n * player.source('elephants'); // buffered, replayed after load\n * player.on('error', handler); // buffered, replayed after load\n */\n\n/**\n * Creates a deferred player proxy that buffers calls until the real player loads.\n *\n * @param {Promise<Object>} playerPromise - Promise that resolves to a VideoPlayer instance.\n * @returns {Object} A proxy that looks like a VideoPlayer synchronously.\n */\nconst createDeferredPlayer = playerPromise => {\n let realPlayer = null;\n let failed = false;\n const queue = [];\n const resolvedPromise = playerPromise.then(p => {\n realPlayer = p;\n queue.forEach(_ref => {\n let {\n method,\n args,\n resolve,\n reject\n } = _ref;\n try {\n resolve(realPlayer[method](...args));\n } catch (e) {\n reject(e);\n }\n });\n queue.length = 0;\n return p;\n }).catch(err => {\n failed = true;\n queue.forEach(_ref2 => {\n let {\n reject\n } = _ref2;\n return reject(err);\n });\n queue.length = 0;\n throw err;\n });\n const proxy = new Proxy({}, {\n get(_target, prop) {\n if (prop === 'then' || prop === 'catch' || prop === 'finally') {\n return resolvedPromise[prop].bind(resolvedPromise);\n }\n if (prop === Symbol.toPrimitive || prop === Symbol.toStringTag) {\n return undefined;\n }\n if (realPlayer) {\n const val = realPlayer[prop];\n return typeof val === 'function' ? val.bind(realPlayer) : val;\n }\n if (failed) {\n return undefined;\n }\n return function () {\n const deferred = {};\n const promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n queue.push({\n method: prop,\n args,\n ...deferred\n });\n promise.catch(e => console.error('[Cloudinary] Deferred player call failed:', e));\n return proxy;\n };\n },\n has(_target, prop) {\n if (realPlayer) {\n return prop in realPlayer;\n }\n return true;\n }\n });\n return proxy;\n};\n\n//# sourceURL=webpack:///./utils/deferred-player.js?\n}"); /***/ }, /***/ "./utils/lazy-player.js" /*!******************************!*\ !*** ./utils/lazy-player.js ***! \******************************/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) { eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getVideoElement: () => (/* binding */ getVideoElement),\n/* harmony export */ lazyBootstrap: () => (/* binding */ lazyBootstrap),\n/* harmony export */ loadPlayer: () => (/* binding */ loadPlayer),\n/* harmony export */ preparePlayerPlaceholder: () => (/* binding */ preparePlayerPlaceholder),\n/* harmony export */ shouldLoadOnScroll: () => (/* binding */ shouldLoadOnScroll),\n/* harmony export */ shouldUseLazyBootstrap: () => (/* binding */ shouldUseLazyBootstrap)\n/* harmony export */ });\nconst FLUID_CLASS = 'cld-fluid';\n\n/** Same condition as `getPosterUrl` in `poster-url.js` (explicit string `poster`); skips the `cld-poster-url` async chunk. */\nconst hasExplicitPoster = options => typeof options?.poster === 'string' && options.poster.length > 0;\nconst getVideoElement = elem => {\n if (typeof elem === 'string') {\n let id = elem;\n if (id.indexOf('#') === 0) id = id.slice(1);\n try {\n elem = document.querySelector(`#${CSS.escape(id)}`);\n } catch {\n elem = null;\n }\n if (!elem) throw new Error(`Could not find element with id ${id}`);\n }\n if (!elem?.tagName) throw new Error('Must specify either an element or an element id.');\n if (elem.tagName !== 'VIDEO') throw new Error('Element is not a video tag.');\n return elem;\n};\nconst preparePlayerPlaceholder = function (videoElement, posterUrl) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const hadControls = videoElement.hasAttribute('controls');\n videoElement.poster = posterUrl;\n videoElement.preload = 'none';\n videoElement.controls = false;\n videoElement.removeAttribute('controls');\n const fluid = options.fluid !== false;\n if (fluid) {\n videoElement.classList.add(FLUID_CLASS);\n }\n if (options.width) videoElement.setAttribute('width', String(options.width));\n if (options.height) videoElement.setAttribute('height', String(options.height));\n const ar = options?.sourceOptions?.aspectRatio || options?.aspectRatio;\n if (typeof ar === 'string' && ar.includes(':')) {\n const parts = ar.split(':').map(x => parseInt(x.trim(), 10));\n if (parts.length === 2 && parts[0] > 0 && parts[1] > 0) {\n videoElement.style.aspectRatio = `${parts[0]} / ${parts[1]}`;\n }\n }\n return {\n videoElement,\n hadControls\n };\n};\nconst loadPlayer = _ref => {\n let {\n overlayRoot,\n videoElement,\n options,\n ready\n } = _ref;\n if (overlayRoot?.parentNode) {\n overlayRoot.replaceWith(videoElement);\n }\n return Promise.all(/*! import() */[__webpack_require__.e(\"styles\"), __webpack_require__.e(\"cld-player-core\")]).then(__webpack_require__.bind(__webpack_require__, /*! ../video-player.js */ \"./video-player.js\")).then(m => m.createVideoPlayer(videoElement, options, ready));\n};\nconst LAZY_PLAYER_CLASS = 'cld-lazy-player';\nconst isLightSkin = (videoElement, options) => {\n const cls = videoElement.className || '';\n return cls.indexOf('cld-video-player-skin-light') > -1 || options?.skin === 'light';\n};\n\n/** Matches Video.js BigPlayButton DOM structure. */\nconst createBigPlayButton = () => {\n const playBtn = document.createElement('button');\n playBtn.type = 'button';\n playBtn.className = 'vjs-big-play-button';\n playBtn.setAttribute('aria-disabled', 'false');\n playBtn.title = 'Play Video';\n playBtn.setAttribute('aria-label', 'Play Video');\n const icon = document.createElement('span');\n icon.className = 'vjs-icon-placeholder';\n icon.setAttribute('aria-hidden', 'true');\n playBtn.appendChild(icon);\n return playBtn;\n};\nconst shouldUseLazyBootstrap = options => !!options?.lazy;\nconst shouldLoadOnScroll = lazy => lazy && typeof lazy === 'object' && lazy.loadOnScroll === true;\n\n/**\n * Renders the lazy placeholder (poster, big-play) before the main player chunk loads.\n *\n * @param {string|HTMLVideoElement} elem\n * @param {object} options\n * @param {function} [ready] - Passed through when the full player loads.\n * @returns {Promise<{ source: function, loadPlayer: function }>}\n */\nconst lazyBootstrap = async (elem, options, ready) => {\n const videoElement = getVideoElement(elem);\n const posterUrl = hasExplicitPoster(options) ? options.poster : (await __webpack_require__.e(/*! import() | cld-poster-url */ \"cld-poster-url\").then(__webpack_require__.bind(__webpack_require__, /*! ./poster-url */ \"./utils/poster-url.js\"))).getPosterUrl(options);\n const loadOnScroll = shouldLoadOnScroll(options.lazy);\n const fluidEnabled = options?.fluid !== false;\n const {\n hadControls\n } = preparePlayerPlaceholder(videoElement, posterUrl, {\n fluid: fluidEnabled,\n width: options?.width,\n height: options?.height,\n sourceOptions: options?.sourceOptions,\n aspectRatio: options?.aspectRatio\n });\n const light = isLightSkin(videoElement, options);\n const overlayRoot = document.createElement('div');\n overlayRoot.classList.add('cld-video-player', 'video-js', LAZY_PLAYER_CLASS);\n // Fluid rules are `.cld-video-player.cld-fluid`; placeholder `<video>` alone cannot satisfy that selector.\n if (fluidEnabled) {\n overlayRoot.classList.add(FLUID_CLASS);\n }\n overlayRoot.classList.add(light ? 'cld-video-player-skin-light' : 'cld-video-player-skin-dark');\n const colors = options?.colors;\n if (colors) {\n if (colors.base) overlayRoot.style.setProperty('--color-base', colors.base);\n if (colors.accent) overlayRoot.style.setProperty('--color-accent', colors.accent);\n if (colors.text) overlayRoot.style.setProperty('--color-text', colors.text);\n }\n videoElement.parentNode.insertBefore(overlayRoot, videoElement);\n overlayRoot.appendChild(videoElement);\n const playBtn = createBigPlayButton();\n overlayRoot.appendChild(playBtn);\n let loadPromise = null;\n let observer = null;\n const teardownActivation = () => {\n playBtn.removeEventListener('click', onPlayClick);\n videoElement.removeEventListener('click', onVideoClick);\n if (observer) {\n observer.disconnect();\n observer = null;\n }\n };\n const activatePlayer = function () {\n let activationOpts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (loadPromise) {\n return loadPromise;\n }\n teardownActivation();\n const autoplayFromUserGesture = activationOpts.autoplayFromUserGesture === true;\n if (hadControls) videoElement.setAttribute('controls', '');\n const wrappedReady = autoplayFromUserGesture ? p => {\n p.play();\n if (ready) ready(p);\n } : ready;\n const playerOptions = Object.assign({}, options);\n delete playerOptions.lazy;\n loadPromise = loadPlayer({\n overlayRoot,\n videoElement,\n options: playerOptions,\n ready: wrappedReady\n });\n return loadPromise;\n };\n function onPlayClick(e) {\n e.stopPropagation();\n activatePlayer({\n autoplayFromUserGesture: true\n });\n }\n function onVideoClick() {\n activatePlayer({\n autoplayFromUserGesture: true\n });\n }\n playBtn.addEventListener('click', onPlayClick);\n videoElement.addEventListener('click', onVideoClick);\n if (loadOnScroll && typeof IntersectionObserver !== 'undefined') {\n observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n activatePlayer({});\n }\n });\n }, {\n rootMargin: '0px',\n threshold: 0.25\n });\n observer.observe(videoElement);\n }\n const stub = {\n source: () => stub,\n loadPlayer: () => activatePlayer({\n autoplayFromUserGesture: true\n })\n };\n return stub;\n};\n\n//# sourceURL=webpack:///./utils/lazy-player.js?\n}"); /***/ }, /***/ "./utils/player-api.js" /*!*****************************!*\ !*** ./utils/player-api.js ***! \*****************************/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) { eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createAsyncPlayer: () => (/* binding */ createAsyncPlayer),\n/* harmony export */ createMultiplePlayers: () => (/* binding */ createMultiplePlayers),\n/* harmony export */ createMultipleSync: () => (/* binding */ createMultipleSync),\n/* harmony export */ setupCloudinaryGlobal: () => (/* binding */ setupCloudinaryGlobal)\n/* harmony export */ });\n/* harmony import */ var _lazy_player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lazy-player */ \"./utils/lazy-player.js\");\n\n\nconst createAsyncPlayer = async (id, playerOptions, ready, createFn) => {\n const mergedOptions = Object.assign({}, playerOptions);\n const videoElement = (0,_lazy_player__WEBPACK_IMPORTED_MODULE_0__.getVideoElement)(id);\n const opts = await (async () => {\n try {\n const {\n fetchAndMergeConfig\n } = await __webpack_require__.e(/*! import() */ \"utils_fetch-config_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./fetch-config */ \"./utils/fetch-config.js\"));\n const fetched = await fetchAndMergeConfig(mergedOptions);\n return Object.assign({}, fetched, mergedOptions);\n } catch {\n return mergedOptions;\n }\n })();\n if (opts?.schedule?.weekly) {\n const {\n shouldUseScheduleBootstrap,\n scheduleBootstrap\n } = await __webpack_require__.e(/*! import() */ \"utils_schedule_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./schedule */ \"./utils/schedule.js\"));\n if (shouldUseScheduleBootstrap(opts)) {\n return scheduleBootstrap(id, opts, ready);\n }\n }\n if ((0,_lazy_player__WEBPACK_IMPORTED_MODULE_0__.shouldUseLazyBootstrap)(opts)) {\n return (0,_lazy_player__WEBPACK_IMPORTED_MODULE_0__.lazyBootstrap)(id, opts, ready);\n }\n return createFn(videoElement, opts, ready);\n};\nconst createMultiplePlayers = async (selector, playerOptions, ready, playerFn) => {\n const nodeList = document.querySelectorAll(selector);\n return Promise.all([...nodeList].map(node => playerFn(node, playerOptions, ready)));\n};\nconst createMultipleSync = (selector, playerOptions, ready, playerFn) => {\n const nodeList = document.querySelectorAll(selector);\n return [...nodeList].map(node => playerFn(node, playerOptions, ready));\n};\nconst setupCloudinaryGlobal = methods => {\n const cloudinary = {\n ...(window.cloudinary || {}),\n ...methods\n };\n window.cloudinary = cloudinary;\n return cloudinary;\n};\n\n//# sourceURL=webpack:///./utils/player-api.js?\n}"); /***/ }, /***/ "./assets/styles/main.scss" /*!*********************************!*\ !*** ./assets/styles/main.scss ***! \*********************************/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) { eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack:///./assets/styles/main.scss?\n}"); /***/ } /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ id: moduleId, /******/ loaded: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ if (!(moduleId in __webpack_modules__)) { /******/ delete __webpack_module_cache__[moduleId]; /******/ var e = new Error("Cannot find module '" + moduleId + "'"); /******/ e.code = 'MODULE_NOT_FOUND'; /******/ throw e; /******/ } /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = __webpack_modules__; /******/ /************************************************************************/ /******/ /* webpack/runtime/chunk loaded */ /******/ (() => { /******/ var deferred = []; /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { /******/ if(chunkIds) { /******/ priority = priority || 0; /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; /******/ deferred[i] = [chunkIds, fn, priority]; /******/ return; /******/ } /******/ var notFulfilled = Infinity; /******/ for (var i = 0; i < deferred.length; i++) { /******/ var [chunkIds, fn, priority] = deferred[i]; /******/ var fulfilled = true; /******/ for (var j = 0; j < chunkIds.length; j++) { /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { /******/ chunkIds.splice(j--, 1); /******/ } else { /******/ fulfilled = false; /******/ if(priority < notFulfilled) notFulfilled = priority; /******/ } /******/ } /******/ if(fulfilled) { /******/ deferred.splice(i--, 1) /******/ var r = fn(); /******/ if (r !== undefined) result = r; /******/ } /******/ } /******/ return result; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/ensure chunk */ /******/ (() => { /******/ __webpack_require__.f = {}; /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = (chunkId) => { /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { /******/ __webpack_require__.f[key](chunkId, promises); /******/ return promises; /******/ }, [])); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/get javascript chunk filename */ /******/ (() => { /******/ // This function allow to reference async chunks /******/ __webpack_require__.u = (chunkId) => { /******/ // return url for filenames based on template /******/ return "" + chunkId + ".js"; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/get mini-css chunk filename */ /******/ (() => { /******/ // This function allow to reference async chunks /******/ __webpack_require__.miniCssF = (chunkId) => { /******/ // return url for filenames based on template /******/ return undefined; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/global */ /******/ (() => { /******/ __webpack_require__.g = (function() { /******/ if (typeof globalThis === 'object') return globalThis; /******/ try { /******/ return this || new Function('return this')(); /******/ } catch (e) { /******/ if (typeof window === 'object') return window; /******/ } /******/ })(); /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/load script */ /******/ (() => { /******/ var inProgress = {}; /******/ // data-webpack is not used as build has no uniqueName /******/ // loadScript function to load a script via script tag /******/ __webpack_require__.l = (url, done, key, chunkId) => { /******/ if(inProgress[url]) { inProgress[url].push(done); return; } /******/ var script, needAttach; /******/ if(key !== undefined) { /******/ var scripts = document.getElementsByTagName("script"); /******/ for(var i = 0; i < scripts.length; i++) { /******/ var s = scripts[i]; /******/ if(s.getAttribute("src") == url) { script = s; break; } /******/ } /******/ } /******/ if(!script) { /******/ needAttach = true; /******/ script = document.createElement('script'); /******/ /******/ script.charset = 'utf-8'; /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ /******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; /******/ var onScriptComplete = (prev, event) => { /******/ // avoid mem leaks in IE. /******/ script.onerror = script.onload = null; /******/ clearTimeout(timeout); /******/ var doneFns = inProgress[url]; /******/ delete inProgress[url]; /******/ script.parentNode && script.parentNode.removeChild(script); /******/ doneFns && doneFns.forEach((fn) => (fn(event))); /******/ if(prev) return prev(event); /******/ } /******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); /******/ script.onerror = onScriptComplete.bind(null, script.onerror); /******/ script.onload = onScriptComplete.bind(null, script.onload); /******/ needAttach && document.head.appendChild(script); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/node module decorator */ /******/ (() => { /******/ __webpack_require__.nmd = (module) => { /******/ module.paths = []; /******/ if (!module.children) module.children = []; /******/ return module; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/publicPath */ /******/ (() => { /******/ var scriptUrl; /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; /******/ var document = __webpack_require__.g.document; /******/ if (!scriptUrl && document) { /******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') /******/ scriptUrl = document.currentScript.src; /******/ if (!scriptUrl) { /******/ var scripts = document.getElementsByTagName("script"); /******/ if(scripts.length) { /******/ var i = scripts.length - 1; /******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; /******/ } /******/ } /******/ } /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); /******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); /******/ __webpack_require__.p = scriptUrl; /******/ })(); /******/ /******/ /* webpack/runtime/jsonp chunk loading */ /******/ (() => { /******/ // no baseURI /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ "player": 0, /******/ "styles": 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { /******/ // JSONP chunk loading for javascript /******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; /******/ if(installedChunkData !== 0) { // 0 means "already installed". /******/ /******/ // a Promise means "currently loading". /******/ if(installedChunkData) { /******/ promises.push(installedChunkData[2]); /******/ } else { /******/ if("styles" != chunkId) { /******/ // setup Promise in chunk cache /******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); /******/ promises.push(installedChunkData[2] = promise); /******/ /******/ // start chunk loading /******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); /******/ // create error before stack unwound to get useful stacktrace later /******/ var error = new Error(); /******/ var loadingEnded = (event) => { /******/ if(__webpack_require__.o(installedChunks, chunkId)) { /******/ installedChunkData = installedChunks[chunkId]; /******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; /******/ if(installedChunkData) { /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); /******/ var realSrc = event && event.target && event.target.src; /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; /******/ error.name = 'ChunkLoadError'; /******/ error.type = errorType; /******/ error.request = realSrc; /******/ installedChunkData[1](error); /******/ } /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); /******/ } else installedChunks[chunkId] = 0; /******/ } /******/ } /******/ }; /******/ /******/ // no prefetching /******/ /******/ // no preloaded /******/ /******/ // no HMR /******/ /******/ // no HMR manifest /******/ /******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); /******/ /******/ // install a JSONP callback for chunk loading /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { /******/ var [chunkIds, moreModules, runtime] = data; /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0; /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { /******/ for(moduleId in moreModules) { /******/ if(__webpack_require__.o(moreModules, moduleId)) { /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(runtime) var result = runtime(__webpack_require__); /******/ } /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ installedChunks[chunkId][0](); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ return __webpack_require__.O(result); /******/ } /******/ /******/ var chunkLoadingGlobal = self["cloudinaryVideoPlayerChunkLoading"] = self["cloudinaryVideoPlayerChunkLoading"] || []; /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); /******/ })(); /******/ /************************************************************************/ /******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module depends on other loaded chunks and execution need to be delayed /******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["styles"], () => (__webpack_require__("./index.js"))) /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); /******/ /******/ return __webpack_exports__; /******/ })() ; });