@videojs/html 10.0.0-beta.14 → 10.0.0-beta.15
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/cdn/audio-minimal-ui.dev.js +3 -3
- package/cdn/audio-minimal-ui.js +1 -1
- package/cdn/audio-minimal.dev.js +4 -4
- package/cdn/audio-minimal.js +1 -1
- package/cdn/audio-ui.dev.js +3 -3
- package/cdn/audio-ui.js +1 -1
- package/cdn/audio.dev.js +4 -4
- package/cdn/audio.js +1 -1
- package/cdn/background.dev.js +1 -1
- package/cdn/background.js +1 -1
- package/cdn/{create-player-DSGjDLpM.js → create-player-BqU8r8H4.js} +2 -2
- package/cdn/{create-player-DSGjDLpM.js.map → create-player-BqU8r8H4.js.map} +1 -1
- package/cdn/{create-player-Cz5Y4DmL.js → create-player-p9xCO0yC.js} +4 -4
- package/cdn/{create-player-Cz5Y4DmL.js.map → create-player-p9xCO0yC.js.map} +1 -1
- package/cdn/{hls-A02jAc_G.js → hls-26YJVjvD.js} +3 -3
- package/cdn/hls-26YJVjvD.js.map +1 -0
- package/cdn/{hls-DwNUcXDb.js → hls-BriQI4q1.js} +45 -4
- package/cdn/hls-BriQI4q1.js.map +1 -0
- package/cdn/media/dash-video.dev.js +1 -1
- package/cdn/media/dash-video.js +1 -1
- package/cdn/media/hls-video.dev.js +3 -3
- package/cdn/media/hls-video.js +1 -1
- package/cdn/media/mux-video.dev.js +4 -4
- package/cdn/media/mux-video.dev.js.map +1 -1
- package/cdn/media/mux-video.js +1 -1
- package/cdn/media/mux-video.js.map +1 -1
- package/cdn/media/native-hls-video.dev.js +2 -2
- package/cdn/media/native-hls-video.js +1 -1
- package/cdn/media/simple-hls-video.dev.js +1 -1
- package/cdn/media/simple-hls-video.js +1 -1
- package/cdn/{media-props-mixin-CmboksUe.js → media-props-mixin-Bd_N2HWy.js} +2 -2
- package/cdn/media-props-mixin-Bd_N2HWy.js.map +1 -0
- package/cdn/{media-props-mixin-CNJVvHAH.js → media-props-mixin-Dc5dpCV4.js} +9 -2
- package/cdn/media-props-mixin-Dc5dpCV4.js.map +1 -0
- package/cdn/{native-hls-Db2TurPW.js → native-hls-CjRvSXAJ.js} +2 -2
- package/cdn/{native-hls-Db2TurPW.js.map → native-hls-CjRvSXAJ.js.map} +1 -1
- package/cdn/{native-hls-CPgjPTAQ.js → native-hls-D2rfyyyW.js} +2 -2
- package/cdn/{native-hls-CPgjPTAQ.js.map → native-hls-D2rfyyyW.js.map} +1 -1
- package/cdn/{player-DlGhe0FD.js → player-Cz9-_j7J.js} +2 -2
- package/cdn/{player-DlGhe0FD.js.map → player-Cz9-_j7J.js.map} +1 -1
- package/cdn/{player-XArb4DyB.js → player-D0bhjT8X.js} +2 -2
- package/cdn/{player-XArb4DyB.js.map → player-D0bhjT8X.js.map} +1 -1
- package/cdn/{poster-Crn2YX3_.js → poster-2FPYTjyv.js} +2 -2
- package/cdn/{poster-Crn2YX3_.js.map → poster-2FPYTjyv.js.map} +1 -1
- package/cdn/{poster-BUuGv2Va.js → poster-gVT-J1-z.js} +3 -3
- package/cdn/{poster-BUuGv2Va.js.map → poster-gVT-J1-z.js.map} +1 -1
- package/cdn/{skin-element-Dk_f7DE8.js → skin-element-DB-cKAAx.js} +2 -2
- package/cdn/{skin-element-Dk_f7DE8.js.map → skin-element-DB-cKAAx.js.map} +1 -1
- package/cdn/{skin-element-D40glySA.js → skin-element-zakTHELS.js} +2 -2
- package/cdn/{skin-element-D40glySA.js.map → skin-element-zakTHELS.js.map} +1 -1
- package/cdn/video-minimal-ui.dev.js +3 -3
- package/cdn/video-minimal-ui.js +1 -1
- package/cdn/video-minimal.dev.js +4 -4
- package/cdn/video-minimal.js +1 -1
- package/cdn/video-ui.dev.js +3 -3
- package/cdn/video-ui.js +1 -1
- package/cdn/video.dev.js +4 -4
- package/cdn/video.js +1 -1
- package/cdn/{volume-slider-CxGbFVVX.js → volume-slider-Co5X4Z1t.js} +2 -2
- package/cdn/{volume-slider-CxGbFVVX.js.map → volume-slider-Co5X4Z1t.js.map} +1 -1
- package/cdn/{volume-slider-BSbnD5gg.js → volume-slider-D18sXnIA.js} +2 -2
- package/cdn/{volume-slider-BSbnD5gg.js.map → volume-slider-D18sXnIA.js.map} +1 -1
- package/package.json +8 -8
- package/cdn/hls-A02jAc_G.js.map +0 -1
- package/cdn/hls-DwNUcXDb.js.map +0 -1
- package/cdn/media-props-mixin-CNJVvHAH.js.map +0 -1
- package/cdn/media-props-mixin-CmboksUe.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-props-mixin-CNJVvHAH.js","names":["#isDefined","#propsToAttrs","#define","#init","#target","#isInit","#upgradeProperty","#childObserver","#syncMediaChildAttribute","#syncMediaChildren","#deferForwardEvent","#forwardEvent","#childMap","#forwardAttribute"],"sources":["../../core/dist/dev/dom/media/custom-media-element/index.js","../src/utils/media-props-mixin.ts"],"sourcesContent":["//#region src/dom/media/custom-media-element/index.ts\n/**\n* Custom Media Element\n* Based on https://github.com/muxinc/custom-video-element - Mux - MIT License\n*\n* The goal is to create an element that works just like the video element\n* but can be extended/sub-classed, because native elements cannot be\n* extended today across browsers.\n*/\nconst Events = [\n\t\"abort\",\n\t\"canplay\",\n\t\"canplaythrough\",\n\t\"durationchange\",\n\t\"emptied\",\n\t\"encrypted\",\n\t\"ended\",\n\t\"error\",\n\t\"loadeddata\",\n\t\"loadedmetadata\",\n\t\"loadstart\",\n\t\"pause\",\n\t\"play\",\n\t\"playing\",\n\t\"progress\",\n\t\"ratechange\",\n\t\"seeked\",\n\t\"seeking\",\n\t\"stalled\",\n\t\"suspend\",\n\t\"timeupdate\",\n\t\"volumechange\",\n\t\"waiting\",\n\t\"waitingforkey\",\n\t\"resize\",\n\t\"enterpictureinpicture\",\n\t\"leavepictureinpicture\",\n\t\"webkitbeginfullscreen\",\n\t\"webkitendfullscreen\",\n\t\"webkitpresentationmodechanged\"\n];\nconst Attributes = [\n\t\"autopictureinpicture\",\n\t\"disablepictureinpicture\",\n\t\"disableremoteplayback\",\n\t\"autoplay\",\n\t\"controls\",\n\t\"controlslist\",\n\t\"crossorigin\",\n\t\"loop\",\n\t\"muted\",\n\t\"playsinline\",\n\t\"poster\",\n\t\"preload\",\n\t\"src\"\n];\n/**\n* Helper function to generate the HTML template for audio elements.\n*/\nfunction getAudioTemplateHTML(attrs) {\n\treturn `\n <style>\n :host {\n display: inline-flex;\n line-height: 0;\n flex-direction: column;\n justify-content: end;\n }\n\n audio {\n width: 100%;\n }\n </style>\n <slot name=\"media\">\n <audio${serializeAttributes(attrs)}></audio>\n </slot>\n <slot></slot>\n `;\n}\n/**\n* Helper function to generate the HTML template for video elements.\n*/\nfunction getVideoTemplateHTML(attrs) {\n\treturn `\n <style>\n :host {\n display: contents;\n }\n\n video {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: var(--media-video-border-radius);\n object-fit: var(--media-object-fit, contain);\n object-position: var(--media-object-position, center);\n }\n\n video::-webkit-media-text-track-container {\n transition: translate var(--media-caption-track-duration, 0) ease-out;\n transition-delay: var(--media-caption-track-delay, 0);\n translate: 0 var(--media-caption-track-y, 0);\n scale: 0.98;\n z-index: 1;\n font-family: inherit;\n }\n </style>\n <slot name=\"media\">\n <video${serializeAttributes(attrs)}></video>\n </slot>\n <slot></slot>\n `;\n}\nfunction CustomMediaMixin(superclass, { tag, is }) {\n\tconst nativeElTest = globalThis.document?.createElement?.(tag, { is });\n\tconst nativeElProps = nativeElTest ? getNativeElProps(nativeElTest) : [];\n\treturn class CustomMedia extends superclass {\n\t\tstatic getTemplateHTML = tag.endsWith(\"audio\") ? getAudioTemplateHTML : getVideoTemplateHTML;\n\t\tstatic shadowRootOptions = { mode: \"open\" };\n\t\tstatic Events = Events;\n\t\tstatic #isDefined = false;\n\t\tstatic #propsToAttrs;\n\t\tstatic get observedAttributes() {\n\t\t\tCustomMedia.#define();\n\t\t\treturn [...nativeElTest?.constructor?.observedAttributes ?? [], ...Attributes];\n\t\t}\n\t\tstatic #define() {\n\t\t\tif (CustomMedia.#isDefined) return;\n\t\t\tCustomMedia.#isDefined = true;\n\t\t\tCustomMedia.#propsToAttrs = new Set(CustomMedia.observedAttributes);\n\t\t\tCustomMedia.#propsToAttrs.delete(\"muted\");\n\t\t\tfor (const prop of nativeElProps) {\n\t\t\t\tif (prop in CustomMedia.prototype) continue;\n\t\t\t\tif (typeof nativeElTest[prop] === \"function\") CustomMedia.prototype[prop] = function(...args) {\n\t\t\t\t\tthis.#init();\n\t\t\t\t\treturn this.call(prop, ...args);\n\t\t\t\t};\n\t\t\t\telse {\n\t\t\t\t\tconst config = { get() {\n\t\t\t\t\t\tthis.#init();\n\t\t\t\t\t\treturn this.get(prop);\n\t\t\t\t\t} };\n\t\t\t\t\tif (prop !== prop.toUpperCase()) config.set = function(val) {\n\t\t\t\t\t\tthis.#init();\n\t\t\t\t\t\tthis.set(prop, val);\n\t\t\t\t\t};\n\t\t\t\t\tObject.defineProperty(CustomMedia.prototype, prop, config);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t#isInit = false;\n\t\t#target = null;\n\t\t#childMap = /* @__PURE__ */ new Map();\n\t\t#childObserver;\n\t\tget(prop) {\n\t\t\tconst attr = prop.toLowerCase();\n\t\t\tif (CustomMedia.#propsToAttrs.has(attr)) {\n\t\t\t\tconst val = this.getAttribute(attr);\n\t\t\t\treturn val === null ? false : val === \"\" ? true : val;\n\t\t\t}\n\t\t\treturn this.target?.[prop];\n\t\t}\n\t\tset(prop, val) {\n\t\t\tconst attr = prop.toLowerCase();\n\t\t\tif (CustomMedia.#propsToAttrs.has(attr)) {\n\t\t\t\tif (val === true || val === false || val == null) this.toggleAttribute(attr, Boolean(val));\n\t\t\t\telse this.setAttribute(attr, val);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.target) this.target[prop] = val;\n\t\t}\n\t\tcall(prop, ...args) {\n\t\t\treturn (this.target?.[prop])?.apply(this.target, args);\n\t\t}\n\t\tget target() {\n\t\t\tthis.#init();\n\t\t\treturn this.#target ?? this.querySelector(\":scope > [slot=media]\") ?? this.querySelector(tag) ?? this.shadowRoot?.querySelector(tag) ?? null;\n\t\t}\n\t\tset target(val) {\n\t\t\tthis.#target = val;\n\t\t}\n\t\tget defaultMuted() {\n\t\t\tthis.#init();\n\t\t\treturn this.get(\"muted\");\n\t\t}\n\t\tset defaultMuted(val) {\n\t\t\tthis.#init();\n\t\t\tthis.set(\"muted\", val);\n\t\t}\n\t\t#init() {\n\t\t\tif (this.#isInit) return;\n\t\t\tthis.#isInit = true;\n\t\t\tthis.init();\n\t\t}\n\t\tinit() {\n\t\t\tif (!this.shadowRoot) {\n\t\t\t\tthis.attachShadow({ mode: \"open\" });\n\t\t\t\tconst attrs = namedNodeMapToObject(this.attributes);\n\t\t\t\tif (is) attrs.is = is;\n\t\t\t\tif (tag) attrs.part = tag;\n\t\t\t\tthis.shadowRoot.innerHTML = this.constructor.getTemplateHTML(attrs);\n\t\t\t}\n\t\t\tthis.target.muted = this.hasAttribute(\"muted\");\n\t\t\tfor (const prop of nativeElProps) this.#upgradeProperty(prop);\n\t\t\tthis.#childObserver = new MutationObserver(this.#syncMediaChildAttribute.bind(this));\n\t\t\tthis.shadowRoot.addEventListener(\"slotchange\", () => this.#syncMediaChildren());\n\t\t\tthis.#syncMediaChildren();\n\t\t\tfor (const type of this.constructor.Events) this.shadowRoot.addEventListener(type, this.#deferForwardEvent, true);\n\t\t}\n\t\t#deferForwardEvent = (event) => {\n\t\t\tif (this.target && this.target === event.target) this.target.addEventListener(event.type, this.#forwardEvent, { once: true });\n\t\t};\n\t\t#forwardEvent = (event) => {\n\t\t\tthis.dispatchEvent(new event.constructor(event.type, event));\n\t\t};\n\t\t#syncMediaChildren() {\n\t\t\tconst removeNativeChildren = new Map(this.#childMap);\n\t\t\t((this.shadowRoot?.querySelector(\"slot:not([name])\"))?.assignedElements({ flatten: true }).filter((el) => [\"track\", \"source\"].includes(el.localName))).forEach((el) => {\n\t\t\t\tremoveNativeChildren.delete(el);\n\t\t\t\tlet clone = this.#childMap.get(el);\n\t\t\t\tif (!clone) {\n\t\t\t\t\tclone = el.cloneNode();\n\t\t\t\t\tthis.#childMap.set(el, clone);\n\t\t\t\t\tthis.#childObserver?.observe(el, { attributes: true });\n\t\t\t\t}\n\t\t\t\tthis.target?.append(clone);\n\t\t\t});\n\t\t\tremoveNativeChildren.forEach((clone, el) => {\n\t\t\t\tclone.remove();\n\t\t\t\tthis.#childMap.delete(el);\n\t\t\t});\n\t\t}\n\t\t#syncMediaChildAttribute(mutations) {\n\t\t\tfor (const mutation of mutations) if (mutation.type === \"attributes\") {\n\t\t\t\tconst { target, attributeName } = mutation;\n\t\t\t\tconst clone = this.#childMap.get(target);\n\t\t\t\tif (clone && attributeName) clone.setAttribute(attributeName, target.getAttribute(attributeName) ?? \"\");\n\t\t\t}\n\t\t}\n\t\t#upgradeProperty(prop) {\n\t\t\tif (Object.hasOwn(this, prop)) {\n\t\t\t\tconst value = this[prop];\n\t\t\t\tdelete this[prop];\n\t\t\t\tthis[prop] = value;\n\t\t\t}\n\t\t}\n\t\tattributeChangedCallback(attrName, oldValue, newValue) {\n\t\t\tthis.#init();\n\t\t\tthis.#forwardAttribute(attrName, oldValue, newValue);\n\t\t}\n\t\t#forwardAttribute(attrName, _oldValue, newValue) {\n\t\t\tif ([\"id\", \"class\"].includes(attrName)) return;\n\t\t\tif (!CustomMedia.observedAttributes.includes(attrName) && this.constructor.observedAttributes.includes(attrName)) return;\n\t\t\tif (newValue === null) this.target?.removeAttribute(attrName);\n\t\t\telse if (this.target?.getAttribute(attrName) !== newValue) this.target?.setAttribute(attrName, newValue);\n\t\t}\n\t\tconnectedCallback() {\n\t\t\tthis.#init();\n\t\t}\n\t};\n}\n/**\n* Helper function to get all properties from a native media element's prototype.\n*/\nfunction getNativeElProps(nativeElTest) {\n\tconst nativeElProps = [];\n\tfor (let proto = Object.getPrototypeOf(nativeElTest); proto && proto !== HTMLElement.prototype; proto = Object.getPrototypeOf(proto)) {\n\t\tconst props = Object.getOwnPropertyNames(proto);\n\t\tnativeElProps.push(...props);\n\t}\n\treturn nativeElProps;\n}\n/**\n* Helper function to serialize attributes into a string.\n*/\nfunction serializeAttributes(attrs) {\n\tlet html = \"\";\n\tfor (const key in attrs) {\n\t\tif (!Attributes.includes(key)) continue;\n\t\tconst value = attrs[key];\n\t\tif (value === \"\") html += ` ${key}`;\n\t\telse html += ` ${key}=\"${value}\"`;\n\t}\n\treturn html;\n}\n/**\n* Helper function to convert NamedNodeMap to a plain object.\n*/\nfunction namedNodeMapToObject(namedNodeMap) {\n\tconst obj = {};\n\tfor (const attr of namedNodeMap) obj[attr.name] = attr.value;\n\treturn obj;\n}\nconst CustomVideoElement = CustomMediaMixin(globalThis.HTMLElement ?? class {}, { tag: \"video\" });\nconst CustomAudioElement = CustomMediaMixin(globalThis.HTMLElement ?? class {}, { tag: \"audio\" });\n//#endregion\nexport { Attributes, CustomAudioElement, CustomMediaMixin, CustomVideoElement, Events };\n\n//# sourceMappingURL=index.js.map","import type { AnyConstructor } from '@videojs/utils/types';\n\ntype AnyClass = abstract new (...args: any[]) => any;\n\nfunction camelToKebab(str: string): string {\n return str.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);\n}\n\nfunction buildAttrPropMap(DelegateClass: AnyClass): Map<string, string> {\n const map = new Map<string, string>();\n for (let proto = DelegateClass.prototype; proto && proto !== Object.prototype; proto = Object.getPrototypeOf(proto)) {\n for (const key of Object.getOwnPropertyNames(proto)) {\n if (key.startsWith('_')) continue;\n const desc = Object.getOwnPropertyDescriptor(proto, key);\n if (desc?.set) map.set(camelToKebab(key), key);\n }\n }\n return map;\n}\n\n/**\n * Mixin that intercepts `getTemplateHTML` and `attributeChangedCallback` to\n * handle delegate-owned properties. Delegate props are stripped from template\n * HTML attrs and routed through the property setter in `attributeChangedCallback`\n * instead of being forwarded to the inner native element.\n */\nexport function MediaPropsMixin<Base extends AnyConstructor<HTMLElement>>(\n BaseClass: Base,\n DelegateClass: AnyClass\n): Base {\n const attrToProp = buildAttrPropMap(DelegateClass);\n\n class MediaPropsElement extends (BaseClass as any) {\n static get observedAttributes(): string[] {\n // biome-ignore lint/complexity/noThisInStatic: intentional use of super\n return [...new Set([...(super.observedAttributes ?? []), ...attrToProp.keys()])];\n }\n\n static getTemplateHTML(attrs: Record<string, string>): string {\n const filtered = { ...attrs };\n for (const attr of attrToProp.keys()) {\n delete filtered[attr];\n }\n // biome-ignore lint/complexity/noThisInStatic: intentional use of super\n return super.getTemplateHTML(filtered);\n }\n\n attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string | null): void {\n const prop = attrToProp.get(attrName);\n if (prop) {\n if (oldValue !== newValue) {\n (this as any)[prop] = typeof (this as any)[prop] === 'boolean' ? newValue !== null : (newValue ?? '');\n }\n return;\n }\n\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n }\n }\n\n return MediaPropsElement as unknown as Base;\n}\n"],"mappings":";;;;;;;;;AASA,MAAM,SAAS;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,aAAa;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;AAID,SAAS,qBAAqB,OAAO;AACpC,QAAO;;;;;;;;;;;;;;cAcM,oBAAoB,MAAM,CAAC;;;;;;;;AAQzC,SAAS,qBAAqB,OAAO;AACpC,QAAO;;;;;;;;;;;;;;;;;;;;;;;;;cAyBM,oBAAoB,MAAM,CAAC;;;;;AAKzC,SAAS,iBAAiB,YAAY,EAAE,KAAK,MAAM;CAClD,MAAM,eAAe,WAAW,UAAU,gBAAgB,KAAK,EAAE,IAAI,CAAC;CACtE,MAAM,gBAAgB,eAAe,iBAAiB,aAAa,GAAG,EAAE;AACxE,QAAO,MAAM,oBAAoB,WAAW;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,iBAAiB,eAA8C;CACtE,MAAM,sBAAM,IAAI,KAAqB;AACrC,MAAK,IAAI,QAAQ,cAAc,WAAW,SAAS,UAAU,OAAO,WAAW,QAAQ,OAAO,eAAe,MAAM,CACjH,MAAK,MAAM,OAAO,OAAO,oBAAoB,MAAM,EAAE;AACnD,MAAI,IAAI,WAAW,IAAI,CAAE;AAEzB,MADa,OAAO,yBAAyB,OAAO,IAAI,EAC9C,IAAK,KAAI,IAAI,aAAa,IAAI,EAAE,IAAI;;AAGlD,QAAO;;;;;;;;AAST,SAAgB,gBACd,WACA,eACM;CACN,MAAM,aAAa,iBAAiB,cAAc;CAElD,MAAM,0BAA2B,UAAkB;EACjD,WAAW,qBAA+B;AAExC,UAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAI,MAAM,sBAAsB,EAAE,EAAG,GAAG,WAAW,MAAM,CAAC,CAAC,CAAC;;EAGlF,OAAO,gBAAgB,OAAuC;GAC5D,MAAM,WAAW,EAAE,GAAG,OAAO;AAC7B,QAAK,MAAM,QAAQ,WAAW,MAAM,CAClC,QAAO,SAAS;AAGlB,UAAO,MAAM,gBAAgB,SAAS;;EAGxC,yBAAyB,UAAkB,UAAyB,UAA+B;GACjG,MAAM,OAAO,WAAW,IAAI,SAAS;AACrC,OAAI,MAAM;AACR,QAAI,aAAa,SACf,CAAC,KAAa,QAAQ,OAAQ,KAAa,UAAU,YAAY,aAAa,OAAQ,YAAY;AAEpG;;AAGF,SAAM,2BAA2B,UAAU,UAAU,SAAS;;;AAIlE,QAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-props-mixin-CmboksUe.js","names":["#isDefined","#propsToAttrs","#define","#init","#target","#isInit","#upgradeProperty","#childObserver","#syncMediaChildAttribute","#syncMediaChildren","#deferForwardEvent","#forwardEvent","#childMap","#forwardAttribute"],"sources":["../../core/dist/default/dom/media/custom-media-element/index.js","../src/utils/media-props-mixin.ts"],"sourcesContent":["//#region src/dom/media/custom-media-element/index.ts\n/**\n* Custom Media Element\n* Based on https://github.com/muxinc/custom-video-element - Mux - MIT License\n*\n* The goal is to create an element that works just like the video element\n* but can be extended/sub-classed, because native elements cannot be\n* extended today across browsers.\n*/\nconst Events = [\n\t\"abort\",\n\t\"canplay\",\n\t\"canplaythrough\",\n\t\"durationchange\",\n\t\"emptied\",\n\t\"encrypted\",\n\t\"ended\",\n\t\"error\",\n\t\"loadeddata\",\n\t\"loadedmetadata\",\n\t\"loadstart\",\n\t\"pause\",\n\t\"play\",\n\t\"playing\",\n\t\"progress\",\n\t\"ratechange\",\n\t\"seeked\",\n\t\"seeking\",\n\t\"stalled\",\n\t\"suspend\",\n\t\"timeupdate\",\n\t\"volumechange\",\n\t\"waiting\",\n\t\"waitingforkey\",\n\t\"resize\",\n\t\"enterpictureinpicture\",\n\t\"leavepictureinpicture\",\n\t\"webkitbeginfullscreen\",\n\t\"webkitendfullscreen\",\n\t\"webkitpresentationmodechanged\"\n];\nconst Attributes = [\n\t\"autopictureinpicture\",\n\t\"disablepictureinpicture\",\n\t\"disableremoteplayback\",\n\t\"autoplay\",\n\t\"controls\",\n\t\"controlslist\",\n\t\"crossorigin\",\n\t\"loop\",\n\t\"muted\",\n\t\"playsinline\",\n\t\"poster\",\n\t\"preload\",\n\t\"src\"\n];\n/**\n* Helper function to generate the HTML template for audio elements.\n*/\nfunction getAudioTemplateHTML(attrs) {\n\treturn `\n <style>\n :host {\n display: inline-flex;\n line-height: 0;\n flex-direction: column;\n justify-content: end;\n }\n\n audio {\n width: 100%;\n }\n </style>\n <slot name=\"media\">\n <audio${serializeAttributes(attrs)}></audio>\n </slot>\n <slot></slot>\n `;\n}\n/**\n* Helper function to generate the HTML template for video elements.\n*/\nfunction getVideoTemplateHTML(attrs) {\n\treturn `\n <style>\n :host {\n display: contents;\n }\n\n video {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: var(--media-video-border-radius);\n object-fit: var(--media-object-fit, contain);\n object-position: var(--media-object-position, center);\n }\n\n video::-webkit-media-text-track-container {\n transition: translate var(--media-caption-track-duration, 0) ease-out;\n transition-delay: var(--media-caption-track-delay, 0);\n translate: 0 var(--media-caption-track-y, 0);\n scale: 0.98;\n z-index: 1;\n font-family: inherit;\n }\n </style>\n <slot name=\"media\">\n <video${serializeAttributes(attrs)}></video>\n </slot>\n <slot></slot>\n `;\n}\nfunction CustomMediaMixin(superclass, { tag, is }) {\n\tconst nativeElTest = globalThis.document?.createElement?.(tag, { is });\n\tconst nativeElProps = nativeElTest ? getNativeElProps(nativeElTest) : [];\n\treturn class CustomMedia extends superclass {\n\t\tstatic getTemplateHTML = tag.endsWith(\"audio\") ? getAudioTemplateHTML : getVideoTemplateHTML;\n\t\tstatic shadowRootOptions = { mode: \"open\" };\n\t\tstatic Events = Events;\n\t\tstatic #isDefined = false;\n\t\tstatic #propsToAttrs;\n\t\tstatic get observedAttributes() {\n\t\t\tCustomMedia.#define();\n\t\t\treturn [...nativeElTest?.constructor?.observedAttributes ?? [], ...Attributes];\n\t\t}\n\t\tstatic #define() {\n\t\t\tif (CustomMedia.#isDefined) return;\n\t\t\tCustomMedia.#isDefined = true;\n\t\t\tCustomMedia.#propsToAttrs = new Set(CustomMedia.observedAttributes);\n\t\t\tCustomMedia.#propsToAttrs.delete(\"muted\");\n\t\t\tfor (const prop of nativeElProps) {\n\t\t\t\tif (prop in CustomMedia.prototype) continue;\n\t\t\t\tif (typeof nativeElTest[prop] === \"function\") CustomMedia.prototype[prop] = function(...args) {\n\t\t\t\t\tthis.#init();\n\t\t\t\t\treturn this.call(prop, ...args);\n\t\t\t\t};\n\t\t\t\telse {\n\t\t\t\t\tconst config = { get() {\n\t\t\t\t\t\tthis.#init();\n\t\t\t\t\t\treturn this.get(prop);\n\t\t\t\t\t} };\n\t\t\t\t\tif (prop !== prop.toUpperCase()) config.set = function(val) {\n\t\t\t\t\t\tthis.#init();\n\t\t\t\t\t\tthis.set(prop, val);\n\t\t\t\t\t};\n\t\t\t\t\tObject.defineProperty(CustomMedia.prototype, prop, config);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t#isInit = false;\n\t\t#target = null;\n\t\t#childMap = /* @__PURE__ */ new Map();\n\t\t#childObserver;\n\t\tget(prop) {\n\t\t\tconst attr = prop.toLowerCase();\n\t\t\tif (CustomMedia.#propsToAttrs.has(attr)) {\n\t\t\t\tconst val = this.getAttribute(attr);\n\t\t\t\treturn val === null ? false : val === \"\" ? true : val;\n\t\t\t}\n\t\t\treturn this.target?.[prop];\n\t\t}\n\t\tset(prop, val) {\n\t\t\tconst attr = prop.toLowerCase();\n\t\t\tif (CustomMedia.#propsToAttrs.has(attr)) {\n\t\t\t\tif (val === true || val === false || val == null) this.toggleAttribute(attr, Boolean(val));\n\t\t\t\telse this.setAttribute(attr, val);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.target) this.target[prop] = val;\n\t\t}\n\t\tcall(prop, ...args) {\n\t\t\treturn (this.target?.[prop])?.apply(this.target, args);\n\t\t}\n\t\tget target() {\n\t\t\tthis.#init();\n\t\t\treturn this.#target ?? this.querySelector(\":scope > [slot=media]\") ?? this.querySelector(tag) ?? this.shadowRoot?.querySelector(tag) ?? null;\n\t\t}\n\t\tset target(val) {\n\t\t\tthis.#target = val;\n\t\t}\n\t\tget defaultMuted() {\n\t\t\tthis.#init();\n\t\t\treturn this.get(\"muted\");\n\t\t}\n\t\tset defaultMuted(val) {\n\t\t\tthis.#init();\n\t\t\tthis.set(\"muted\", val);\n\t\t}\n\t\t#init() {\n\t\t\tif (this.#isInit) return;\n\t\t\tthis.#isInit = true;\n\t\t\tthis.init();\n\t\t}\n\t\tinit() {\n\t\t\tif (!this.shadowRoot) {\n\t\t\t\tthis.attachShadow({ mode: \"open\" });\n\t\t\t\tconst attrs = namedNodeMapToObject(this.attributes);\n\t\t\t\tif (is) attrs.is = is;\n\t\t\t\tif (tag) attrs.part = tag;\n\t\t\t\tthis.shadowRoot.innerHTML = this.constructor.getTemplateHTML(attrs);\n\t\t\t}\n\t\t\tthis.target.muted = this.hasAttribute(\"muted\");\n\t\t\tfor (const prop of nativeElProps) this.#upgradeProperty(prop);\n\t\t\tthis.#childObserver = new MutationObserver(this.#syncMediaChildAttribute.bind(this));\n\t\t\tthis.shadowRoot.addEventListener(\"slotchange\", () => this.#syncMediaChildren());\n\t\t\tthis.#syncMediaChildren();\n\t\t\tfor (const type of this.constructor.Events) this.shadowRoot.addEventListener(type, this.#deferForwardEvent, true);\n\t\t}\n\t\t#deferForwardEvent = (event) => {\n\t\t\tif (this.target && this.target === event.target) this.target.addEventListener(event.type, this.#forwardEvent, { once: true });\n\t\t};\n\t\t#forwardEvent = (event) => {\n\t\t\tthis.dispatchEvent(new event.constructor(event.type, event));\n\t\t};\n\t\t#syncMediaChildren() {\n\t\t\tconst removeNativeChildren = new Map(this.#childMap);\n\t\t\t((this.shadowRoot?.querySelector(\"slot:not([name])\"))?.assignedElements({ flatten: true }).filter((el) => [\"track\", \"source\"].includes(el.localName))).forEach((el) => {\n\t\t\t\tremoveNativeChildren.delete(el);\n\t\t\t\tlet clone = this.#childMap.get(el);\n\t\t\t\tif (!clone) {\n\t\t\t\t\tclone = el.cloneNode();\n\t\t\t\t\tthis.#childMap.set(el, clone);\n\t\t\t\t\tthis.#childObserver?.observe(el, { attributes: true });\n\t\t\t\t}\n\t\t\t\tthis.target?.append(clone);\n\t\t\t});\n\t\t\tremoveNativeChildren.forEach((clone, el) => {\n\t\t\t\tclone.remove();\n\t\t\t\tthis.#childMap.delete(el);\n\t\t\t});\n\t\t}\n\t\t#syncMediaChildAttribute(mutations) {\n\t\t\tfor (const mutation of mutations) if (mutation.type === \"attributes\") {\n\t\t\t\tconst { target, attributeName } = mutation;\n\t\t\t\tconst clone = this.#childMap.get(target);\n\t\t\t\tif (clone && attributeName) clone.setAttribute(attributeName, target.getAttribute(attributeName) ?? \"\");\n\t\t\t}\n\t\t}\n\t\t#upgradeProperty(prop) {\n\t\t\tif (Object.hasOwn(this, prop)) {\n\t\t\t\tconst value = this[prop];\n\t\t\t\tdelete this[prop];\n\t\t\t\tthis[prop] = value;\n\t\t\t}\n\t\t}\n\t\tattributeChangedCallback(attrName, oldValue, newValue) {\n\t\t\tthis.#init();\n\t\t\tthis.#forwardAttribute(attrName, oldValue, newValue);\n\t\t}\n\t\t#forwardAttribute(attrName, _oldValue, newValue) {\n\t\t\tif ([\"id\", \"class\"].includes(attrName)) return;\n\t\t\tif (!CustomMedia.observedAttributes.includes(attrName) && this.constructor.observedAttributes.includes(attrName)) return;\n\t\t\tif (newValue === null) this.target?.removeAttribute(attrName);\n\t\t\telse if (this.target?.getAttribute(attrName) !== newValue) this.target?.setAttribute(attrName, newValue);\n\t\t}\n\t\tconnectedCallback() {\n\t\t\tthis.#init();\n\t\t}\n\t};\n}\n/**\n* Helper function to get all properties from a native media element's prototype.\n*/\nfunction getNativeElProps(nativeElTest) {\n\tconst nativeElProps = [];\n\tfor (let proto = Object.getPrototypeOf(nativeElTest); proto && proto !== HTMLElement.prototype; proto = Object.getPrototypeOf(proto)) {\n\t\tconst props = Object.getOwnPropertyNames(proto);\n\t\tnativeElProps.push(...props);\n\t}\n\treturn nativeElProps;\n}\n/**\n* Helper function to serialize attributes into a string.\n*/\nfunction serializeAttributes(attrs) {\n\tlet html = \"\";\n\tfor (const key in attrs) {\n\t\tif (!Attributes.includes(key)) continue;\n\t\tconst value = attrs[key];\n\t\tif (value === \"\") html += ` ${key}`;\n\t\telse html += ` ${key}=\"${value}\"`;\n\t}\n\treturn html;\n}\n/**\n* Helper function to convert NamedNodeMap to a plain object.\n*/\nfunction namedNodeMapToObject(namedNodeMap) {\n\tconst obj = {};\n\tfor (const attr of namedNodeMap) obj[attr.name] = attr.value;\n\treturn obj;\n}\nconst CustomVideoElement = CustomMediaMixin(globalThis.HTMLElement ?? class {}, { tag: \"video\" });\nconst CustomAudioElement = CustomMediaMixin(globalThis.HTMLElement ?? class {}, { tag: \"audio\" });\n//#endregion\nexport { Attributes, CustomAudioElement, CustomMediaMixin, CustomVideoElement, Events };\n\n//# sourceMappingURL=index.js.map","import type { AnyConstructor } from '@videojs/utils/types';\n\ntype AnyClass = abstract new (...args: any[]) => any;\n\nfunction camelToKebab(str: string): string {\n return str.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);\n}\n\nfunction buildAttrPropMap(DelegateClass: AnyClass): Map<string, string> {\n const map = new Map<string, string>();\n for (let proto = DelegateClass.prototype; proto && proto !== Object.prototype; proto = Object.getPrototypeOf(proto)) {\n for (const key of Object.getOwnPropertyNames(proto)) {\n if (key.startsWith('_')) continue;\n const desc = Object.getOwnPropertyDescriptor(proto, key);\n if (desc?.set) map.set(camelToKebab(key), key);\n }\n }\n return map;\n}\n\n/**\n * Mixin that intercepts `getTemplateHTML` and `attributeChangedCallback` to\n * handle delegate-owned properties. Delegate props are stripped from template\n * HTML attrs and routed through the property setter in `attributeChangedCallback`\n * instead of being forwarded to the inner native element.\n */\nexport function MediaPropsMixin<Base extends AnyConstructor<HTMLElement>>(\n BaseClass: Base,\n DelegateClass: AnyClass\n): Base {\n const attrToProp = buildAttrPropMap(DelegateClass);\n\n class MediaPropsElement extends (BaseClass as any) {\n static get observedAttributes(): string[] {\n // biome-ignore lint/complexity/noThisInStatic: intentional use of super\n return [...new Set([...(super.observedAttributes ?? []), ...attrToProp.keys()])];\n }\n\n static getTemplateHTML(attrs: Record<string, string>): string {\n const filtered = { ...attrs };\n for (const attr of attrToProp.keys()) {\n delete filtered[attr];\n }\n // biome-ignore lint/complexity/noThisInStatic: intentional use of super\n return super.getTemplateHTML(filtered);\n }\n\n attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string | null): void {\n const prop = attrToProp.get(attrName);\n if (prop) {\n if (oldValue !== newValue) {\n (this as any)[prop] = typeof (this as any)[prop] === 'boolean' ? newValue !== null : (newValue ?? '');\n }\n return;\n }\n\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n }\n }\n\n return MediaPropsElement as unknown as Base;\n}\n"],"mappings":"AASA,MAAM,EA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