@ix_waterford/lib 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/{static/js/async → async}/reactPlayerDash.js +3 -4
  2. package/dist/async/reactPlayerDash.js.map +1 -0
  3. package/dist/{static/js/async → async}/reactPlayerHls.js +3 -4
  4. package/dist/async/reactPlayerHls.js.map +1 -0
  5. package/dist/{static/js/async → async}/reactPlayerMux.js +3 -4
  6. package/dist/async/reactPlayerMux.js.map +1 -0
  7. package/dist/{static/js/async → async}/reactPlayerPreview.js +6 -7
  8. package/dist/async/reactPlayerPreview.js.map +1 -0
  9. package/dist/{static/js/async → async}/reactPlayerSpotify.js +3 -4
  10. package/dist/async/reactPlayerSpotify.js.map +1 -0
  11. package/dist/{static/js/async → async}/reactPlayerTiktok.js +3 -4
  12. package/dist/async/reactPlayerTiktok.js.map +1 -0
  13. package/dist/{static/js/async → async}/reactPlayerTwitch.js +3 -4
  14. package/dist/async/reactPlayerTwitch.js.map +1 -0
  15. package/dist/{static/js/async → async}/reactPlayerVimeo.js +3 -4
  16. package/dist/async/reactPlayerVimeo.js.map +1 -0
  17. package/dist/{static/js/async → async}/reactPlayerWistia.js +3 -4
  18. package/dist/async/reactPlayerWistia.js.map +1 -0
  19. package/dist/{static/js/async → async}/reactPlayerYouTube.js +3 -4
  20. package/dist/async/reactPlayerYouTube.js.map +1 -0
  21. package/dist/{static/js/async → async}/vendors-node_modules_custom-media-element_dist_custom-media-element_js-node_modules_media-tra-835023.js +1 -2
  22. package/dist/async/vendors-node_modules_custom-media-element_dist_custom-media-element_js-node_modules_media-tra-835023.js.map +1 -0
  23. package/dist/{static/js/async → async}/vendors-node_modules_dashjs_dist_modern_esm_dash_all_min_js.js +1 -2
  24. package/dist/async/vendors-node_modules_dashjs_dist_modern_esm_dash_all_min_js.js.map +1 -0
  25. package/dist/{static/js/async → async}/vendors-node_modules_hls_js_dist_hls_mjs.js +1 -2
  26. package/dist/async/vendors-node_modules_hls_js_dist_hls_mjs.js.map +1 -0
  27. package/dist/index.html +1 -1
  28. package/dist/{static/js/index.js → index.js} +360 -364
  29. package/dist/index.js.map +1 -0
  30. package/dist/lib-react.js +1462 -0
  31. package/dist/lib-react.js.map +1 -0
  32. package/dist/vendors-node_modules_rspack_core_dist_cssExtractHmr_js-node_modules_dayjs_plugin_utc_js-node_-5eb95d.js +53062 -0
  33. package/dist/vendors-node_modules_rspack_core_dist_cssExtractHmr_js-node_modules_dayjs_plugin_utc_js-node_-5eb95d.js.map +1 -0
  34. package/package.json +5 -5
  35. package/dist/static/js/async/reactPlayerDash.js.map +0 -1
  36. package/dist/static/js/async/reactPlayerHls.js.map +0 -1
  37. package/dist/static/js/async/reactPlayerMux.js.map +0 -1
  38. package/dist/static/js/async/reactPlayerPreview.js.map +0 -1
  39. package/dist/static/js/async/reactPlayerSpotify.js.map +0 -1
  40. package/dist/static/js/async/reactPlayerTiktok.js.map +0 -1
  41. package/dist/static/js/async/reactPlayerTwitch.js.map +0 -1
  42. package/dist/static/js/async/reactPlayerVimeo.js.map +0 -1
  43. package/dist/static/js/async/reactPlayerWistia.js.map +0 -1
  44. package/dist/static/js/async/reactPlayerYouTube.js.map +0 -1
  45. package/dist/static/js/async/vendors-node_modules_custom-media-element_dist_custom-media-element_js-node_modules_media-tra-835023.js.map +0 -1
  46. package/dist/static/js/async/vendors-node_modules_dashjs_dist_modern_esm_dash_all_min_js.js.map +0 -1
  47. package/dist/static/js/async/vendors-node_modules_hls_js_dist_hls_mjs.js.map +0 -1
  48. package/dist/static/js/index.js.map +0 -1
  49. package/dist/static/js/lib-react.js +0 -3235
  50. package/dist/static/js/lib-react.js.map +0 -1
  51. package/dist/static/js/vendors-node_modules_rspack_core_dist_cssExtractHmr_js-node_modules_dayjs_plugin_utc_js-node_-897cfa.js +0 -113737
  52. package/dist/static/js/vendors-node_modules_rspack_core_dist_cssExtractHmr_js-node_modules_dayjs_plugin_utc_js-node_-897cfa.js.map +0 -1
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  (self["webpackChunk_ix_waterford_lib"] = self["webpackChunk_ix_waterford_lib"] || []).push([["reactPlayerDash"], {
3
2
  "./node_modules/dash-video-element/dist/dash-video-element.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
3
  __webpack_require__.r(__webpack_exports__);
@@ -171,7 +170,7 @@ __webpack_require__.r(__webpack_exports__);
171
170
  __webpack_require__.d(__webpack_exports__, {
172
171
  "default": () => (react_default)
173
172
  });
174
- /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/react/index.js");
173
+ /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
175
174
  /* import */var _dash_video_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/dash-video-element/dist/dash-video-element.js");
176
175
  "use client";
177
176
 
@@ -322,7 +321,7 @@ function setProperty(node, name, value) {
322
321
 
323
322
  // dist/react.ts
324
323
  var react_default = createComponent({
325
- react: react__WEBPACK_IMPORTED_MODULE_0__,
324
+ react: react__WEBPACK_IMPORTED_MODULE_0__["default"],
326
325
  tagName: "dash-video",
327
326
  elementClass: _dash_video_element_js__WEBPACK_IMPORTED_MODULE_1__["default"],
328
327
  toAttributeName(propName) {
@@ -347,5 +346,5 @@ ce-la-react/dist/ce-la-react.js:
347
346
 
348
347
  }),
349
348
 
350
- }]);
349
+ }])
351
350
  //# sourceMappingURL=reactPlayerDash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async/reactPlayerDash.js","sources":["/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/dash-video-element/dist/dash-video-element.js","/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/dash-video-element/dist/react.js"],"sourcesContent":["import { CustomVideoElement } from \"custom-media-element\";\nimport { MediaTracksMixin } from \"media-tracks\";\nclass DashVideoElement extends MediaTracksMixin(CustomVideoElement) {\n static shadowRootOptions = { ...CustomVideoElement.shadowRootOptions };\n static getTemplateHTML = (attrs) => {\n const { src, ...rest } = attrs;\n return CustomVideoElement.getTemplateHTML(rest);\n };\n #apiInit;\n attributeChangedCallback(attrName, oldValue, newValue) {\n if (attrName !== \"src\") {\n super.attributeChangedCallback(attrName, oldValue, newValue);\n }\n if (attrName === \"src\" && oldValue != newValue) {\n this.load();\n }\n }\n async _initThumbnails(representation) {\n const generateAllCues = async (totalThumbnails2, thumbnailDuration2) => {\n const promises = [];\n const timescale = representation.timescale || 1;\n const startNumber = representation.startNumber || 1;\n const pto = representation.presentationTimeOffset ? representation.presentationTimeOffset / timescale : 0;\n const tduration = representation.segmentDuration;\n for (let thIndex = 0; thIndex < totalThumbnails2; thIndex++) {\n const startTime = calculateThumbnailStartTime({\n thIndex,\n thduration: thumbnailDuration2,\n ttiles: totalThumbnails2,\n tduration,\n startNumber,\n pto\n });\n const endTime = startTime + thumbnailDuration2;\n const promise = new Promise((resolve, reject) => {\n this.api.provideThumbnail(startTime, ({ url, width, height, x, y }) => {\n try {\n const cue = new VTTCue(\n startTime,\n endTime,\n `${url}#xywh=${x},${y},${width},${height}`\n );\n resolve(cue);\n } catch (err) {\n reject(err);\n }\n });\n });\n promises.push(promise);\n }\n return await Promise.all(promises).catch((e) => console.error(\"Error processing thumbnails\", e));\n };\n const { totalThumbnails, thumbnailDuration } = calculateThumbnailTimes(representation);\n const cues = await generateAllCues(totalThumbnails, thumbnailDuration);\n let track = this.nativeEl.querySelector('track[label=\"thumbnails\"]');\n if (!track) {\n track = createThumbnailTrack();\n this.nativeEl.appendChild(track);\n const vttUrl = cuesToVttBlobUrl(cues);\n track.src = vttUrl;\n track.dispatchEvent(new Event(\"change\"));\n }\n }\n async load() {\n if (this.#apiInit) {\n this.api.attachSource(this.src);\n return;\n }\n this.#apiInit = true;\n const Dash = await import(\"dashjs\");\n this.api = Dash.MediaPlayer().create();\n this.api.initialize(this.nativeEl, this.src, this.autoplay);\n this.api.on(Dash.MediaPlayer.events.STREAM_INITIALIZED, () => {\n const bitrateList = this.api.getRepresentationsByType(\"video\");\n let videoTrack = this.videoTracks.getTrackById(\"main\");\n if (!videoTrack) {\n videoTrack = this.addVideoTrack(\"main\");\n videoTrack.id = \"main\";\n videoTrack.selected = true;\n }\n bitrateList.forEach((rep) => {\n const bitrate = rep.bandwidth ?? rep.bitrate ?? (Number.isFinite(rep.bitrateInKbit) ? rep.bitrateInKbit * 1e3 : void 0);\n const rendition = videoTrack.addRendition(rep.id, rep.width, rep.height, rep.mimeType ?? rep.codec, bitrate);\n rendition.id = rep.id;\n });\n this.videoRenditions.addEventListener(\"change\", () => {\n const selected = this.videoRenditions[this.videoRenditions.selectedIndex];\n if (selected == null ? void 0 : selected.id) {\n this.api.updateSettings({ streaming: { abr: { autoSwitchBitrate: { video: false } } } });\n this.api.setRepresentationForTypeById(\"video\", selected.id, true);\n } else {\n this.api.updateSettings({ streaming: { abr: { autoSwitchBitrate: { video: true } } } });\n }\n });\n if (!this.api.isDynamic()) {\n const imageReps = this.api.getRepresentationsByType(\"image\");\n imageReps.forEach(async (rep, idx) => {\n if (idx > 0) return;\n this._initThumbnails(rep);\n });\n }\n });\n }\n}\nfunction calculateThumbnailTimes(representation) {\n var _a, _b;\n const essentialProp = representation.essentialProperties[0];\n const [htiles, vtiles] = essentialProp.value.split(\"x\").map(Number);\n const ttiles = htiles * vtiles;\n const periodDuration = ((_b = (_a = representation.adaptation) == null ? void 0 : _a.period) == null ? void 0 : _b.duration) || null;\n const tileDuration = representation.segmentDuration;\n const timescale = representation.timescale || 1;\n const tduration = tileDuration / timescale;\n const thduration = tduration / ttiles;\n const totalThumbnails = periodDuration != null ? Math.ceil(periodDuration / thduration) : Math.ceil(tileDuration / thduration);\n return { totalThumbnails, thumbnailDuration: thduration };\n}\nfunction calculateThumbnailStartTime({ thIndex, tduration, thduration, ttiles, startNumber, pto }) {\n const tnumber = Math.floor(thIndex / ttiles) + startNumber;\n const thnumber = thIndex % ttiles + 1;\n const tileStartTime = (tnumber - 1) * tduration - pto;\n const thumbnailStartTime = (thnumber - 1) * thduration;\n return tileStartTime + thumbnailStartTime;\n}\nfunction createThumbnailTrack() {\n const track = document.createElement(\"track\");\n track.kind = \"metadata\";\n track.label = \"thumbnails\";\n track.srclang = \"en\";\n track.mode = \"hidden\";\n track.default = true;\n return track;\n}\nfunction cuesToVttBlobUrl(cues) {\n let vtt = \"WEBVTT\\n\\n\";\n for (const cue of cues) {\n vtt += `${formatTime(cue.startTime)} --> ${formatTime(cue.endTime)}\n`;\n vtt += `${cue.text}\n\n`;\n }\n const blob = new Blob([vtt], { type: \"text/vtt\" });\n return URL.createObjectURL(blob);\n function formatTime(t) {\n const h = String(Math.floor(t / 3600)).padStart(2, \"0\");\n const m = String(Math.floor(t % 3600 / 60)).padStart(2, \"0\");\n const s = (t % 60).toFixed(3).padStart(6, \"0\");\n return `${h}:${m}:${s}`;\n }\n}\nif (globalThis.customElements && !globalThis.customElements.get(\"dash-video\")) {\n globalThis.customElements.define(\"dash-video\", DashVideoElement);\n}\nvar dash_video_element_default = DashVideoElement;\nexport {\n dash_video_element_default as default\n};\n","\"use client\";\n\n// dist/react.ts\nimport React from \"react\";\nimport CustomMediaElement from \"./dash-video-element.js\";\n\n// ../../node_modules/ce-la-react/dist/ce-la-react.js\nvar reservedReactProps = /* @__PURE__ */ new Set([\n \"style\",\n \"children\",\n \"ref\",\n \"key\",\n \"suppressContentEditableWarning\",\n \"suppressHydrationWarning\",\n \"dangerouslySetInnerHTML\"\n]);\nvar reactPropToAttrNameMap = {\n className: \"class\",\n htmlFor: \"for\"\n};\nfunction defaultToAttributeName(propName) {\n return propName.toLowerCase();\n}\nfunction defaultToAttributeValue(propValue) {\n if (typeof propValue === \"boolean\") return propValue ? \"\" : void 0;\n if (typeof propValue === \"function\") return void 0;\n if (typeof propValue === \"object\" && propValue !== null) return void 0;\n return propValue;\n}\nfunction createComponent({\n react: React2,\n tagName,\n elementClass,\n events,\n displayName,\n defaultProps,\n toAttributeName = defaultToAttributeName,\n toAttributeValue = defaultToAttributeValue\n}) {\n const IS_REACT_19_OR_NEWER = Number.parseInt(React2.version) >= 19;\n const ReactComponent = React2.forwardRef((props, ref) => {\n var _a, _b;\n const elementRef = React2.useRef(null);\n const prevElemPropsRef = React2.useRef(/* @__PURE__ */ new Map());\n const eventProps = {};\n const attrs = {};\n const reactProps = {};\n const elementProps = {};\n for (const [k, v] of Object.entries(props)) {\n if (reservedReactProps.has(k)) {\n reactProps[k] = v;\n continue;\n }\n const attrName = toAttributeName(reactPropToAttrNameMap[k] ?? k);\n if (elementClass.prototype && k in elementClass.prototype && !(k in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) && !((_b = elementClass.observedAttributes) == null ? void 0 : _b.some((attr) => attr === attrName))) {\n elementProps[k] = v;\n continue;\n }\n if (k.startsWith(\"on\")) {\n eventProps[k] = v;\n continue;\n }\n const attrValue = toAttributeValue(v);\n if (attrName && attrValue != null) {\n attrs[attrName] = String(attrValue);\n if (!IS_REACT_19_OR_NEWER) {\n reactProps[attrName] = attrValue;\n }\n }\n if (attrName && IS_REACT_19_OR_NEWER) {\n const attrValueFromDefault = defaultToAttributeValue(v);\n if (attrValue !== attrValueFromDefault) {\n reactProps[attrName] = attrValue;\n } else {\n reactProps[attrName] = v;\n }\n }\n }\n if (typeof window !== \"undefined\") {\n for (const propName in eventProps) {\n const callback = eventProps[propName];\n const useCapture = propName.endsWith(\"Capture\");\n const eventName = ((events == null ? void 0 : events[propName]) ?? propName.slice(2).toLowerCase()).slice(\n 0,\n useCapture ? -7 : void 0\n );\n React2.useLayoutEffect(() => {\n const eventTarget = elementRef == null ? void 0 : elementRef.current;\n if (!eventTarget || typeof callback !== \"function\") return;\n eventTarget.addEventListener(eventName, callback, useCapture);\n return () => {\n eventTarget.removeEventListener(eventName, callback, useCapture);\n };\n }, [elementRef == null ? void 0 : elementRef.current, callback]);\n }\n React2.useLayoutEffect(() => {\n if (elementRef.current === null) return;\n const newElemProps = /* @__PURE__ */ new Map();\n for (const key in elementProps) {\n setProperty(elementRef.current, key, elementProps[key]);\n prevElemPropsRef.current.delete(key);\n newElemProps.set(key, elementProps[key]);\n }\n for (const [key, _value] of prevElemPropsRef.current) {\n setProperty(elementRef.current, key, void 0);\n }\n prevElemPropsRef.current = newElemProps;\n });\n }\n if (typeof window === \"undefined\" && (elementClass == null ? void 0 : elementClass.getTemplateHTML) && (elementClass == null ? void 0 : elementClass.shadowRootOptions)) {\n const { mode, delegatesFocus } = elementClass.shadowRootOptions;\n const templateShadowRoot = React2.createElement(\"template\", {\n shadowrootmode: mode,\n shadowrootdelegatesfocus: delegatesFocus,\n dangerouslySetInnerHTML: {\n __html: elementClass.getTemplateHTML(attrs, props)\n }\n });\n reactProps.children = [templateShadowRoot, reactProps.children];\n }\n return React2.createElement(tagName, {\n ...defaultProps,\n ...reactProps,\n ref: React2.useCallback(\n (node) => {\n elementRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref !== null) {\n ref.current = node;\n }\n },\n [ref]\n )\n });\n });\n ReactComponent.displayName = displayName ?? elementClass.name;\n return ReactComponent;\n}\nfunction setProperty(node, name, value) {\n var _a;\n node[name] = value;\n if (value == null && name in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) {\n node.removeAttribute(name);\n }\n}\n\n// dist/react.ts\nvar react_default = createComponent({\n react: React,\n tagName: \"dash-video\",\n elementClass: CustomMediaElement,\n toAttributeName(propName) {\n if (propName === \"muted\") return \"\";\n if (propName === \"defaultMuted\") return \"muted\";\n return defaultToAttributeName(propName);\n }\n});\nexport {\n react_default as default\n};\n/*! Bundled license information:\n\nce-la-react/dist/ce-la-react.js:\n (**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n *\n * Modified version of `@lit/react` for vanilla custom elements with support for SSR.\n *)\n*/\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;;;;AC7JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  (self["webpackChunk_ix_waterford_lib"] = self["webpackChunk_ix_waterford_lib"] || []).push([["reactPlayerHls"], {
