mbt-puzzle-preview-lb 1.0.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/index.js +861 -0
- package/dist/reactPlayerDailyMotion.index.js +21 -0
- package/dist/reactPlayerFacebook.index.js +21 -0
- package/dist/reactPlayerFilePlayer.index.js +21 -0
- package/dist/reactPlayerKaltura.index.js +21 -0
- package/dist/reactPlayerMixcloud.index.js +21 -0
- package/dist/reactPlayerMux.index.js +21 -0
- package/dist/reactPlayerPreview.index.js +21 -0
- package/dist/reactPlayerSoundCloud.index.js +21 -0
- package/dist/reactPlayerStreamable.index.js +21 -0
- package/dist/reactPlayerTwitch.index.js +21 -0
- package/dist/reactPlayerVidyard.index.js +21 -0
- package/dist/reactPlayerVimeo.index.js +21 -0
- package/dist/reactPlayerWistia.index.js +21 -0
- package/dist/reactPlayerYouTube.index.js +21 -0
- package/package.json +90 -0
- package/readme.md +82 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerDailyMotion"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/DailyMotion.js":
|
|
12
|
+
/*!**************************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/DailyMotion.js ***!
|
|
14
|
+
\**************************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar DailyMotion_exports = {};\n__export(DailyMotion_exports, {\n default: () => DailyMotion\n});\nmodule.exports = __toCommonJS(DailyMotion_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://api.dmcdn.net/all.js\";\nconst SDK_GLOBAL = \"DM\";\nconst SDK_GLOBAL_READY = \"dmAsyncInit\";\nclass DailyMotion extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"onDurationChange\", () => {\n const duration = this.getDuration();\n this.props.onDuration(duration);\n });\n __publicField(this, \"mute\", () => {\n this.callPlayer(\"setMuted\", true);\n });\n __publicField(this, \"unmute\", () => {\n this.callPlayer(\"setMuted\", false);\n });\n __publicField(this, \"ref\", (container) => {\n this.container = container;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url) {\n const { controls, config, onError, playing } = this.props;\n const [, id] = url.match(import_patterns.MATCH_URL_DAILYMOTION);\n if (this.player) {\n this.player.load(id, {\n start: (0, import_utils.parseStartTime)(url),\n autoplay: playing\n });\n return;\n }\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, (DM) => DM.player).then((DM) => {\n if (!this.container)\n return;\n const Player = DM.player;\n this.player = new Player(this.container, {\n width: \"100%\",\n height: \"100%\",\n video: id,\n params: {\n controls,\n autoplay: this.props.playing,\n mute: this.props.muted,\n start: (0, import_utils.parseStartTime)(url),\n origin: window.location.origin,\n ...config.params\n },\n events: {\n apiready: this.props.onReady,\n seeked: () => this.props.onSeek(this.player.currentTime),\n video_end: this.props.onEnded,\n durationchange: this.onDurationChange,\n pause: this.props.onPause,\n playing: this.props.onPlay,\n waiting: this.props.onBuffer,\n error: (event) => onError(event)\n }\n });\n }, onError);\n }\n play() {\n this.callPlayer(\"play\");\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n }\n seekTo(seconds, keepPlaying = true) {\n this.callPlayer(\"seek\", seconds);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"setVolume\", fraction);\n }\n getDuration() {\n return this.player.duration || null;\n }\n getCurrentTime() {\n return this.player.currentTime;\n }\n getSecondsLoaded() {\n return this.player.bufferedTime;\n }\n render() {\n const { display } = this.props;\n const style = {\n width: \"100%\",\n height: \"100%\",\n display\n };\n return /* @__PURE__ */ import_react.default.createElement(\"div\", { style }, /* @__PURE__ */ import_react.default.createElement(\"div\", { ref: this.ref }));\n }\n}\n__publicField(DailyMotion, \"displayName\", \"DailyMotion\");\n__publicField(DailyMotion, \"canPlay\", import_patterns.canPlay.dailymotion);\n__publicField(DailyMotion, \"loopOnEnded\", true);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/DailyMotion.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerFacebook"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/Facebook.js":
|
|
12
|
+
/*!***********************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/Facebook.js ***!
|
|
14
|
+
\***********************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Facebook_exports = {};\n__export(Facebook_exports, {\n default: () => Facebook\n});\nmodule.exports = __toCommonJS(Facebook_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://connect.facebook.net/en_US/sdk.js\";\nconst SDK_GLOBAL = \"FB\";\nconst SDK_GLOBAL_READY = \"fbAsyncInit\";\nconst PLAYER_ID_PREFIX = \"facebook-player-\";\nclass Facebook extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"playerID\", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);\n __publicField(this, \"mute\", () => {\n this.callPlayer(\"mute\");\n });\n __publicField(this, \"unmute\", () => {\n this.callPlayer(\"unmute\");\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url, isReady) {\n if (isReady) {\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => FB.XFBML.parse());\n return;\n }\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => {\n FB.init({\n appId: this.props.config.appId,\n xfbml: true,\n version: this.props.config.version\n });\n FB.Event.subscribe(\"xfbml.render\", (msg) => {\n this.props.onLoaded();\n });\n FB.Event.subscribe(\"xfbml.ready\", (msg) => {\n if (msg.type === \"video\" && msg.id === this.playerID) {\n this.player = msg.instance;\n this.player.subscribe(\"startedPlaying\", this.props.onPlay);\n this.player.subscribe(\"paused\", this.props.onPause);\n this.player.subscribe(\"finishedPlaying\", this.props.onEnded);\n this.player.subscribe(\"startedBuffering\", this.props.onBuffer);\n this.player.subscribe(\"finishedBuffering\", this.props.onBufferEnd);\n this.player.subscribe(\"error\", this.props.onError);\n if (this.props.muted) {\n this.callPlayer(\"mute\");\n } else {\n this.callPlayer(\"unmute\");\n }\n this.props.onReady();\n document.getElementById(this.playerID).querySelector(\"iframe\").style.visibility = \"visible\";\n }\n });\n });\n }\n play() {\n this.callPlayer(\"play\");\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n }\n seekTo(seconds, keepPlaying = true) {\n this.callPlayer(\"seek\", seconds);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"setVolume\", fraction);\n }\n getDuration() {\n return this.callPlayer(\"getDuration\");\n }\n getCurrentTime() {\n return this.callPlayer(\"getCurrentPosition\");\n }\n getSecondsLoaded() {\n return null;\n }\n render() {\n const { attributes } = this.props.config;\n const style = {\n width: \"100%\",\n height: \"100%\"\n };\n return /* @__PURE__ */ import_react.default.createElement(\n \"div\",\n {\n style,\n id: this.playerID,\n className: \"fb-video\",\n \"data-href\": this.props.url,\n \"data-autoplay\": this.props.playing ? \"true\" : \"false\",\n \"data-allowfullscreen\": \"true\",\n \"data-controls\": this.props.controls ? \"true\" : \"false\",\n ...attributes\n }\n );\n }\n}\n__publicField(Facebook, \"displayName\", \"Facebook\");\n__publicField(Facebook, \"canPlay\", import_patterns.canPlay.facebook);\n__publicField(Facebook, \"loopOnEnded\", true);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/Facebook.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerFilePlayer"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/FilePlayer.js":
|
|
12
|
+
/*!*************************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/FilePlayer.js ***!
|
|
14
|
+
\*************************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar FilePlayer_exports = {};\n__export(FilePlayer_exports, {\n default: () => FilePlayer\n});\nmodule.exports = __toCommonJS(FilePlayer_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst HAS_NAVIGATOR = typeof navigator !== \"undefined\";\nconst IS_IPAD_PRO = HAS_NAVIGATOR && navigator.platform === \"MacIntel\" && navigator.maxTouchPoints > 1;\nconst IS_IOS = HAS_NAVIGATOR && (/iPad|iPhone|iPod/.test(navigator.userAgent) || IS_IPAD_PRO) && !window.MSStream;\nconst IS_SAFARI = HAS_NAVIGATOR && /^((?!chrome|android).)*safari/i.test(navigator.userAgent) && !window.MSStream;\nconst HLS_SDK_URL = \"https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js\";\nconst HLS_GLOBAL = \"Hls\";\nconst DASH_SDK_URL = \"https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js\";\nconst DASH_GLOBAL = \"dashjs\";\nconst FLV_SDK_URL = \"https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js\";\nconst FLV_GLOBAL = \"flvjs\";\nconst MATCH_DROPBOX_URL = /www\\.dropbox\\.com\\/.+/;\nconst MATCH_CLOUDFLARE_STREAM = /https:\\/\\/watch\\.cloudflarestream\\.com\\/([a-z0-9]+)/;\nconst REPLACE_CLOUDFLARE_STREAM = \"https://videodelivery.net/{id}/manifest/video.m3u8\";\nclass FilePlayer extends import_react.Component {\n constructor() {\n super(...arguments);\n // Proxy methods to prevent listener leaks\n __publicField(this, \"onReady\", (...args) => this.props.onReady(...args));\n __publicField(this, \"onPlay\", (...args) => this.props.onPlay(...args));\n __publicField(this, \"onBuffer\", (...args) => this.props.onBuffer(...args));\n __publicField(this, \"onBufferEnd\", (...args) => this.props.onBufferEnd(...args));\n __publicField(this, \"onPause\", (...args) => this.props.onPause(...args));\n __publicField(this, \"onEnded\", (...args) => this.props.onEnded(...args));\n __publicField(this, \"onError\", (...args) => this.props.onError(...args));\n __publicField(this, \"onPlayBackRateChange\", (event) => this.props.onPlaybackRateChange(event.target.playbackRate));\n __publicField(this, \"onEnablePIP\", (...args) => this.props.onEnablePIP(...args));\n __publicField(this, \"onDisablePIP\", (e) => {\n const { onDisablePIP, playing } = this.props;\n onDisablePIP(e);\n if (playing) {\n this.play();\n }\n });\n __publicField(this, \"onPresentationModeChange\", (e) => {\n if (this.player && (0, import_utils.supportsWebKitPresentationMode)(this.player)) {\n const { webkitPresentationMode } = this.player;\n if (webkitPresentationMode === \"picture-in-picture\") {\n this.onEnablePIP(e);\n } else if (webkitPresentationMode === \"inline\") {\n this.onDisablePIP(e);\n }\n }\n });\n __publicField(this, \"onSeek\", (e) => {\n this.props.onSeek(e.target.currentTime);\n });\n __publicField(this, \"mute\", () => {\n this.player.muted = true;\n });\n __publicField(this, \"unmute\", () => {\n this.player.muted = false;\n });\n __publicField(this, \"renderSourceElement\", (source, index) => {\n if (typeof source === \"string\") {\n return /* @__PURE__ */ import_react.default.createElement(\"source\", { key: index, src: source });\n }\n return /* @__PURE__ */ import_react.default.createElement(\"source\", { key: index, ...source });\n });\n __publicField(this, \"renderTrack\", (track, index) => {\n return /* @__PURE__ */ import_react.default.createElement(\"track\", { key: index, ...track });\n });\n __publicField(this, \"ref\", (player) => {\n if (this.player) {\n this.prevPlayer = this.player;\n }\n this.player = player;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n this.addListeners(this.player);\n const src = this.getSource(this.props.url);\n if (src) {\n this.player.src = src;\n }\n if (IS_IOS || this.props.config.forceDisableHls) {\n this.player.load();\n }\n }\n componentDidUpdate(prevProps) {\n if (this.shouldUseAudio(this.props) !== this.shouldUseAudio(prevProps)) {\n this.removeListeners(this.prevPlayer, prevProps.url);\n this.addListeners(this.player);\n }\n if (this.props.url !== prevProps.url && !(0, import_utils.isMediaStream)(this.props.url) && !(this.props.url instanceof Array)) {\n this.player.srcObject = null;\n }\n }\n componentWillUnmount() {\n this.player.removeAttribute(\"src\");\n this.removeListeners(this.player);\n if (this.hls) {\n this.hls.destroy();\n }\n }\n addListeners(player) {\n const { url, playsinline } = this.props;\n player.addEventListener(\"play\", this.onPlay);\n player.addEventListener(\"waiting\", this.onBuffer);\n player.addEventListener(\"playing\", this.onBufferEnd);\n player.addEventListener(\"pause\", this.onPause);\n player.addEventListener(\"seeked\", this.onSeek);\n player.addEventListener(\"ended\", this.onEnded);\n player.addEventListener(\"error\", this.onError);\n player.addEventListener(\"ratechange\", this.onPlayBackRateChange);\n player.addEventListener(\"enterpictureinpicture\", this.onEnablePIP);\n player.addEventListener(\"leavepictureinpicture\", this.onDisablePIP);\n player.addEventListener(\"webkitpresentationmodechanged\", this.onPresentationModeChange);\n if (!this.shouldUseHLS(url)) {\n player.addEventListener(\"canplay\", this.onReady);\n }\n if (playsinline) {\n player.setAttribute(\"playsinline\", \"\");\n player.setAttribute(\"webkit-playsinline\", \"\");\n player.setAttribute(\"x5-playsinline\", \"\");\n }\n }\n removeListeners(player, url) {\n player.removeEventListener(\"canplay\", this.onReady);\n player.removeEventListener(\"play\", this.onPlay);\n player.removeEventListener(\"waiting\", this.onBuffer);\n player.removeEventListener(\"playing\", this.onBufferEnd);\n player.removeEventListener(\"pause\", this.onPause);\n player.removeEventListener(\"seeked\", this.onSeek);\n player.removeEventListener(\"ended\", this.onEnded);\n player.removeEventListener(\"error\", this.onError);\n player.removeEventListener(\"ratechange\", this.onPlayBackRateChange);\n player.removeEventListener(\"enterpictureinpicture\", this.onEnablePIP);\n player.removeEventListener(\"leavepictureinpicture\", this.onDisablePIP);\n player.removeEventListener(\"webkitpresentationmodechanged\", this.onPresentationModeChange);\n if (!this.shouldUseHLS(url)) {\n player.removeEventListener(\"canplay\", this.onReady);\n }\n }\n shouldUseAudio(props) {\n if (props.config.forceVideo) {\n return false;\n }\n if (props.config.attributes.poster) {\n return false;\n }\n return import_patterns.AUDIO_EXTENSIONS.test(props.url) || props.config.forceAudio;\n }\n shouldUseHLS(url) {\n if (IS_SAFARI && this.props.config.forceSafariHLS || this.props.config.forceHLS) {\n return true;\n }\n if (IS_IOS || this.props.config.forceDisableHls) {\n return false;\n }\n return import_patterns.HLS_EXTENSIONS.test(url) || MATCH_CLOUDFLARE_STREAM.test(url);\n }\n shouldUseDASH(url) {\n return import_patterns.DASH_EXTENSIONS.test(url) || this.props.config.forceDASH;\n }\n shouldUseFLV(url) {\n return import_patterns.FLV_EXTENSIONS.test(url) || this.props.config.forceFLV;\n }\n load(url) {\n const { hlsVersion, hlsOptions, dashVersion, flvVersion } = this.props.config;\n if (this.hls) {\n this.hls.destroy();\n }\n if (this.dash) {\n this.dash.reset();\n }\n if (this.shouldUseHLS(url)) {\n (0, import_utils.getSDK)(HLS_SDK_URL.replace(\"VERSION\", hlsVersion), HLS_GLOBAL).then((Hls) => {\n this.hls = new Hls(hlsOptions);\n this.hls.on(Hls.Events.MANIFEST_PARSED, () => {\n this.props.onReady();\n });\n this.hls.on(Hls.Events.ERROR, (e, data) => {\n this.props.onError(e, data, this.hls, Hls);\n });\n if (MATCH_CLOUDFLARE_STREAM.test(url)) {\n const id = url.match(MATCH_CLOUDFLARE_STREAM)[1];\n this.hls.loadSource(REPLACE_CLOUDFLARE_STREAM.replace(\"{id}\", id));\n } else {\n this.hls.loadSource(url);\n }\n this.hls.attachMedia(this.player);\n this.props.onLoaded();\n });\n }\n if (this.shouldUseDASH(url)) {\n (0, import_utils.getSDK)(DASH_SDK_URL.replace(\"VERSION\", dashVersion), DASH_GLOBAL).then((dashjs) => {\n this.dash = dashjs.MediaPlayer().create();\n this.dash.initialize(this.player, url, this.props.playing);\n this.dash.on(\"error\", this.props.onError);\n if (parseInt(dashVersion) < 3) {\n this.dash.getDebug().setLogToBrowserConsole(false);\n } else {\n this.dash.updateSettings({ debug: { logLevel: dashjs.Debug.LOG_LEVEL_NONE } });\n }\n this.props.onLoaded();\n });\n }\n if (this.shouldUseFLV(url)) {\n (0, import_utils.getSDK)(FLV_SDK_URL.replace(\"VERSION\", flvVersion), FLV_GLOBAL).then((flvjs) => {\n this.flv = flvjs.createPlayer({ type: \"flv\", url });\n this.flv.attachMediaElement(this.player);\n this.flv.on(flvjs.Events.ERROR, (e, data) => {\n this.props.onError(e, data, this.flv, flvjs);\n });\n this.flv.load();\n this.props.onLoaded();\n });\n }\n if (url instanceof Array) {\n this.player.load();\n } else if ((0, import_utils.isMediaStream)(url)) {\n try {\n this.player.srcObject = url;\n } catch (e) {\n this.player.src = window.URL.createObjectURL(url);\n }\n }\n }\n play() {\n const promise = this.player.play();\n if (promise) {\n promise.catch(this.props.onError);\n }\n }\n pause() {\n this.player.pause();\n }\n stop() {\n this.player.removeAttribute(\"src\");\n if (this.dash) {\n this.dash.reset();\n }\n }\n seekTo(seconds, keepPlaying = true) {\n this.player.currentTime = seconds;\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.player.volume = fraction;\n }\n enablePIP() {\n if (this.player.requestPictureInPicture && document.pictureInPictureElement !== this.player) {\n this.player.requestPictureInPicture();\n } else if ((0, import_utils.supportsWebKitPresentationMode)(this.player) && this.player.webkitPresentationMode !== \"picture-in-picture\") {\n this.player.webkitSetPresentationMode(\"picture-in-picture\");\n }\n }\n disablePIP() {\n if (document.exitPictureInPicture && document.pictureInPictureElement === this.player) {\n document.exitPictureInPicture();\n } else if ((0, import_utils.supportsWebKitPresentationMode)(this.player) && this.player.webkitPresentationMode !== \"inline\") {\n this.player.webkitSetPresentationMode(\"inline\");\n }\n }\n setPlaybackRate(rate) {\n try {\n this.player.playbackRate = rate;\n } catch (error) {\n this.props.onError(error);\n }\n }\n getDuration() {\n if (!this.player)\n return null;\n const { duration, seekable } = this.player;\n if (duration === Infinity && seekable.length > 0) {\n return seekable.end(seekable.length - 1);\n }\n return duration;\n }\n getCurrentTime() {\n if (!this.player)\n return null;\n return this.player.currentTime;\n }\n getSecondsLoaded() {\n if (!this.player)\n return null;\n const { buffered } = this.player;\n if (buffered.length === 0) {\n return 0;\n }\n const end = buffered.end(buffered.length - 1);\n const duration = this.getDuration();\n if (end > duration) {\n return duration;\n }\n return end;\n }\n getSource(url) {\n const useHLS = this.shouldUseHLS(url);\n const useDASH = this.shouldUseDASH(url);\n const useFLV = this.shouldUseFLV(url);\n if (url instanceof Array || (0, import_utils.isMediaStream)(url) || useHLS || useDASH || useFLV) {\n return void 0;\n }\n if (MATCH_DROPBOX_URL.test(url)) {\n return url.replace(\"www.dropbox.com\", \"dl.dropboxusercontent.com\");\n }\n return url;\n }\n render() {\n const { url, playing, loop, controls, muted, config, width, height } = this.props;\n const useAudio = this.shouldUseAudio(this.props);\n const Element = useAudio ? \"audio\" : \"video\";\n const style = {\n width: width === \"auto\" ? width : \"100%\",\n height: height === \"auto\" ? height : \"100%\"\n };\n return /* @__PURE__ */ import_react.default.createElement(\n Element,\n {\n ref: this.ref,\n src: this.getSource(url),\n style,\n preload: \"auto\",\n autoPlay: playing || void 0,\n controls,\n muted,\n loop,\n ...config.attributes\n },\n url instanceof Array && url.map(this.renderSourceElement),\n config.tracks.map(this.renderTrack)\n );\n }\n}\n__publicField(FilePlayer, \"displayName\", \"FilePlayer\");\n__publicField(FilePlayer, \"canPlay\", import_patterns.canPlay.file);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/FilePlayer.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerKaltura"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/Kaltura.js":
|
|
12
|
+
/*!**********************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/Kaltura.js ***!
|
|
14
|
+
\**********************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Kaltura_exports = {};\n__export(Kaltura_exports, {\n default: () => Kaltura\n});\nmodule.exports = __toCommonJS(Kaltura_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://cdn.embed.ly/player-0.1.0.min.js\";\nconst SDK_GLOBAL = \"playerjs\";\nclass Kaltura extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"duration\", null);\n __publicField(this, \"currentTime\", null);\n __publicField(this, \"secondsLoaded\", null);\n __publicField(this, \"mute\", () => {\n this.callPlayer(\"mute\");\n });\n __publicField(this, \"unmute\", () => {\n this.callPlayer(\"unmute\");\n });\n __publicField(this, \"ref\", (iframe) => {\n this.iframe = iframe;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url) {\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((playerjs) => {\n if (!this.iframe)\n return;\n this.player = new playerjs.Player(this.iframe);\n this.player.on(\"ready\", () => {\n setTimeout(() => {\n this.player.isReady = true;\n this.player.setLoop(this.props.loop);\n if (this.props.muted) {\n this.player.mute();\n }\n this.addListeners(this.player, this.props);\n this.props.onReady();\n }, 500);\n });\n }, this.props.onError);\n }\n addListeners(player, props) {\n player.on(\"play\", props.onPlay);\n player.on(\"pause\", props.onPause);\n player.on(\"ended\", props.onEnded);\n player.on(\"error\", props.onError);\n player.on(\"timeupdate\", ({ duration, seconds }) => {\n this.duration = duration;\n this.currentTime = seconds;\n });\n }\n play() {\n this.callPlayer(\"play\");\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n }\n seekTo(seconds, keepPlaying = true) {\n this.callPlayer(\"setCurrentTime\", seconds);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"setVolume\", fraction);\n }\n setLoop(loop) {\n this.callPlayer(\"setLoop\", loop);\n }\n getDuration() {\n return this.duration;\n }\n getCurrentTime() {\n return this.currentTime;\n }\n getSecondsLoaded() {\n return this.secondsLoaded;\n }\n render() {\n const style = {\n width: \"100%\",\n height: \"100%\"\n };\n return /* @__PURE__ */ import_react.default.createElement(\n \"iframe\",\n {\n ref: this.ref,\n src: this.props.url,\n frameBorder: \"0\",\n scrolling: \"no\",\n style,\n allow: \"encrypted-media; autoplay; fullscreen;\",\n referrerPolicy: \"no-referrer-when-downgrade\"\n }\n );\n }\n}\n__publicField(Kaltura, \"displayName\", \"Kaltura\");\n__publicField(Kaltura, \"canPlay\", import_patterns.canPlay.kaltura);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/Kaltura.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerMixcloud"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/Mixcloud.js":
|
|
12
|
+
/*!***********************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/Mixcloud.js ***!
|
|
14
|
+
\***********************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Mixcloud_exports = {};\n__export(Mixcloud_exports, {\n default: () => Mixcloud\n});\nmodule.exports = __toCommonJS(Mixcloud_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://widget.mixcloud.com/media/js/widgetApi.js\";\nconst SDK_GLOBAL = \"Mixcloud\";\nclass Mixcloud extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"duration\", null);\n __publicField(this, \"currentTime\", null);\n __publicField(this, \"secondsLoaded\", null);\n __publicField(this, \"mute\", () => {\n });\n __publicField(this, \"unmute\", () => {\n });\n __publicField(this, \"ref\", (iframe) => {\n this.iframe = iframe;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url) {\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Mixcloud2) => {\n this.player = Mixcloud2.PlayerWidget(this.iframe);\n this.player.ready.then(() => {\n this.player.events.play.on(this.props.onPlay);\n this.player.events.pause.on(this.props.onPause);\n this.player.events.ended.on(this.props.onEnded);\n this.player.events.error.on(this.props.error);\n this.player.events.progress.on((seconds, duration) => {\n this.currentTime = seconds;\n this.duration = duration;\n });\n this.props.onReady();\n });\n }, this.props.onError);\n }\n play() {\n this.callPlayer(\"play\");\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n }\n seekTo(seconds, keepPlaying = true) {\n this.callPlayer(\"seek\", seconds);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n }\n getDuration() {\n return this.duration;\n }\n getCurrentTime() {\n return this.currentTime;\n }\n getSecondsLoaded() {\n return null;\n }\n render() {\n const { url, config } = this.props;\n const id = url.match(import_patterns.MATCH_URL_MIXCLOUD)[1];\n const style = {\n width: \"100%\",\n height: \"100%\"\n };\n const query = (0, import_utils.queryString)({\n ...config.options,\n feed: `/${id}/`\n });\n return /* @__PURE__ */ import_react.default.createElement(\n \"iframe\",\n {\n key: id,\n ref: this.ref,\n style,\n src: `https://www.mixcloud.com/widget/iframe/?${query}`,\n frameBorder: \"0\",\n allow: \"autoplay\"\n }\n );\n }\n}\n__publicField(Mixcloud, \"displayName\", \"Mixcloud\");\n__publicField(Mixcloud, \"canPlay\", import_patterns.canPlay.mixcloud);\n__publicField(Mixcloud, \"loopOnEnded\", true);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/Mixcloud.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerMux"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/Mux.js":
|
|
12
|
+
/*!******************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/Mux.js ***!
|
|
14
|
+
\******************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Mux_exports = {};\n__export(Mux_exports, {\n default: () => Mux\n});\nmodule.exports = __toCommonJS(Mux_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://cdn.jsdelivr.net/npm/@mux/mux-player@VERSION/dist/mux-player.mjs\";\nclass Mux extends import_react.Component {\n constructor() {\n super(...arguments);\n // Proxy methods to prevent listener leaks\n __publicField(this, \"onReady\", (...args) => this.props.onReady(...args));\n __publicField(this, \"onPlay\", (...args) => this.props.onPlay(...args));\n __publicField(this, \"onBuffer\", (...args) => this.props.onBuffer(...args));\n __publicField(this, \"onBufferEnd\", (...args) => this.props.onBufferEnd(...args));\n __publicField(this, \"onPause\", (...args) => this.props.onPause(...args));\n __publicField(this, \"onEnded\", (...args) => this.props.onEnded(...args));\n __publicField(this, \"onError\", (...args) => this.props.onError(...args));\n __publicField(this, \"onPlayBackRateChange\", (event) => this.props.onPlaybackRateChange(event.target.playbackRate));\n __publicField(this, \"onEnablePIP\", (...args) => this.props.onEnablePIP(...args));\n __publicField(this, \"onSeek\", (e) => {\n this.props.onSeek(e.target.currentTime);\n });\n __publicField(this, \"onDurationChange\", () => {\n const duration = this.getDuration();\n this.props.onDuration(duration);\n });\n __publicField(this, \"mute\", () => {\n this.player.muted = true;\n });\n __publicField(this, \"unmute\", () => {\n this.player.muted = false;\n });\n __publicField(this, \"ref\", (player) => {\n this.player = player;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n this.addListeners(this.player);\n const playbackId = this.getPlaybackId(this.props.url);\n if (playbackId) {\n this.player.playbackId = playbackId;\n }\n }\n componentWillUnmount() {\n this.player.playbackId = null;\n this.removeListeners(this.player);\n }\n addListeners(player) {\n const { playsinline } = this.props;\n player.addEventListener(\"play\", this.onPlay);\n player.addEventListener(\"waiting\", this.onBuffer);\n player.addEventListener(\"playing\", this.onBufferEnd);\n player.addEventListener(\"pause\", this.onPause);\n player.addEventListener(\"seeked\", this.onSeek);\n player.addEventListener(\"ended\", this.onEnded);\n player.addEventListener(\"error\", this.onError);\n player.addEventListener(\"ratechange\", this.onPlayBackRateChange);\n player.addEventListener(\"enterpictureinpicture\", this.onEnablePIP);\n player.addEventListener(\"leavepictureinpicture\", this.onDisablePIP);\n player.addEventListener(\"webkitpresentationmodechanged\", this.onPresentationModeChange);\n player.addEventListener(\"canplay\", this.onReady);\n if (playsinline) {\n player.setAttribute(\"playsinline\", \"\");\n }\n }\n removeListeners(player) {\n player.removeEventListener(\"canplay\", this.onReady);\n player.removeEventListener(\"play\", this.onPlay);\n player.removeEventListener(\"waiting\", this.onBuffer);\n player.removeEventListener(\"playing\", this.onBufferEnd);\n player.removeEventListener(\"pause\", this.onPause);\n player.removeEventListener(\"seeked\", this.onSeek);\n player.removeEventListener(\"ended\", this.onEnded);\n player.removeEventListener(\"error\", this.onError);\n player.removeEventListener(\"ratechange\", this.onPlayBackRateChange);\n player.removeEventListener(\"enterpictureinpicture\", this.onEnablePIP);\n player.removeEventListener(\"leavepictureinpicture\", this.onDisablePIP);\n player.removeEventListener(\"canplay\", this.onReady);\n }\n async load(url) {\n var _a;\n const { onError, config } = this.props;\n if (!((_a = globalThis.customElements) == null ? void 0 : _a.get(\"mux-player\"))) {\n try {\n const sdkUrl = SDK_URL.replace(\"VERSION\", config.version);\n await import(\n /* webpackIgnore: true */\n `${sdkUrl}`\n );\n this.props.onLoaded();\n } catch (error) {\n onError(error);\n }\n }\n const [, id] = url.match(import_patterns.MATCH_URL_MUX);\n this.player.playbackId = id;\n }\n play() {\n const promise = this.player.play();\n if (promise) {\n promise.catch(this.props.onError);\n }\n }\n pause() {\n this.player.pause();\n }\n stop() {\n this.player.playbackId = null;\n }\n seekTo(seconds, keepPlaying = true) {\n this.player.currentTime = seconds;\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.player.volume = fraction;\n }\n enablePIP() {\n if (this.player.requestPictureInPicture && document.pictureInPictureElement !== this.player) {\n this.player.requestPictureInPicture();\n }\n }\n disablePIP() {\n if (document.exitPictureInPicture && document.pictureInPictureElement === this.player) {\n document.exitPictureInPicture();\n }\n }\n setPlaybackRate(rate) {\n try {\n this.player.playbackRate = rate;\n } catch (error) {\n this.props.onError(error);\n }\n }\n getDuration() {\n if (!this.player)\n return null;\n const { duration, seekable } = this.player;\n if (duration === Infinity && seekable.length > 0) {\n return seekable.end(seekable.length - 1);\n }\n return duration;\n }\n getCurrentTime() {\n if (!this.player)\n return null;\n return this.player.currentTime;\n }\n getSecondsLoaded() {\n if (!this.player)\n return null;\n const { buffered } = this.player;\n if (buffered.length === 0) {\n return 0;\n }\n const end = buffered.end(buffered.length - 1);\n const duration = this.getDuration();\n if (end > duration) {\n return duration;\n }\n return end;\n }\n getPlaybackId(url) {\n const [, id] = url.match(import_patterns.MATCH_URL_MUX);\n return id;\n }\n render() {\n const { url, playing, loop, controls, muted, config, width, height } = this.props;\n const style = {\n width: width === \"auto\" ? width : \"100%\",\n height: height === \"auto\" ? height : \"100%\"\n };\n if (controls === false) {\n style[\"--controls\"] = \"none\";\n }\n return /* @__PURE__ */ import_react.default.createElement(\n \"mux-player\",\n {\n ref: this.ref,\n \"playback-id\": this.getPlaybackId(url),\n style,\n preload: \"auto\",\n autoPlay: playing || void 0,\n muted: muted ? \"\" : void 0,\n loop: loop ? \"\" : void 0,\n ...config.attributes\n }\n );\n }\n}\n__publicField(Mux, \"displayName\", \"Mux\");\n__publicField(Mux, \"canPlay\", import_patterns.canPlay.mux);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/Mux.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerPreview"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/Preview.js":
|
|
12
|
+
/*!**************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/Preview.js ***!
|
|
14
|
+
\**************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Preview_exports = {};\n__export(Preview_exports, {\n default: () => Preview\n});\nmodule.exports = __toCommonJS(Preview_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nconst ICON_SIZE = \"64px\";\nconst cache = {};\nclass Preview extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"mounted\", false);\n __publicField(this, \"state\", {\n image: null\n });\n __publicField(this, \"handleKeyPress\", (e) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n this.props.onClick();\n }\n });\n }\n componentDidMount() {\n this.mounted = true;\n this.fetchImage(this.props);\n }\n componentDidUpdate(prevProps) {\n const { url, light } = this.props;\n if (prevProps.url !== url || prevProps.light !== light) {\n this.fetchImage(this.props);\n }\n }\n componentWillUnmount() {\n this.mounted = false;\n }\n fetchImage({ url, light, oEmbedUrl }) {\n if (import_react.default.isValidElement(light)) {\n return;\n }\n if (typeof light === \"string\") {\n this.setState({ image: light });\n return;\n }\n if (cache[url]) {\n this.setState({ image: cache[url] });\n return;\n }\n this.setState({ image: null });\n return window.fetch(oEmbedUrl.replace(\"{url}\", url)).then((response) => response.json()).then((data) => {\n if (data.thumbnail_url && this.mounted) {\n const image = data.thumbnail_url.replace(\"height=100\", \"height=480\").replace(\"-d_295x166\", \"-d_640\");\n this.setState({ image });\n cache[url] = image;\n }\n });\n }\n render() {\n const { light, onClick, playIcon, previewTabIndex, previewAriaLabel } = this.props;\n const { image } = this.state;\n const isElement = import_react.default.isValidElement(light);\n const flexCenter = {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n };\n const styles = {\n preview: {\n width: \"100%\",\n height: \"100%\",\n backgroundImage: image && !isElement ? `url(${image})` : void 0,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n cursor: \"pointer\",\n ...flexCenter\n },\n shadow: {\n background: \"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)\",\n borderRadius: ICON_SIZE,\n width: ICON_SIZE,\n height: ICON_SIZE,\n position: isElement ? \"absolute\" : void 0,\n ...flexCenter\n },\n playIcon: {\n borderStyle: \"solid\",\n borderWidth: \"16px 0 16px 26px\",\n borderColor: \"transparent transparent transparent white\",\n marginLeft: \"7px\"\n }\n };\n const defaultPlayIcon = /* @__PURE__ */ import_react.default.createElement(\"div\", { style: styles.shadow, className: \"react-player__shadow\" }, /* @__PURE__ */ import_react.default.createElement(\"div\", { style: styles.playIcon, className: \"react-player__play-icon\" }));\n return /* @__PURE__ */ import_react.default.createElement(\n \"div\",\n {\n style: styles.preview,\n className: \"react-player__preview\",\n onClick,\n tabIndex: previewTabIndex,\n onKeyPress: this.handleKeyPress,\n ...previewAriaLabel ? { \"aria-label\": previewAriaLabel } : {}\n },\n isElement ? light : null,\n playIcon || defaultPlayIcon\n );\n }\n}\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/Preview.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerSoundCloud"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/SoundCloud.js":
|
|
12
|
+
/*!*************************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/SoundCloud.js ***!
|
|
14
|
+
\*************************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar SoundCloud_exports = {};\n__export(SoundCloud_exports, {\n default: () => SoundCloud\n});\nmodule.exports = __toCommonJS(SoundCloud_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://w.soundcloud.com/player/api.js\";\nconst SDK_GLOBAL = \"SC\";\nclass SoundCloud extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"duration\", null);\n __publicField(this, \"currentTime\", null);\n __publicField(this, \"fractionLoaded\", null);\n __publicField(this, \"mute\", () => {\n this.setVolume(0);\n });\n __publicField(this, \"unmute\", () => {\n if (this.props.volume !== null) {\n this.setVolume(this.props.volume);\n }\n });\n __publicField(this, \"ref\", (iframe) => {\n this.iframe = iframe;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url, isReady) {\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((SC) => {\n if (!this.iframe)\n return;\n const { PLAY, PLAY_PROGRESS, PAUSE, FINISH, ERROR } = SC.Widget.Events;\n if (!isReady) {\n this.player = SC.Widget(this.iframe);\n this.player.bind(PLAY, this.props.onPlay);\n this.player.bind(PAUSE, () => {\n const remaining = this.duration - this.currentTime;\n if (remaining < 0.05) {\n return;\n }\n this.props.onPause();\n });\n this.player.bind(PLAY_PROGRESS, (e) => {\n this.currentTime = e.currentPosition / 1e3;\n this.fractionLoaded = e.loadedProgress;\n });\n this.player.bind(FINISH, () => this.props.onEnded());\n this.player.bind(ERROR, (e) => this.props.onError(e));\n }\n this.player.load(url, {\n ...this.props.config.options,\n callback: () => {\n this.player.getDuration((duration) => {\n this.duration = duration / 1e3;\n this.props.onReady();\n });\n }\n });\n });\n }\n play() {\n this.callPlayer(\"play\");\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n }\n seekTo(seconds, keepPlaying = true) {\n this.callPlayer(\"seekTo\", seconds * 1e3);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"setVolume\", fraction * 100);\n }\n getDuration() {\n return this.duration;\n }\n getCurrentTime() {\n return this.currentTime;\n }\n getSecondsLoaded() {\n return this.fractionLoaded * this.duration;\n }\n render() {\n const { display } = this.props;\n const style = {\n width: \"100%\",\n height: \"100%\",\n display\n };\n return /* @__PURE__ */ import_react.default.createElement(\n \"iframe\",\n {\n ref: this.ref,\n src: `https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,\n style,\n frameBorder: 0,\n allow: \"autoplay\"\n }\n );\n }\n}\n__publicField(SoundCloud, \"displayName\", \"SoundCloud\");\n__publicField(SoundCloud, \"canPlay\", import_patterns.canPlay.soundcloud);\n__publicField(SoundCloud, \"loopOnEnded\", true);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/SoundCloud.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerStreamable"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/Streamable.js":
|
|
12
|
+
/*!*************************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/Streamable.js ***!
|
|
14
|
+
\*************************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Streamable_exports = {};\n__export(Streamable_exports, {\n default: () => Streamable\n});\nmodule.exports = __toCommonJS(Streamable_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://cdn.embed.ly/player-0.1.0.min.js\";\nconst SDK_GLOBAL = \"playerjs\";\nclass Streamable extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"duration\", null);\n __publicField(this, \"currentTime\", null);\n __publicField(this, \"secondsLoaded\", null);\n __publicField(this, \"mute\", () => {\n this.callPlayer(\"mute\");\n });\n __publicField(this, \"unmute\", () => {\n this.callPlayer(\"unmute\");\n });\n __publicField(this, \"ref\", (iframe) => {\n this.iframe = iframe;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url) {\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((playerjs) => {\n if (!this.iframe)\n return;\n this.player = new playerjs.Player(this.iframe);\n this.player.setLoop(this.props.loop);\n this.player.on(\"ready\", this.props.onReady);\n this.player.on(\"play\", this.props.onPlay);\n this.player.on(\"pause\", this.props.onPause);\n this.player.on(\"seeked\", this.props.onSeek);\n this.player.on(\"ended\", this.props.onEnded);\n this.player.on(\"error\", this.props.onError);\n this.player.on(\"timeupdate\", ({ duration, seconds }) => {\n this.duration = duration;\n this.currentTime = seconds;\n });\n this.player.on(\"buffered\", ({ percent }) => {\n if (this.duration) {\n this.secondsLoaded = this.duration * percent;\n }\n });\n if (this.props.muted) {\n this.player.mute();\n }\n }, this.props.onError);\n }\n play() {\n this.callPlayer(\"play\");\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n }\n seekTo(seconds, keepPlaying = true) {\n this.callPlayer(\"setCurrentTime\", seconds);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"setVolume\", fraction * 100);\n }\n setLoop(loop) {\n this.callPlayer(\"setLoop\", loop);\n }\n getDuration() {\n return this.duration;\n }\n getCurrentTime() {\n return this.currentTime;\n }\n getSecondsLoaded() {\n return this.secondsLoaded;\n }\n render() {\n const id = this.props.url.match(import_patterns.MATCH_URL_STREAMABLE)[1];\n const style = {\n width: \"100%\",\n height: \"100%\"\n };\n return /* @__PURE__ */ import_react.default.createElement(\n \"iframe\",\n {\n ref: this.ref,\n src: `https://streamable.com/o/${id}`,\n frameBorder: \"0\",\n scrolling: \"no\",\n style,\n allow: \"encrypted-media; autoplay; fullscreen;\"\n }\n );\n }\n}\n__publicField(Streamable, \"displayName\", \"Streamable\");\n__publicField(Streamable, \"canPlay\", import_patterns.canPlay.streamable);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/Streamable.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerTwitch"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/Twitch.js":
|
|
12
|
+
/*!*********************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/Twitch.js ***!
|
|
14
|
+
\*********************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Twitch_exports = {};\n__export(Twitch_exports, {\n default: () => Twitch\n});\nmodule.exports = __toCommonJS(Twitch_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://player.twitch.tv/js/embed/v1.js\";\nconst SDK_GLOBAL = \"Twitch\";\nconst PLAYER_ID_PREFIX = \"twitch-player-\";\nclass Twitch extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"playerID\", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);\n __publicField(this, \"mute\", () => {\n this.callPlayer(\"setMuted\", true);\n });\n __publicField(this, \"unmute\", () => {\n this.callPlayer(\"setMuted\", false);\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url, isReady) {\n const { playsinline, onError, config, controls } = this.props;\n const isChannel = import_patterns.MATCH_URL_TWITCH_CHANNEL.test(url);\n const id = isChannel ? url.match(import_patterns.MATCH_URL_TWITCH_CHANNEL)[1] : url.match(import_patterns.MATCH_URL_TWITCH_VIDEO)[1];\n if (isReady) {\n if (isChannel) {\n this.player.setChannel(id);\n } else {\n this.player.setVideo(\"v\" + id);\n }\n return;\n }\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Twitch2) => {\n this.player = new Twitch2.Player(this.playerID, {\n video: isChannel ? \"\" : id,\n channel: isChannel ? id : \"\",\n height: \"100%\",\n width: \"100%\",\n playsinline,\n autoplay: this.props.playing,\n muted: this.props.muted,\n // https://github.com/CookPete/react-player/issues/733#issuecomment-549085859\n controls: isChannel ? true : controls,\n time: (0, import_utils.parseStartTime)(url),\n ...config.options\n });\n const { READY, PLAYING, PAUSE, ENDED, ONLINE, OFFLINE, SEEK } = Twitch2.Player;\n this.player.addEventListener(READY, this.props.onReady);\n this.player.addEventListener(PLAYING, this.props.onPlay);\n this.player.addEventListener(PAUSE, this.props.onPause);\n this.player.addEventListener(ENDED, this.props.onEnded);\n this.player.addEventListener(SEEK, this.props.onSeek);\n this.player.addEventListener(ONLINE, this.props.onLoaded);\n this.player.addEventListener(OFFLINE, this.props.onLoaded);\n }, onError);\n }\n play() {\n this.callPlayer(\"play\");\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n this.callPlayer(\"pause\");\n }\n seekTo(seconds, keepPlaying = true) {\n this.callPlayer(\"seek\", seconds);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"setVolume\", fraction);\n }\n getDuration() {\n return this.callPlayer(\"getDuration\");\n }\n getCurrentTime() {\n return this.callPlayer(\"getCurrentTime\");\n }\n getSecondsLoaded() {\n return null;\n }\n render() {\n const style = {\n width: \"100%\",\n height: \"100%\"\n };\n return /* @__PURE__ */ import_react.default.createElement(\"div\", { style, id: this.playerID });\n }\n}\n__publicField(Twitch, \"displayName\", \"Twitch\");\n__publicField(Twitch, \"canPlay\", import_patterns.canPlay.twitch);\n__publicField(Twitch, \"loopOnEnded\", true);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/Twitch.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerVidyard"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/Vidyard.js":
|
|
12
|
+
/*!**********************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/Vidyard.js ***!
|
|
14
|
+
\**********************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Vidyard_exports = {};\n__export(Vidyard_exports, {\n default: () => Vidyard\n});\nmodule.exports = __toCommonJS(Vidyard_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://play.vidyard.com/embed/v4.js\";\nconst SDK_GLOBAL = \"VidyardV4\";\nconst SDK_GLOBAL_READY = \"onVidyardAPI\";\nclass Vidyard extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"mute\", () => {\n this.setVolume(0);\n });\n __publicField(this, \"unmute\", () => {\n if (this.props.volume !== null) {\n this.setVolume(this.props.volume);\n }\n });\n __publicField(this, \"ref\", (container) => {\n this.container = container;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url) {\n const { playing, config, onError, onDuration } = this.props;\n const id = url && url.match(import_patterns.MATCH_URL_VIDYARD)[1];\n if (this.player) {\n this.stop();\n }\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((Vidyard2) => {\n if (!this.container)\n return;\n Vidyard2.api.addReadyListener((data, player) => {\n if (this.player) {\n return;\n }\n this.player = player;\n this.player.on(\"ready\", this.props.onReady);\n this.player.on(\"play\", this.props.onPlay);\n this.player.on(\"pause\", this.props.onPause);\n this.player.on(\"seek\", this.props.onSeek);\n this.player.on(\"playerComplete\", this.props.onEnded);\n }, id);\n Vidyard2.api.renderPlayer({\n uuid: id,\n container: this.container,\n autoplay: playing ? 1 : 0,\n ...config.options\n });\n Vidyard2.api.getPlayerMetadata(id).then((meta) => {\n this.duration = meta.length_in_seconds;\n onDuration(meta.length_in_seconds);\n });\n }, onError);\n }\n play() {\n this.callPlayer(\"play\");\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n window.VidyardV4.api.destroyPlayer(this.player);\n }\n seekTo(amount, keepPlaying = true) {\n this.callPlayer(\"seek\", amount);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"setVolume\", fraction);\n }\n setPlaybackRate(rate) {\n this.callPlayer(\"setPlaybackSpeed\", rate);\n }\n getDuration() {\n return this.duration;\n }\n getCurrentTime() {\n return this.callPlayer(\"currentTime\");\n }\n getSecondsLoaded() {\n return null;\n }\n render() {\n const { display } = this.props;\n const style = {\n width: \"100%\",\n height: \"100%\",\n display\n };\n return /* @__PURE__ */ import_react.default.createElement(\"div\", { style }, /* @__PURE__ */ import_react.default.createElement(\"div\", { ref: this.ref }));\n }\n}\n__publicField(Vidyard, \"displayName\", \"Vidyard\");\n__publicField(Vidyard, \"canPlay\", import_patterns.canPlay.vidyard);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/Vidyard.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerVimeo"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/Vimeo.js":
|
|
12
|
+
/*!********************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/Vimeo.js ***!
|
|
14
|
+
\********************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Vimeo_exports = {};\n__export(Vimeo_exports, {\n default: () => Vimeo\n});\nmodule.exports = __toCommonJS(Vimeo_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://player.vimeo.com/api/player.js\";\nconst SDK_GLOBAL = \"Vimeo\";\nconst cleanUrl = (url) => {\n return url.replace(\"/manage/videos\", \"\");\n};\nclass Vimeo extends import_react.Component {\n constructor() {\n super(...arguments);\n // Prevent checking isLoading when URL changes\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"duration\", null);\n __publicField(this, \"currentTime\", null);\n __publicField(this, \"secondsLoaded\", null);\n __publicField(this, \"mute\", () => {\n this.setMuted(true);\n });\n __publicField(this, \"unmute\", () => {\n this.setMuted(false);\n });\n __publicField(this, \"ref\", (container) => {\n this.container = container;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url) {\n this.duration = null;\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Vimeo2) => {\n if (!this.container)\n return;\n const { playerOptions, title } = this.props.config;\n this.player = new Vimeo2.Player(this.container, {\n url: cleanUrl(url),\n autoplay: this.props.playing,\n muted: this.props.muted,\n loop: this.props.loop,\n playsinline: this.props.playsinline,\n controls: this.props.controls,\n ...playerOptions\n });\n this.player.ready().then(() => {\n const iframe = this.container.querySelector(\"iframe\");\n iframe.style.width = \"100%\";\n iframe.style.height = \"100%\";\n if (title) {\n iframe.title = title;\n }\n }).catch(this.props.onError);\n this.player.on(\"loaded\", () => {\n this.props.onReady();\n this.refreshDuration();\n });\n this.player.on(\"play\", () => {\n this.props.onPlay();\n this.refreshDuration();\n });\n this.player.on(\"pause\", this.props.onPause);\n this.player.on(\"seeked\", (e) => this.props.onSeek(e.seconds));\n this.player.on(\"ended\", this.props.onEnded);\n this.player.on(\"error\", this.props.onError);\n this.player.on(\"timeupdate\", ({ seconds }) => {\n this.currentTime = seconds;\n });\n this.player.on(\"progress\", ({ seconds }) => {\n this.secondsLoaded = seconds;\n });\n this.player.on(\"bufferstart\", this.props.onBuffer);\n this.player.on(\"bufferend\", this.props.onBufferEnd);\n this.player.on(\"playbackratechange\", (e) => this.props.onPlaybackRateChange(e.playbackRate));\n }, this.props.onError);\n }\n refreshDuration() {\n this.player.getDuration().then((duration) => {\n this.duration = duration;\n });\n }\n play() {\n const promise = this.callPlayer(\"play\");\n if (promise) {\n promise.catch(this.props.onError);\n }\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n this.callPlayer(\"unload\");\n }\n seekTo(seconds, keepPlaying = true) {\n this.callPlayer(\"setCurrentTime\", seconds);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"setVolume\", fraction);\n }\n setMuted(muted) {\n this.callPlayer(\"setMuted\", muted);\n }\n setLoop(loop) {\n this.callPlayer(\"setLoop\", loop);\n }\n setPlaybackRate(rate) {\n this.callPlayer(\"setPlaybackRate\", rate);\n }\n getDuration() {\n return this.duration;\n }\n getCurrentTime() {\n return this.currentTime;\n }\n getSecondsLoaded() {\n return this.secondsLoaded;\n }\n render() {\n const { display } = this.props;\n const style = {\n width: \"100%\",\n height: \"100%\",\n overflow: \"hidden\",\n display\n };\n return /* @__PURE__ */ import_react.default.createElement(\n \"div\",\n {\n key: this.props.url,\n ref: this.ref,\n style\n }\n );\n }\n}\n__publicField(Vimeo, \"displayName\", \"Vimeo\");\n__publicField(Vimeo, \"canPlay\", import_patterns.canPlay.vimeo);\n__publicField(Vimeo, \"forceLoad\", true);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/Vimeo.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerWistia"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/Wistia.js":
|
|
12
|
+
/*!*********************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/Wistia.js ***!
|
|
14
|
+
\*********************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar Wistia_exports = {};\n__export(Wistia_exports, {\n default: () => Wistia\n});\nmodule.exports = __toCommonJS(Wistia_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://fast.wistia.com/assets/external/E-v1.js\";\nconst SDK_GLOBAL = \"Wistia\";\nconst PLAYER_ID_PREFIX = \"wistia-player-\";\nclass Wistia extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"playerID\", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);\n // Proxy methods to prevent listener leaks\n __publicField(this, \"onPlay\", (...args) => this.props.onPlay(...args));\n __publicField(this, \"onPause\", (...args) => this.props.onPause(...args));\n __publicField(this, \"onSeek\", (...args) => this.props.onSeek(...args));\n __publicField(this, \"onEnded\", (...args) => this.props.onEnded(...args));\n __publicField(this, \"onPlaybackRateChange\", (...args) => this.props.onPlaybackRateChange(...args));\n __publicField(this, \"mute\", () => {\n this.callPlayer(\"mute\");\n });\n __publicField(this, \"unmute\", () => {\n this.callPlayer(\"unmute\");\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n load(url) {\n const { playing, muted, controls, onReady, config, onError } = this.props;\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Wistia2) => {\n if (config.customControls) {\n config.customControls.forEach((control) => Wistia2.defineControl(control));\n }\n window._wq = window._wq || [];\n window._wq.push({\n id: this.playerID,\n options: {\n autoPlay: playing,\n silentAutoPlay: \"allow\",\n muted,\n controlsVisibleOnLoad: controls,\n fullscreenButton: controls,\n playbar: controls,\n playbackRateControl: controls,\n qualityControl: controls,\n volumeControl: controls,\n settingsControl: controls,\n smallPlayButton: controls,\n ...config.options\n },\n onReady: (player) => {\n this.player = player;\n this.unbind();\n this.player.bind(\"play\", this.onPlay);\n this.player.bind(\"pause\", this.onPause);\n this.player.bind(\"seek\", this.onSeek);\n this.player.bind(\"end\", this.onEnded);\n this.player.bind(\"playbackratechange\", this.onPlaybackRateChange);\n onReady();\n }\n });\n }, onError);\n }\n unbind() {\n this.player.unbind(\"play\", this.onPlay);\n this.player.unbind(\"pause\", this.onPause);\n this.player.unbind(\"seek\", this.onSeek);\n this.player.unbind(\"end\", this.onEnded);\n this.player.unbind(\"playbackratechange\", this.onPlaybackRateChange);\n }\n play() {\n this.callPlayer(\"play\");\n }\n pause() {\n this.callPlayer(\"pause\");\n }\n stop() {\n this.unbind();\n this.callPlayer(\"remove\");\n }\n seekTo(seconds, keepPlaying = true) {\n this.callPlayer(\"time\", seconds);\n if (!keepPlaying) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"volume\", fraction);\n }\n setPlaybackRate(rate) {\n this.callPlayer(\"playbackRate\", rate);\n }\n getDuration() {\n return this.callPlayer(\"duration\");\n }\n getCurrentTime() {\n return this.callPlayer(\"time\");\n }\n getSecondsLoaded() {\n return null;\n }\n render() {\n const { url } = this.props;\n const videoID = url && url.match(import_patterns.MATCH_URL_WISTIA)[1];\n const className = `wistia_embed wistia_async_${videoID}`;\n const style = {\n width: \"100%\",\n height: \"100%\"\n };\n return /* @__PURE__ */ import_react.default.createElement(\"div\", { id: this.playerID, key: videoID, className, style });\n }\n}\n__publicField(Wistia, \"displayName\", \"Wistia\");\n__publicField(Wistia, \"canPlay\", import_patterns.canPlay.wistia);\n__publicField(Wistia, \"loopOnEnded\", true);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/Wistia.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(this["webpackChunkpuzzle_preview_library"] = this["webpackChunkpuzzle_preview_library"] || []).push([["reactPlayerYouTube"],{
|
|
10
|
+
|
|
11
|
+
/***/ "./node_modules/react-player/lib/players/YouTube.js":
|
|
12
|
+
/*!**********************************************************!*\
|
|
13
|
+
!*** ./node_modules/react-player/lib/players/YouTube.js ***!
|
|
14
|
+
\**********************************************************/
|
|
15
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
eval("var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar YouTube_exports = {};\n__export(YouTube_exports, {\n default: () => YouTube\n});\nmodule.exports = __toCommonJS(YouTube_exports);\nvar import_react = __toESM(__webpack_require__(/*! react */ \"react\"));\nvar import_utils = __webpack_require__(/*! ../utils */ \"./node_modules/react-player/lib/utils.js\");\nvar import_patterns = __webpack_require__(/*! ../patterns */ \"./node_modules/react-player/lib/patterns.js\");\nconst SDK_URL = \"https://www.youtube.com/iframe_api\";\nconst SDK_GLOBAL = \"YT\";\nconst SDK_GLOBAL_READY = \"onYouTubeIframeAPIReady\";\nconst MATCH_PLAYLIST = /[?&](?:list|channel)=([a-zA-Z0-9_-]+)/;\nconst MATCH_USER_UPLOADS = /user\\/([a-zA-Z0-9_-]+)\\/?/;\nconst MATCH_NOCOOKIE = /youtube-nocookie\\.com/;\nconst NOCOOKIE_HOST = \"https://www.youtube-nocookie.com\";\nclass YouTube extends import_react.Component {\n constructor() {\n super(...arguments);\n __publicField(this, \"callPlayer\", import_utils.callPlayer);\n __publicField(this, \"parsePlaylist\", (url) => {\n if (url instanceof Array) {\n return {\n listType: \"playlist\",\n playlist: url.map(this.getID).join(\",\")\n };\n }\n if (MATCH_PLAYLIST.test(url)) {\n const [, playlistId] = url.match(MATCH_PLAYLIST);\n return {\n listType: \"playlist\",\n list: playlistId.replace(/^UC/, \"UU\")\n };\n }\n if (MATCH_USER_UPLOADS.test(url)) {\n const [, username] = url.match(MATCH_USER_UPLOADS);\n return {\n listType: \"user_uploads\",\n list: username\n };\n }\n return {};\n });\n __publicField(this, \"onStateChange\", (event) => {\n const { data } = event;\n const { onPlay, onPause, onBuffer, onBufferEnd, onEnded, onReady, loop, config: { playerVars, onUnstarted } } = this.props;\n const { UNSTARTED, PLAYING, PAUSED, BUFFERING, ENDED, CUED } = window[SDK_GLOBAL].PlayerState;\n if (data === UNSTARTED)\n onUnstarted();\n if (data === PLAYING) {\n onPlay();\n onBufferEnd();\n }\n if (data === PAUSED)\n onPause();\n if (data === BUFFERING)\n onBuffer();\n if (data === ENDED) {\n const isPlaylist = !!this.callPlayer(\"getPlaylist\");\n if (loop && !isPlaylist) {\n if (playerVars.start) {\n this.seekTo(playerVars.start);\n } else {\n this.play();\n }\n }\n onEnded();\n }\n if (data === CUED)\n onReady();\n });\n __publicField(this, \"mute\", () => {\n this.callPlayer(\"mute\");\n });\n __publicField(this, \"unmute\", () => {\n this.callPlayer(\"unMute\");\n });\n __publicField(this, \"ref\", (container) => {\n this.container = container;\n });\n }\n componentDidMount() {\n this.props.onMount && this.props.onMount(this);\n }\n getID(url) {\n if (!url || url instanceof Array || MATCH_PLAYLIST.test(url)) {\n return null;\n }\n return url.match(import_patterns.MATCH_URL_YOUTUBE)[1];\n }\n load(url, isReady) {\n const { playing, muted, playsinline, controls, loop, config, onError } = this.props;\n const { playerVars, embedOptions } = config;\n const id = this.getID(url);\n if (isReady) {\n if (MATCH_PLAYLIST.test(url) || MATCH_USER_UPLOADS.test(url) || url instanceof Array) {\n this.player.loadPlaylist(this.parsePlaylist(url));\n return;\n }\n this.player.cueVideoById({\n videoId: id,\n startSeconds: (0, import_utils.parseStartTime)(url) || playerVars.start,\n endSeconds: (0, import_utils.parseEndTime)(url) || playerVars.end\n });\n return;\n }\n (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, (YT) => YT.loaded).then((YT) => {\n if (!this.container)\n return;\n this.player = new YT.Player(this.container, {\n width: \"100%\",\n height: \"100%\",\n videoId: id,\n playerVars: {\n autoplay: playing ? 1 : 0,\n mute: muted ? 1 : 0,\n controls: controls ? 1 : 0,\n start: (0, import_utils.parseStartTime)(url),\n end: (0, import_utils.parseEndTime)(url),\n origin: window.location.origin,\n playsinline: playsinline ? 1 : 0,\n ...this.parsePlaylist(url),\n ...playerVars\n },\n events: {\n onReady: () => {\n if (loop) {\n this.player.setLoop(true);\n }\n this.props.onReady();\n },\n onPlaybackRateChange: (event) => this.props.onPlaybackRateChange(event.data),\n onPlaybackQualityChange: (event) => this.props.onPlaybackQualityChange(event),\n onStateChange: this.onStateChange,\n onError: (event) => onError(event.data)\n },\n host: MATCH_NOCOOKIE.test(url) ? NOCOOKIE_HOST : void 0,\n ...embedOptions\n });\n }, onError);\n if (embedOptions.events) {\n console.warn(\"Using `embedOptions.events` will likely break things. Use ReactPlayer\\u2019s callback props instead, eg onReady, onPlay, onPause\");\n }\n }\n play() {\n this.callPlayer(\"playVideo\");\n }\n pause() {\n this.callPlayer(\"pauseVideo\");\n }\n stop() {\n if (!document.body.contains(this.callPlayer(\"getIframe\")))\n return;\n this.callPlayer(\"stopVideo\");\n }\n seekTo(amount, keepPlaying = false) {\n this.callPlayer(\"seekTo\", amount);\n if (!keepPlaying && !this.props.playing) {\n this.pause();\n }\n }\n setVolume(fraction) {\n this.callPlayer(\"setVolume\", fraction * 100);\n }\n setPlaybackRate(rate) {\n this.callPlayer(\"setPlaybackRate\", rate);\n }\n setLoop(loop) {\n this.callPlayer(\"setLoop\", loop);\n }\n getDuration() {\n return this.callPlayer(\"getDuration\");\n }\n getCurrentTime() {\n return this.callPlayer(\"getCurrentTime\");\n }\n getSecondsLoaded() {\n return this.callPlayer(\"getVideoLoadedFraction\") * this.getDuration();\n }\n render() {\n const { display } = this.props;\n const style = {\n width: \"100%\",\n height: \"100%\",\n display\n };\n return /* @__PURE__ */ import_react.default.createElement(\"div\", { style }, /* @__PURE__ */ import_react.default.createElement(\"div\", { ref: this.ref }));\n }\n}\n__publicField(YouTube, \"displayName\", \"YouTube\");\n__publicField(YouTube, \"canPlay\", import_patterns.canPlay.youtube);\n\n\n//# sourceURL=webpack://puzzle-preview-library/./node_modules/react-player/lib/players/YouTube.js?");
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
}]);
|