import { MediaAttachMixin } from "../../store/media-attach-mixin.js";
import { HlsCustomMedia } from "@videojs/core/dom/media/hls";

//#region src/media/hls-video/index.ts
var HlsVideo = class extends MediaAttachMixin(HlsCustomMedia) {
	static getTemplateHTML(attrs) {
		const { src, ...rest } = attrs;
		return super.getTemplateHTML(rest);
	}
	constructor() {
		super();
		this.attach(this.target);
	}
	attributeChangedCallback(attrName, oldValue, newValue) {
		if (attrName !== "src") super.attributeChangedCallback(attrName, oldValue, newValue);
		if (attrName === "src" && oldValue !== newValue) this.src = newValue ?? "";
	}
	disconnectedCallback() {
		super.disconnectedCallback?.();
		if (!this.hasAttribute("keep-alive")) this.destroy();
	}
};

//#endregion
export { HlsVideo };
//# sourceMappingURL=index.js.map