3
2
  "./node_modules/hls-video-element/dist/hls-video-element.js": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
3
  __webpack_require__.r(__webpack_exports__);
@@ -250,7 +249,7 @@ __webpack_require__.r(__webpack_exports__);
250
249
  __webpack_require__.d(__webpack_exports__, {
251
250
  "default": () => (react_default)
252
251
  });
253
- /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/react/index.js");
252
+ /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
254
253
  /* import */var _hls_video_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/hls-video-element/dist/hls-video-element.js");
255
254
  "use client";
256
255
 
@@ -401,7 +400,7 @@ function setProperty(node, name, value) {
401
400
 
402
401
  // dist/react.ts
403
402
  var react_default = createComponent({
404
- react: react__WEBPACK_IMPORTED_MODULE_0__,
403
+ react: react__WEBPACK_IMPORTED_MODULE_0__["default"],
405
404
  tagName: "hls-video",
406
405
  elementClass: _hls_video_element_js__WEBPACK_IMPORTED_MODULE_1__["default"],
407
406
  toAttributeName(propName) {
@@ -426,5 +425,5 @@ ce-la-react/dist/ce-la-react.js:
426
425
 
427
426
  }),
428
427
 
429
- }]);
428
+ }])
430
429
  //# sourceMappingURL=reactPlayerHls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async/reactPlayerHls.js","sources":["/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/hls-video-element/dist/hls-video-element.js","/Users/kirubakaran.r/Documents/projects/hub/components/waterford_library/node_modules/hls-video-element/dist/react.js"],"sourcesContent":["import { CustomVideoElement } from \"custom-media-element\";\nimport { MediaTracksMixin } from \"media-tracks\";\nimport Hls from \"hls.js/dist/hls.mjs\";\nconst HlsVideoMixin = (superclass) => {\n return class HlsVideo extends superclass {\n static shadowRootOptions = { ...superclass.shadowRootOptions };\n static getTemplateHTML = (attrs, props = {}) => {\n const { src, ...rest } = attrs;\n return `\n <script type=\"application/json\" id=\"config\">\n ${JSON.stringify(props.config || {})}\n </script>\n ${superclass.getTemplateHTML(rest)}\n `;\n };\n #airplaySourceEl = null;\n #config = null;\n constructor() {\n super();\n this.#upgradeProperty(\"config\");\n }\n get config() {\n return this.#config;\n }\n set config(value) {\n this.#config = value;\n }\n attributeChangedCallback(attrName, oldValue, newValue) {\n if (attrName !== \"src\") {\n super.attributeChangedCallback(attrName, oldValue, newValue);\n }\n if (attrName === \"src\" && oldValue != newValue) {\n this.load();\n }\n }\n #destroy() {\n var _a, _b;\n (_a = this.#airplaySourceEl) == null ? void 0 : _a.remove();\n (_b = this.nativeEl) == null ? void 0 : _b.removeEventListener(\n \"webkitcurrentplaybacktargetiswirelesschanged\",\n this.#toggleHlsLoad\n );\n if (this.api) {\n this.api.detachMedia();\n this.api.destroy();\n this.api = null;\n }\n }\n async load() {\n var _a, _b;\n const isFirstLoad = !this.api;\n this.#destroy();\n if (!this.src) {\n return;\n }\n if (isFirstLoad && !this.#config) {\n this.#config = JSON.parse(((_a = this.shadowRoot.getElementById(\"config\")) == null ? void 0 : _a.textContent) || \"{}\");\n }\n if (Hls.isSupported()) {\n await Promise.resolve();\n this.api = new Hls({\n // Mimic the media element with an Infinity duration for live streams.\n liveDurationInfinity: true,\n // Disable auto quality level/fragment loading.\n autoStartLoad: false,\n // Custom configuration for hls.js.\n ...this.config\n });\n this.api.loadSource(this.src);\n this.api.attachMedia(this.nativeEl);\n switch (this.nativeEl.preload) {\n case \"none\": {\n const loadSourceOnPlay = () => this.api.startLoad();\n this.nativeEl.addEventListener(\"play\", loadSourceOnPlay, {\n once: true\n });\n this.api.on(Hls.Events.DESTROYING, () => {\n this.nativeEl.removeEventListener(\"play\", loadSourceOnPlay);\n });\n break;\n }\n case \"metadata\": {\n const originalLength = this.api.config.maxBufferLength;\n const originalSize = this.api.config.maxBufferSize;\n this.api.config.maxBufferLength = 1;\n this.api.config.maxBufferSize = 1;\n const increaseBufferOnPlay = () => {\n this.api.config.maxBufferLength = originalLength;\n this.api.config.maxBufferSize = originalSize;\n };\n this.nativeEl.addEventListener(\"play\", increaseBufferOnPlay, {\n once: true\n });\n this.api.on(Hls.Events.DESTROYING, () => {\n this.nativeEl.removeEventListener(\"play\", increaseBufferOnPlay);\n });\n this.api.startLoad();\n break;\n }\n default:\n this.api.startLoad();\n }\n if (this.nativeEl.webkitCurrentPlaybackTargetIsWireless) {\n this.api.stopLoad();\n }\n this.nativeEl.addEventListener(\n \"webkitcurrentplaybacktargetiswirelesschanged\",\n this.#toggleHlsLoad\n );\n this.#airplaySourceEl = document.createElement(\"source\");\n this.#airplaySourceEl.setAttribute(\"type\", \"application/x-mpegURL\");\n this.#airplaySourceEl.setAttribute(\"src\", this.src);\n this.nativeEl.disableRemotePlayback = false;\n this.nativeEl.append(this.#airplaySourceEl);\n const levelIdMap = /* @__PURE__ */ new WeakMap();\n this.api.on(Hls.Events.MANIFEST_PARSED, (event, data) => {\n if (this.nativeEl.autoplay && this.nativeEl.paused) {\n this.nativeEl.play().catch((err) => {\n console.warn(\"Autoplay failed:\", err);\n });\n }\n removeAllMediaTracks();\n let videoTrack = this.videoTracks.getTrackById(\"main\");\n if (!videoTrack) {\n videoTrack = this.addVideoTrack(\"main\");\n videoTrack.id = \"main\";\n videoTrack.selected = true;\n }\n for (const [id, level] of data.levels.entries()) {\n const videoRendition = videoTrack.addRendition(\n level.url[0],\n level.width,\n level.height,\n level.videoCodec,\n level.bitrate\n );\n levelIdMap.set(level, `${id}`);\n videoRendition.id = `${id}`;\n }\n for (let [id, a] of data.audioTracks.entries()) {\n const kind = a.default ? \"main\" : \"alternative\";\n const audioTrack = this.addAudioTrack(kind, a.name, a.lang);\n audioTrack.id = `${id}`;\n if (a.default) {\n audioTrack.enabled = true;\n }\n }\n });\n this.audioTracks.addEventListener(\"change\", () => {\n var _a2;\n const audioTrackId = +((_a2 = [...this.audioTracks].find((t) => t.enabled)) == null ? void 0 : _a2.id);\n const availableIds = this.api.audioTracks.map((t) => t.id);\n if (audioTrackId != this.api.audioTrack && availableIds.includes(audioTrackId)) {\n this.api.audioTrack = audioTrackId;\n }\n });\n this.api.on(Hls.Events.LEVELS_UPDATED, (event, data) => {\n const videoTrack = this.videoTracks[this.videoTracks.selectedIndex ?? 0];\n if (!videoTrack) return;\n const levelIds = data.levels.map((l) => levelIdMap.get(l));\n for (const rendition of this.videoRenditions) {\n if (rendition.id && !levelIds.includes(rendition.id)) {\n videoTrack.removeRendition(rendition);\n }\n }\n });\n let lastFailedLevel = null;\n this.api.on(Hls.Events.ERROR, (event, data) => {\n if (data.type === Hls.ErrorTypes.NETWORK_ERROR && data.details === Hls.ErrorDetails.FRAG_LOAD_ERROR) {\n lastFailedLevel = data.frag.level;\n }\n });\n this.api.on(Hls.Events.LEVEL_SWITCHED, (event, data) => {\n const newLevel = data.level;\n if (lastFailedLevel !== null && newLevel < lastFailedLevel) {\n console.warn(\n `\\u26A0\\uFE0F hls.js downgraded quality from level ${lastFailedLevel} to ${newLevel} due to fragment load failure.`\n );\n this.videoRenditions.selectedIndex = newLevel;\n lastFailedLevel = null;\n }\n });\n const switchRendition = (event) => {\n const level = event.target.selectedIndex;\n if (level != this.api.nextLevel) {\n this.api.nextLevel = level;\n }\n };\n (_b = this.videoRenditions) == null ? void 0 : _b.addEventListener(\"change\", switchRendition);\n const removeAllMediaTracks = () => {\n for (const videoTrack of this.videoTracks) {\n this.removeVideoTrack(videoTrack);\n }\n for (const audioTrack of this.audioTracks) {\n this.removeAudioTrack(audioTrack);\n }\n };\n this.api.once(Hls.Events.DESTROYING, removeAllMediaTracks);\n return;\n }\n await Promise.resolve();\n if (this.nativeEl.canPlayType(\"application/vnd.apple.mpegurl\")) {\n this.nativeEl.src = this.src;\n }\n }\n #toggleHlsLoad = () => {\n var _a, _b, _c;\n if ((_a = this.nativeEl) == null ? void 0 : _a.webkitCurrentPlaybackTargetIsWireless) {\n (_b = this.api) == null ? void 0 : _b.stopLoad();\n } else {\n (_c = this.api) == null ? void 0 : _c.startLoad();\n }\n };\n // This is a pattern to update property values that are set before\n // the custom element is upgraded.\n // https://web.dev/custom-elements-best-practices/#make-properties-lazy\n #upgradeProperty(prop) {\n if (Object.prototype.hasOwnProperty.call(this, prop)) {\n const value = this[prop];\n delete this[prop];\n this[prop] = value;\n }\n }\n };\n};\nconst HlsVideoElement = HlsVideoMixin(MediaTracksMixin(CustomVideoElement));\nif (globalThis.customElements && !globalThis.customElements.get(\"hls-video\")) {\n globalThis.customElements.define(\"hls-video\", HlsVideoElement);\n}\nvar hls_video_element_default = HlsVideoElement;\nexport {\n Hls,\n HlsVideoElement,\n HlsVideoMixin,\n hls_video_element_default as default\n};\n","\"use client\";\n\n// dist/react.ts\nimport React from \"react\";\nimport CustomMediaElement from \"./hls-video-element.js\";\n\n// ../../node_modules/ce-la-react/dist/ce-la-react.js\nvar reservedReactProps = /* @__PURE__ */ new Set([\n \"style\",\n \"children\",\n \"ref\",\n \"key\",\n \"suppressContentEditableWarning\",\n \"suppressHydrationWarning\",\n \"dangerouslySetInnerHTML\"\n]);\nvar reactPropToAttrNameMap = {\n className: \"class\",\n htmlFor: \"for\"\n};\nfunction defaultToAttributeName(propName) {\n return propName.toLowerCase();\n}\nfunction defaultToAttributeValue(propValue) {\n if (typeof propValue === \"boolean\") return propValue ? \"\" : void 0;\n if (typeof propValue === \"function\") return void 0;\n if (typeof propValue === \"object\" && propValue !== null) return void 0;\n return propValue;\n}\nfunction createComponent({\n react: React2,\n tagName,\n elementClass,\n events,\n displayName,\n defaultProps,\n toAttributeName = defaultToAttributeName,\n toAttributeValue = defaultToAttributeValue\n}) {\n const IS_REACT_19_OR_NEWER = Number.parseInt(React2.version) >= 19;\n const ReactComponent = React2.forwardRef((props, ref) => {\n var _a, _b;\n const elementRef = React2.useRef(null);\n const prevElemPropsRef = React2.useRef(/* @__PURE__ */ new Map());\n const eventProps = {};\n const attrs = {};\n const reactProps = {};\n const elementProps = {};\n for (const [k, v] of Object.entries(props)) {\n if (reservedReactProps.has(k)) {\n reactProps[k] = v;\n continue;\n }\n const attrName = toAttributeName(reactPropToAttrNameMap[k] ?? k);\n if (elementClass.prototype && k in elementClass.prototype && !(k in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) && !((_b = elementClass.observedAttributes) == null ? void 0 : _b.some((attr) => attr === attrName))) {\n elementProps[k] = v;\n continue;\n }\n if (k.startsWith(\"on\")) {\n eventProps[k] = v;\n continue;\n }\n const attrValue = toAttributeValue(v);\n if (attrName && attrValue != null) {\n attrs[attrName] = String(attrValue);\n if (!IS_REACT_19_OR_NEWER) {\n reactProps[attrName] = attrValue;\n }\n }\n if (attrName && IS_REACT_19_OR_NEWER) {\n const attrValueFromDefault = defaultToAttributeValue(v);\n if (attrValue !== attrValueFromDefault) {\n reactProps[attrName] = attrValue;\n } else {\n reactProps[attrName] = v;\n }\n }\n }\n if (typeof window !== \"undefined\") {\n for (const propName in eventProps) {\n const callback = eventProps[propName];\n const useCapture = propName.endsWith(\"Capture\");\n const eventName = ((events == null ? void 0 : events[propName]) ?? propName.slice(2).toLowerCase()).slice(\n 0,\n useCapture ? -7 : void 0\n );\n React2.useLayoutEffect(() => {\n const eventTarget = elementRef == null ? void 0 : elementRef.current;\n if (!eventTarget || typeof callback !== \"function\") return;\n eventTarget.addEventListener(eventName, callback, useCapture);\n return () => {\n eventTarget.removeEventListener(eventName, callback, useCapture);\n };\n }, [elementRef == null ? void 0 : elementRef.current, callback]);\n }\n React2.useLayoutEffect(() => {\n if (elementRef.current === null) return;\n const newElemProps = /* @__PURE__ */ new Map();\n for (const key in elementProps) {\n setProperty(elementRef.current, key, elementProps[key]);\n prevElemPropsRef.current.delete(key);\n newElemProps.set(key, elementProps[key]);\n }\n for (const [key, _value] of prevElemPropsRef.current) {\n setProperty(elementRef.current, key, void 0);\n }\n prevElemPropsRef.current = newElemProps;\n });\n }\n if (typeof window === \"undefined\" && (elementClass == null ? void 0 : elementClass.getTemplateHTML) && (elementClass == null ? void 0 : elementClass.shadowRootOptions)) {\n const { mode, delegatesFocus } = elementClass.shadowRootOptions;\n const templateShadowRoot = React2.createElement(\"template\", {\n shadowrootmode: mode,\n shadowrootdelegatesfocus: delegatesFocus,\n dangerouslySetInnerHTML: {\n __html: elementClass.getTemplateHTML(attrs, props)\n }\n });\n reactProps.children = [templateShadowRoot, reactProps.children];\n }\n return React2.createElement(tagName, {\n ...defaultProps,\n ...reactProps,\n ref: React2.useCallback(\n (node) => {\n elementRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref !== null) {\n ref.current = node;\n }\n },\n [ref]\n )\n });\n });\n ReactComponent.displayName = displayName ?? elementClass.name;\n return ReactComponent;\n}\nfunction setProperty(node, name, value) {\n var _a;\n node[name] = value;\n if (value == null && name in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) {\n node.removeAttribute(name);\n }\n}\n\n// dist/react.ts\nvar react_default = createComponent({\n react: React,\n tagName: \"hls-video\",\n elementClass: CustomMediaElement,\n toAttributeName(propName) {\n if (propName === \"muted\") return \"\";\n if (propName === \"defaultMuted\") return \"muted\";\n return defaultToAttributeName(propName);\n }\n});\nexport {\n react_default as default\n};\n/*! Bundled license information:\n\nce-la-react/dist/ce-la-react.js:\n (**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n *\n * Modified version of `@lit/react` for vanilla custom elements with support for SSR.\n *)\n*/\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;;;;;;;;;AC3OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  (self["webpackChunk_ix_waterford_lib"] = self["webpackChunk_ix_waterford_lib"] || []).push([["reactPlayerMux"], {
3
2
  "./node_modules/@mux/mux-player-react/dist/index.mjs": (function (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
3
  __webpack_require__.r(__webpack_exports__);
@@ -12,10 +11,10 @@ __webpack_require__.d(__webpack_exports__, {
12
11
  playerSoftwareName: () => (fe),
13
12
  playerSoftwareVersion: () => (de)
14
13
  });
15
- /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/react/index.js");
14
+ /* import */var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
16
15
  /* import */var _mux_playback_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/@mux/playback-core/dist/index.mjs");
17
16
  /* import */var _mux_mux_player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./node_modules/@mux/mux-player/dist/index.mjs");
18
- "use client";var M=parseInt(react__WEBPACK_IMPORTED_MODULE_0__.version)>=19,E={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},B=e=>e==null,ee=(e,t)=>B(t)?!1:e in t,te=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),ne=(e,t)=>{if(!(!M&&typeof t=="boolean"&&!t)){if(ee(e,E))return E[e];if(typeof t!="undefined")return/[A-Z]/.test(e)?te(e):e}};var ae=(e,t)=>!M&&typeof e=="boolean"?"":e,P=(e={})=>{let{ref:t,...n}=e;return Object.entries(n).reduce((o,[a,l])=>{let i=ne(a,l);if(!i)return o;let c=ae(l,a);return o[i]=c,o},{})};function x(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function re(...e){return t=>{let n=!1,o=e.map(a=>{let l=x(a,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let a=0;a<o.length;a++){let l=o[a];typeof l=="function"?l():x(e[a],null)}}}}function f(...e){return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(re(...e),e)}var oe=Object.prototype.hasOwnProperty,ue=(e,t)=>{if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.some((a,l)=>t[l]===a);let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let a=0;a<n.length;a++)if(!oe.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0},p=(e,t,n)=>!ue(t,e[n]),se=(e,t,n)=>{e[n]=t},ie=(e,t,n,o=se,a=p)=>(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{let l=n==null?void 0:n.current;l&&a(l,t,e)&&o(l,t,e)},[n==null?void 0:n.current,t]),u=ie;var ye=()=>{try{return"3.8.0"}catch{}return"UNKNOWN"},me=ye(),g=()=>me;var r=(e,t,n)=>(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{let o=t==null?void 0:t.current;if(!o||!n)return;let a=e,l=n;return o.addEventListener(a,l),()=>{o.removeEventListener(a,l)}},[t==null?void 0:t.current,n,e]);var Pe=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({children:e,...t},n)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("mux-player",{suppressHydrationWarning:!0,...P(t),ref:n},e)),xe=(e,t)=>{let{onAbort:n,onCanPlay:o,onCanPlayThrough:a,onEmptied:l,onLoadStart:i,onLoadedData:c,onLoadedMetadata:v,onProgress:R,onDurationChange:T,onVolumeChange:h,onRateChange:b,onResize:C,onWaiting:k,onPlay:O,onPlaying:S,onTimeUpdate:w,onPause:N,onSeeking:L,onSeeked:A,onStalled:I,onSuspend:_,onEnded:K,onError:H,onCuePointChange:D,onChapterChange:V,metadata:W,tokens:U,paused:z,playbackId:F,playbackRates:G,currentTime:Z,themeProps:j,extraSourceParams:q,castCustomData:J,_hlsConfig:Y,...$}=t;return u("tokens",U,e),u("playbackId",F,e),u("playbackRates",G,e),u("metadata",W,e),u("extraSourceParams",q,e),u("_hlsConfig",Y,e),u("themeProps",j,e),u("castCustomData",J,e),u("paused",z,e,(s,y)=>{y!=null&&(y?s.pause():s.play())},(s,y,Q)=>s.hasAttribute("autoplay")&&!s.hasPlayed?!1:p(s,y,Q)),u("currentTime",Z,e,(s,y)=>{y!=null&&(s.currentTime=y)}),r("abort",e,n),r("canplay",e,o),r("canplaythrough",e,a),r("emptied",e,l),r("loadstart",e,i),r("loadeddata",e,c),r("loadedmetadata",e,v),r("progress",e,R),r("durationchange",e,T),r("volumechange",e,h),r("ratechange",e,b),r("resize",e,C),r("waiting",e,k),r("play",e,O),r("playing",e,S),r("timeupdate",e,w),r("pause",e,N),r("seeking",e,L),r("seeked",e,A),r("stalled",e,I),r("suspend",e,_),r("ended",e,K),r("error",e,H),r("cuepointchange",e,D),r("chapterchange",e,V),[$]},de=g(),fe="mux-player-react",ge=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((e,t)=>{var i;let n=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),o=f(n,t),[a]=xe(n,e),[l]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)((i=e.playerInitTime)!=null?i:(0,_mux_playback_core__WEBPACK_IMPORTED_MODULE_1__.generatePlayerInitTime)());return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Pe,{ref:o,defaultHiddenCaptions:e.defaultHiddenCaptions,playerSoftwareName:fe,playerSoftwareVersion:de,playerInitTime:l,...a})}),ze=ge;
17
+ "use client";var M=parseInt(react__WEBPACK_IMPORTED_MODULE_0__["default"].version)>=19,E={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},B=e=>e==null,ee=(e,t)=>B(t)?!1:e in t,te=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),ne=(e,t)=>{if(!(!M&&typeof t=="boolean"&&!t)){if(ee(e,E))return E[e];if(typeof t!="undefined")return/[A-Z]/.test(e)?te(e):e}};var ae=(e,t)=>!M&&typeof e=="boolean"?"":e,P=(e={})=>{let{ref:t,...n}=e;return Object.entries(n).reduce((o,[a,l])=>{let i=ne(a,l);if(!i)return o;let c=ae(l,a);return o[i]=c,o},{})};function x(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function re(...e){return t=>{let n=!1,o=e.map(a=>{let l=x(a,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let a=0;a<o.length;a++){let l=o[a];typeof l=="function"?l():x(e[a],null)}}}}function f(...e){return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(re(...e),e)}var oe=Object.prototype.hasOwnProperty,ue=(e,t)=>{if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.some((a,l)=>t[l]===a);let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let a=0;a<n.length;a++)if(!oe.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0},p=(e,t,n)=>!ue(t,e[n]),se=(e,t,n)=>{e[n]=t},ie=(e,t,n,o=se,a=p)=>(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{let l=n==null?void 0:n.current;l&&a(l,t,e)&&o(l,t,e)},[n==null?void 0:n.current,t]),u=ie;var ye=()=>{try{return"3.8.0"}catch{}return"UNKNOWN"},me=ye(),g=()=>me;var r=(e,t,n)=>(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{let o=t==null?void 0:t.current;if(!o||!n)return;let a=e,l=n;return o.addEventListener(a,l),()=>{o.removeEventListener(a,l)}},[t==null?void 0:t.current,n,e]);var Pe=react__WEBPACK_IMPORTED_MODULE_0__["default"].forwardRef(({children:e,...t},n)=>react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement("mux-player",{suppressHydrationWarning:!0,...P(t),ref:n},e)),xe=(e,t)=>{let{onAbort:n,onCanPlay:o,onCanPlayThrough:a,onEmptied:l,onLoadStart:i,onLoadedData:c,onLoadedMetadata:v,onProgress:R,onDurationChange:T,onVolumeChange:h,onRateChange:b,onResize:C,onWaiting:k,onPlay:O,onPlaying:S,onTimeUpdate:w,onPause:N,onSeeking:L,onSeeked:A,onStalled:I,onSuspend:_,onEnded:K,onError:H,onCuePointChange:D,onChapterChange:V,metadata:W,tokens:U,paused:z,playbackId:F,playbackRates:G,currentTime:Z,themeProps:j,extraSourceParams:q,castCustomData:J,_hlsConfig:Y,...$}=t;return u("tokens",U,e),u("playbackId",F,e),u("playbackRates",G,e),u("metadata",W,e),u("extraSourceParams",q,e),u("_hlsConfig",Y,e),u("themeProps",j,e),u("castCustomData",J,e),u("paused",z,e,(s,y)=>{y!=null&&(y?s.pause():s.play())},(s,y,Q)=>s.hasAttribute("autoplay")&&!s.hasPlayed?!1:p(s,y,Q)),u("currentTime",Z,e,(s,y)=>{y!=null&&(s.currentTime=y)}),r("abort",e,n),r("canplay",e,o),r("canplaythrough",e,a),r("emptied",e,l),r("loadstart",e,i),r("loadeddata",e,c),r("loadedmetadata",e,v),r("progress",e,R),r("durationchange",e,T),r("volumechange",e,h),r("ratechange",e,b),r("resize",e,C),r("waiting",e,k),r("play",e,O),r("playing",e,S),r("timeupdate",e,w),r("pause",e,N),r("seeking",e,L),r("seeked",e,A),r("stalled",e,I),r("suspend",e,_),r("ended",e,K),r("error",e,H),r("cuepointchange",e,D),r("chapterchange",e,V),[$]},de=g(),fe="mux-player-react",ge=react__WEBPACK_IMPORTED_MODULE_0__["default"].forwardRef((e,t)=>{var i;let n=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),o=f(n,t),[a]=xe(n,e),[l]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)((i=e.playerInitTime)!=null?i:(0,_mux_playback_core__WEBPACK_IMPORTED_MODULE_1__.generatePlayerInitTime)());return react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(Pe,{ref:o,defaultHiddenCaptions:e.defaultHiddenCaptions,playerSoftwareName:fe,playerSoftwareVersion:de,playerInitTime:l,...a})}),ze=ge;
19
18
  //# sourceMappingURL=index.mjs.map
20
19
 
21
20
 
@@ -16072,5 +16071,5 @@ var Yr=Object.create;var ft=Object.defineProperty;var Xr=Object.getOwnPropertyDe
16072
16071
 
16073
16072
  }),
16074
16073
 
16075
- }]);
16074
+ }])
16076
16075
  //# sourceMappingURL=reactPlayerMux.js.map