@videojs/html 10.0.0-beta.30 → 10.0.0-beta.31
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 +1 -1
- package/cdn/audio-minimal-ui.js +1 -1
- package/cdn/audio-minimal.dev.js +4 -4
- package/cdn/audio-minimal.dev.js.map +1 -1
- package/cdn/audio-minimal.js +1 -1
- package/cdn/audio-minimal.js.map +1 -1
- package/cdn/audio-player.dev.js +1 -0
- package/cdn/audio-player.js +1 -0
- package/cdn/audio-ui.dev.js +1 -1
- package/cdn/audio-ui.js +1 -1
- package/cdn/audio.dev.js +4 -4
- package/cdn/audio.dev.js.map +1 -1
- package/cdn/audio.js +1 -1
- package/cdn/audio.js.map +1 -1
- package/cdn/background.dev.js +1 -1
- package/cdn/background.js +1 -1
- package/cdn/{compounds-D1FPw7jg.js → compounds-BA8gXlmJ.js} +32 -188
- package/cdn/compounds-BA8gXlmJ.js.map +1 -0
- package/cdn/compounds-DKoFv2f8.js +8 -0
- package/cdn/compounds-DKoFv2f8.js.map +1 -0
- package/cdn/{create-player-5UrHNqBI.js → create-player-BEEc22xK.js} +18 -2
- package/cdn/{create-player-5UrHNqBI.js.map → create-player-BEEc22xK.js.map} +1 -1
- package/cdn/create-player-D5WQ_jzZ.js +2 -0
- package/cdn/{create-player-LjvbIxIq.js.map → create-player-D5WQ_jzZ.js.map} +1 -1
- package/cdn/{gesture-element-BbNy1Pjt.js → gesture-element-CxdagZOo.js} +2 -2
- package/cdn/{gesture-element-BbNy1Pjt.js.map → gesture-element-CxdagZOo.js.map} +1 -1
- package/cdn/{gesture-element-KdpjbbBD.js → gesture-element-x6kojUJk.js} +3 -3
- package/cdn/{gesture-element-KdpjbbBD.js.map → gesture-element-x6kojUJk.js.map} +1 -1
- package/cdn/i18n-CE4KxKuj.js.map +1 -1
- package/cdn/{i18n-DeI9j-ko.js → i18n-C_WyuIHd.js} +2 -2
- package/cdn/{i18n-DeI9j-ko.js.map → i18n-C_WyuIHd.js.map} +1 -1
- package/cdn/i18n-DyF_NfCk.js.map +1 -1
- package/cdn/i18n-o3_t8fxw.js +2 -0
- package/cdn/{i18n-R3TQ8P2f.js.map → i18n-o3_t8fxw.js.map} +1 -1
- package/cdn/live-audio-minimal-ui.dev.js +2 -0
- package/cdn/live-audio-minimal-ui.js +1 -0
- package/cdn/live-audio-minimal.dev.d.ts +1 -0
- package/cdn/live-audio-minimal.dev.js +97 -0
- package/cdn/live-audio-minimal.dev.js.map +1 -0
- package/cdn/live-audio-minimal.js +2 -0
- package/cdn/live-audio-minimal.js.map +1 -0
- package/cdn/live-audio-player.dev.d.ts +1 -0
- package/cdn/live-audio-player.dev.js +1 -0
- package/cdn/live-audio-player.js +1 -0
- package/cdn/live-audio-ui.dev.d.ts +1 -0
- package/cdn/live-audio-ui.dev.js +2 -0
- package/cdn/live-audio-ui.js +1 -0
- package/cdn/live-audio.dev.d.ts +1 -0
- package/cdn/live-audio.dev.js +97 -0
- package/cdn/live-audio.dev.js.map +1 -0
- package/cdn/live-audio.js +2 -0
- package/cdn/live-audio.js.map +1 -0
- package/cdn/{live-button-element-CylfQD0v.js → live-button-element-BFufqFFV.js} +3 -3
- package/cdn/{live-button-element-CylfQD0v.js.map → live-button-element-BFufqFFV.js.map} +1 -1
- package/cdn/live-button-element-CEbrR59d.js +2 -0
- package/cdn/{live-button-element-C-WypudK.js.map → live-button-element-CEbrR59d.js.map} +1 -1
- package/cdn/live-video-minimal-ui.dev.d.ts +1 -0
- package/cdn/live-video-minimal-ui.dev.js +2 -0
- package/cdn/live-video-minimal-ui.js +1 -0
- package/cdn/live-video-minimal.dev.js +5 -36
- package/cdn/live-video-minimal.dev.js.map +1 -1
- package/cdn/live-video-minimal.js +1 -1
- package/cdn/live-video-minimal.js.map +1 -1
- package/cdn/live-video-player.dev.d.ts +1 -0
- package/cdn/live-video-player.dev.js +1 -0
- package/cdn/live-video-player.js +1 -0
- package/cdn/live-video-ui.dev.d.ts +1 -0
- package/cdn/live-video-ui.dev.js +2 -0
- package/cdn/live-video-ui.js +1 -0
- package/cdn/live-video.dev.js +5 -38
- package/cdn/live-video.dev.js.map +1 -1
- package/cdn/live-video.js +1 -1
- package/cdn/live-video.js.map +1 -1
- package/cdn/media/hls-background-video.dev.js +1 -1
- package/cdn/media/hls-background-video.js +1 -1
- package/cdn/media/hls-background-video.js.map +1 -1
- package/cdn/media/mux-background-video.dev.js +1 -1
- package/cdn/media/mux-background-video.js +1 -1
- package/cdn/media/mux-background-video.js.map +1 -1
- package/cdn/media/mux-data.dev.js +1 -1
- package/cdn/media/mux-data.dev.js.map +1 -1
- package/cdn/media/mux-data.js +1 -1
- package/cdn/media/mux-data.js.map +1 -1
- package/cdn/{media-B4uT13xV.js → media-B4uT13xV2.js} +1 -1
- package/cdn/media-B4uT13xV2.js.map +1 -0
- package/cdn/{media-D6Xer97u.js → media-D6Xer97u2.js} +1 -1
- package/cdn/media-D6Xer97u2.js.map +1 -0
- package/cdn/minimal-ui-0eDc51VS.js +2 -0
- package/cdn/{minimal-ui-D3XCtSx_.js.map → minimal-ui-0eDc51VS.js.map} +1 -1
- package/cdn/minimal-ui-C2vRjwax.js +36 -0
- package/cdn/minimal-ui-C2vRjwax.js.map +1 -0
- package/cdn/{minimal-ui-ajeAXABk.js → minimal-ui-CLBGXvp5.js} +4 -4
- package/cdn/{minimal-ui-ajeAXABk.js.map → minimal-ui-CLBGXvp5.js.map} +1 -1
- package/cdn/minimal-ui-ClCvmIm4.js +2 -0
- package/cdn/minimal-ui-ClCvmIm4.js.map +1 -0
- package/cdn/minimal-ui-DDM48qb3.js +2 -0
- package/cdn/minimal-ui-DDM48qb3.js.map +1 -0
- package/cdn/minimal-ui-DY4C1zGt.js +23 -0
- package/cdn/minimal-ui-DY4C1zGt.js.map +1 -0
- package/cdn/{minimal-ui-KUzZkG_3.js → minimal-ui-Dk4_XLp4.js} +8 -8
- package/cdn/{minimal-ui-KUzZkG_3.js.map → minimal-ui-Dk4_XLp4.js.map} +1 -1
- package/cdn/{minimal-ui-p9QCZfCz.js → minimal-ui-JHiRECkp.js} +2 -2
- package/cdn/{minimal-ui-p9QCZfCz.js.map → minimal-ui-JHiRECkp.js.map} +1 -1
- package/cdn/{player-POHYt5tr.js → player-BGAk4zHP.js} +2 -2
- package/cdn/{player-POHYt5tr.js.map → player-BGAk4zHP.js.map} +1 -1
- package/cdn/{player-CngT-cVQ.js → player-Bb9oakYz.js} +2 -2
- package/cdn/{player-CngT-cVQ.js.map → player-Bb9oakYz.js.map} +1 -1
- package/cdn/{player-BXQMSpgR.js → player-BrlY19A2.js} +2 -2
- package/cdn/{player-BXQMSpgR.js.map → player-BrlY19A2.js.map} +1 -1
- package/cdn/{player-BuxifKSM.js → player-CQENs37B.js} +2 -2
- package/cdn/{player-BuxifKSM.js.map → player-CQENs37B.js.map} +1 -1
- package/cdn/player-DdOHaN9e.js +2 -0
- package/cdn/player-DdOHaN9e.js.map +1 -0
- package/cdn/{player-B5zkgqwT.js → player-DtcVc6sP.js} +2 -2
- package/cdn/{player-B5zkgqwT.js.map → player-DtcVc6sP.js.map} +1 -1
- package/cdn/{player-DMP2pc3L.js → player-bEUswOOg.js} +2 -2
- package/cdn/{player-DMP2pc3L.js.map → player-bEUswOOg.js.map} +1 -1
- package/cdn/player-qLOeas8M.js +18 -0
- package/cdn/player-qLOeas8M.js.map +1 -0
- package/cdn/poster-element-BA7p_OJL.js +2 -0
- package/cdn/{poster-element-Djlm5fwC.js.map → poster-element-BA7p_OJL.js.map} +1 -1
- package/cdn/{poster-element-CuCEBVr3.js → poster-element-BTynHaSW.js} +4 -3
- package/cdn/{poster-element-CuCEBVr3.js.map → poster-element-BTynHaSW.js.map} +1 -1
- package/cdn/radio-options-controller-Cz5yFvUh.js +138 -0
- package/cdn/radio-options-controller-Cz5yFvUh.js.map +1 -0
- package/cdn/radio-options-controller-hybHJkeC.js +2 -0
- package/cdn/radio-options-controller-hybHJkeC.js.map +1 -0
- package/cdn/seek-button-element-C4g3qPbc.js +2 -0
- package/cdn/{seek-button-element-CgaXVFPS.js.map → seek-button-element-C4g3qPbc.js.map} +1 -1
- package/cdn/{seek-button-element-BD2caCd5.js → seek-button-element-CirtfRSE.js} +4 -3
- package/cdn/seek-button-element-CirtfRSE.js.map +1 -0
- package/cdn/{skin-element-PDwjO4v0.js → skin-element-BF1a0EIj.js} +2 -2
- package/cdn/{skin-element-PDwjO4v0.js.map → skin-element-BF1a0EIj.js.map} +1 -1
- package/cdn/skin-element-BTt7JKoR.js +2 -0
- package/cdn/{skin-element-DE8OodF5.js.map → skin-element-BTt7JKoR.js.map} +1 -1
- package/cdn/template-BKUlUXWF.js +2 -0
- package/cdn/template-BKUlUXWF.js.map +1 -0
- package/cdn/template-ClYP_1RH.js +31 -0
- package/cdn/template-ClYP_1RH.js.map +1 -0
- package/cdn/text-element-DW2FuvdI.js +2 -0
- package/cdn/text-element-DW2FuvdI.js.map +1 -0
- package/cdn/{text-element-dyiwucQB.js → text-element-LzVNdZbp.js} +50 -2
- package/cdn/text-element-LzVNdZbp.js.map +1 -0
- package/cdn/time-slider-chapters-element-Bf4gYppH.js +2 -0
- package/cdn/{time-slider-chapters-element-b6oeaZtJ.js.map → time-slider-chapters-element-Bf4gYppH.js.map} +1 -1
- package/cdn/{time-slider-chapters-element-BTMqnBhM.js → time-slider-chapters-element-DMkTYNg3.js} +5 -3
- package/cdn/time-slider-chapters-element-DMkTYNg3.js.map +1 -0
- package/cdn/{ui-BsUcH4YJ.js → ui-BL6b1m09.js} +7 -7
- package/cdn/{ui-BsUcH4YJ.js.map → ui-BL6b1m09.js.map} +1 -1
- package/cdn/ui-BbpSrILu.js +2 -0
- package/cdn/{ui-DLvwCbsU.js.map → ui-BbpSrILu.js.map} +1 -1
- package/cdn/ui-BmCfIOl5.js +38 -0
- package/cdn/ui-BmCfIOl5.js.map +1 -0
- package/cdn/ui-Bu9GX-M_.js +28 -0
- package/cdn/ui-Bu9GX-M_.js.map +1 -0
- package/cdn/ui-CBrFrvmm.js +2 -0
- package/cdn/{ui-CxftD4RF.js.map → ui-CBrFrvmm.js.map} +1 -1
- package/cdn/{ui-CtONjPC2.js → ui-CQsP0EFA.js} +9 -9
- package/cdn/{ui-CtONjPC2.js.map → ui-CQsP0EFA.js.map} +1 -1
- package/cdn/ui-Crbp7m4I.js +2 -0
- package/cdn/ui-Crbp7m4I.js.map +1 -0
- package/cdn/ui-DRKjxVsj.js +2 -0
- package/cdn/ui-DRKjxVsj.js.map +1 -0
- package/cdn/video-minimal-ui.dev.js +1 -1
- package/cdn/video-minimal-ui.js +1 -1
- package/cdn/video-minimal.dev.js +13 -12
- package/cdn/video-minimal.dev.js.map +1 -1
- package/cdn/video-minimal.js +1 -1
- package/cdn/video-minimal.js.map +1 -1
- package/cdn/video-player.dev.d.ts +1 -0
- package/cdn/video-player.dev.js +1 -0
- package/cdn/video-player.js +1 -0
- package/cdn/video-ui.dev.js +1 -1
- package/cdn/video-ui.js +1 -1
- package/cdn/video.dev.js +14 -13
- package/cdn/video.dev.js.map +1 -1
- package/cdn/video.js +1 -1
- package/cdn/video.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/audio/skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-audio/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-audio/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-audio/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-audio/skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-video/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-video/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-video/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/live-video/skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/minimal-skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/minimal-skin.js.map +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/skin.js +1 -1
- package/dist/default/_virtual/inline-css_src/define/video/skin.js.map +1 -1
- package/dist/default/define/audio/minimal-skin.css +39 -7
- package/dist/default/define/audio/skin.css +31 -7
- package/dist/default/define/live-audio/minimal-skin.css +39 -7
- package/dist/default/define/live-audio/skin.css +31 -7
- package/dist/default/define/live-video/minimal-skin.css +39 -7
- package/dist/default/define/live-video/minimal-skin.js +1 -1
- package/dist/default/define/live-video/minimal-skin.js.map +1 -1
- package/dist/default/define/live-video/minimal-skin.tailwind.js +1 -1
- package/dist/default/define/live-video/minimal-skin.tailwind.js.map +1 -1
- package/dist/default/define/live-video/skin.css +31 -7
- package/dist/default/define/live-video/skin.js +1 -1
- package/dist/default/define/live-video/skin.js.map +1 -1
- package/dist/default/define/live-video/skin.tailwind.js +1 -1
- package/dist/default/define/live-video/skin.tailwind.js.map +1 -1
- package/dist/default/define/video/minimal-skin.css +39 -7
- package/dist/default/define/video/minimal-skin.js +1 -1
- package/dist/default/define/video/minimal-skin.js.map +1 -1
- package/dist/default/define/video/minimal-skin.tailwind.js +1 -1
- package/dist/default/define/video/minimal-skin.tailwind.js.map +1 -1
- package/dist/default/define/video/skin.css +31 -7
- package/dist/default/define/video/skin.js +1 -1
- package/dist/default/define/video/skin.js.map +1 -1
- package/dist/default/define/video/skin.tailwind.js +1 -1
- package/dist/default/define/video/skin.tailwind.js.map +1 -1
- package/dist/default/i18n/provider-mixin.js +24 -0
- package/dist/default/i18n/provider-mixin.js.map +1 -1
- package/dist/default/skins/dist/default/default/tailwind/components/button-group.js +1 -1
- package/dist/default/skins/dist/default/default/tailwind/components/button-group.js.map +1 -1
- package/dist/default/skins/dist/default/default/tailwind/components/controls.js +1 -1
- package/dist/default/skins/dist/default/default/tailwind/components/controls.js.map +1 -1
- package/dist/default/skins/dist/default/default/tailwind/components/menu.js +8 -7
- package/dist/default/skins/dist/default/default/tailwind/components/menu.js.map +1 -1
- package/dist/default/skins/dist/default/default/tailwind/components/time.js +1 -1
- package/dist/default/skins/dist/default/default/tailwind/components/time.js.map +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/components/button-group.js +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/components/button-group.js.map +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/components/controls.js +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/components/controls.js.map +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/components/menu.js +8 -7
- package/dist/default/skins/dist/default/minimal/tailwind/components/menu.js.map +1 -1
- package/dist/default/skins/dist/default/minimal/tailwind/components/time.js +2 -2
- package/dist/default/skins/dist/default/minimal/tailwind/components/time.js.map +1 -1
- package/dist/default/ui/slider/slider-element.js +1 -2
- package/dist/default/ui/slider/slider-element.js.map +1 -1
- package/dist/default/ui/time-slider/time-slider-element.js +1 -2
- package/dist/default/ui/time-slider/time-slider-element.js.map +1 -1
- package/dist/default/ui/volume-slider/volume-slider-element.js +1 -2
- package/dist/default/ui/volume-slider/volume-slider-element.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/audio/skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-audio/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-audio/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-audio/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-audio/skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-video/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-video/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-video/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/live-video/skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/minimal-skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/minimal-skin.js.map +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/skin.js +1 -1
- package/dist/dev/_virtual/inline-css_src/define/video/skin.js.map +1 -1
- package/dist/dev/define/audio/minimal-skin.css +39 -7
- package/dist/dev/define/audio/skin.css +31 -7
- package/dist/dev/define/live-audio/minimal-skin.css +39 -7
- package/dist/dev/define/live-audio/skin.css +31 -7
- package/dist/dev/define/live-video/minimal-skin.css +39 -7
- package/dist/dev/define/live-video/minimal-skin.js +1 -1
- package/dist/dev/define/live-video/minimal-skin.js.map +1 -1
- package/dist/dev/define/live-video/minimal-skin.tailwind.js +1 -1
- package/dist/dev/define/live-video/minimal-skin.tailwind.js.map +1 -1
- package/dist/dev/define/live-video/skin.css +31 -7
- package/dist/dev/define/live-video/skin.js +1 -1
- package/dist/dev/define/live-video/skin.js.map +1 -1
- package/dist/dev/define/live-video/skin.tailwind.js +1 -1
- package/dist/dev/define/live-video/skin.tailwind.js.map +1 -1
- package/dist/dev/define/video/minimal-skin.css +39 -7
- package/dist/dev/define/video/minimal-skin.js +8 -8
- package/dist/dev/define/video/minimal-skin.js.map +1 -1
- package/dist/dev/define/video/minimal-skin.tailwind.js +12 -12
- package/dist/dev/define/video/minimal-skin.tailwind.js.map +1 -1
- package/dist/dev/define/video/skin.css +31 -7
- package/dist/dev/define/video/skin.js +8 -8
- package/dist/dev/define/video/skin.js.map +1 -1
- package/dist/dev/define/video/skin.tailwind.js +12 -12
- package/dist/dev/define/video/skin.tailwind.js.map +1 -1
- package/dist/dev/i18n/provider-mixin.d.ts.map +1 -1
- package/dist/dev/i18n/provider-mixin.js +24 -0
- package/dist/dev/i18n/provider-mixin.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/button-group.js +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/button-group.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/controls.js +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/controls.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/menu.js +8 -7
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/menu.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/time.js +1 -1
- package/dist/dev/packages/skins/dist/default/default/tailwind/components/time.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/button-group.js +1 -1
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/button-group.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/controls.js +1 -1
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/controls.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/menu.js +8 -7
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/menu.js.map +1 -1
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/time.js +2 -2
- package/dist/dev/packages/skins/dist/default/minimal/tailwind/components/time.js.map +1 -1
- package/dist/dev/ui/slider/slider-element.d.ts.map +1 -1
- package/dist/dev/ui/slider/slider-element.js +1 -2
- package/dist/dev/ui/slider/slider-element.js.map +1 -1
- package/dist/dev/ui/time-slider/time-slider-element.d.ts.map +1 -1
- package/dist/dev/ui/time-slider/time-slider-element.js +1 -2
- package/dist/dev/ui/time-slider/time-slider-element.js.map +1 -1
- package/dist/dev/ui/volume-slider/volume-slider-element.d.ts.map +1 -1
- package/dist/dev/ui/volume-slider/volume-slider-element.js +1 -2
- package/dist/dev/ui/volume-slider/volume-slider-element.js.map +1 -1
- package/docs/README.md +1 -1
- package/docs/concepts/media-sources.md +26 -2
- package/docs/concepts/skins.md +39 -15
- package/docs/how-to/customize-skins.md +7662 -48
- package/docs/how-to/i18n-switch-locale.md +27 -0
- package/docs/how-to/installation.md +4 -4
- package/docs/how-to/migrate-from-plyr.md +1 -5
- package/docs/llms.txt +7 -0
- package/docs/reference/cloudflare-video.md +483 -0
- package/docs/reference/dash-video.md +54 -0
- package/docs/reference/feature-metadata.md +3 -1
- package/docs/reference/hlsjs-video.md +626 -0
- package/docs/reference/native-hls-video.md +40 -0
- package/docs/reference/shaka-video.md +588 -0
- package/docs/reference/spotify-audio.md +394 -0
- package/docs/reference/tiktok-video.md +504 -0
- package/docs/reference/title.md +1 -1
- package/docs/reference/twitch-video.md +447 -0
- package/docs/reference/vimeo-video.md +1038 -0
- package/docs/reference/youtube-video.md +573 -0
- package/package.json +9 -9
- package/cdn/audio-headless.dev.js +0 -1
- package/cdn/audio-headless.js +0 -1
- package/cdn/compounds-CHlzbAKu.js +0 -8
- package/cdn/compounds-CHlzbAKu.js.map +0 -1
- package/cdn/compounds-D1FPw7jg.js.map +0 -1
- package/cdn/create-player-LjvbIxIq.js +0 -2
- package/cdn/i18n-R3TQ8P2f.js +0 -2
- package/cdn/live-button-element-C-WypudK.js +0 -2
- package/cdn/media-B4uT13xV.js.map +0 -1
- package/cdn/media-D6Xer97u.js.map +0 -1
- package/cdn/minimal-ui-D3XCtSx_.js +0 -2
- package/cdn/poster-element-Djlm5fwC.js +0 -2
- package/cdn/seek-button-element-BD2caCd5.js.map +0 -1
- package/cdn/seek-button-element-CgaXVFPS.js +0 -2
- package/cdn/skin-element-DE8OodF5.js +0 -2
- package/cdn/text-element-BJyj7nLo.js +0 -2
- package/cdn/text-element-BJyj7nLo.js.map +0 -1
- package/cdn/text-element-dyiwucQB.js.map +0 -1
- package/cdn/time-slider-chapters-element-BTMqnBhM.js.map +0 -1
- package/cdn/time-slider-chapters-element-b6oeaZtJ.js +0 -2
- package/cdn/ui-CxftD4RF.js +0 -2
- package/cdn/ui-DLvwCbsU.js +0 -2
- package/cdn/video-headless.dev.js +0 -1
- package/cdn/video-headless.js +0 -1
- /package/cdn/{audio-headless.dev.d.ts → audio-player.dev.d.ts} +0 -0
- /package/cdn/{video-headless.dev.d.ts → live-audio-minimal-ui.dev.d.ts} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,r as n,s as r,u as i}from"./predicate-LbFu-fPH.js";import{n as a,t as o}from"./i18n-CE4KxKuj.js";import{t as s}from"./shallow-equal-KV1zFqZi.js";import{n as c}from"./media-element-Cp5PrNre.js";import{n as l,r as u,t as d}from"./context-C2rsoDxk.js";import{l as f}from"./container-element-Dd0ZCdhK.js";import{t as p}from"./listen-4VrUltMW.js";import{t as m}from"./noop-Ch0IHcOP.js";import{n as h,t as g}from"./casing-CxqC0yQL.js";import{n as _,t as v}from"./text-track-CG8USvNG.js";import{t as y}from"./webkit-DljEkldb.js";import{n as b,r as ee,t as te}from"./constants-B4LD5zrj.js";import{t as x}from"./abort-BhNYXtuF.js";function S(e){let t=e.composedPath();return t.length>0?t[0]:e.target}function ne(e,t,n){return new Promise((r,i)=>{let a=()=>{i(n?.signal?.reason??`Aborted`)};if(n?.signal?.aborted){a();return}n?.signal?.addEventListener(`abort`,a,{once:!0}),e.addEventListener(t,e=>{n?.signal?.removeEventListener(`abort`,a),r(e)},{...n,once:!0})})}const re=[`button`,`input`,`select`,`textarea`,`a[href]`,`[role="button"]`,`[role="menu"]`,`[role="menuitem"]`,`[role="menuitemcheckbox"]`,`[role="menuitemradio"]`,`[role="slider"]`,`[data-interactive]`].join(`,`),ie=[`textarea`,`select`,`input:not([type])`,...[`text`,`search`,`url`,`tel`,`email`,`password`,`number`].map(e=>`input[type="${e}"]`),`[contenteditable]:not([contenteditable="false"])`].join(`,`);function ae(e){return e.matches(ie)}function oe(e){let t=S(e);return t instanceof Element&&ae(t)}function se(e){let t=S(e);return t instanceof Element&&t.closest(re)!==null}const ce=new Set([` `,`Enter`]);function le(e){if(!ce.has(e.key))return!1;let t=S(e);return t instanceof Element&&t.matches(`button,a[href],[role="slider"],[role="button"]`)}function ue(e){let t=[];for(let n=0;n<e.length;n++)t.push([e.start(n),e.end(n)]);return t}function C(e){let t=Object.values(e.config??{}).map(e=>e.state);return{...e,...t.length>0?{preserve:t}:{}}}function de(e){let t=e.map(e=>e.config??{});return Object.assign({},...t)}function fe(e,t,n){let r=e[t.action];if(typeof r!=`function`)throw TypeError(`Missing config action "${String(t.action)}"`);r(n)}function pe(e){return e.readyState>=1}function w(e){if(!r(e))return!1;let t=e;return!i(t.paused)&&!i(t.ended)&&n(t.pause)}function T(e){if(!r(e))return!1;let t=e;return!i(t.currentTime)&&!i(t.duration)&&!i(t.seeking)}function E(e){if(!r(e))return!1;let t=e;return!i(t.src)&&!i(t.currentSrc)&&!i(t.readyState)&&n(t.load)}function D(e){if(!r(e))return!1;let t=e;return!i(t.volume)&&!i(t.muted)}function me(e){return r(e)?!i(e.muted):!1}function he(e){return r(e)?!i(e.playbackRate):!1}function ge(e){return r(e)?n(e.requestPictureInPicture):!1}function O(e){if(!r(e))return!1;let t=e;return!i(t.buffered)&&t.buffered!==ee&&!i(t.seekable)&&t.seekable!==ee}function _e(e){return r(e)?!i(e.error):!1}function k(e){if(!r(e))return!1;let t=e;return!i(t.textTracks)&&t.textTracks!==b}function ve(e){return r(e)?!i(e.videoRenditions):!1}function ye(e){return r(e)?!i(e.audioTracks):!1}function be(e){if(!r(e))return!1;let t=e;return!i(t.videoWidth)&&!i(t.videoHeight)}function xe(e){if(!r(e))return!1;let t=e;return r(t.remote)&&t.remote!==te}function Se(e){return r(e)?!i(e.streamType):!1}function Ce(e){return r(e)?!i(e.contentData):!1}function we(e){if(!r(e))return!1;let t=e;return!i(t.liveEdgeStart)&&!i(t.targetLiveWindow)}function Te(e){return r(e)&&`querySelectorAll`in e&&n(e.querySelectorAll)}function Ee(e,t){return e.id||String(t)}function De(e){return{...e.id!==void 0&&{id:e.id},...e.kind!==void 0&&{kind:e.kind},label:e.label,language:e.language,enabled:e.enabled}}const Oe=C({name:`audioTrack`,state:({target:e})=>({audioTrackList:[],selectAudioTrack(t){let{media:n}=e();if(!ye(n))return;let r=[...n.audioTracks],i=r.find((e,n)=>Ee(e,n)===t);if(i)for(let e of r)e.enabled=e===i}}),attach({target:e,signal:t,set:n}){let{media:r}=e,i=null,a=null,o=()=>ye(r)?r.audioTracks:null,s=(e=o())=>{n({audioTrackList:e?[...e].map(De):[]})},c=()=>{let e=o();if(e===i){s(e);return}a?.abort(),a=new AbortController,i=e,i&&(p(i,`addtrack`,()=>s(i),{signal:a.signal}),p(i,`removetrack`,()=>s(i),{signal:a.signal}),p(i,`change`,()=>s(i),{signal:a.signal})),s(i)};c(),p(r,`loadstart`,c,{signal:t}),t.addEventListener(`abort`,()=>a?.abort(),{once:!0})}}),A=C({name:`buffer`,state:()=>({buffered:[],seekable:[]}),attach({target:e,signal:t,set:n}){let{media:r}=e;if(!O(r))return;let i=()=>n({buffered:ue(r.buffered),seekable:ue(r.seekable)});i(),p(r,`progress`,i,{signal:t}),p(r,`emptied`,i,{signal:t})}});function ke(e,t,n){if(n.size===0)return null;let r=e-t.left,i=t.width;if(i===0)return null;let a=r/i;return n.size===2&&n.has(`left`)&&n.has(`right`)?a<.5?`left`:`right`:n.size===3?a<1/3?`left`:a<2/3?`center`:`right`:n.has(`left`)&&a<.5?`left`:n.has(`right`)&&a>=.5?`right`:n.has(`center`)&&(n.size===1||a>=1/3&&a<2/3)?`center`:null}var Ae=class{#e;#t=[];#n=new Set;#r=null;#i=new Set;constructor(e){this.#e=e}get bindings(){return this.#t}subscribe(e){return this.#i.add(e),()=>this.#i.delete(e)}claimsTap(e,t){return!se(e)&&this.#t.some(n=>n.type===`tap`&&n.action===t&&(!n.pointer||n.pointer===e.pointerType))}add(e){let t={...e,onActivate:t=>{if(this.#i.size>0){let n={type:e.type,source:`gesture`,action:e.action,value:e.value,region:e.region,pointer:e.pointer,event:t};for(let e of this.#i)try{e(n)}catch{}}e.onActivate(t)}};this.#t.push(t),this.#n.add(t.recognizer),this.#a();let n=!1;return()=>{if(n)return;n=!0;let e=this.#t.indexOf(t);e!==-1&&this.#t.splice(e,1),this.#o()}}#a(){if(this.#r)return;this.#r=new AbortController;let{signal:e}=this.#r,t=0;p(this.#e,`pointerdown`,e=>{e.button===0&&(t=Date.now())},{signal:e}),p(this.#e,`pointerup`,e=>{if(e.button!==0||Date.now()-t>250||se(e))return;let n=e.pointerType,r=e.clientX,i=this.#e,a=this.#t,o={resolve:e=>Ne(a,e,n,r,i)};for(let t of this.#n)t.handleUp(o,e)},{signal:e})}#o(){if(!(this.#t.length>0)){for(let e of this.#n)e.reset();this.#n.clear(),this.#r?.abort(),this.#r=null}}};const j=new WeakMap;function je(e){return j.get(e)}function Me(e){let t=j.get(e);return t||(t=new Ae(e),j.set(e,t)),t}function Ne(e,t,n,r,i){let a=i.getBoundingClientRect(),o=Pe(e,t,n),s=o.size>0?ke(r,a,o):null,c=[];for(let r of e)if(!r.disabled&&r.type===t&&!(r.pointer&&r.pointer!==n)){if(r.region){if(r.region!==s)continue}else if(s!==null)continue;c.push(r)}return c}function Pe(e,t,n){let r=new Set;for(let i of e)i.disabled||i.type===t&&(i.pointer&&i.pointer!==n||i.region&&r.add(i.region));return r}function M(e){let t=e;if(r(t.remote)&&`state`in t.remote&&`prompt`in t.remote)return t.remote}function Fe(e){return M(e)?.state===`connected`}function Ie(e){return M(e)?.state===`connecting`}async function Le(e){let t=M(e);if(!t)throw new DOMException(`Remote playback not supported`,`NotSupportedError`);return t.prompt()}const Re=new WeakMap,N=C({name:`controls`,state:({get:e,set:t})=>{let n=ze(()=>(t({controlsVisible:!0}),()=>{}),()=>{let n=!e().userActive;return t({userActive:n,controlsVisible:n}),n});return Re.set(n.requestControlsLock,n),{userActive:!0,controlsVisible:!0,requestControlsLock:n.requestControlsLock,toggleControls:n.toggleControls}},attach({target:t,signal:n,get:r,set:i}){let{media:a,container:o}=t;if(!w(a)||e(o))return;let s,c=0,l=e=>c>0||e||a.paused||Fe(a)||Ie(a);function u(){clearTimeout(s),s=void 0}function d(){u(),!(c>0)&&(s=setTimeout(m,2e3))}function f(){r().userActive||i({userActive:!0,controlsVisible:!0}),d()}function m(){u(),i({userActive:!1,controlsVisible:l(!1)})}function h(){c++,u(),r().controlsVisible||i({controlsVisible:!0});let e=!1;return()=>{e||n.aborted||(e=!0,c--,c===0&&f())}}function g(){return r().controlsVisible?m():f(),r().controlsVisible}let _=Re.get(r().requestControlsLock);_.setDelegates(h,g);let v=0,y=0,b=()=>y>0&&Date.now()-y<500;function ee(e){v=Date.now(),e.pointerType===`touch`&&(y=v)}function te(e){if(e.pointerType===`touch`&&(y=Date.now()),e.pointerType===`touch`&&Date.now()-v<250){if(je(o)?.claimsTap(e,`toggleControls`))return;let t=[a,o].includes(e.target);r().controlsVisible&&t?m():f()}else f()}let x=()=>{let{userActive:e}=r();i({controlsVisible:l(e)}),!a.paused&&e&&d()};function S(e){if(e.pointerType===`touch`){r().userActive&&d();return}f()}if(p(o,`pointermove`,S,{signal:n}),p(o,`pointerdown`,ee,{signal:n}),p(o,`pointerup`,te,{signal:n}),p(o,`keyup`,f,{signal:n}),p(o,`focusin`,()=>{b()||f()},{signal:n}),p(o,`mouseleave`,()=>{b()||m()},{signal:n}),p(a,`play`,x,{signal:n}),p(a,`pause`,x,{signal:n}),p(a,`ended`,x,{signal:n}),xe(a)){let e=()=>{let{userActive:e}=r();i({controlsVisible:l(e)})};p(a.remote,`connect`,e,{signal:n}),p(a.remote,`connecting`,e,{signal:n}),p(a.remote,`disconnect`,e,{signal:n})}n.addEventListener(`abort`,()=>{_.reset(),c=0,u()},{once:!0}),d()}});function ze(e,t){let n=e,r=t,i=new Set,a={requestControlsLock:()=>{let e={release:n()},t=!1;return i.add(e),()=>{t||(t=!0,i.delete(e),e.release())}},toggleControls:()=>r(),setDelegates(e,t){if(e!==n){n=e;for(let t of i)t.release(),t.release=e()}r=t},reset(){a.setDelegates(e,t)}};return a}const P=C({name:`error`,state:({set:e})=>({error:null,dismissError(){e({error:null})}}),attach({target:e,signal:t,set:n}){let{media:r}=e;_e(r)&&(p(r,`error`,()=>n({error:r.error}),{signal:t}),p(r,`emptied`,()=>n({error:null}),{signal:t}))}});function Be(){let e=document;return e.fullscreenEnabled||e.webkitFullscreenEnabled?!0:n(document.createElement(`video`).webkitSetPresentationMode)}function Ve(){let e=document;return e.fullscreenElement??e.webkitFullscreenElement??null}function He(e){if(!(e instanceof Element))return!1;try{return e.matches(`:fullscreen`)}catch{return!1}}function F(e,t){if(t.webkitPresentationMode===`fullscreen`)return!0;let n=Ve();return n&&(n===e||n===t)||He(e)||He(t)?!0:t.isFullscreen??!1}async function Ue(e,t){let r=document;if(e&&(r.fullscreenEnabled||r.webkitFullscreenEnabled)){let t=e;if(n(t.requestFullscreen))return t.requestFullscreen();if(n(t.webkitRequestFullscreen))return t.webkitRequestFullscreen()}let i=t;if(n(i.webkitSetPresentationMode)){i.webkitSetPresentationMode(`fullscreen`);return}let a=t;if(n(a.requestFullscreen))return a.requestFullscreen()}async function I(e){let t=document,r=e;if(r.webkitPresentationMode===`fullscreen`&&n(r.webkitSetPresentationMode)){r.webkitSetPresentationMode(`inline`);return}if(n(t.exitFullscreen))return t.exitFullscreen();if(n(t.webkitExitFullscreen))return t.webkitExitFullscreen();let i=e;if(n(i.exitFullscreen))return i.exitFullscreen()}function We(){if(document.pictureInPictureEnabled){let e=/.*Version\/.*Safari\/.*/.test(navigator.userAgent),t=typeof matchMedia==`function`&&matchMedia(`(display-mode: standalone)`).matches;return!e||!t}return n(document.createElement(`video`).webkitSetPresentationMode)}function Ge(e){return n(e.webkitSetPresentationMode)?!0:ge(e)}function L(e){return e.webkitPresentationMode===`picture-in-picture`||document.pictureInPictureElement===e?!0:e.isPictureInPicture??!1}async function Ke(e){let t=e;if(n(t.webkitSetPresentationMode)){t.webkitSetPresentationMode(`picture-in-picture`);return}let r=e;if(n(r.requestPictureInPicture))return r.requestPictureInPicture()}async function R(e){let t=e;if(t.webkitPresentationMode===`picture-in-picture`&&n(t.webkitSetPresentationMode)){t.webkitSetPresentationMode(`inline`);return}if(n(document.exitPictureInPicture))return document.exitPictureInPicture();let r=e;if(n(r.exitPictureInPicture))return r.exitPictureInPicture()}const z=C({name:`fullscreen`,state:({target:e})=>({fullscreen:!1,fullscreenAvailability:`unavailable`,async requestFullscreen(){let{media:t,container:n}=e();return L(t)&&await R(t),Ue(n,t)},async exitFullscreen(){let{media:t}=e();return I(t)},async toggleFullscreen(){let{media:t,container:n}=e();return F(n,t)?I(t):(L(t)&&await R(t),Ue(n,t))}}),attach({target:e,signal:t,set:n}){let{media:r,container:i}=e;n({fullscreenAvailability:Be()?`available`:`unsupported`});let a=()=>n({fullscreen:F(i,r)});a(),p(document,`fullscreenchange`,a,{signal:t}),p(document,`webkitfullscreenchange`,a,{signal:t}),`webkitPresentationMode`in r&&p(r,`webkitpresentationmodechanged`,a,{signal:t})}}),qe=C({name:`live`,state:()=>({liveEdgeStart:NaN,targetLiveWindow:NaN}),attach({target:e,signal:t,set:n}){let{media:r}=e;if(!we(r))return;let i=()=>n({liveEdgeStart:r.liveEdgeStart,targetLiveWindow:r.targetLiveWindow});i(),p(r,`targetlivewindowchange`,i,{signal:t}),p(r,`streamtypechange`,i,{signal:t}),p(r,`loadedmetadata`,i,{signal:t}),p(r,`canplay`,i,{signal:t}),p(r,`progress`,i,{signal:t}),p(r,`durationchange`,i,{signal:t}),p(r,`timeupdate`,i,{signal:t}),p(r,`emptied`,i,{signal:t})}}),B=Symbol(`@videojs/media-title`),V=Symbol(`@videojs/user-title`),Je=Symbol(`@videojs/set-user-title`),H=Symbol(`@videojs/media-poster`),U=Symbol(`@videojs/user-poster`),Ye=Symbol(`@videojs/set-user-poster`),W=C({name:`metadata`,config:{title:{action:Je,state:V,html:{attribute:`content-title`}},poster:{action:Ye,state:U}},state:({set:e})=>({[B]:void 0,[V]:void 0,[Je]:t=>e({[V]:t}),[H]:void 0,[U]:void 0,[Ye]:t=>e({[U]:t})}),derived:{title:({get:e})=>e()[V]??e()[B]??``,poster:({get:e})=>e()[U]??e()[H]??``},attach({target:e,signal:t,set:n}){let{media:r}=e;if(!Ce(r))return;let i=()=>n({[B]:r.contentData?.title,[H]:r.contentData?.poster});i(),p(r,`contentdatachange`,i,{signal:t})}}),G=C({name:`pip`,state:({target:e})=>({pip:!1,pipAvailability:`unavailable`,async requestPictureInPicture(){let{media:t,container:n}=e();return F(n,t)&&await I(t),Ke(t)},async exitPictureInPicture(){let{media:t}=e();return R(t)},async togglePictureInPicture(){let{media:t,container:n}=e();return L(t)?R(t):(F(n,t)&&await I(t),Ke(t))}}),attach({target:e,signal:t,set:n}){let{media:r}=e;n({pipAvailability:We()&&Ge(r)?`available`:`unsupported`});let i=()=>n({pip:L(r)});i(),p(r,`enterpictureinpicture`,i,{signal:t}),p(r,`leavepictureinpicture`,i,{signal:t}),`webkitPresentationMode`in r&&p(r,`webkitpresentationmodechanged`,i,{signal:t})}}),K=C({name:`playback`,state:({target:e})=>({paused:!0,ended:!1,started:!1,waiting:!1,play(){return e().media.play()},pause(){let{media:t}=e();w(t)&&t.pause()},togglePaused(){let t=e().media;return w(t)?t.paused?(t.play(),!0):(t.pause(),!1):!1}}),attach({target:e,signal:t,set:n}){let{media:r}=e;if(!w(r)||!T(r)||!E(r))return;let i=()=>n({paused:r.paused,ended:r.ended,started:!r.paused||r.currentTime>0,waiting:r.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&!r.paused});i(),p(r,`emptied`,i,{signal:t}),p(r,`play`,i,{signal:t}),p(r,`pause`,i,{signal:t}),p(r,`ended`,i,{signal:t}),p(r,`playing`,i,{signal:t}),p(r,`waiting`,i,{signal:t}),p(r,`seeked`,i,{signal:t})}}),Xe=[.2,.5,.7,1,1.2,1.5,1.7,2],q=C({name:`playbackRate`,state:({target:e})=>({playbackRates:Xe,playbackRate:1,setPlaybackRate(t){let{media:n}=e();he(n)&&(n.playbackRate=t)}}),attach({target:e,signal:t,set:n}){let{media:r}=e;if(!he(r))return;let i=()=>n({playbackRate:r.playbackRate});i(),p(r,`ratechange`,i,{signal:t})}});function Ze(e,t){return e.id||String(t)}function Qe(e){return{...e.id!==void 0&&{id:e.id},...e.width!==void 0&&{width:e.width},...e.height!==void 0&&{height:e.height},...e.bitrate!==void 0&&{bitrate:e.bitrate},...e.frameRate!==void 0&&{frameRate:e.frameRate},...e.codec!==void 0&&{codec:e.codec},selected:e.selected}}function $e(e){return e.width&&e.height?Math.min(e.width,e.height):e.height??e.width}const et=C({name:`quality`,state:({target:e})=>({videoRenditionList:[],activeVideoRendition:null,selectVideoRendition(t){let{media:n}=e();if(!ve(n))return;if(t===`auto`){n.videoRenditions.selectedIndex=-1;return}let r=[...n.videoRenditions].findIndex((e,n)=>Ze(e,n)===t);r!==-1&&(n.videoRenditions.selectedIndex=r)}}),attach({target:e,signal:t,set:n}){let{media:r}=e,i=null,a=null,o=()=>ve(r)?r.videoRenditions:null,s=e=>{if(!e)return null;let t=[...e],n=t.find(e=>e.active);if(n)return n;if(!be(r)||!r.videoWidth&&!r.videoHeight)return null;let i=$e({width:r.videoWidth||void 0,height:r.videoHeight||void 0}),a=t.filter(e=>$e(e)===i);return a.length===1?a[0]:null},c=(e=o())=>{let t=s(e);n({videoRenditionList:e?[...e].map(Qe):[],activeVideoRendition:t?Qe(t):null})},l=()=>{let e=o();if(e===i){c(e);return}a?.abort(),a=new AbortController,i=e,i&&(p(i,`addrendition`,()=>c(i),{signal:a.signal}),p(i,`removerendition`,()=>c(i),{signal:a.signal}),p(i,`change`,()=>c(i),{signal:a.signal}),p(i,`activechange`,()=>c(i),{signal:a.signal})),c(i)};l(),p(r,`loadstart`,l,{signal:t}),p(r,`resize`,()=>c(i),{signal:t}),t.addEventListener(`abort`,()=>a?.abort(),{once:!0})}}),J=C({name:`remotePlayback`,state:({target:e})=>({remotePlaybackState:`disconnected`,remotePlaybackAvailability:`unsupported`,async toggleRemotePlayback(){let{media:t,container:n}=e();return Fe(t)?Le(t):(F(n,t)&&await I(t),await Le(t))}}),attach({target:e,signal:t,set:n}){let{media:r}=e;if(!xe(r))return;if(y(r)){let e=()=>{n({remotePlaybackState:r.webkitCurrentPlaybackTargetIsWireless?`connected`:`disconnected`})};p(r,`webkitplaybacktargetavailabilitychanged`,e=>{let{availability:t}=e;n({remotePlaybackAvailability:t===`available`?`available`:`unavailable`})},{signal:t}),p(r,`webkitcurrentplaybacktargetiswirelesschanged`,e,{signal:t}),e();return}let i=()=>n({remotePlaybackState:r.remote.state});i(),p(r.remote,`connect`,i,{signal:t}),p(r.remote,`connecting`,i,{signal:t}),p(r.remote,`disconnect`,i,{signal:t}),r.remote.watchAvailability(e=>{n({remotePlaybackAvailability:e?`available`:`unavailable`})}).catch(()=>{n({remotePlaybackAvailability:`unsupported`})}),t.addEventListener(`abort`,()=>{r.remote?.cancelWatchAvailability?.().catch(()=>{})})}}),Y=C({name:`source`,state:({target:e,signals:t})=>({source:null,canPlay:!1,loadSource(n){t.clear();let{media:r}=e();return E(r)?(r.src=n,r.load(),n):n}}),attach({target:e,signal:t,set:n}){let{media:r}=e;if(!E(r))return;let i=()=>n({source:r.currentSrc||r.src||null,canPlay:r.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA});i(),p(r,`canplay`,i,{signal:t}),p(r,`canplaythrough`,i,{signal:t}),p(r,`loadstart`,i,{signal:t}),p(r,`emptied`,i,{signal:t})}});function tt(e,t){return e.id||`track:${t}:${e.kind}:${e.language}:${e.label}`}function nt(e){return Array.from(e.textTracks).map((e,t)=>({id:tt(e,t),track:e})).filter(({track:e})=>_(e)).sort((e,t)=>e.track.kind>t.track.kind?1:e.track.kind<t.track.kind?-1:0)}function X(e,t){for(let{track:n}of e){let e=n===t?`showing`:`disabled`;n.mode!==e&&(n.mode=e)}}function rt(e){return t(e)?null:e.toLowerCase()===`use-credentials`?`use-credentials`:`anonymous`}function it(e,t){let n=a(t),r=o(t);n!==`en`&&!n.startsWith(`en-`)&&r.pop();for(let t of r){let n=e.find(({track:e})=>a(e.language)===t);if(n)return n;let r=e.find(({track:e})=>a(e.language).startsWith(`${t}-`));if(r)return r}}const at=C({name:`textTrack`,state:({target:e})=>{let t=null;return{chaptersCues:[],thumbnailCues:[],thumbnailTrackSrc:null,thumbnailTrackCrossOrigin:null,textTrackList:[],subtitlesShowing:!1,toggleSubtitles(n){let{media:r}=e();if(!k(r))return!1;let i=nt(r);if(!i.length)return!1;let a=i.find(({track:e})=>e.mode===`showing`),o=n??!a;if(a&&(t=a.id),!o)return X(i,null),!1;let s=a??i.find(({id:e})=>e===t)??it(i,globalThis.navigator?.language??``)??i[0];return t=s.id,X(i,s.track),!0},selectSubtitlesTrack(n){let{media:r}=e();if(!k(r))return;let i=nt(r);if(!i.length)return;if(n===`off`){let e=i.find(({track:e})=>e.mode===`showing`);e&&(t=e.id),X(i,null);return}let a=i.find(({id:e})=>e===n);a&&(t=a.id,X(i,a.track))}}},attach({target:e,signal:t,set:n}){let{media:r}=e;if(!k(r))return;let i=null,a=()=>{i?.abort(),i=new AbortController;let e=null,t=null,o=[],s=!1;for(let n=0;n<r.textTracks.length;n++){let i=r.textTracks[n];!e&&i.kind===`chapters`&&(e=i),!t&&i.kind===`metadata`&&i.label===`thumbnails`&&(t=i),o.push({id:tt(i,n),kind:i.kind,label:i.label,language:i.language,mode:i.mode}),_(i)&&i.mode===`showing`&&(s=!0)}let c=e?.cues?Array.from(e.cues):[],l=t?.cues?Array.from(t.cues):[],u=null,d=null;t&&(u=v(r,t)?.src??null,d=E(r)?rt(r.crossOrigin):null);let f=Te(r)&&r.querySelectorAll(`track`)||[],m=r instanceof HTMLElement&&r.shadowRoot?.querySelectorAll(`track`)||[];for(let e of[...f,...m])e.track?.cues?.length||p(e,`load`,a,{signal:i.signal});n({chaptersCues:c,thumbnailCues:l,thumbnailTrackSrc:u,thumbnailTrackCrossOrigin:d,textTrackList:o,subtitlesShowing:s})};a();let o=r.textTracks;o instanceof EventTarget&&(p(o,`addtrack`,a,{signal:t}),p(o,`removetrack`,a,{signal:t}),p(o,`change`,a,{signal:t})),p(r,`loadstart`,a,{signal:t}),t.addEventListener(`abort`,()=>i?.abort(),{once:!0})}}),ot={seek:Symbol.for(`@videojs/seek`)},Z=C({name:`time`,state:({target:e,signals:t,set:n})=>({currentTime:0,duration:0,seeking:!1,async seek(r){let{media:i}=e(),a=t.supersede(ot.seek);if(!T(i)||!E(i))return 0;if(!pe(i)&&!await ne(i,`loadedmetadata`,{signal:a}).catch(()=>!1))return i.currentTime;let o=Math.max(0,Math.min(r,i.duration||1/0));return n({currentTime:o,seeking:!0}),i.currentTime=o,await ne(i,`seeked`,{signal:a}).catch(m),i.currentTime}}),attach({target:e,signal:t,set:n,get:r}){let{media:i}=e;if(!T(i))return;let a=()=>{let{duration:e}=i;if(e===1/0&&O(i)){let{seekable:e}=i;return e.length>0?e.end(e.length-1):0}return Number.isFinite(e)?e:0},o=()=>n({currentTime:i.currentTime,duration:a(),seeking:i.seeking}),s=()=>{r().seeking||o()};o(),p(i,`timeupdate`,s,{signal:t}),p(i,`durationchange`,o,{signal:t}),p(i,`seeking`,o,{signal:t}),p(i,`seeked`,o,{signal:t}),p(i,`loadedmetadata`,o,{signal:t}),p(i,`emptied`,o,{signal:t}),p(i,`progress`,s,{signal:t})}}),Q=C({name:`volume`,state:({target:e})=>({volume:1,muted:!1,volumeAvailability:`unavailable`,mutedAvailability:`unavailable`,setVolume(t){let{media:n}=e();if(!D(n))return 0;let r=Math.max(0,Math.min(1,t));return r>0&&n.muted&&(n.muted=!1),n.volume=r,n.volume},toggleMuted(){let{media:t}=e();return me(t)?D(t)?(t.muted||t.volume===0?(t.muted=!1,t.volume===0&&(t.volume=.25)):t.muted=!0,t.muted):(t.muted=!t.muted,t.muted):!1}}),attach({target:e,signal:t,set:n}){let{media:r}=e,i=D(r),a=me(r);if(!i&&!a)return;n({volumeAvailability:i?st():`unavailable`,mutedAvailability:a?`available`:`unavailable`});let o=()=>n({volume:i?r.volume:1,muted:a?r.muted:!1});o(),p(r,`volumechange`,o,{signal:t})}});function st(){let e=document.createElement(`video`);try{return e.volume=.5,e.volume===.5?`available`:`unsupported`}catch{return`unsupported`}}var ct=class{#e;#t=new Map;get base(){return(this.#e??=new AbortController).signal}clear(){for(let e of this.#t.values())e.abort();this.#t.clear()}reset(){this.clear(),this.#e?.abort(),this.#e=void 0}supersede(e){this.#t.get(e)?.abort();let t=new AbortController;return this.#t.set(e,t),x([this.base,t.signal])}};function lt(...e){let t=e.map(e=>e.derived??{});return{state:t=>{let n=e.map(e=>e.state(t));return Object.assign({},...n)},preserve:Array.from(new Set(e.flatMap(e=>e.preserve??[]))),derived:Object.assign({},...t),attach:t=>{for(let n of e)try{n.attach?.(t)}catch(e){t.reportError(e)}}}}var ut=class extends Error{code;cause;constructor(e,t){super(t?.message??e),this.name=`StoreError`,this.code=e,this.cause=t?.cause}};function dt(){throw new ut(`NO_TARGET`)}function ft(){throw new ut(`DESTROYED`)}let pt=!1;function mt(){pt||(pt=!0,queueMicrotask(ht))}const $=new Set;function ht(){pt=!1;for(let e of $)e.flush();$.clear()}const gt=Object.prototype.hasOwnProperty;var _t=class{#e;#t=new Set;#n=!1;constructor(e){this.#e=Object.freeze({...e})}get current(){return this.#e}patch(e){let t={...this.#e},n=!1;for(let r of Reflect.ownKeys(e)){if(!gt.call(e,r))continue;let i=e[r];Object.is(this.#e[r],i)||(t[r]=i,n=!0)}n&&(this.#e=Object.freeze(t),this.#r())}replace(e){s(this.#e,e)||(this.#e=Object.freeze({...e}),this.#r())}subscribe(e,t){let n=t?.signal;if(n?.aborted)return m;if(this.#t.add(e),!n)return()=>this.#t.delete(e);let r=()=>this.#t.delete(e);return n.addEventListener(`abort`,r,{once:!0}),()=>{n.removeEventListener(`abort`,r),this.#t.delete(e)}}flush(){if(this.#n){this.#n=!1;for(let e of this.#t)e()}}#r(){this.#n=!0,$.add(this),mt()}};function vt(e){return new _t(e)}const yt=Symbol.for(`@videojs/store`),bt=Object.prototype.hasOwnProperty;function xt(){return((t,n={})=>{let r=null,i=!1,a=new AbortController,o=new ct,s,c;function l(){i&&ft(),r||dt()}let u=St(t.state({target:()=>(l(),r),signals:o,get:()=>s,set:e=>h(e)}));s=u;let d=p(s);c=vt(m(s,d));let f={[yt]:!0,get $state(){return c},get target(){return r},get destroyed(){return i},get state(){return c.current},attach:g,destroy:v,subscribe:y};for(let e of Object.keys(c.current))Object.defineProperty(f,e,{get:()=>c.current[e],enumerable:!0});for(let e of Object.getOwnPropertySymbols(s))typeof s[e]==`function`&&Object.defineProperty(f,e,{get:()=>s[e]});try{n.onSetup?.({store:f,signal:a.signal})}catch(e){b(e)}return f;function p(e){let n={},r=t.derived;if(!r)return n;let i={get:()=>e};for(let e of Object.keys(r))n[e]=r[e](i);return n}function m(e,t){let n={};for(let t of Object.keys(e))n[t]=e[t];return Object.assign(n,t)}function h(e){let t=Ct(s,e);if(!t)return;let n=p(t.next);s=t.next,c.replace(m(s,n))}function g(e){i&&ft(),o.reset(),r=e;let a={target:e,signal:o.base,get:()=>s,set:e=>{try{h(e)}catch(e){b(e)}},reportError:b,store:{get state(){return c.current},subscribe:y}};try{t.attach?.(a)}catch(e){b(e)}try{n.onAttach?.({store:f,target:e,signal:o.base})}catch(e){b(e)}return _}function _(){if(e(r))return;o.reset(),r=null;let n={...u};for(let e of t.preserve??[])n[e]=s[e];h(n)}function v(){i||(i=!0,_(),a.abort())}function y(e,t){return c.subscribe(e,t)}function b(e){n.onError?n.onError({store:f,error:e}):console.error(`[vjs-store]`,e)}})}function St(e){return Object.freeze({...e})}function Ct(e,t){let n={...e},r=!1;for(let i of Reflect.ownKeys(t)){if(!bt.call(t,i))continue;let a=t[i];Object.is(e[i],a)||(n[i]=a,r=!0)}return r?{next:Object.freeze(n)}:null}function wt(e){return r(e)&&yt in e}const Tt=[K,q,et,Oe,Q,Z,Y,A,z,G,J,N,at,P,W],Et=[K,q,Q,Z,Y,A,P,W],Dt=[],Ot=[K,Q,Z,Y,A,z,G,J,N,at,P,qe,W];var kt=class{#e;#t;#n;#r;#i=m;constructor(e,t,n){this.#e=e,this.#n=t,this.#t=n,e.addController(this)}get value(){return this.#t?(this.#r??=this.#t(this.#n.current),this.#r):this.#n.current}track(e){this.#n=e,this.#a()}hostConnected(){this.#a()}hostDisconnected(){this.#i(),this.#i=m,this.#r=void 0}#a(){if(this.#i(),!this.#t){this.#i=this.#n.subscribe(()=>this.#e.requestUpdate());return}let e=this.#t;this.#r=e(this.#n.current),this.#i=this.#n.subscribe(()=>{let t=e(this.#n.current);s(this.#r,t)||(this.#r=t,this.#e.requestUpdate())})}},At=class{#e;#t;#n;constructor(e,t,n){this.#e=n??m,wt(t)?(this.#n=t,this.#t=null):(this.#n=null,this.#t=new c(e,{context:t,callback:e=>this.#e(e),subscribe:!1})),e.addController(this)}get value(){return this.#t?this.#t.value??null:this.#n}hostConnected(){this.#n&&this.#e(this.#n)}},jt=class{#e;#t;#n;#r=null;constructor(e,t,n){this.#e=e,this.#t=n,this.#n=new At(e,t,e=>this.#i(e)),e.addController(this)}get value(){let t=this.#n.value;if(e(t))throw Error(`Store not available`);return i(this.#t)?t:this.#r.value}hostConnected(){}#i(e){i(this.#t)||(this.#r?this.#r.track(e.$state):this.#r=new kt(this.#e,e.$state,this.#t))}},Mt=class{#e;#t;#n;#r=null;constructor(e,t,n){this.#e=e,this.#t=n,this.#n=new c(e,{context:t,callback:e=>this.#i(e),subscribe:!0}),e.addController(this)}get value(){let e=this.#n.value;if(e)return this.#t?this.#r?.value:e}get displayName(){return this.#t?.displayName}hostConnected(){let e=this.#n.value;e&&this.#i(e)}hostDisconnected(){this.#r=null}#i(e){!this.#r&&this.#t&&(this.#r=new jt(this.#e,e,this.#t))}};function Nt(e){return Object.entries(e).map(([e,t])=>{let n=t.html?.attribute??h(e);return{property:g(n),attribute:n,entry:t}})}function Pt(t){let n=Nt(t.config);return r=>{class i extends r{static{this.properties={...r.properties,...Object.fromEntries(n.map(({property:e,attribute:t})=>[e,{type:String,attribute:t}]))}}#e=t.factory();#t=null;#n=null;#r=null;#i=null;#a=!1;#o=e=>{this.#r!==e&&(this.#r=e,this.#l.setValue({media:e,setMedia:this.#o}),this.#d())};#s=e=>{this.#i!==e&&(this.#i=e,this.#u.setValue({container:e,setContainer:this.#s}),this.#d())};#c=new f(this,{context:t.playerContext,initialValue:this.store});#l=new f(this,{context:t.mediaContext,initialValue:{media:this.#r,setMedia:this.#o}});#u=new f(this,{context:t.containerContext,initialValue:{container:this.#i,setContainer:this.#s}});get store(){return e(this.#e)&&(this.#e=t.factory()),this.#e}connectedCallback(){this.#p(),super.connectedCallback(),this.#c.setValue(this.store),this.#l.setValue({media:this.#r,setMedia:this.#o}),this.#u.setValue({container:this.#i,setContainer:this.#s}),this.#d(),this.#m()}disconnectedCallback(){super.disconnectedCallback(),this.#f()}destroyCallback(){this.#f(),this.#e?.destroy(),this.#e=null,super.destroyCallback()}willUpdate(e){super.willUpdate(e);for(let{property:t,entry:r}of n)e.has(t)&&fe(this.store,r,this[t])}#d(){let e=this.#e;if(!e)return;if(!this.#r){this.#f();return}let t={media:this.#r,container:this.#i},n=e.target?.media!==t.media,r=e.target?.container!==t.container;(n||r)&&(this.#f(),this.#n=e.attach(t))}#f(){this.#n?.(),this.#n=null}#p(){let e=this.store;if(this.#t!==e){for(let{property:t,entry:r}of n)fe(e,r,this[t]);this.#t=e}}#m(){this.#r||this.#a||(this.#a=!0,queueMicrotask(()=>{if(this.#a=!1,this.#r)return;let e=this.querySelector(`video, audio`);e&&this.#o(e)}))}}return i}}function Ft(e){let t=lt(...e.features),n=de(e.features);function r(){return xt()(t)}return{context:u,create:r,PlayerController:Mt,ProviderMixin:Pt({playerContext:u,mediaContext:l,containerContext:d,factory:r,config:n})}}export{Se as A,P as C,Oe as D,A as E,oe as M,le as N,O,z as S,Me as T,q as _,Dt as a,W as b,vt as c,Q as d,Z as f,et as g,J as h,Et as i,C as j,T as k,dt as l,Y as m,Mt as n,Ot as o,at as p,kt as r,Tt as s,Ft as t,ct as u,K as v,N as w,qe as x,G as y};
|
|
2
|
-
//# sourceMappingURL=create-player-LjvbIxIq.js.map
|
package/cdn/i18n-R3TQ8P2f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A as e,B as t,C as n,D as r,M as i,S as a,rt as o,w as s}from"./compounds-CHlzbAKu.js";import{r as c}from"./translate-text-TzSgu_oe.js";import{t as l}from"./media-element-Cp5PrNre.js";import{r as u}from"./context-C2rsoDxk.js";import{c as d,r as f}from"./container-element-Dd0ZCdhK.js";import{c as p,n as m}from"./create-player-LjvbIxIq.js";import{resolveText as h,translateText as g}from"./i18n.js";const _=`live.`,v={key:`${_}playing`,text:`Playing live`},y={key:`${_}seekToEdge`,text:`Seek to live edge`},b={key:`${_}badge`,text:`Live`};var x=class e{static defaultText=b;static defaultProps={label:``,disabled:!1};state=p({live:!1,liveEdge:!1,label:``});#e={...e.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(t){this.#e=o(t,e.defaultProps)}getLabel(e){return a(this.#e.label,e)||(e.liveEdge?v:y)}getAttrs(e){let t=this.#e.disabled||e.liveEdge;return{"aria-label":this.getLabel(e),"aria-disabled":t?`true`:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t,t=S(e),n=t&&this.#n(e);return this.state.patch({live:t,liveEdge:n}),this.state.patch({label:c(this.getLabel(this.state.current))}),this.state.current}async seekToLive(e){if(this.#e.disabled||!S(e)||this.#n(e))return;let t=C(e);t!=null&&await e.seek(t)}#n(e){let{currentTime:t,liveEdgeStart:n}=e;if(Number.isFinite(n))return t>=n-5;let r=C(e);return r!=null&&t>=r-10}};function S(e){return!Number.isNaN(e.targetLiveWindow)}function C(e){let{seekable:t}=e;if(t.length===0)return null;let n=t[t.length-1][1];return Number.isFinite(n)?n:null}const w={live:`data-live`,liveEdge:`data-live-edge`};var T=class extends l{constructor(...n){super(...n),this.disabled=!1,this.label=``,this.core=new x,this.live=new m(this,u,i),this.time=new m(this,u,t),this.buffer=new m(this,u,e),this.#e=new f(this,d),this.#t=!1,this.#n=null}static{this.tagName=`media-live-button`}static{this.properties={label:{type:String},disabled:{type:Boolean}}}#e;get $state(){return this.core.state}#t;#n;connectedCallback(){if(super.connectedCallback(),this.destroyed)return;this.#t||=!this.textContent?.trim(),this.#t&&(this.textContent=g(x.defaultText,this.#e.value)),this.#n=new AbortController;let e=r({onActivate:()=>{let e=this.#r();e&&this.core.seekToLive(e)},isDisabled:()=>this.disabled||!this.#r()});s(this,e,{signal:this.#n.signal})}disconnectedCallback(){super.disconnectedCallback(),this.#n?.abort(),this.#n=null}getLabel(){return this.core.state.current.label?h(this.core.state.current.label):void 0}getResolvedLabel(){if(!this.#r())return;let e=this.core.getState();return g(this.core.getLabel(e),this.#e.value)}willUpdate(e){super.willUpdate(e),this.core.setProps(this)}update(e){super.update(e),this.#t&&(this.textContent=g(x.defaultText,this.#e.value));let t=this.#r();if(!t)return;this.core.setMedia(t);let r=this.core.getState(),i=this.core.getAttrs(r);s(this,{...i,"aria-label":g(i[`aria-label`],this.#e.value)}),n(this,r,w)}#r(){let e=this.live.value,t=this.time.value,n=this.buffer.value;return!e||!t||!n?null:{currentTime:t.currentTime,seek:t.seek,seekable:n.seekable,liveEdgeStart:e.liveEdgeStart,targetLiveWindow:e.targetLiveWindow}}};export{T as t};
|
|
2
|
-
//# sourceMappingURL=live-button-element-C-WypudK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-B4uT13xV.js","names":["#config","#engine","#createEngine","#stopErrorSync","#signals","#setError","#error","#reportedCode","#cancelPendingPlay","#loadstartListener","#target","#media"],"sources":["../../spf/dist/dev/playback/behaviors/select-tracks.js","../../spf/dist/dev/media/dom/screen.js","../../spf/dist/dev/playback/behaviors/dom/track-screen-resolution.js","../../spf/dist/dev/playback/engines/hls/engine-background-video.js","../../spf/dist/dev/playback/adapters/hls-background-video/adapter.js","../../spf/dist/dev/playback/adapters/hls-background-video/host.js","../../spf/dist/dev/playback/adapters/hls-background-video/media.js","../src/media/hls-background-video/media.ts"],"sourcesContent":["import { computed, peek } from \"../../core/signals/primitives.js\";\nimport { defineBehavior } from \"../../core/composition/create-composition.js\";\nimport { createMachineReactor } from \"../../core/reactors/create-machine-reactor.js\";\nimport { isResolvedPresentation } from \"../../media/types/index.js\";\nimport { getTracksByType } from \"../../media/utils/tracks.js\";\nimport { AUDIO_TYPE_CONFIG, VIDEO_TYPE_CONFIG } from \"../primitives/track-types.js\";\nimport { byDescendingResolution, pickAudioTrackFromTracks, tracksUnderPixelArea } from \"../../media/primitives/select-tracks.js\";\nimport { applyConstraints, applyRules, excludeUnplayableTracks, sameCandidateSet } from \"../primitives/selection-rules.js\";\n//#region src/playback/behaviors/select-tracks.ts\n/**\n* **Default audio/video track selection on src load / unselect on src unload.**\n* When a presentation is resolved, sets `selectedVideoTrackId` /\n* `selectedAudioTrackId` from a per-type default rule chain if no selection\n* already exists. When the presentation is unset/reset (transitions back to unresolved),\n* clears the selection so a stale id from the previous source doesn't persist.\n*\n* Lifecycle-driven: the pick fires once per transition, and nothing re-picks —\n* that is what separates these from the `switch*` variants. External writes (user\n* picks, ABR, programmatic filter-driven re-picks) are left alone, including a\n* write naming a track the manifest never offered.\n*\n* The one thing policed between transitions is a pick the *constraints* turn\n* against: a rendition's container and encryption are only known once its media\n* playlist resolves, which is after the pick was made, so a selection that becomes\n* unplayable is dropped. Dropped, never moved — re-picking is exactly the behavior\n* `switchVideoTrack` exists to provide. Dropping reports nothing on its own, since\n* whatever made the pick unplayable already reported its own, more specific cause.\n*\n* Selection runs the same rule model `switchVideoTrack` does — a hard\n* `constraints` pre-pass, then an ordered `rules` chain, with the pick as the\n* head (see `internal/design/spf/track-switching-model.md`). What differs is\n* reactivity, not the rules: this evaluates the chain once on resolve and pins\n* the result, where `switchVideoTrack` re-evaluates inside an effect so its rules\n* subscribe to bandwidth and user selection. A rule written for one therefore\n* composes into the other unchanged.\n*\n* Both are config-driven, each per-type export wiring a sensible default: audio's\n* three-tier language policy, and for video the *empty* chain — with nothing\n* narrowing or reordering, the head is the first candidate. The behavior's\n* `config` is forwarded to the rules, so options like `preferredAudioLanguage`\n* reach them without an intermediate layer.\n*\n* Note a rule can only pick among real candidates, where the picker it replaced\n* could return any id at all. An id absent from the manifest was never\n* selectable, so that narrowing is the point rather than a limitation.\n*\n* Compose `selectVideoTrack` for the simple \"pick a default video track\"\n* behavior, or `switchVideoTrack` (`./track-switching.ts`) for the\n* ABR-driven variant. Compose `selectAudioTrack` for the simple default\n* pick, or `switchAudioTrack` (`./track-switching.ts`) for the\n* filter-reactive + mid-stream-flush slot-owner variant — when audio-abr\n* lands, `switchAudioTrack` extends into `switchAudioQuality`. Compose\n* only one per type — they're alternatives, not stackable (each writes\n* the same `selected*TrackId` slot). The simple variants tree-shake out\n* the heavier machinery (bandwidth estimator, quality selection, flush\n* orchestration).\n*\n* Text selection has no simple variant here — it's owned by `switchTextTrack`\n* (`./track-switching.ts`), which resolves standing `userTextTrackSelection`\n* intent against the constrained, CDN-scoped renditions.\n*/\nfunction setupTrackSelection({ state, config: { selectedKey, trackType, constraints, rules, ruleConfig } }) {\n\tconst derivedStateSignal = computed(() => isResolvedPresentation(state.presentation.get()) ? \"presentation-resolved\" : \"presentation-unresolved\");\n\tconst deps = {\n\t\tstate,\n\t\tconfig: ruleConfig\n\t};\n\tconst candidateSet = computed(() => {\n\t\tconst presentation = state.presentation.get();\n\t\tif (!isResolvedPresentation(presentation)) return [];\n\t\treturn applyConstraints(constraints, getTracksByType(presentation, trackType), deps);\n\t}, { equals: sameCandidateSet });\n\treturn createMachineReactor({\n\t\tinitial: \"presentation-unresolved\",\n\t\tmonitor: () => derivedStateSignal.get(),\n\t\tstates: {\n\t\t\t\"presentation-unresolved\": {},\n\t\t\t\"presentation-resolved\": {\n\t\t\t\tentry: () => {\n\t\t\t\t\tif (!state[selectedKey].get()) {\n\t\t\t\t\t\tconst id = applyRules(rules, peek(candidateSet), deps)[0]?.id;\n\t\t\t\t\t\tif (id) state[selectedKey].set(id);\n\t\t\t\t\t}\n\t\t\t\t\treturn () => state[selectedKey].set(void 0);\n\t\t\t\t},\n\t\t\t\teffects: [() => {\n\t\t\t\t\tconst selectedId = peek(state[selectedKey]);\n\t\t\t\t\tif (!selectedId) return;\n\t\t\t\t\tif (candidateSet.get().some((track) => track.id === selectedId)) return;\n\t\t\t\t\tconst presentation = peek(state.presentation);\n\t\t\t\t\tif (isResolvedPresentation(presentation) && getTracksByType(presentation, trackType).some((track) => track.id === selectedId)) state[selectedKey].set(void 0);\n\t\t\t\t}]\n\t\t\t}\n\t\t}\n\t});\n}\n/** Default video chain: none. The first candidate is the pick. */\nconst DEFAULT_VIDEO_RULES = [];\n/**\n* Default audio chain: the three-tier policy (`preferredAudioLanguage` →\n* `DEFAULT=YES` → first) as a single narrowing rule. Returning `[]` when nothing\n* is picked lets `applyRules` fall through to the unnarrowed candidates, so the\n* head stays the first track — the same last tier the policy itself ends on.\n*/\nconst preferAudioPolicy = (tracks, { config }) => {\n\tconst id = pickAudioTrackFromTracks(tracks, config);\n\tconst pick = tracks.find((track) => track.id === id);\n\treturn pick ? [pick] : [];\n};\nconst DEFAULT_AUDIO_RULES = [preferAudioPolicy];\n/**\n* Order the candidates by resolution, largest first, with bandwidth breaking ties\n* between renditions of identical dimensions. The background-video default — that\n* variant pins one rendition for the session, and absent a cap the largest is the\n* head.\n*\n* A ranker, so it reorders rather than narrowing: the chain's pick is the head of\n* what it returns, which means ranking never has to collapse to one track. Belongs\n* last in a chain — a sort only reorders what survived the filters ahead of it, and\n* leaving it last is what lets `applyRules` early-bail before it runs.\n*\n* Exported because it is a *rule*, not a variant's private policy: the same one\n* composes into `switchVideoTrack`'s chain when a ranker is wanted there.\n*/\nconst preferHighestResolution = (tracks) => [...tracks].sort(byDescendingResolution);\n/**\n* Narrow to the renditions that fit the screen, by pixel area — the screen-size\n* cap from `internal/design/spf/features/rendition-selection-caps.md`, as a scope\n* (soft filter) rather than a constraint: an over-cap rendition is wasteful, not\n* unplayable, so nothing here may make a source unplayable.\n*\n* Narrows only — it neither orders the survivors nor resolves the case where none\n* survive, because `applyRules` owns both. So it needs a ranker behind it to pick\n* within the cap: `[screenResolutionCap, preferHighestResolution]` yields the\n* largest rendition that fits. Composed *last*, the pick would instead be whichever\n* fitting rendition the manifest happened to list first.\n*\n* Reading `state.screenResolution` through its signal is what subscribes a\n* re-evaluating chain (`switchVideoTrack`) to screen changes; `selectVideoTrack`\n* pins the first answer instead, by design.\n*\n* Compares areas rather than matching a `\"1080p\"`-style tier because a tier only\n* describes a rendition once you assume its aspect ratio — the assumption that\n* mis-measures an anamorphic ladder. See `media/dom/screen.ts`.\n*\n* Three ways the cap ends up not applying, all of them fall-through:\n*\n* - **No `screenResolution` signal at all**, because the composition omits\n* `trackScreenResolution`. So composing the cap without its signal source is\n* inert rather than broken.\n* - **A `screenResolution` of `undefined`**, meaning no screen to read. \"Unknown\"\n* has to mean \"don't cap\": treating it as an area of zero would pin every source\n* to its smallest rendition on exactly the environments we know least about.\n* - **No rendition fits**, on a screen smaller than the whole ladder. `applyRules`\n* skips the empty result and the chain proceeds unnarrowed, so the ranker behind\n* the cap decides — for `preferHighestResolution`, the largest rendition. A floor\n* is the fix if that ever matters (`rendition-selection-caps.md` carries one), not\n* a special case here.\n*/\nconst screenResolutionCap = (tracks, { state }) => {\n\tconst screenResolution = state?.screenResolution?.get();\n\tif (!screenResolution) return [];\n\treturn tracksUnderPixelArea(tracks, screenResolution.width * screenResolution.height);\n};\n/**\n* Default video constraints: the capability pre-pass alone. No\n* `excludeFailedCdns` — this variant's compositions run no failover monitor, so\n* `failedCdns` has no writer and the constraint would always pass through.\n*/\nconst DEFAULT_VIDEO_CONSTRAINTS = [excludeUnplayableTracks];\n/**\n* Select a video track when a presentation loads. Clears the selection on\n* src unload.\n*\n* This is the simple, non-ABR counterpart to `switchVideoTrack` — compose\n* one or the other, not both (both write `selectedVideoTrackId`). Composing\n* `selectVideoTrack` alone tree-shakes out the ABR code path\n* (bandwidth-estimator, quality-selection); use it for sources without\n* meaningful quality variants, test setups, or players that intentionally\n* pin a quality.\n*\n* @example\n* const reactor = selectVideoTrack.setup({ state });\n*/\nconst selectVideoTrack = defineBehavior({\n\tstateKeys: [\"presentation\", \"selectedVideoTrackId\"],\n\tcontextKeys: [],\n\tsetup: ({ state, config }) => setupTrackSelection({\n\t\tstate,\n\t\tconfig: {\n\t\t\tselectedKey: VIDEO_TYPE_CONFIG.selectedKey,\n\t\t\ttrackType: \"video\",\n\t\t\tconstraints: config?.constraints ?? DEFAULT_VIDEO_CONSTRAINTS,\n\t\t\trules: config?.rules ?? DEFAULT_VIDEO_RULES,\n\t\t\truleConfig: config\n\t\t}\n\t})\n});\ndefineBehavior({\n\tstateKeys: [\"presentation\", \"selectedAudioTrackId\"],\n\tcontextKeys: [],\n\tsetup: ({ state, config }) => setupTrackSelection({\n\t\tstate,\n\t\tconfig: {\n\t\t\tselectedKey: AUDIO_TYPE_CONFIG.selectedKey,\n\t\t\ttrackType: \"audio\",\n\t\t\tconstraints: config?.constraints ?? [],\n\t\t\trules: config?.rules ?? DEFAULT_AUDIO_RULES,\n\t\t\truleConfig: config\n\t\t}\n\t})\n});\n//#endregion\nexport { preferHighestResolution, screenResolutionCap, selectVideoTrack };\n\n//# sourceMappingURL=select-tracks.js.map","import { scaleResolution } from \"../primitives/resolution.js\";\nimport { getDevicePixelRatio, listen, watchDevicePixelRatio } from \"@videojs/utils/dom\";\nimport { isFunction } from \"@videojs/utils/predicate\";\nimport { shallowEqual } from \"@videojs/utils/object\";\n//#region src/media/dom/screen.ts\n/**\n* Screen resolution, as the signal source for a screen-size rendition cap.\n*\n* Reported as a width and a height rather than a `\"720p\"`-style tier, because\n* the cap that consumes it compares against real track dimensions. A tier only\n* describes a track once you assume its aspect ratio, and that assumption\n* mis-measures an anamorphic or otherwise non-16:9 rendition.\n*\n* The signal source for the screen-size cap in\n* `internal/design/spf/features/rendition-selection-caps.md`.\n*\n* The screen underneath a window is not stable: rotating a device swaps the axes,\n* and unplugging a monitor or dragging the window to another display changes the\n* numbers *and* which physical screen they describe. So `getScreenResolution`\n* reads at call time and caches nothing, and `watchScreenResolution` layers the\n* reacting on top rather than the reader holding state of its own.\n*/\n/**\n* Read the screen's resolution, or `undefined` where there isn't one to read.\n*\n* `undefined` means \"unknown\", which is the answer a cap needs in order to not\n* cap. `screenResolutionCap` reads it that way and declines to narrow, so an\n* unknown screen is \"no cap\" rather than a cap of zero — the reading a naive\n* `?? 0` would produce, which would pin every source to its smallest rendition on\n* exactly the environments we know least about.\n*\n* Dimensions are reported as-is, including the axis swap a rotated device\n* applies to them. Normalizing orientation away is a policy question — whether a\n* cap should flap on rotation, or hold the larger budget across both — and\n* belongs to the cap rather than to the reading.\n*/\nfunction getScreenResolution({ useDevicePixelRatio } = { useDevicePixelRatio: true }) {\n\tconst screen = globalThis.screen;\n\tif (!screen) return void 0;\n\treturn scaleResolution(screen, useDevicePixelRatio ? getDevicePixelRatio() : 1);\n}\n/**\n* Call `onChange` whenever {@link getScreenResolution} would start answering\n* differently. Returns a function that stops watching.\n*\n* There is no single event for \"the screen changed\", so this subscribes to every\n* signal that implies one and compares readings to decide whether anything\n* actually moved. Comparing is what makes that safe: the signals overlap and\n* `resize` in particular is noisy, so over-subscribing costs a discarded read\n* rather than a spurious call.\n*\n* `onChange` is called once on subscribe with the starting value — including\n* `undefined` where there is no screen — and after that only on a genuine change.\n* So a consumer gets its initial state from the watcher and never has to pair it\n* with a separate {@link getScreenResolution} call.\n*\n* The signals, and what each one is here for:\n*\n* - **`screen`'s own `change`** — the screen itself being reconfigured, or the\n* window landing on a different one. The direct signal, and the only one that\n* catches a window moving between two same-size, same-ratio displays. From the\n* Window Management API, but on the base `Screen` rather than behind\n* `getScreenDetails()`, so it needs no permission — only a secure context.\n* Measured present in Chromium and absent in WebKit and Firefox, hence the\n* three below rather than this alone.\n* - **`resize`** — the window changing size, which is also what the OS does to it\n* when the display it was on goes away.\n* - **`screen.orientation` change** — rotation, which swaps the axes without\n* necessarily resizing the window.\n* - **a `(resolution: <ratio>dppx)` media query** (`watchDevicePixelRatio`) — the\n* device pixel ratio changing under a window that kept its size, which is the\n* cross-display drag between displays of different density.\n*\n* Worth keeping despite looking redundant, because it is the only coverage that\n* case has in WebKit and Firefox: neither implements `screen`'s change event,\n* and the drag doesn't resize the window. It is also a cleaner signal in Safari\n* than elsewhere — WebKit holds `devicePixelRatio` independent of page zoom, so\n* there it moves only on a real density change, where Chromium and Gecko fold\n* zoom into it as well.\n*\n* ⚠️ Known gap, on engines without `screen`'s change event: dragging a window\n* between two different-size displays that share a ratio, without the window\n* resizing, changes the reading with nothing firing. Closing it there would mean\n* polling, whose interval and battery cost are a policy decision this function\n* shouldn't be making.\n*/\nfunction watchScreenResolution(onChange, options = { useDevicePixelRatio: true }) {\n\tconst disconnect = new AbortController();\n\tconst { signal } = disconnect;\n\tlet current = getScreenResolution(options);\n\tconst check = () => {\n\t\tconst next = getScreenResolution(options);\n\t\tif (shallowEqual(current, next)) return;\n\t\tcurrent = next;\n\t\tonChange(next);\n\t};\n\tonChange(current);\n\twatchDevicePixelRatio(check, signal);\n\tconst screen = globalThis.screen;\n\tconst orientation = screen?.orientation;\n\tif (globalThis.window) listen(globalThis.window, \"resize\", check, { signal });\n\tif (isEventTarget(screen)) listen(screen, \"change\", check, { signal });\n\tif (orientation) listen(orientation, \"change\", check, { signal });\n\treturn () => disconnect.abort();\n}\nfunction isEventTarget(value) {\n\treturn isFunction(value?.addEventListener);\n}\n//#endregion\nexport { getScreenResolution, watchScreenResolution };\n\n//# sourceMappingURL=screen.js.map","import { defineBehavior } from \"../../../core/composition/create-composition.js\";\nimport { watchScreenResolution } from \"../../../media/dom/screen.js\";\n//#region src/playback/behaviors/dom/track-screen-resolution.ts\n/**\n* Mirror the screen's pixel dimensions into reactive state, so a rendition cap\n* can narrow candidates to what the screen can actually show without reading the\n* environment at pick time — which would make the picker impure, and would never\n* re-pick when the screen changed.\n*\n* Populated at setup rather than on the first change: `watchScreenResolution`\n* reports its starting value, so nothing downstream waits on a screen that may\n* never move. `undefined` where there is no screen to read, which is the value a\n* cap reads as \"no cap\" — see `getScreenResolution` on why that beats a zero.\n*\n* Reads no other slot, and has no source-identity reset: the screen is\n* independent of the presentation, so a new `src` doesn't invalidate the reading.\n*/\nfunction trackScreenResolutionSetup({ state, config }) {\n\treturn watchScreenResolution((resolution) => state.screenResolution.set(resolution), { useDevicePixelRatio: config?.useDevicePixelRatio ?? true });\n}\nconst trackScreenResolution = defineBehavior({\n\tstateKeys: [\"screenResolution\"],\n\tcontextKeys: [],\n\tsetup: trackScreenResolutionSetup\n});\n//#endregion\nexport { trackScreenResolution };\n\n//# sourceMappingURL=track-screen-resolution.js.map","import { createComposition } from \"../../../core/composition/create-composition.js\";\nimport { makeShareSignals } from \"../../../core/composition/share-signals.js\";\nimport { loadVideoSegments } from \"../../behaviors/dom/load-segments.js\";\nimport { trackCurrentTime } from \"../../behaviors/dom/track-current-time.js\";\nimport \"../../../media/errors.js\";\nimport { excludeUnplayableTracks } from \"../../primitives/selection-rules.js\";\nimport { preferHighestResolution, screenResolutionCap, selectVideoTrack } from \"../../behaviors/select-tracks.js\";\nimport { canPlayTrack } from \"../../../media/dom/capabilities.js\";\nimport { parseMultivariantPlaylist } from \"../../../media/hls/parse-multivariant.js\";\nimport { getResolvedSelectedTrackDuration } from \"../../../media/utils/track-selection.js\";\nimport { calculatePresentationDuration } from \"../../behaviors/calculate-presentation-duration.js\";\nimport { collectErrors, reportAbsentTrackType } from \"../../behaviors/collect-errors.js\";\nimport { endOfStream } from \"../../behaviors/dom/end-of-stream.js\";\nimport { setupVideoBufferActors } from \"../../behaviors/dom/setup-buffer-actors.js\";\nimport { setupMediaSource } from \"../../behaviors/dom/setup-mediasource.js\";\nimport { updateMediaSourceDuration } from \"../../behaviors/dom/update-mediasource-duration.js\";\nimport { resolvePresentation } from \"../../behaviors/resolve-presentation.js\";\nimport { resolveVideoTrack } from \"../../behaviors/resolve-track.js\";\nimport { reportUnsupportedTrackConditions } from \"../../primitives/report-track-conditions.js\";\nimport { trackScreenResolution } from \"../../behaviors/dom/track-screen-resolution.js\";\n//#region src/playback/engines/hls/engine-background-video.ts\nconst shareSignals = makeShareSignals();\n/**\n* Create a background-video playback engine.\n*\n* Subtractive composition over the HLS engine baseline:\n* audio-side, text-side, ABR-driven, preload-monitoring, and play/seek\n* load-trigger behaviors are removed. `selectVideoTrack` (with a\n* highest-resolution rule by default) replaces `switchVideoQuality`, pinning\n* a single rendition for the session. The initial state seeds\n* `loadActivated: true` so the composition behaves as if preload has\n* already been activated — appropriate for ambient / hero / GIF-replacement\n* surfaces that should start loading the moment a src is set.\n*\n* Error reporting is *not* subtracted: `collectErrors` owns the sequence,\n* `resolveVideoTrack` reports per-rendition causes, and `selectVideoTrack`\n* reports the video verdict when nothing survives its constraints. Without them\n* every unplayable source here is a silent stall — an unsupported container,\n* encryption this engine can't decrypt, and an undecodable codec all leave\n* `HTMLMediaElement.error` null on both Chromium and WebKit.\n*\n* Native `loop` / `muted` / `autoplay` are adapter concerns and live on\n* `HlsBackgroundVideoMediaElement` rather than the engine.\n*\n* @example\n* ```ts\n* let signals: BackgroundVideoEngineSignals;\n* const engine = createBackgroundVideoEngine({\n* onSignalsReady: (refs) => {\n* signals = refs;\n* },\n* });\n*\n* signals.context.mediaElement.set(videoEl);\n* signals.state.presentation.set({ url: 'https://example.com/stream.m3u8' });\n*\n* await engine.destroy();\n* ```\n*/\nfunction createBackgroundVideoEngine(config = {}) {\n\tconst finalConfig = {\n\t\t...config,\n\t\tconstraints: config.constraints ?? [excludeUnplayableTracks, reportAbsentTrackType(2011)],\n\t\trules: config.rules ?? [screenResolutionCap, preferHighestResolution],\n\t\tparsePresentation: config.parsePresentation ?? parseMultivariantPlaylist,\n\t\tresolveDuration: getResolvedSelectedTrackDuration,\n\t\tcanPlayTrack: config.canPlayTrack ?? canPlayTrack,\n\t\treportUnsupportedTrackConditions: config.reportUnsupportedTrackConditions ?? reportUnsupportedTrackConditions\n\t};\n\treturn createComposition([\n\t\tresolvePresentation,\n\t\tcalculatePresentationDuration,\n\t\tcollectErrors,\n\t\tselectVideoTrack,\n\t\tresolveVideoTrack,\n\t\tloadVideoSegments,\n\t\tsetupMediaSource,\n\t\tupdateMediaSourceDuration,\n\t\tsetupVideoBufferActors,\n\t\ttrackCurrentTime,\n\t\ttrackScreenResolution,\n\t\tendOfStream,\n\t\tshareSignals\n\t], {\n\t\tconfig: finalConfig,\n\t\tinitialState: { loadActivated: true }\n\t});\n}\n//#endregion\nexport { createBackgroundVideoEngine };\n\n//# sourceMappingURL=engine-background-video.js.map","import { effect } from \"../../../core/signals/effect.js\";\nimport { SVTA_NO_SUPPORTED_VIDEO_TRACK, SVTA_UNSUPPORTED_DRM_SYSTEM, SVTA_UNSUPPORTED_PLAYBACK_FEATURE, SVTA_UNSUPPORTED_VIDEO_FORMAT } from \"../../../media/errors.js\";\nimport { createBackgroundVideoEngine } from \"../../engines/hls/engine-background-video.js\";\nimport { UNPLAYABLE_SOURCE_MESSAGE } from \"../../primitives/error-messages.js\";\nimport { firstFatal, hasUnsupportedFeatureCause } from \"../hls-video/error-surface.js\";\n//#region src/playback/adapters/hls-background-video/adapter.ts\nconst hlsBackgroundVideoMediaDefaultProps = { src: \"\" };\n/**\n* Which reported conditions this composition treats as **fatal** — the ones that\n* reach `error` and fire `'error'`. Severity isn't part of an SVTA code\n* (§Approach: \"impact varies with player implementation\"), so it's decided at\n* this boundary rather than by the reporter.\n*\n* **Causes are fatal here, unlike on the other two adapters.** There, a cause is\n* context — one unplayable rendition doesn't fail a source whose others still\n* play, and a verdict follows if the type empties. In the pinned variant a cause\n* *is* the verdict: only the pinned rendition's playlist is ever resolved, so a\n* cause can only be about the pick itself, and dropping that pick is final —\n* nothing here re-picks (that is what `switchVideoTrack` exists for, and this\n* engine doesn't compose it). Measured on Chromium: an MPEG-TS source reports\n* 1004 and an encrypted one 4008, each with no verdict behind it, and the element\n* then sits at `readyState 0` with `error` null forever.\n*\n* The verdict is still listed, for the shapes that report nothing else: no video\n* renditions at all, or a ladder pruned before anything resolves — both of which\n* `reportAbsentTrackType` covers from the tail of the constraint chain.\n*\n* First-fatal-wins then surfaces the cause rather than the verdict when both are\n* present, which is the more specific of the two.\n*/\nconst FATAL_SVTA_CODES = /* @__PURE__ */ new Set([\n\tSVTA_NO_SUPPORTED_VIDEO_TRACK,\n\tSVTA_UNSUPPORTED_VIDEO_FORMAT,\n\tSVTA_UNSUPPORTED_DRM_SYSTEM\n]);\n/**\n* Mixin that adds the background-video SPF playback engine to any base class,\n* for an HLS URL.\n*\n* `src` is the whole input surface, and `error` is the one output: nothing about\n* an unplayable source reaches the media element on its own here — an unsupported\n* container, encryption with no EME, and an undecodable codec all leave\n* `HTMLMediaElement.error` null with the element stalled at `readyState 0`\n* (measured on Chromium and WebKit) — so a consumer that watched only the\n* `<video>` would see a source that never appears and never says why. The engine\n* reports each condition onto `engine.state.errors` and logs it; this adapter\n* promotes the first fatal one, mapping it the same way the video and audio Medias\n* map theirs. See `internal/design/spf/features/errors.md`.\n*\n* Selection pins the largest rendition that *fits the screen*, and holds it for\n* the session. The manifest is still the better place to narrow further: a\n* delivery param — `?max_resolution=720p` on a Mux stream URL, for one — keeps\n* the renditions it excludes out of the manifest entirely, rather than\n* fetched-then-unpicked.\n*\n* The pin is given up, never moved, if the pick turns out to be unplayable: the\n* container is only known once a media playlist resolves, which is after the pick\n* is made, so the selection clears rather than quietly appending bytes nothing can\n* decode.\n*\n* `@videojs/spf/mux-background-video` is this same Media under a Mux-flavored\n* name — an alias, not a variant. Nothing about the surface changes with the\n* import path.\n*\n* Everything else the use case fixes rather than exposes: video-only, looping,\n* muted, autoplaying, loading as soon as there is a source. `attach` writes that\n* onto the element and nothing here declares `loop` / `muted` / `autoplay` /\n* `preload` of its own — a host-bound Media inherits all four from the host\n* already, and shadowing them with fixed values would only make reads describe\n* an intention rather than what the element is doing.\n*\n* A new src re-resolves the presentation, tearing down the state, SourceBuffers,\n* and in-flight requests the previous one built before the next begins. The\n* engine instance and the attached media element are both kept, so neither has to\n* be rewired.\n*\n* @fires error - Fired when a fatal condition is reported. Read `error` for it.\n*\n* @example\n* class HlsBackgroundVideoMedia extends HlsBackgroundVideoMediaMixin(BackgroundVideoHost) {}\n*\n* const media = new HlsBackgroundVideoMedia();\n* media.attach(document.querySelector('video'));\n* media.src = 'https://stream.mux.com/PLAYBACK_ID.m3u8?max_resolution=720p';\n* media.play();\n*/\nfunction HlsBackgroundVideoMediaMixin(BaseClass) {\n\tclass HlsBackgroundVideoMediaImpl extends BaseClass {\n\t\t#engine;\n\t\t#config;\n\t\t#signals;\n\t\t#error = null;\n\t\t/**\n\t\t* The *reported* condition currently surfaced, which is what the re-fire latch\n\t\t* keys on. Not `#error.code`: that's the code this adapter chose to surface,\n\t\t* and the substitution below can make the two differ.\n\t\t*/\n\t\t#reportedCode = null;\n\t\t#stopErrorSync;\n\t\t/** Pending loadstart listener from a deferred play() retry, if any. */\n\t\t#loadstartListener = null;\n\t\tconstructor(...args) {\n\t\t\tsuper(...args);\n\t\t\tconst { config } = args?.[0] ?? {};\n\t\t\tthis.#config = config;\n\t\t\tthis.#engine = this.#createEngine();\n\t\t\tthis.#stopErrorSync = effect(() => {\n\t\t\t\tconst errors = this.#signals.state.errors.get();\n\t\t\t\tthis.#setError(firstFatal(errors, FATAL_SVTA_CODES), errors);\n\t\t\t});\n\t\t}\n\t\tget engine() {\n\t\t\treturn this.#engine;\n\t\t}\n\t\t/**\n\t\t* The current fatal condition, or `null`. Only *fatal* ones appear here — the\n\t\t* engine reports non-fatal ones too (they stay in `engine.state.errors`), and\n\t\t* promoting them would say playback had failed when it hadn't. Which ones are\n\t\t* fatal is wider here than on the video and audio Medias; see\n\t\t* {@link FATAL_SVTA_CODES}. Resets per source. Fires `'error'` when set.\n\t\t*\n\t\t* Mapped the same way theirs are: a sequence holding an\n\t\t* unimplemented-capability cause surfaces as\n\t\t* {@link SVTA_UNSUPPORTED_PLAYBACK_FEATURE} (99001) with the specifics logged,\n\t\t* because \"this player can't play this source\" is what a consumer can act on,\n\t\t* where a raw container or DRM code only says what to go and look up.\n\t\t*/\n\t\tget error() {\n\t\t\treturn this.#error;\n\t\t}\n\t\t#setError(reported, errors) {\n\t\t\tif (!reported) {\n\t\t\t\tthis.#error = null;\n\t\t\t\tthis.#reportedCode = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.#reportedCode === reported.code) return;\n\t\t\tthis.#reportedCode = reported.code;\n\t\t\tconsole.error(UNPLAYABLE_SOURCE_MESSAGE, { conditions: errors });\n\t\t\tthis.#error = {\n\t\t\t\tcode: hasUnsupportedFeatureCause(errors) ? SVTA_UNSUPPORTED_PLAYBACK_FEATURE : reported.code,\n\t\t\t\tmessage: reported.message ?? \"\",\n\t\t\t\t...reported.data === void 0 ? {} : { data: reported.data }\n\t\t\t};\n\t\t\tthis.dispatchEvent?.(new Event(\"error\"));\n\t\t}\n\t\tattach(mediaElement) {\n\t\t\tsuper.attach?.(mediaElement);\n\t\t\tmediaElement.loop = true;\n\t\t\tmediaElement.muted = true;\n\t\t\tmediaElement.autoplay = true;\n\t\t\tmediaElement.preload = \"auto\";\n\t\t\tthis.#signals.context.mediaElement.set(mediaElement);\n\t\t}\n\t\tdetach() {\n\t\t\tthis.#cancelPendingPlay();\n\t\t\tthis.#signals.context.mediaElement.set(void 0);\n\t\t\tsuper.detach?.();\n\t\t}\n\t\tdestroy() {\n\t\t\tthis.#cancelPendingPlay();\n\t\t\tthis.#stopErrorSync();\n\t\t\tthis.#engine.destroy();\n\t\t}\n\t\tget src() {\n\t\t\treturn this.#signals.state.presentation.get()?.url ?? \"\";\n\t\t}\n\t\tset src(value) {\n\t\t\tif (value === this.src) return;\n\t\t\tthis.#cancelPendingPlay();\n\t\t\tthis.#signals.state.presentation.set(value ? { url: value } : void 0);\n\t\t}\n\t\tasync play() {\n\t\t\tconst mediaElement = this.#signals.context.mediaElement.get();\n\t\t\tif (!mediaElement) return Promise.reject(/* @__PURE__ */ new Error(\"HlsBackgroundVideoMediaElement: no media element attached\"));\n\t\t\ttry {\n\t\t\t\treturn await mediaElement.play();\n\t\t\t} catch (err) {\n\t\t\t\tif (this.src) return new Promise((resolve, reject) => {\n\t\t\t\t\tconst listener = () => {\n\t\t\t\t\t\tthis.#loadstartListener = null;\n\t\t\t\t\t\tmediaElement.play().then(resolve, reject);\n\t\t\t\t\t};\n\t\t\t\t\tthis.#loadstartListener = listener;\n\t\t\t\t\tmediaElement.addEventListener(\"loadstart\", listener, { once: true });\n\t\t\t\t});\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\t\t#createEngine() {\n\t\t\treturn createBackgroundVideoEngine({\n\t\t\t\t...this.#config,\n\t\t\t\tonSignalsReady: (signals) => {\n\t\t\t\t\tthis.#signals = signals;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t#cancelPendingPlay() {\n\t\t\tif (!this.#loadstartListener) return;\n\t\t\tthis.#signals.context.mediaElement.get()?.removeEventListener(\"loadstart\", this.#loadstartListener);\n\t\t\tthis.#loadstartListener = null;\n\t\t}\n\t}\n\treturn HlsBackgroundVideoMediaImpl;\n}\n/** Standalone SPF background-video adapter with no base class. */\nvar HlsBackgroundVideoMediaElement = class extends HlsBackgroundVideoMediaMixin(class {}) {};\n//#endregion\nexport { HlsBackgroundVideoMediaElement, HlsBackgroundVideoMediaMixin, hlsBackgroundVideoMediaDefaultProps };\n\n//# sourceMappingURL=adapter.js.map","//#region src/playback/adapters/hls-background-video/host.ts\n/**\n* The `<video>` binding a background video uses: somewhere to keep the attached\n* element, and the four properties the Media fixes on it.\n*\n* That is the whole surface anything here reaches. The engine drives playback,\n* the element exposes `src` and nothing else, and the background player\n* subscribes to no store features, so nothing asks a background video for\n* `currentTime`, `play()`, picture-in-picture, fullscreen, forwarded events, or\n* media components. Holding the host to what is reachable is what keeps this\n* entry free of `@videojs/media`, and small enough to suit a component whose\n* whole pitch is its size.\n*\n* An `EventTarget`, because a Media is one: the store and the element layers\n* take anything they attach as an event source, and inheriting the three methods\n* satisfies that for free rather than by stubbing them.\n*\n* ⚠️ It still implements too little to carry the rest of the media surface, which\n* bounds what may consume it: a store feature reading a property outside this set\n* gets `undefined` rather than an error. A Media needing more of that surface\n* belongs on a host that provides it.\n*/\nvar BackgroundVideoHost = class extends EventTarget {\n\t#target = null;\n\tattach(target) {\n\t\tif (!target || this.#target === target) return;\n\t\tthis.#target = target;\n\t}\n\tdetach() {\n\t\tthis.#target = null;\n\t}\n\tget loop() {\n\t\treturn this.#target?.loop ?? false;\n\t}\n\tset loop(value) {\n\t\tif (this.#target) this.#target.loop = value;\n\t}\n\tget muted() {\n\t\treturn this.#target?.muted ?? false;\n\t}\n\tset muted(value) {\n\t\tif (this.#target) this.#target.muted = value;\n\t}\n\tget autoplay() {\n\t\treturn this.#target?.autoplay ?? false;\n\t}\n\tset autoplay(value) {\n\t\tif (this.#target) this.#target.autoplay = value;\n\t}\n\tget preload() {\n\t\treturn this.#target?.preload ?? \"metadata\";\n\t}\n\tset preload(value) {\n\t\tif (this.#target) this.#target.preload = value;\n\t}\n};\n//#endregion\nexport { BackgroundVideoHost };\n\n//# sourceMappingURL=host.js.map","import { HlsBackgroundVideoMediaMixin } from \"./adapter.js\";\nimport { BackgroundVideoHost } from \"./host.js\";\n//#region src/playback/adapters/hls-background-video/media.ts\nconst HlsBackgroundVideoMediaBase = HlsBackgroundVideoMediaMixin(BackgroundVideoHost);\n/**\n* The background-video Media, bound to a `<video>` through\n* {@link BackgroundVideoHost}.\n*\n* That host carries the attached element and the four properties `attach` fixes,\n* which is all this Media's surface needs, and it is local — so this entry has\n* no `@videojs/media` dependency.\n*\n* No `MediaTracksMixin`, unlike `HlsVideoMedia`: the engine subtracts audio and\n* text entirely and pins one video rendition for the session, so there are no\n* track lists for a consumer to project or switch between.\n*/\nvar HlsBackgroundVideoMedia = class extends HlsBackgroundVideoMediaBase {};\n//#endregion\nexport { HlsBackgroundVideoMedia };\n\n//# sourceMappingURL=media.js.map","import type { Media } from '@videojs/media/dom';\nimport { HlsBackgroundVideoMedia, type HlsVideoMediaError } from '@videojs/spf/hls-background-video';\nimport { type CustomElement, namedNodeMapToObject } from '@videojs/utils/dom';\nimport type { Constructor } from '@videojs/utils/types';\nimport { MediaAttachMixin } from '../../store/media-attach-mixin';\nimport { getTemplateHTML } from '../background-video/template';\n\n// `MediaAttachMixin` is typed as returning its base, so its `disconnectedCallback`\n// isn't visible for `super` to reach. `CustomElement` declares the lifecycle\n// callbacks this element overrides.\nconst HlsBackgroundVideoBase = MediaAttachMixin(HTMLElement) as unknown as Constructor<CustomElement>;\n\n/**\n * A muted, looping, chrome-less video over the SPF background-video engine.\n *\n * The SPF-backed counterpart to `<background-video>`, which plays its source\n * natively. This one streams HLS through the engine, which pins a single\n * rendition for the session rather than adapting, and drops audio and text\n * handling entirely — the shape an ambient hero video actually wants.\n *\n * Nearer an image than a player, and `src` is the whole surface. Replaces the\n * standalone `mux-background-video` package, whose `audio`, `debug`, `preload`,\n * and `max-resolution` attributes are all deliberately absent. Capping which\n * rendition is fetched is a delivery param on the URL — `?max_resolution=720p`\n * on a Mux stream, for one — which keeps the renditions it excludes out of the\n * manifest rather than merely unpicked; `preload` would have nothing to say,\n * since the engine loads from the moment it has a source. And unlike\n * `<background-video>` there are no `nomuted` / `noloop` / `noautoplay` opt-outs:\n * those three are what this element is for, so the adapter fixes them on at\n * attach.\n *\n * Takes no structured `source` — `src` is an HLS URL, as the package it replaces\n * required. Mux playback-ID identity, poster, and storyboard belong to\n * `<mux-video>`; none of them mean anything without controls to hang them on.\n *\n * Nothing about an unplayable source reaches the inner `<video>` on its own, so\n * `error` on it stays null and the element sits at `readyState 0`. The engine\n * reports each condition and logs it, the Media promotes the fatal one, and this\n * element re-fires it as its own `error` / `'error'` — the one place a consumer\n * holding the element can see a source that never appears.\n *\n * @fires error - Fired when a fatal condition is reported. Read `error` for it.\n *\n * `<mux-background-video>` is this element under the name the package it replaces\n * used. Same class, so the tag is a naming choice and nothing more.\n *\n * @example\n * ```html\n * <hls-background-video src=\"https://stream.mux.com/PLAYBACK_ID.m3u8?max_resolution=720p\">\n * <img src=\"https://image.mux.com/PLAYBACK_ID/thumbnail.webp?time=0\" alt=\"\" />\n * </hls-background-video>\n * ```\n */\n// Deliberately not `CustomMediaElement`, matching `<background-video>`: a\n// background video needs one property, not the full WHATWG media API.\nexport class HlsBackgroundVideo extends HlsBackgroundVideoBase {\n static shadowRootOptions = { mode: 'open' as ShadowRootMode };\n static getTemplateHTML = getTemplateHTML;\n\n static get observedAttributes(): string[] {\n return ['src'];\n }\n\n #media = new HlsBackgroundVideoMedia();\n\n constructor() {\n super();\n\n if (!this.shadowRoot) {\n this.attachShadow((this.constructor as typeof HlsBackgroundVideo).shadowRootOptions);\n\n const attrs = {\n ...namedNodeMapToObject(this.attributes),\n muted: '',\n loop: '',\n autoplay: '',\n playsinline: '',\n disableremoteplayback: '',\n disablepictureinpicture: '',\n };\n\n this.shadowRoot!.innerHTML = getTemplateHTML(attrs);\n }\n\n // Neither Chrome nor Firefox honor a `muted` attribute set after\n // `document.createElement`, and autoplay is refused without it. Attaching is\n // what sets the property — along with the rest of the fixed behavior — so\n // nothing here needs to repeat it.\n const video = this.video;\n if (video) this.#media.attach(video);\n\n // Re-fired rather than bridged on demand the way `CustomMediaElement` does\n // it: one listener for the one event this element has, on a Media it owns\n // for its whole life, is less than the machinery to defer it would cost.\n this.#media.addEventListener('error', () => this.dispatchEvent(new Event('error')));\n }\n\n /** Register the Media (not the inner `<video>`) with the provider. */\n getMediaTarget(): Media | null {\n return this.#media as unknown as Media;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback?.();\n if (this.hasAttribute('keep-alive')) return;\n // Deferred so a synchronous reparent (remove then insert) doesn't tear down\n // the engine, matching `CustomMediaElement`.\n queueMicrotask(() => {\n if (!this.isConnected) this.#media.destroy();\n });\n }\n\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void {\n if (oldValue === newValue) return;\n\n if (name === 'src') this.src = newValue ?? '';\n }\n\n /** The inner `<video>` the engine renders into. */\n get video(): HTMLVideoElement | null {\n const video = this.shadowRoot?.querySelector('video');\n return video instanceof HTMLVideoElement ? video : null;\n }\n\n /**\n * What made the current source unplayable, or `null`. An SVTA code rather than\n * a `MediaError` one — 99001 where this player has no pipeline for what the\n * source needs, with the specifics logged. Reset by a new source, and not on\n * the inner `<video>`, which never learns of it.\n */\n get error(): HlsVideoMediaError | null {\n return this.#media.error;\n }\n\n /** HLS manifest URL. Assigning a new one restarts playback from scratch. */\n get src(): string {\n return this.#media.src;\n }\n\n set src(value: string) {\n this.#media.src = value;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,SAAS,oBAAoB,EAAE,OAAO,QAAQ,EAAE,aAAa,WAAW,aAAa,OAAO,gBAAgB;CAC3G,MAAM,qBAAqB,eAAe,uBAAuB,MAAM,aAAa,IAAI,CAAC,IAAI,0BAA0B,yBAAyB;CAChJ,MAAM,OAAO;EACZ;EACA,QAAQ;CACT;CACA,MAAM,eAAe,eAAe;EACnC,MAAM,eAAe,MAAM,aAAa,IAAI;EAC5C,IAAI,CAAC,uBAAuB,YAAY,GAAG,OAAO,CAAC;EACnD,OAAO,iBAAiB,aAAa,gBAAgB,cAAc,SAAS,GAAG,IAAI;CACpF,GAAG,EAAE,QAAQ,iBAAiB,CAAC;CAC/B,OAAO,qBAAqB;EAC3B,SAAS;EACT,eAAe,mBAAmB,IAAI;EACtC,QAAQ;GACP,2BAA2B,CAAC;GAC5B,yBAAyB;IACxB,aAAa;KACZ,IAAI,CAAC,MAAM,YAAY,CAAC,IAAI,GAAG;MAC9B,MAAM,KAAK,WAAW,OAAO,KAAK,YAAY,GAAG,IAAI,CAAC,CAAC,EAAE,EAAE;MAC3D,IAAI,IAAI,MAAM,YAAY,CAAC,IAAI,EAAE;KAClC;KACA,aAAa,MAAM,YAAY,CAAC,IAAI,KAAK,CAAC;IAC3C;IACA,SAAS,OAAO;K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Q;EAC7C,CAAC;CACH;CAEA,yBAAyB,MAAc,UAAyB,UAA+B;EAC7F,IAAI,aAAa,UAAU;EAE3B,IAAI,SAAS,OAAO,KAAK,MAAM,YAAY;CAC7C;;CAGA,IAAI,QAAiC;EACnC,MAAM,QAAQ,KAAK,YAAY,cAAc,OAAO;EACpD,OAAO,iBAAiB,mBAAmB,QAAQ;CACrD;;;;;;;CAQA,IAAI,QAAmC;EACrC,OAAO,KAAKA,OAAO;CACrB;;CAGA,IAAI,MAAc;EAChB,OAAO,KAAKA,OAAO;CACrB;CAEA,IAAI,IAAI,OAAe;EACrB,KAAKA,OAAO,MAAM;CACpB;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-D6Xer97u.js","names":["#config","#engine","#createEngine","#stopErrorSync","#signals","#setError","#error","#reportedCode","#cancelPendingPlay","#loadstartListener","#target","#media"],"sources":["../../spf/dist/default/playback/behaviors/select-tracks.js","../../spf/dist/default/media/dom/screen.js","../../spf/dist/default/playback/behaviors/dom/track-screen-resolution.js","../../spf/dist/default/playback/engines/hls/engine-background-video.js","../../spf/dist/default/playback/adapters/hls-background-video/adapter.js","../../spf/dist/default/playback/adapters/hls-background-video/host.js","../../spf/dist/default/playback/adapters/hls-background-video/media.js","../src/media/hls-background-video/media.ts"],"sourcesContent":["import { computed, peek } from \"../../core/signals/primitives.js\";\nimport { defineBehavior } from \"../../core/composition/create-composition.js\";\nimport { createMachineReactor } from \"../../core/reactors/create-machine-reactor.js\";\nimport { isResolvedPresentation } from \"../../media/types/index.js\";\nimport { getTracksByType } from \"../../media/utils/tracks.js\";\nimport { AUDIO_TYPE_CONFIG, VIDEO_TYPE_CONFIG } from \"../primitives/track-types.js\";\nimport { byDescendingResolution, pickAudioTrackFromTracks, tracksUnderPixelArea } from \"../../media/primitives/select-tracks.js\";\nimport { applyConstraints, applyRules, excludeUnplayableTracks, sameCandidateSet } from \"../primitives/selection-rules.js\";\n//#region src/playback/behaviors/select-tracks.ts\n/**\n* **Default audio/video track selection on src load / unselect on src unload.**\n* When a presentation is resolved, sets `selectedVideoTrackId` /\n* `selectedAudioTrackId` from a per-type default rule chain if no selection\n* already exists. When the presentation is unset/reset (transitions back to unresolved),\n* clears the selection so a stale id from the previous source doesn't persist.\n*\n* Lifecycle-driven: the pick fires once per transition, and nothing re-picks —\n* that is what separates these from the `switch*` variants. External writes (user\n* picks, ABR, programmatic filter-driven re-picks) are left alone, including a\n* write naming a track the manifest never offered.\n*\n* The one thing policed between transitions is a pick the *constraints* turn\n* against: a rendition's container and encryption are only known once its media\n* playlist resolves, which is after the pick was made, so a selection that becomes\n* unplayable is dropped. Dropped, never moved — re-picking is exactly the behavior\n* `switchVideoTrack` exists to provide. Dropping reports nothing on its own, since\n* whatever made the pick unplayable already reported its own, more specific cause.\n*\n* Selection runs the same rule model `switchVideoTrack` does — a hard\n* `constraints` pre-pass, then an ordered `rules` chain, with the pick as the\n* head (see `internal/design/spf/track-switching-model.md`). What differs is\n* reactivity, not the rules: this evaluates the chain once on resolve and pins\n* the result, where `switchVideoTrack` re-evaluates inside an effect so its rules\n* subscribe to bandwidth and user selection. A rule written for one therefore\n* composes into the other unchanged.\n*\n* Both are config-driven, each per-type export wiring a sensible default: audio's\n* three-tier language policy, and for video the *empty* chain — with nothing\n* narrowing or reordering, the head is the first candidate. The behavior's\n* `config` is forwarded to the rules, so options like `preferredAudioLanguage`\n* reach them without an intermediate layer.\n*\n* Note a rule can only pick among real candidates, where the picker it replaced\n* could return any id at all. An id absent from the manifest was never\n* selectable, so that narrowing is the point rather than a limitation.\n*\n* Compose `selectVideoTrack` for the simple \"pick a default video track\"\n* behavior, or `switchVideoTrack` (`./track-switching.ts`) for the\n* ABR-driven variant. Compose `selectAudioTrack` for the simple default\n* pick, or `switchAudioTrack` (`./track-switching.ts`) for the\n* filter-reactive + mid-stream-flush slot-owner variant — when audio-abr\n* lands, `switchAudioTrack` extends into `switchAudioQuality`. Compose\n* only one per type — they're alternatives, not stackable (each writes\n* the same `selected*TrackId` slot). The simple variants tree-shake out\n* the heavier machinery (bandwidth estimator, quality selection, flush\n* orchestration).\n*\n* Text selection has no simple variant here — it's owned by `switchTextTrack`\n* (`./track-switching.ts`), which resolves standing `userTextTrackSelection`\n* intent against the constrained, CDN-scoped renditions.\n*/\nfunction setupTrackSelection({ state, config: { selectedKey, trackType, constraints, rules, ruleConfig } }) {\n\tconst derivedStateSignal = computed(() => isResolvedPresentation(state.presentation.get()) ? \"presentation-resolved\" : \"presentation-unresolved\");\n\tconst deps = {\n\t\tstate,\n\t\tconfig: ruleConfig\n\t};\n\tconst candidateSet = computed(() => {\n\t\tconst presentation = state.presentation.get();\n\t\tif (!isResolvedPresentation(presentation)) return [];\n\t\treturn applyConstraints(constraints, getTracksByType(presentation, trackType), deps);\n\t}, { equals: sameCandidateSet });\n\treturn createMachineReactor({\n\t\tinitial: \"presentation-unresolved\",\n\t\tmonitor: () => derivedStateSignal.get(),\n\t\tstates: {\n\t\t\t\"presentation-unresolved\": {},\n\t\t\t\"presentation-resolved\": {\n\t\t\t\tentry: () => {\n\t\t\t\t\tif (!state[selectedKey].get()) {\n\t\t\t\t\t\tconst id = applyRules(rules, peek(candidateSet), deps)[0]?.id;\n\t\t\t\t\t\tif (id) state[selectedKey].set(id);\n\t\t\t\t\t}\n\t\t\t\t\treturn () => state[selectedKey].set(void 0);\n\t\t\t\t},\n\t\t\t\teffects: [() => {\n\t\t\t\t\tconst selectedId = peek(state[selectedKey]);\n\t\t\t\t\tif (!selectedId) return;\n\t\t\t\t\tif (candidateSet.get().some((track) => track.id === selectedId)) return;\n\t\t\t\t\tconst presentation = peek(state.presentation);\n\t\t\t\t\tif (isResolvedPresentation(presentation) && getTracksByType(presentation, trackType).some((track) => track.id === selectedId)) state[selectedKey].set(void 0);\n\t\t\t\t}]\n\t\t\t}\n\t\t}\n\t});\n}\n/** Default video chain: none. The first candidate is the pick. */\nconst DEFAULT_VIDEO_RULES = [];\n/**\n* Default audio chain: the three-tier policy (`preferredAudioLanguage` →\n* `DEFAULT=YES` → first) as a single narrowing rule. Returning `[]` when nothing\n* is picked lets `applyRules` fall through to the unnarrowed candidates, so the\n* head stays the first track — the same last tier the policy itself ends on.\n*/\nconst preferAudioPolicy = (tracks, { config }) => {\n\tconst id = pickAudioTrackFromTracks(tracks, config);\n\tconst pick = tracks.find((track) => track.id === id);\n\treturn pick ? [pick] : [];\n};\nconst DEFAULT_AUDIO_RULES = [preferAudioPolicy];\n/**\n* Order the candidates by resolution, largest first, with bandwidth breaking ties\n* between renditions of identical dimensions. The background-video default — that\n* variant pins one rendition for the session, and absent a cap the largest is the\n* head.\n*\n* A ranker, so it reorders rather than narrowing: the chain's pick is the head of\n* what it returns, which means ranking never has to collapse to one track. Belongs\n* last in a chain — a sort only reorders what survived the filters ahead of it, and\n* leaving it last is what lets `applyRules` early-bail before it runs.\n*\n* Exported because it is a *rule*, not a variant's private policy: the same one\n* composes into `switchVideoTrack`'s chain when a ranker is wanted there.\n*/\nconst preferHighestResolution = (tracks) => [...tracks].sort(byDescendingResolution);\n/**\n* Narrow to the renditions that fit the screen, by pixel area — the screen-size\n* cap from `internal/design/spf/features/rendition-selection-caps.md`, as a scope\n* (soft filter) rather than a constraint: an over-cap rendition is wasteful, not\n* unplayable, so nothing here may make a source unplayable.\n*\n* Narrows only — it neither orders the survivors nor resolves the case where none\n* survive, because `applyRules` owns both. So it needs a ranker behind it to pick\n* within the cap: `[screenResolutionCap, preferHighestResolution]` yields the\n* largest rendition that fits. Composed *last*, the pick would instead be whichever\n* fitting rendition the manifest happened to list first.\n*\n* Reading `state.screenResolution` through its signal is what subscribes a\n* re-evaluating chain (`switchVideoTrack`) to screen changes; `selectVideoTrack`\n* pins the first answer instead, by design.\n*\n* Compares areas rather than matching a `\"1080p\"`-style tier because a tier only\n* describes a rendition once you assume its aspect ratio — the assumption that\n* mis-measures an anamorphic ladder. See `media/dom/screen.ts`.\n*\n* Three ways the cap ends up not applying, all of them fall-through:\n*\n* - **No `screenResolution` signal at all**, because the composition omits\n* `trackScreenResolution`. So composing the cap without its signal source is\n* inert rather than broken.\n* - **A `screenResolution` of `undefined`**, meaning no screen to read. \"Unknown\"\n* has to mean \"don't cap\": treating it as an area of zero would pin every source\n* to its smallest rendition on exactly the environments we know least about.\n* - **No rendition fits**, on a screen smaller than the whole ladder. `applyRules`\n* skips the empty result and the chain proceeds unnarrowed, so the ranker behind\n* the cap decides — for `preferHighestResolution`, the largest rendition. A floor\n* is the fix if that ever matters (`rendition-selection-caps.md` carries one), not\n* a special case here.\n*/\nconst screenResolutionCap = (tracks, { state }) => {\n\tconst screenResolution = state?.screenResolution?.get();\n\tif (!screenResolution) return [];\n\treturn tracksUnderPixelArea(tracks, screenResolution.width * screenResolution.height);\n};\n/**\n* Default video constraints: the capability pre-pass alone. No\n* `excludeFailedCdns` — this variant's compositions run no failover monitor, so\n* `failedCdns` has no writer and the constraint would always pass through.\n*/\nconst DEFAULT_VIDEO_CONSTRAINTS = [excludeUnplayableTracks];\n/**\n* Select a video track when a presentation loads. Clears the selection on\n* src unload.\n*\n* This is the simple, non-ABR counterpart to `switchVideoTrack` — compose\n* one or the other, not both (both write `selectedVideoTrackId`). Composing\n* `selectVideoTrack` alone tree-shakes out the ABR code path\n* (bandwidth-estimator, quality-selection); use it for sources without\n* meaningful quality variants, test setups, or players that intentionally\n* pin a quality.\n*\n* @example\n* const reactor = selectVideoTrack.setup({ state });\n*/\nconst selectVideoTrack = defineBehavior({\n\tstateKeys: [\"presentation\", \"selectedVideoTrackId\"],\n\tcontextKeys: [],\n\tsetup: ({ state, config }) => setupTrackSelection({\n\t\tstate,\n\t\tconfig: {\n\t\t\tselectedKey: VIDEO_TYPE_CONFIG.selectedKey,\n\t\t\ttrackType: \"video\",\n\t\t\tconstraints: config?.constraints ?? DEFAULT_VIDEO_CONSTRAINTS,\n\t\t\trules: config?.rules ?? DEFAULT_VIDEO_RULES,\n\t\t\truleConfig: config\n\t\t}\n\t})\n});\ndefineBehavior({\n\tstateKeys: [\"presentation\", \"selectedAudioTrackId\"],\n\tcontextKeys: [],\n\tsetup: ({ state, config }) => setupTrackSelection({\n\t\tstate,\n\t\tconfig: {\n\t\t\tselectedKey: AUDIO_TYPE_CONFIG.selectedKey,\n\t\t\ttrackType: \"audio\",\n\t\t\tconstraints: config?.constraints ?? [],\n\t\t\trules: config?.rules ?? DEFAULT_AUDIO_RULES,\n\t\t\truleConfig: config\n\t\t}\n\t})\n});\n//#endregion\nexport { preferHighestResolution, screenResolutionCap, selectVideoTrack };\n\n//# sourceMappingURL=select-tracks.js.map","import { scaleResolution } from \"../primitives/resolution.js\";\nimport { getDevicePixelRatio, listen, watchDevicePixelRatio } from \"@videojs/utils/dom\";\nimport { isFunction } from \"@videojs/utils/predicate\";\nimport { shallowEqual } from \"@videojs/utils/object\";\n//#region src/media/dom/screen.ts\n/**\n* Screen resolution, as the signal source for a screen-size rendition cap.\n*\n* Reported as a width and a height rather than a `\"720p\"`-style tier, because\n* the cap that consumes it compares against real track dimensions. A tier only\n* describes a track once you assume its aspect ratio, and that assumption\n* mis-measures an anamorphic or otherwise non-16:9 rendition.\n*\n* The signal source for the screen-size cap in\n* `internal/design/spf/features/rendition-selection-caps.md`.\n*\n* The screen underneath a window is not stable: rotating a device swaps the axes,\n* and unplugging a monitor or dragging the window to another display changes the\n* numbers *and* which physical screen they describe. So `getScreenResolution`\n* reads at call time and caches nothing, and `watchScreenResolution` layers the\n* reacting on top rather than the reader holding state of its own.\n*/\n/**\n* Read the screen's resolution, or `undefined` where there isn't one to read.\n*\n* `undefined` means \"unknown\", which is the answer a cap needs in order to not\n* cap. `screenResolutionCap` reads it that way and declines to narrow, so an\n* unknown screen is \"no cap\" rather than a cap of zero — the reading a naive\n* `?? 0` would produce, which would pin every source to its smallest rendition on\n* exactly the environments we know least about.\n*\n* Dimensions are reported as-is, including the axis swap a rotated device\n* applies to them. Normalizing orientation away is a policy question — whether a\n* cap should flap on rotation, or hold the larger budget across both — and\n* belongs to the cap rather than to the reading.\n*/\nfunction getScreenResolution({ useDevicePixelRatio } = { useDevicePixelRatio: true }) {\n\tconst screen = globalThis.screen;\n\tif (!screen) return void 0;\n\treturn scaleResolution(screen, useDevicePixelRatio ? getDevicePixelRatio() : 1);\n}\n/**\n* Call `onChange` whenever {@link getScreenResolution} would start answering\n* differently. Returns a function that stops watching.\n*\n* There is no single event for \"the screen changed\", so this subscribes to every\n* signal that implies one and compares readings to decide whether anything\n* actually moved. Comparing is what makes that safe: the signals overlap and\n* `resize` in particular is noisy, so over-subscribing costs a discarded read\n* rather than a spurious call.\n*\n* `onChange` is called once on subscribe with the starting value — including\n* `undefined` where there is no screen — and after that only on a genuine change.\n* So a consumer gets its initial state from the watcher and never has to pair it\n* with a separate {@link getScreenResolution} call.\n*\n* The signals, and what each one is here for:\n*\n* - **`screen`'s own `change`** — the screen itself being reconfigured, or the\n* window landing on a different one. The direct signal, and the only one that\n* catches a window moving between two same-size, same-ratio displays. From the\n* Window Management API, but on the base `Screen` rather than behind\n* `getScreenDetails()`, so it needs no permission — only a secure context.\n* Measured present in Chromium and absent in WebKit and Firefox, hence the\n* three below rather than this alone.\n* - **`resize`** — the window changing size, which is also what the OS does to it\n* when the display it was on goes away.\n* - **`screen.orientation` change** — rotation, which swaps the axes without\n* necessarily resizing the window.\n* - **a `(resolution: <ratio>dppx)` media query** (`watchDevicePixelRatio`) — the\n* device pixel ratio changing under a window that kept its size, which is the\n* cross-display drag between displays of different density.\n*\n* Worth keeping despite looking redundant, because it is the only coverage that\n* case has in WebKit and Firefox: neither implements `screen`'s change event,\n* and the drag doesn't resize the window. It is also a cleaner signal in Safari\n* than elsewhere — WebKit holds `devicePixelRatio` independent of page zoom, so\n* there it moves only on a real density change, where Chromium and Gecko fold\n* zoom into it as well.\n*\n* ⚠️ Known gap, on engines without `screen`'s change event: dragging a window\n* between two different-size displays that share a ratio, without the window\n* resizing, changes the reading with nothing firing. Closing it there would mean\n* polling, whose interval and battery cost are a policy decision this function\n* shouldn't be making.\n*/\nfunction watchScreenResolution(onChange, options = { useDevicePixelRatio: true }) {\n\tconst disconnect = new AbortController();\n\tconst { signal } = disconnect;\n\tlet current = getScreenResolution(options);\n\tconst check = () => {\n\t\tconst next = getScreenResolution(options);\n\t\tif (shallowEqual(current, next)) return;\n\t\tcurrent = next;\n\t\tonChange(next);\n\t};\n\tonChange(current);\n\twatchDevicePixelRatio(check, signal);\n\tconst screen = globalThis.screen;\n\tconst orientation = screen?.orientation;\n\tif (globalThis.window) listen(globalThis.window, \"resize\", check, { signal });\n\tif (isEventTarget(screen)) listen(screen, \"change\", check, { signal });\n\tif (orientation) listen(orientation, \"change\", check, { signal });\n\treturn () => disconnect.abort();\n}\nfunction isEventTarget(value) {\n\treturn isFunction(value?.addEventListener);\n}\n//#endregion\nexport { getScreenResolution, watchScreenResolution };\n\n//# sourceMappingURL=screen.js.map","import { defineBehavior } from \"../../../core/composition/create-composition.js\";\nimport { watchScreenResolution } from \"../../../media/dom/screen.js\";\n//#region src/playback/behaviors/dom/track-screen-resolution.ts\n/**\n* Mirror the screen's pixel dimensions into reactive state, so a rendition cap\n* can narrow candidates to what the screen can actually show without reading the\n* environment at pick time — which would make the picker impure, and would never\n* re-pick when the screen changed.\n*\n* Populated at setup rather than on the first change: `watchScreenResolution`\n* reports its starting value, so nothing downstream waits on a screen that may\n* never move. `undefined` where there is no screen to read, which is the value a\n* cap reads as \"no cap\" — see `getScreenResolution` on why that beats a zero.\n*\n* Reads no other slot, and has no source-identity reset: the screen is\n* independent of the presentation, so a new `src` doesn't invalidate the reading.\n*/\nfunction trackScreenResolutionSetup({ state, config }) {\n\treturn watchScreenResolution((resolution) => state.screenResolution.set(resolution), { useDevicePixelRatio: config?.useDevicePixelRatio ?? true });\n}\nconst trackScreenResolution = defineBehavior({\n\tstateKeys: [\"screenResolution\"],\n\tcontextKeys: [],\n\tsetup: trackScreenResolutionSetup\n});\n//#endregion\nexport { trackScreenResolution };\n\n//# sourceMappingURL=track-screen-resolution.js.map","import { createComposition } from \"../../../core/composition/create-composition.js\";\nimport { makeShareSignals } from \"../../../core/composition/share-signals.js\";\nimport { loadVideoSegments } from \"../../behaviors/dom/load-segments.js\";\nimport { trackCurrentTime } from \"../../behaviors/dom/track-current-time.js\";\nimport \"../../../media/errors.js\";\nimport { excludeUnplayableTracks } from \"../../primitives/selection-rules.js\";\nimport { preferHighestResolution, screenResolutionCap, selectVideoTrack } from \"../../behaviors/select-tracks.js\";\nimport { canPlayTrack } from \"../../../media/dom/capabilities.js\";\nimport { parseMultivariantPlaylist } from \"../../../media/hls/parse-multivariant.js\";\nimport { getResolvedSelectedTrackDuration } from \"../../../media/utils/track-selection.js\";\nimport { calculatePresentationDuration } from \"../../behaviors/calculate-presentation-duration.js\";\nimport { collectErrors, reportAbsentTrackType } from \"../../behaviors/collect-errors.js\";\nimport { endOfStream } from \"../../behaviors/dom/end-of-stream.js\";\nimport { setupVideoBufferActors } from \"../../behaviors/dom/setup-buffer-actors.js\";\nimport { setupMediaSource } from \"../../behaviors/dom/setup-mediasource.js\";\nimport { updateMediaSourceDuration } from \"../../behaviors/dom/update-mediasource-duration.js\";\nimport { resolvePresentation } from \"../../behaviors/resolve-presentation.js\";\nimport { resolveVideoTrack } from \"../../behaviors/resolve-track.js\";\nimport { reportUnsupportedTrackConditions } from \"../../primitives/report-track-conditions.js\";\nimport { trackScreenResolution } from \"../../behaviors/dom/track-screen-resolution.js\";\n//#region src/playback/engines/hls/engine-background-video.ts\nconst shareSignals = makeShareSignals();\n/**\n* Create a background-video playback engine.\n*\n* Subtractive composition over the HLS engine baseline:\n* audio-side, text-side, ABR-driven, preload-monitoring, and play/seek\n* load-trigger behaviors are removed. `selectVideoTrack` (with a\n* highest-resolution rule by default) replaces `switchVideoQuality`, pinning\n* a single rendition for the session. The initial state seeds\n* `loadActivated: true` so the composition behaves as if preload has\n* already been activated — appropriate for ambient / hero / GIF-replacement\n* surfaces that should start loading the moment a src is set.\n*\n* Error reporting is *not* subtracted: `collectErrors` owns the sequence,\n* `resolveVideoTrack` reports per-rendition causes, and `selectVideoTrack`\n* reports the video verdict when nothing survives its constraints. Without them\n* every unplayable source here is a silent stall — an unsupported container,\n* encryption this engine can't decrypt, and an undecodable codec all leave\n* `HTMLMediaElement.error` null on both Chromium and WebKit.\n*\n* Native `loop` / `muted` / `autoplay` are adapter concerns and live on\n* `HlsBackgroundVideoMediaElement` rather than the engine.\n*\n* @example\n* ```ts\n* let signals: BackgroundVideoEngineSignals;\n* const engine = createBackgroundVideoEngine({\n* onSignalsReady: (refs) => {\n* signals = refs;\n* },\n* });\n*\n* signals.context.mediaElement.set(videoEl);\n* signals.state.presentation.set({ url: 'https://example.com/stream.m3u8' });\n*\n* await engine.destroy();\n* ```\n*/\nfunction createBackgroundVideoEngine(config = {}) {\n\tconst finalConfig = {\n\t\t...config,\n\t\tconstraints: config.constraints ?? [excludeUnplayableTracks, reportAbsentTrackType(2011)],\n\t\trules: config.rules ?? [screenResolutionCap, preferHighestResolution],\n\t\tparsePresentation: config.parsePresentation ?? parseMultivariantPlaylist,\n\t\tresolveDuration: getResolvedSelectedTrackDuration,\n\t\tcanPlayTrack: config.canPlayTrack ?? canPlayTrack,\n\t\treportUnsupportedTrackConditions: config.reportUnsupportedTrackConditions ?? reportUnsupportedTrackConditions\n\t};\n\treturn createComposition([\n\t\tresolvePresentation,\n\t\tcalculatePresentationDuration,\n\t\tcollectErrors,\n\t\tselectVideoTrack,\n\t\tresolveVideoTrack,\n\t\tloadVideoSegments,\n\t\tsetupMediaSource,\n\t\tupdateMediaSourceDuration,\n\t\tsetupVideoBufferActors,\n\t\ttrackCurrentTime,\n\t\ttrackScreenResolution,\n\t\tendOfStream,\n\t\tshareSignals\n\t], {\n\t\tconfig: finalConfig,\n\t\tinitialState: { loadActivated: true }\n\t});\n}\n//#endregion\nexport { createBackgroundVideoEngine };\n\n//# sourceMappingURL=engine-background-video.js.map","import { effect } from \"../../../core/signals/effect.js\";\nimport { SVTA_NO_SUPPORTED_VIDEO_TRACK, SVTA_UNSUPPORTED_DRM_SYSTEM, SVTA_UNSUPPORTED_PLAYBACK_FEATURE, SVTA_UNSUPPORTED_VIDEO_FORMAT } from \"../../../media/errors.js\";\nimport { createBackgroundVideoEngine } from \"../../engines/hls/engine-background-video.js\";\nimport { UNPLAYABLE_SOURCE_MESSAGE } from \"../../primitives/error-messages.js\";\nimport { firstFatal, hasUnsupportedFeatureCause } from \"../hls-video/error-surface.js\";\n//#region src/playback/adapters/hls-background-video/adapter.ts\nconst hlsBackgroundVideoMediaDefaultProps = { src: \"\" };\n/**\n* Which reported conditions this composition treats as **fatal** — the ones that\n* reach `error` and fire `'error'`. Severity isn't part of an SVTA code\n* (§Approach: \"impact varies with player implementation\"), so it's decided at\n* this boundary rather than by the reporter.\n*\n* **Causes are fatal here, unlike on the other two adapters.** There, a cause is\n* context — one unplayable rendition doesn't fail a source whose others still\n* play, and a verdict follows if the type empties. In the pinned variant a cause\n* *is* the verdict: only the pinned rendition's playlist is ever resolved, so a\n* cause can only be about the pick itself, and dropping that pick is final —\n* nothing here re-picks (that is what `switchVideoTrack` exists for, and this\n* engine doesn't compose it). Measured on Chromium: an MPEG-TS source reports\n* 1004 and an encrypted one 4008, each with no verdict behind it, and the element\n* then sits at `readyState 0` with `error` null forever.\n*\n* The verdict is still listed, for the shapes that report nothing else: no video\n* renditions at all, or a ladder pruned before anything resolves — both of which\n* `reportAbsentTrackType` covers from the tail of the constraint chain.\n*\n* First-fatal-wins then surfaces the cause rather than the verdict when both are\n* present, which is the more specific of the two.\n*/\nconst FATAL_SVTA_CODES = /* @__PURE__ */ new Set([\n\tSVTA_NO_SUPPORTED_VIDEO_TRACK,\n\tSVTA_UNSUPPORTED_VIDEO_FORMAT,\n\tSVTA_UNSUPPORTED_DRM_SYSTEM\n]);\n/**\n* Mixin that adds the background-video SPF playback engine to any base class,\n* for an HLS URL.\n*\n* `src` is the whole input surface, and `error` is the one output: nothing about\n* an unplayable source reaches the media element on its own here — an unsupported\n* container, encryption with no EME, and an undecodable codec all leave\n* `HTMLMediaElement.error` null with the element stalled at `readyState 0`\n* (measured on Chromium and WebKit) — so a consumer that watched only the\n* `<video>` would see a source that never appears and never says why. The engine\n* reports each condition onto `engine.state.errors` and logs it; this adapter\n* promotes the first fatal one, mapping it the same way the video and audio Medias\n* map theirs. See `internal/design/spf/features/errors.md`.\n*\n* Selection pins the largest rendition that *fits the screen*, and holds it for\n* the session. The manifest is still the better place to narrow further: a\n* delivery param — `?max_resolution=720p` on a Mux stream URL, for one — keeps\n* the renditions it excludes out of the manifest entirely, rather than\n* fetched-then-unpicked.\n*\n* The pin is given up, never moved, if the pick turns out to be unplayable: the\n* container is only known once a media playlist resolves, which is after the pick\n* is made, so the selection clears rather than quietly appending bytes nothing can\n* decode.\n*\n* `@videojs/spf/mux-background-video` is this same Media under a Mux-flavored\n* name — an alias, not a variant. Nothing about the surface changes with the\n* import path.\n*\n* Everything else the use case fixes rather than exposes: video-only, looping,\n* muted, autoplaying, loading as soon as there is a source. `attach` writes that\n* onto the element and nothing here declares `loop` / `muted` / `autoplay` /\n* `preload` of its own — a host-bound Media inherits all four from the host\n* already, and shadowing them with fixed values would only make reads describe\n* an intention rather than what the element is doing.\n*\n* A new src re-resolves the presentation, tearing down the state, SourceBuffers,\n* and in-flight requests the previous one built before the next begins. The\n* engine instance and the attached media element are both kept, so neither has to\n* be rewired.\n*\n* @fires error - Fired when a fatal condition is reported. Read `error` for it.\n*\n* @example\n* class HlsBackgroundVideoMedia extends HlsBackgroundVideoMediaMixin(BackgroundVideoHost) {}\n*\n* const media = new HlsBackgroundVideoMedia();\n* media.attach(document.querySelector('video'));\n* media.src = 'https://stream.mux.com/PLAYBACK_ID.m3u8?max_resolution=720p';\n* media.play();\n*/\nfunction HlsBackgroundVideoMediaMixin(BaseClass) {\n\tclass HlsBackgroundVideoMediaImpl extends BaseClass {\n\t\t#engine;\n\t\t#config;\n\t\t#signals;\n\t\t#error = null;\n\t\t/**\n\t\t* The *reported* condition currently surfaced, which is what the re-fire latch\n\t\t* keys on. Not `#error.code`: that's the code this adapter chose to surface,\n\t\t* and the substitution below can make the two differ.\n\t\t*/\n\t\t#reportedCode = null;\n\t\t#stopErrorSync;\n\t\t/** Pending loadstart listener from a deferred play() retry, if any. */\n\t\t#loadstartListener = null;\n\t\tconstructor(...args) {\n\t\t\tsuper(...args);\n\t\t\tconst { config } = args?.[0] ?? {};\n\t\t\tthis.#config = config;\n\t\t\tthis.#engine = this.#createEngine();\n\t\t\tthis.#stopErrorSync = effect(() => {\n\t\t\t\tconst errors = this.#signals.state.errors.get();\n\t\t\t\tthis.#setError(firstFatal(errors, FATAL_SVTA_CODES), errors);\n\t\t\t});\n\t\t}\n\t\tget engine() {\n\t\t\treturn this.#engine;\n\t\t}\n\t\t/**\n\t\t* The current fatal condition, or `null`. Only *fatal* ones appear here — the\n\t\t* engine reports non-fatal ones too (they stay in `engine.state.errors`), and\n\t\t* promoting them would say playback had failed when it hadn't. Which ones are\n\t\t* fatal is wider here than on the video and audio Medias; see\n\t\t* {@link FATAL_SVTA_CODES}. Resets per source. Fires `'error'` when set.\n\t\t*\n\t\t* Mapped the same way theirs are: a sequence holding an\n\t\t* unimplemented-capability cause surfaces as\n\t\t* {@link SVTA_UNSUPPORTED_PLAYBACK_FEATURE} (99001) with the specifics logged,\n\t\t* because \"this player can't play this source\" is what a consumer can act on,\n\t\t* where a raw container or DRM code only says what to go and look up.\n\t\t*/\n\t\tget error() {\n\t\t\treturn this.#error;\n\t\t}\n\t\t#setError(reported, errors) {\n\t\t\tif (!reported) {\n\t\t\t\tthis.#error = null;\n\t\t\t\tthis.#reportedCode = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.#reportedCode === reported.code) return;\n\t\t\tthis.#reportedCode = reported.code;\n\t\t\tconsole.error(UNPLAYABLE_SOURCE_MESSAGE, { conditions: errors });\n\t\t\tthis.#error = {\n\t\t\t\tcode: hasUnsupportedFeatureCause(errors) ? SVTA_UNSUPPORTED_PLAYBACK_FEATURE : reported.code,\n\t\t\t\tmessage: reported.message ?? \"\",\n\t\t\t\t...reported.data === void 0 ? {} : { data: reported.data }\n\t\t\t};\n\t\t\tthis.dispatchEvent?.(new Event(\"error\"));\n\t\t}\n\t\tattach(mediaElement) {\n\t\t\tsuper.attach?.(mediaElement);\n\t\t\tmediaElement.loop = true;\n\t\t\tmediaElement.muted = true;\n\t\t\tmediaElement.autoplay = true;\n\t\t\tmediaElement.preload = \"auto\";\n\t\t\tthis.#signals.context.mediaElement.set(mediaElement);\n\t\t}\n\t\tdetach() {\n\t\t\tthis.#cancelPendingPlay();\n\t\t\tthis.#signals.context.mediaElement.set(void 0);\n\t\t\tsuper.detach?.();\n\t\t}\n\t\tdestroy() {\n\t\t\tthis.#cancelPendingPlay();\n\t\t\tthis.#stopErrorSync();\n\t\t\tthis.#engine.destroy();\n\t\t}\n\t\tget src() {\n\t\t\treturn this.#signals.state.presentation.get()?.url ?? \"\";\n\t\t}\n\t\tset src(value) {\n\t\t\tif (value === this.src) return;\n\t\t\tthis.#cancelPendingPlay();\n\t\t\tthis.#signals.state.presentation.set(value ? { url: value } : void 0);\n\t\t}\n\t\tasync play() {\n\t\t\tconst mediaElement = this.#signals.context.mediaElement.get();\n\t\t\tif (!mediaElement) return Promise.reject(/* @__PURE__ */ new Error(\"HlsBackgroundVideoMediaElement: no media element attached\"));\n\t\t\ttry {\n\t\t\t\treturn await mediaElement.play();\n\t\t\t} catch (err) {\n\t\t\t\tif (this.src) return new Promise((resolve, reject) => {\n\t\t\t\t\tconst listener = () => {\n\t\t\t\t\t\tthis.#loadstartListener = null;\n\t\t\t\t\t\tmediaElement.play().then(resolve, reject);\n\t\t\t\t\t};\n\t\t\t\t\tthis.#loadstartListener = listener;\n\t\t\t\t\tmediaElement.addEventListener(\"loadstart\", listener, { once: true });\n\t\t\t\t});\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\t\t#createEngine() {\n\t\t\treturn createBackgroundVideoEngine({\n\t\t\t\t...this.#config,\n\t\t\t\tonSignalsReady: (signals) => {\n\t\t\t\t\tthis.#signals = signals;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t#cancelPendingPlay() {\n\t\t\tif (!this.#loadstartListener) return;\n\t\t\tthis.#signals.context.mediaElement.get()?.removeEventListener(\"loadstart\", this.#loadstartListener);\n\t\t\tthis.#loadstartListener = null;\n\t\t}\n\t}\n\treturn HlsBackgroundVideoMediaImpl;\n}\n/** Standalone SPF background-video adapter with no base class. */\nvar HlsBackgroundVideoMediaElement = class extends HlsBackgroundVideoMediaMixin(class {}) {};\n//#endregion\nexport { HlsBackgroundVideoMediaElement, HlsBackgroundVideoMediaMixin, hlsBackgroundVideoMediaDefaultProps };\n\n//# sourceMappingURL=adapter.js.map","//#region src/playback/adapters/hls-background-video/host.ts\n/**\n* The `<video>` binding a background video uses: somewhere to keep the attached\n* element, and the four properties the Media fixes on it.\n*\n* That is the whole surface anything here reaches. The engine drives playback,\n* the element exposes `src` and nothing else, and the background player\n* subscribes to no store features, so nothing asks a background video for\n* `currentTime`, `play()`, picture-in-picture, fullscreen, forwarded events, or\n* media components. Holding the host to what is reachable is what keeps this\n* entry free of `@videojs/media`, and small enough to suit a component whose\n* whole pitch is its size.\n*\n* An `EventTarget`, because a Media is one: the store and the element layers\n* take anything they attach as an event source, and inheriting the three methods\n* satisfies that for free rather than by stubbing them.\n*\n* ⚠️ It still implements too little to carry the rest of the media surface, which\n* bounds what may consume it: a store feature reading a property outside this set\n* gets `undefined` rather than an error. A Media needing more of that surface\n* belongs on a host that provides it.\n*/\nvar BackgroundVideoHost = class extends EventTarget {\n\t#target = null;\n\tattach(target) {\n\t\tif (!target || this.#target === target) return;\n\t\tthis.#target = target;\n\t}\n\tdetach() {\n\t\tthis.#target = null;\n\t}\n\tget loop() {\n\t\treturn this.#target?.loop ?? false;\n\t}\n\tset loop(value) {\n\t\tif (this.#target) this.#target.loop = value;\n\t}\n\tget muted() {\n\t\treturn this.#target?.muted ?? false;\n\t}\n\tset muted(value) {\n\t\tif (this.#target) this.#target.muted = value;\n\t}\n\tget autoplay() {\n\t\treturn this.#target?.autoplay ?? false;\n\t}\n\tset autoplay(value) {\n\t\tif (this.#target) this.#target.autoplay = value;\n\t}\n\tget preload() {\n\t\treturn this.#target?.preload ?? \"metadata\";\n\t}\n\tset preload(value) {\n\t\tif (this.#target) this.#target.preload = value;\n\t}\n};\n//#endregion\nexport { BackgroundVideoHost };\n\n//# sourceMappingURL=host.js.map","import { HlsBackgroundVideoMediaMixin } from \"./adapter.js\";\nimport { BackgroundVideoHost } from \"./host.js\";\n//#region src/playback/adapters/hls-background-video/media.ts\nconst HlsBackgroundVideoMediaBase = HlsBackgroundVideoMediaMixin(BackgroundVideoHost);\n/**\n* The background-video Media, bound to a `<video>` through\n* {@link BackgroundVideoHost}.\n*\n* That host carries the attached element and the four properties `attach` fixes,\n* which is all this Media's surface needs, and it is local — so this entry has\n* no `@videojs/media` dependency.\n*\n* No `MediaTracksMixin`, unlike `HlsVideoMedia`: the engine subtracts audio and\n* text entirely and pins one video rendition for the session, so there are no\n* track lists for a consumer to project or switch between.\n*/\nvar HlsBackgroundVideoMedia = class extends HlsBackgroundVideoMediaBase {};\n//#endregion\nexport { HlsBackgroundVideoMedia };\n\n//# sourceMappingURL=media.js.map","import type { Media } from '@videojs/media/dom';\nimport { HlsBackgroundVideoMedia, type HlsVideoMediaError } from '@videojs/spf/hls-background-video';\nimport { type CustomElement, namedNodeMapToObject } from '@videojs/utils/dom';\nimport type { Constructor } from '@videojs/utils/types';\nimport { MediaAttachMixin } from '../../store/media-attach-mixin';\nimport { getTemplateHTML } from '../background-video/template';\n\n// `MediaAttachMixin` is typed as returning its base, so its `disconnectedCallback`\n// isn't visible for `super` to reach. `CustomElement` declares the lifecycle\n// callbacks this element overrides.\nconst HlsBackgroundVideoBase = MediaAttachMixin(HTMLElement) as unknown as Constructor<CustomElement>;\n\n/**\n * A muted, looping, chrome-less video over the SPF background-video engine.\n *\n * The SPF-backed counterpart to `<background-video>`, which plays its source\n * natively. This one streams HLS through the engine, which pins a single\n * rendition for the session rather than adapting, and drops audio and text\n * handling entirely — the shape an ambient hero video actually wants.\n *\n * Nearer an image than a player, and `src` is the whole surface. Replaces the\n * standalone `mux-background-video` package, whose `audio`, `debug`, `preload`,\n * and `max-resolution` attributes are all deliberately absent. Capping which\n * rendition is fetched is a delivery param on the URL — `?max_resolution=720p`\n * on a Mux stream, for one — which keeps the renditions it excludes out of the\n * manifest rather than merely unpicked; `preload` would have nothing to say,\n * since the engine loads from the moment it has a source. And unlike\n * `<background-video>` there are no `nomuted` / `noloop` / `noautoplay` opt-outs:\n * those three are what this element is for, so the adapter fixes them on at\n * attach.\n *\n * Takes no structured `source` — `src` is an HLS URL, as the package it replaces\n * required. Mux playback-ID identity, poster, and storyboard belong to\n * `<mux-video>`; none of them mean anything without controls to hang them on.\n *\n * Nothing about an unplayable source reaches the inner `<video>` on its own, so\n * `error` on it stays null and the element sits at `readyState 0`. The engine\n * reports each condition and logs it, the Media promotes the fatal one, and this\n * element re-fires it as its own `error` / `'error'` — the one place a consumer\n * holding the element can see a source that never appears.\n *\n * @fires error - Fired when a fatal condition is reported. Read `error` for it.\n *\n * `<mux-background-video>` is this element under the name the package it replaces\n * used. Same class, so the tag is a naming choice and nothing more.\n *\n * @example\n * ```html\n * <hls-background-video src=\"https://stream.mux.com/PLAYBACK_ID.m3u8?max_resolution=720p\">\n * <img src=\"https://image.mux.com/PLAYBACK_ID/thumbnail.webp?time=0\" alt=\"\" />\n * </hls-background-video>\n * ```\n */\n// Deliberately not `CustomMediaElement`, matching `<background-video>`: a\n// background video needs one property, not the full WHATWG media API.\nexport class HlsBackgroundVideo extends HlsBackgroundVideoBase {\n static shadowRootOptions = { mode: 'open' as ShadowRootMode };\n static getTemplateHTML = getTemplateHTML;\n\n static get observedAttributes(): string[] {\n return ['src'];\n }\n\n #media = new HlsBackgroundVideoMedia();\n\n constructor() {\n super();\n\n if (!this.shadowRoot) {\n this.attachShadow((this.constructor as typeof HlsBackgroundVideo).shadowRootOptions);\n\n const attrs = {\n ...namedNodeMapToObject(this.attributes),\n muted: '',\n loop: '',\n autoplay: '',\n playsinline: '',\n disableremoteplayback: '',\n disablepictureinpicture: '',\n };\n\n this.shadowRoot!.innerHTML = getTemplateHTML(attrs);\n }\n\n // Neither Chrome nor Firefox honor a `muted` attribute set after\n // `document.createElement`, and autoplay is refused without it. Attaching is\n // what sets the property — along with the rest of the fixed behavior — so\n // nothing here needs to repeat it.\n const video = this.video;\n if (video) this.#media.attach(video);\n\n // Re-fired rather than bridged on demand the way `CustomMediaElement` does\n // it: one listener for the one event this element has, on a Media it owns\n // for its whole life, is less than the machinery to defer it would cost.\n this.#media.addEventListener('error', () => this.dispatchEvent(new Event('error')));\n }\n\n /** Register the Media (not the inner `<video>`) with the provider. */\n getMediaTarget(): Media | null {\n return this.#media as unknown as Media;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback?.();\n if (this.hasAttribute('keep-alive')) return;\n // Deferred so a synchronous reparent (remove then insert) doesn't tear down\n // the engine, matching `CustomMediaElement`.\n queueMicrotask(() => {\n if (!this.isConnected) this.#media.destroy();\n });\n }\n\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void {\n if (oldValue === newValue) return;\n\n if (name === 'src') this.src = newValue ?? '';\n }\n\n /** The inner `<video>` the engine renders into. */\n get video(): HTMLVideoElement | null {\n const video = this.shadowRoot?.querySelector('video');\n return video instanceof HTMLVideoElement ? video : null;\n }\n\n /**\n * What made the current source unplayable, or `null`. An SVTA code rather than\n * a `MediaError` one — 99001 where this player has no pipeline for what the\n * source needs, with the specifics logged. Reset by a new source, and not on\n * the inner `<video>`, which never learns of it.\n */\n get error(): HlsVideoMediaError | null {\n return this.#media.error;\n }\n\n /** HLS manifest URL. Assigning a new one restarts playback from scratch. */\n get src(): string {\n return this.#media.src;\n }\n\n set src(value: string) {\n this.#media.src = value;\n }\n}\n"],"mappings":"usBA6DA,SAAS,EAAoB,CAAE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AI,KAAc,CAChB,OAAO,KAAKA,GAAO,GACrB,CAEA,IAAI,IAAI,EAAe,CACrB,KAAKA,GAAO,IAAM,CACpB,CACF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as e,d as t,f as n,h as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f}from"./compounds-CHlzbAKu.js";import{i as p}from"./context-C2rsoDxk.js";import{t as m}from"./container-element-Dd0ZCdhK.js";import"./i18n-R3TQ8P2f.js";import{t as h}from"./gesture-element-BbNy1Pjt.js";import{i as g,n as _,r as v,t as y}from"./time-slider-chapters-element-b6oeaZtJ.js";import{a as b,i as x,n as S,o as C,r as w,s as T,t as E}from"./poster-element-Djlm5fwC.js";import{n as D,r as O,t as k}from"./seek-button-element-CgaXVFPS.js";import{t as A}from"./player-BuxifKSM.js";p(A),p(m),f(),s(),u(),d(),p(y),p(_),a(),c(),i(),e(),p(T),p(g),p(r),p(C),p(x),p(w),p(h),p(o),p(l),p(S),p(n),p(O),p(D),p(b),p(t),p(E),p(v),p(k);
|
|
2
|
-
//# sourceMappingURL=minimal-ui-D3XCtSx_.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C as e,F as t,G as n,N as r,P as i,R as a,S as o,W as s,X as c,_ as l,b as u,g as d,j as f,rt as p,v as m,w as ee,x as te,z as h}from"./compounds-CHlzbAKu.js";import{r as g}from"./translate-text-TzSgu_oe.js";import{t as _}from"./media-element-Cp5PrNre.js";import{r as v}from"./context-C2rsoDxk.js";import{c as y,r as b}from"./container-element-Dd0ZCdhK.js";import{c as x,n as S}from"./create-player-LjvbIxIq.js";import{n as C}from"./text-track-CG8USvNG.js";import{n as ne}from"./webkit-DljEkldb.js";import{translateText as re}from"./i18n.js";const w=`airplay.`,T={key:`${w}start`,text:`Start AirPlay`},E={key:`${w}stop`,text:`Stop AirPlay`},D=`cast.`,O={key:`${D}start`,text:`Start casting`},k={key:`${D}stop`,text:`Stop casting`},A={key:`${D}connecting`,text:`Connecting`};var j=class e{static defaultProps={label:``,disabled:!1};state=x({state:`disconnected`,availability:`unsupported`,disabled:!0,hidden:!0,label:``});#e={...e.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(t){this.#e=p(t,e.defaultProps)}getLabel(e){return o(this.#e.label,e)||(e.state===`connected`?E:e.state===`connecting`?A:T)}getAttrs(e){return{"aria-label":this.getLabel(e),"aria-disabled":e.disabled?`true`:void 0,hidden:e.hidden?``:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t,t=ne()?e.remotePlaybackAvailability:`unsupported`;return this.state.patch({state:e.remotePlaybackState,availability:t,disabled:this.#e.disabled||t!==`available`,hidden:t!==`available`}),this.state.patch({label:g(this.getLabel(this.state.current))}),this.state.current}async toggle(e){if(this.setMedia(e),!this.getState().disabled)try{await e.toggleRemotePlayback()}catch{}}};const M={state:`data-airplay-state`,availability:`data-availability`,disabled:`data-disabled`,hidden:`data-hidden`},N=`captions.`,P={key:`${N}enable`,text:`Enable captions`},F={key:`${N}disable`,text:`Disable captions`};var I=class e{static defaultProps={label:``,disabled:!1,menuTrigger:!1};state=x({subtitlesShowing:!1,availability:`unavailable`,disabled:!0,hidden:!0,label:``});#e={...e.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(t){this.#e=p(t,e.defaultProps)}getLabel(e){return o(this.#e.label,e)||(e.subtitlesShowing?F:P)}getAttrs(e){return{"aria-label":this.getLabel(e),"aria-disabled":e.disabled?`true`:void 0,hidden:e.hidden?``:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t,t=e.textTrackList.some(C)?`available`:`unavailable`;return this.state.patch({subtitlesShowing:e.subtitlesShowing,availability:t,disabled:this.#e.disabled||t!==`available`,hidden:t===`unavailable`}),this.state.patch({label:g(this.getLabel(this.state.current))}),this.state.current}toggle(e){this.setMedia(e),!this.getState().disabled&&(this.#e.menuTrigger&&L(e)>1||e.toggleSubtitles())}};function L(e){return e.textTrackList.filter(C).length}const R={subtitlesShowing:`data-active`,availability:`data-availability`,disabled:`data-disabled`,hidden:`data-hidden`};function z(e){return e.label?e.label:e.language?e.language:e.kind===`captions`?s:c}function B(e,t){return e.kind>t.kind?1:e.kind<t.kind?-1:0}function V(e){return e.filter(C).sort(B)}var H=class e{static defaultProps={label:``,formatTrack:z,disabled:!1};state=x({options:[{value:`off`,label:n,disabled:!1}],value:`off`,subtitlesShowing:!1,disabled:!0,hidden:!0,availability:`unavailable`,label:``});#e={...e.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(t){this.#e=p(t,e.defaultProps)}getLabel(e){return o(this.#e.label,e)||s}getTrackLabel(e){return this.#e.formatTrack(e)}getAttrs(e){return{"aria-label":this.getLabel(e),"aria-disabled":e.disabled?`true`:void 0,hidden:e.hidden?``:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t,t=V(e.textTrackList),r=t.findIndex(e=>e.mode===`showing`),i=[{value:`off`,label:n,disabled:!1},...t.map((e,t)=>({value:e.id||String(t),label:this.getTrackLabel(e),disabled:!1}))],a=t.length>0?`available`:`unavailable`;return this.state.patch({options:i,value:r===-1?`off`:t[r].id||String(r),subtitlesShowing:e.subtitlesShowing,disabled:this.#e.disabled||t.length===0,hidden:a===`unavailable`,availability:a}),this.state.patch({label:g(this.getLabel(this.state.current))}),this.state.current}select(e,t){if(this.#e.disabled)return;let n=V(e.textTrackList);if(n.length){if(t===`off`){e.selectSubtitlesTrack(`off`);return}n.some((e,n)=>(e.id||String(n))===t)&&e.selectSubtitlesTrack(t)}}selectValue(e,t){this.select(e,t)}};const U={subtitlesShowing:`data-active`,disabled:`data-disabled`,hidden:`data-hidden`,availability:`data-availability`};var ie=class e{static defaultProps={label:``,disabled:!1};state=x({connection:`disconnected`,availability:`unsupported`,disabled:!0,hidden:!0,label:``});#e={...e.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(t){this.#e=p(t,e.defaultProps)}getLabel(e){return o(this.#e.label,e)||(e.connection===`connected`?k:e.connection===`connecting`?A:O)}getAttrs(e){return{"aria-label":this.getLabel(e),"aria-disabled":e.disabled?`true`:void 0,hidden:e.hidden?``:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t,t=globalThis.chrome?e.remotePlaybackAvailability:`unsupported`;return this.state.patch({connection:e.remotePlaybackState,availability:t,disabled:this.#e.disabled||t!==`available`,hidden:t===`unsupported`}),this.state.patch({label:g(this.getLabel(this.state.current))}),this.state.current}async toggle(e){if(this.setMedia(e),!this.getState().disabled)return e.toggleRemotePlayback()}};const W={connection:`data-cast-state`,availability:`data-availability`,disabled:`data-disabled`,hidden:`data-hidden`};var G=class e{static defaultProps={label:``,disabled:!1};state=x({fullscreen:!1,availability:`unavailable`,disabled:!0,hidden:!0,label:``});#e={...e.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(t){this.#e=p(t,e.defaultProps)}getLabel(e){return o(this.#e.label,e)||(e.fullscreen?te:u)}getAttrs(e){return{"aria-label":this.getLabel(e),"aria-disabled":e.disabled?`true`:void 0,hidden:e.hidden?``:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t,t=e.fullscreenAvailability;return this.state.patch({fullscreen:e.fullscreen,availability:t,disabled:this.#e.disabled||t!==`available`,hidden:t!==`available`}),this.state.patch({label:g(this.getLabel(this.state.current))}),this.state.current}async toggle(e){if(this.setMedia(e),!this.getState().disabled)return e.fullscreen?e.exitFullscreen():e.requestFullscreen()}};const K={fullscreen:`data-fullscreen`,availability:`data-availability`,disabled:`data-disabled`,hidden:`data-hidden`},q=`pip.`,J={key:`${q}enter`,text:`Enter picture-in-picture`},Y={key:`${q}exit`,text:`Exit picture-in-picture`};var ae=class e{static defaultProps={label:``,disabled:!1};state=x({pip:!1,availability:`unavailable`,disabled:!0,hidden:!0,label:``});#e={...e.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(t){this.#e=p(t,e.defaultProps)}getLabel(e){return o(this.#e.label,e)||(e.pip?Y:J)}getAttrs(e){return{"aria-label":this.getLabel(e),"aria-disabled":e.disabled?`true`:void 0,hidden:e.hidden?``:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t,t=e.pipAvailability;return this.state.patch({pip:e.pip,availability:t,disabled:this.#e.disabled||t!==`available`,hidden:t!==`available`}),this.state.patch({label:g(this.getLabel(this.state.current))}),this.state.current}async toggle(e){if(this.setMedia(e),!this.getState().disabled)return e.pip?e.exitPictureInPicture():e.requestPictureInPicture()}};const oe={pip:`data-pip`,availability:`data-availability`,disabled:`data-disabled`,hidden:`data-hidden`};var se=class{#e=null;#t=`none`;setMedia(e){this.#e=e}setImageLoadState(e){this.#t=e}getState(){let e=this.#e;return{visible:!e.started,src:e.poster,loading:this.#t===`loading`,loaded:this.#t===`loaded`,error:this.#t===`error`}}};const ce={visible:`data-visible`,loading:`data-loading`,loaded:`data-loaded`,error:`data-error`};var le=class extends m{constructor(...e){super(...e),this.core=new j,this.stateAttrMap=M,this.mediaState=new S(this,v,a)}static{this.tagName=`media-airplay-button`}activate(e){this.core.toggle(e)}};function ue(e,t){let n=e.getRootNode(),r=(`getElementById`in n?n.getElementById(t):null)??n.querySelector(`#${CSS.escape(t)}`);if(!r||!(`open`in r))return;let i=r;i.open=!i.open}function X(e){return e.textTrackList.filter(C).length}var de=class extends m{constructor(...e){super(...e),this.commandfor=void 0,this.menuFor=void 0,this.#e=void 0,this.core=new I,this.stateAttrMap=R,this.mediaState=new S(this,v,h),this.hotkeyAction=`toggleSubtitles`}static{this.tagName=`media-captions-button`}static{this.properties={label:{type:String},disabled:{type:Boolean},commandfor:{type:String},menuFor:{type:String,attribute:`menu-for`}}}#e;connectedCallback(){super.connectedCallback(),this.commandfor&&this.commandfor!==this.menuFor&&(this.#e=this.commandfor)}activate(e,t){if(this.menuFor&&X(e)>1){t instanceof KeyboardEvent&&ue(this,this.menuFor);return}this.core.toggle(e)}getIsButtonDisabled(){let e=this.mediaState.value;return!!(super.getIsButtonDisabled()||e&&X(e)===0)}willUpdate(e){super.willUpdate(e),e.has(`commandfor`)&&this.commandfor!==this.menuFor&&(this.#e=this.commandfor),(e.has(`commandfor`)||e.has(`menuFor`))&&this.#t()}update(e){super.update(e);let t=this.mediaState.value;t&&(this.#t(t),this.menuFor&&X(t)>1&&ee(this,{"aria-disabled":this.getIsButtonDisabled()?`true`:void 0}))}#t(e){let t=e??this.mediaState.value,n=t&&this.menuFor&&X(t)>1?this.menuFor:this.#e;n?this.setAttribute(`commandfor`,n):this.removeAttribute(`commandfor`)}},fe=class extends l{constructor(...e){super(...e),this.disabled=!1,this.label=``,this.formatTrack=H.defaultProps.formatTrack,this.#e=new H,this.#t=new b(this,y),this.#n=new S(this,v,h),this.#r=new d(this,{setItemAttributes:(e,t)=>e.setAttribute(`data-track`,t.value),onValueChange:e=>{let t=this.#n.value;t&&this.#e.selectValue(t,e)}})}static{this.tagName=`media-captions-radio-group`}static{this.properties={...l.properties,disabled:{type:Boolean},label:{type:String}}}#e;#t;#n;#r;connectedCallback(){super.connectedCallback(),this.destroyed}update(t){let n=this.#n.value,r=null;n&&(this.#e.setProps({formatTrack:this.formatTrack,disabled:this.disabled,label:this.label}),this.#e.setMedia(n),r=this.#e.getState(),this.applyDefaultAriaLabel(re(this.#e.getLabel(r),this.#t.value)),this.#r.sync(r,this.#t.value,this.#t.locale),this.publishMenuTriggerState(r.disabled,r.availability)),super.update(t),r&&e(this,r,U)}},pe=class extends m{constructor(...e){super(...e),this.core=new ie,this.stateAttrMap=W,this.mediaState=new S(this,v,a)}static{this.tagName=`media-cast-button`}activate(e){return this.core.toggle(e)}},me=class extends m{constructor(...e){super(...e),this.core=new G,this.stateAttrMap=K,this.mediaState=new S(this,v,f),this.hotkeyAction=`toggleFullscreen`}static{this.tagName=`media-fullscreen-button`}activate(e){return this.core.toggle(e)}},he=class extends m{constructor(...e){super(...e),this.core=new ae,this.stateAttrMap=oe,this.mediaState=new S(this,v,i),this.hotkeyAction=`togglePictureInPicture`}static{this.tagName=`media-pip-button`}activate(e){return this.core.toggle(e)}};function Z(e){if(e instanceof HTMLSlotElement){let t=e.assignedElements();if(t.length>0)return t}return[...e.children]}function Q(e){for(let t of Z(e)){if(t instanceof HTMLImageElement)return t;let e=Q(t);if(e)return e}return null}function $(e){if(e.hasAttribute(`src`)||e.hasAttribute(`srcset`))return!0;let t=e.parentElement;return t?.localName===`picture`&&t.querySelector(`source`)!==null}function ge(e){return!!e.getAttribute(`src`)||e.hasAttribute(`srcset`)}var _e=class extends _{static{this.tagName=`media-poster`}#e=new se;#t=new MutationObserver(()=>this.requestUpdate());#n=new S(this,v,t);#r=new S(this,v,r);#i=null;#a=!1;#o=`pending`;#s=null;#c=null;connectedCallback(){if(super.connectedCallback(),this.destroyed)return;this.#c=new AbortController;let{signal:e}=this.#c;this.addEventListener(`slotchange`,()=>this.requestUpdate(),{signal:e}),this.#t.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.#u(null),this.#t.disconnect(),this.#c?.abort(),this.#c=null}get#l(){return!this.#i||!$(this.#i)?`none`:this.#o===`pending`?`loading`:this.#o}update(t){super.update(t);let n=this.#n.value;if(!n)return;this.#e.setMedia({started:n.started,poster:this.#r.value?.poster??``});let{src:r}=this.#e.getState();this.#u(Q(this)),this.#d(r),this.#e.setImageLoadState(this.#l),e(this,this.#e.getState(),ce)}#u(e){if(e===this.#i||(this.#a&&this.#i?.removeAttribute(`src`),this.#s?.abort(),this.#s=null,this.#i=e,this.#a=e!==null&&!$(e),this.#o=`pending`,!e))return;e.naturalWidth>0?this.#o=`loaded`:e.complete&&ge(e)&&(this.#o=`error`),this.#s=new AbortController;let{signal:t}=this.#s,n=e=>()=>{this.#o=e,this.requestUpdate()};e.addEventListener(`load`,n(`loaded`),{signal:t}),e.addEventListener(`error`,n(`error`),{signal:t})}#d(e){let t=this.#i;t&&this.#a&&(e?t.getAttribute(`src`)!==e&&(this.#o=`pending`,t.setAttribute(`src`,e)):(this.#o=`pending`,t.removeAttribute(`src`)))}};export{fe as a,pe as i,he as n,de as o,me as r,le as s,_e as t};
|
|
2
|
-
//# sourceMappingURL=poster-element-Djlm5fwC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seek-button-element-BD2caCd5.js","names":["#props","#media","resolveText","#props","#media","resolveText","#props","#media","resolveText","#mediaState","#core","#i18n","#options"],"sources":["../../core/dist/dev/core/ui/playback-rate-button/playback-rate-button-core.js","../../core/dist/dev/core/ui/playback-rate-button/playback-rate-button-data-attrs.js","../../core/dist/dev/core/ui/playback-rate-radio-group/playback-rate-radio-group-core.js","../../core/dist/dev/core/ui/playback-rate-radio-group/playback-rate-radio-group-data-attrs.js","../../core/dist/dev/i18n/text/seek.js","../../core/dist/dev/core/ui/seek-button/seek-button-core.js","../../core/dist/dev/core/ui/seek-button/seek-button-data-attrs.js","../src/ui/playback-rate-button/playback-rate-button-element.ts","../src/ui/playback-rate-radio-group/playback-rate-radio-group-element.ts","../src/ui/seek-button/seek-button-element.ts"],"sourcesContent":["import { resolveText } from \"../../i18n/resolve-text.js\";\nimport { resolveLabel } from \"../utils/resolve-label.js\";\nimport { rateText } from \"../../../i18n/text/playback.js\";\nimport { createState } from \"@videojs/store\";\nimport { defaults } from \"@videojs/utils/object\";\n//#region src/core/ui/playback-rate-button/playback-rate-button-core.ts\nvar PlaybackRateButtonCore = class PlaybackRateButtonCore {\n\tstatic defaultProps = {\n\t\tlabel: \"\",\n\t\tdisabled: false,\n\t\tmenuTrigger: false\n\t};\n\tstate = createState({\n\t\trate: 1,\n\t\tlabel: \"\"\n\t});\n\t#props = { ...PlaybackRateButtonCore.defaultProps };\n\t#media = null;\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, PlaybackRateButtonCore.defaultProps);\n\t}\n\tgetLabel(state) {\n\t\tconst custom = resolveLabel(this.#props.label, state);\n\t\tif (custom !== void 0) return custom;\n\t\treturn rateText;\n\t}\n\tgetLabelParams(state) {\n\t\tif (resolveLabel(this.#props.label, state) !== void 0) return void 0;\n\t\treturn { rate: state.rate };\n\t}\n\tgetAttrs(state) {\n\t\treturn {\n\t\t\t\"aria-label\": this.getLabel(state),\n\t\t\t\"aria-disabled\": this.#props.disabled ? \"true\" : void 0\n\t\t};\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\tgetState() {\n\t\tconst media = this.#media;\n\t\tthis.state.patch({ rate: media.playbackRate });\n\t\tthis.state.patch({ label: resolveText(this.getLabel(this.state.current)) });\n\t\treturn this.state.current;\n\t}\n\tcycle(media) {\n\t\tif (this.#props.disabled) return;\n\t\tif (this.#props.menuTrigger) return;\n\t\tconst { playbackRates, playbackRate } = media;\n\t\tif (playbackRates.length === 0) return;\n\t\tconst idx = playbackRates.indexOf(playbackRate);\n\t\tconst next = idx === -1 ? playbackRates.find((r) => r > playbackRate) ?? playbackRates[0] : playbackRates[(idx + 1) % playbackRates.length];\n\t\tmedia.setPlaybackRate(next);\n\t}\n};\n//#endregion\nexport { PlaybackRateButtonCore };\n\n//# sourceMappingURL=playback-rate-button-core.js.map","//#region src/core/ui/playback-rate-button/playback-rate-button-data-attrs.ts\nconst PlaybackRateButtonDataAttrs = { \n/** Current playback rate. */\nrate: \"data-rate\" };\n//#endregion\nexport { PlaybackRateButtonDataAttrs };\n\n//# sourceMappingURL=playback-rate-button-data-attrs.js.map","import { resolveText } from \"../../i18n/resolve-text.js\";\nimport { resolveLabel } from \"../utils/resolve-label.js\";\nimport { playbackRateText } from \"../../../i18n/text/menu.js\";\nimport { createState } from \"@videojs/store\";\nimport { defaults } from \"@videojs/utils/object\";\nimport { isUndefined } from \"@videojs/utils/predicate\";\n//#region src/core/ui/playback-rate-radio-group/playback-rate-radio-group-core.ts\nfunction formatPlaybackRate(rate) {\n\treturn `${rate}×`;\n}\nvar PlaybackRateRadioGroupCore = class PlaybackRateRadioGroupCore {\n\tstatic defaultProps = {\n\t\tlabel: \"\",\n\t\tformatRate: formatPlaybackRate,\n\t\tdisabled: false\n\t};\n\tstate = createState({\n\t\trate: 1,\n\t\tvalue: \"1\",\n\t\toptions: [],\n\t\tdisabled: true,\n\t\thidden: true,\n\t\tavailability: \"unavailable\",\n\t\tlabel: \"\"\n\t});\n\t#props = { ...PlaybackRateRadioGroupCore.defaultProps };\n\t#media = null;\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, PlaybackRateRadioGroupCore.defaultProps);\n\t}\n\tgetLabel(state) {\n\t\tconst custom = resolveLabel(this.#props.label, state);\n\t\tif (custom !== void 0) return custom;\n\t\treturn playbackRateText;\n\t}\n\tgetLabelParams(_state) {}\n\tgetRateLabel(rate) {\n\t\treturn this.#props.formatRate(rate);\n\t}\n\tgetRateValue(rate) {\n\t\treturn String(rate);\n\t}\n\tgetAttrs(state) {\n\t\treturn {\n\t\t\t\"aria-label\": this.getLabel(state),\n\t\t\t\"aria-disabled\": state.disabled ? \"true\" : void 0,\n\t\t\thidden: state.hidden ? \"\" : void 0\n\t\t};\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\tgetState() {\n\t\tconst media = this.#media;\n\t\tconst availability = media.playbackRates.length > 0 ? \"available\" : \"unavailable\";\n\t\tthis.state.patch({\n\t\t\trate: media.playbackRate,\n\t\t\tvalue: this.getRateValue(media.playbackRate),\n\t\t\toptions: media.playbackRates.map((rate) => ({\n\t\t\t\trate,\n\t\t\t\tvalue: this.getRateValue(rate),\n\t\t\t\tlabel: this.getRateLabel(rate),\n\t\t\t\tdisabled: false\n\t\t\t})),\n\t\t\tdisabled: this.#props.disabled || media.playbackRates.length === 0,\n\t\t\thidden: availability === \"unavailable\",\n\t\t\tavailability\n\t\t});\n\t\tthis.state.patch({ label: resolveText(this.getLabel(this.state.current)) });\n\t\treturn this.state.current;\n\t}\n\tselect(media, rate) {\n\t\tif (this.#props.disabled) return;\n\t\tif (!media.playbackRates.includes(rate)) return;\n\t\tmedia.setPlaybackRate(rate);\n\t}\n\tselectValue(media, value) {\n\t\tconst rate = media.playbackRates.find((candidate) => this.getRateValue(candidate) === value);\n\t\tif (isUndefined(rate)) return;\n\t\tthis.select(media, rate);\n\t}\n};\n//#endregion\nexport { PlaybackRateRadioGroupCore };\n\n//# sourceMappingURL=playback-rate-radio-group-core.js.map","//#region src/core/ui/playback-rate-radio-group/playback-rate-radio-group-data-attrs.ts\nconst PlaybackRateRadioGroupDataAttrs = {\n\t/** Current playback rate. */\n\trate: \"data-rate\",\n\t/** Present when playback rate selection is disabled. */\n\tdisabled: \"data-disabled\",\n\t/** Present when playback rate selection is unavailable. */\n\thidden: \"data-hidden\",\n\t/** Indicates playback rate availability (`available` or `unavailable`). */\n\tavailability: \"data-availability\"\n};\n//#endregion\nexport { PlaybackRateRadioGroupDataAttrs };\n\n//# sourceMappingURL=playback-rate-radio-group-data-attrs.js.map","//#region src/core/i18n/text/seek.ts\nconst prefix = \"seek.\";\nconst forwardText = {\n\tkey: `${prefix}forward`,\n\ttext: \"Seek forward {seconds} seconds\"\n};\nconst backwardText = {\n\tkey: `${prefix}backward`,\n\ttext: \"Seek backward {seconds} seconds\"\n};\n//#endregion\nexport { backwardText, forwardText };\n\n//# sourceMappingURL=seek.js.map","import { resolveText } from \"../../i18n/resolve-text.js\";\nimport { resolveLabel } from \"../utils/resolve-label.js\";\nimport { backwardText, forwardText } from \"../../../i18n/text/seek.js\";\nimport { createState } from \"@videojs/store\";\nimport { defaults } from \"@videojs/utils/object\";\n//#region src/core/ui/seek-button/seek-button-core.ts\nvar SeekButtonCore = class SeekButtonCore {\n\tstatic defaultProps = {\n\t\tseconds: 30,\n\t\tlabel: \"\",\n\t\tdisabled: false\n\t};\n\tstate = createState({\n\t\tseeking: false,\n\t\tdirection: \"forward\",\n\t\tlabel: \"\"\n\t});\n\t#props = { ...SeekButtonCore.defaultProps };\n\t#media = null;\n\tconstructor(props) {\n\t\tif (props) this.setProps(props);\n\t}\n\tsetProps(props) {\n\t\tthis.#props = defaults(props, SeekButtonCore.defaultProps);\n\t}\n\tgetLabel(state) {\n\t\tconst custom = resolveLabel(this.#props.label, state);\n\t\tif (custom !== void 0) return custom;\n\t\treturn state.direction === \"backward\" ? backwardText : forwardText;\n\t}\n\tgetLabelParams(state) {\n\t\tif (resolveLabel(this.#props.label, state) !== void 0) return void 0;\n\t\treturn { seconds: Math.abs(this.#props.seconds) };\n\t}\n\tgetAttrs(state) {\n\t\treturn {\n\t\t\t\"aria-label\": this.getLabel(state),\n\t\t\t\"aria-disabled\": this.#props.disabled ? \"true\" : void 0\n\t\t};\n\t}\n\tsetMedia(media) {\n\t\tthis.#media = media;\n\t}\n\tgetState() {\n\t\tconst media = this.#media;\n\t\tconst direction = this.#props.seconds < 0 ? \"backward\" : \"forward\";\n\t\tthis.state.patch({\n\t\t\tseeking: media.seeking,\n\t\t\tdirection\n\t\t});\n\t\tthis.state.patch({ label: resolveText(this.getLabel(this.state.current)) });\n\t\treturn this.state.current;\n\t}\n\tasync seek(media) {\n\t\tif (this.#props.disabled) return;\n\t\tawait media.seek(media.currentTime + this.#props.seconds);\n\t}\n};\n//#endregion\nexport { SeekButtonCore };\n\n//# sourceMappingURL=seek-button-core.js.map","//#region src/core/ui/seek-button/seek-button-data-attrs.ts\nconst SeekButtonDataAttrs = {\n\t/** Present when a seek is in progress. */\n\tseeking: \"data-seeking\",\n\t/** Indicates the seek direction: `\"forward\"` or `\"backward\"`. */\n\tdirection: \"data-direction\"\n};\n//#endregion\nexport { SeekButtonDataAttrs };\n\n//# sourceMappingURL=seek-button-data-attrs.js.map","import { PlaybackRateButtonCore, PlaybackRateButtonDataAttrs } from '@videojs/core';\nimport { applyElementProps, selectPlaybackRate, type UIEvent } from '@videojs/core/dom';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\nimport type { MediaPlaybackRateState } from '@videojs/media';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaButtonElement } from '../media-button-element';\n\nexport class PlaybackRateButtonElement extends MediaButtonElement<PlaybackRateButtonCore> {\n static readonly tagName = 'media-playback-rate-button';\n\n static override properties = {\n label: { type: String },\n disabled: { type: Boolean },\n commandfor: { type: String },\n } satisfies PropertyDeclarationMap<'label' | 'disabled' | 'commandfor'>;\n\n commandfor: string | undefined = undefined;\n\n protected readonly core = new PlaybackRateButtonCore();\n protected readonly stateAttrMap = PlaybackRateButtonDataAttrs;\n protected readonly mediaState = new PlayerController(this, playerContext, selectPlaybackRate);\n protected override readonly hotkeyAction = 'speedUp';\n\n protected activate(state: MediaPlaybackRateState, event?: UIEvent): void {\n if (this.commandfor) {\n if (event instanceof KeyboardEvent) {\n // Custom elements do not synthesize a click from keyboard activation.\n // Dispatch one so the linked menu follows its normal open lifecycle.\n this.click();\n }\n return;\n }\n this.core.cycle(state);\n }\n\n protected override getIsButtonDisabled(): boolean {\n const media = this.mediaState.value;\n if (super.getIsButtonDisabled()) return true;\n if (this.commandfor && media && media.playbackRates.length === 0) return true;\n return false;\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n\n if (changed.has('commandfor')) {\n if (this.commandfor) {\n this.setAttribute('commandfor', this.commandfor);\n } else {\n this.removeAttribute('commandfor');\n }\n }\n }\n\n protected override update(changed: PropertyValues): void {\n super.update(changed);\n\n const media = this.mediaState.value;\n if (!media || !this.commandfor) return;\n\n applyElementProps(this, {\n 'aria-disabled': this.getIsButtonDisabled() ? 'true' : undefined,\n });\n }\n}\n\nexport namespace PlaybackRateButtonElement {\n export type State = PlaybackRateButtonCore.State;\n}\n","import {\n PlaybackRateRadioGroupCore,\n PlaybackRateRadioGroupDataAttrs,\n type PlaybackRateRadioGroupOption,\n} from '@videojs/core';\nimport { applyStateDataAttrs, logMissingFeature, selectPlaybackRate } from '@videojs/core/dom';\nimport { translateText } from '@videojs/core/i18n';\nimport type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';\n\nimport { i18nContext } from '../../i18n/context';\nimport { I18nController } from '../../i18n/controller';\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MenuRadioGroupElement } from '../menu/menu-radio-group-element';\nimport { RadioOptionsController } from '../radio-options/radio-options-controller';\n\nexport class PlaybackRateRadioGroupElement extends MenuRadioGroupElement {\n static override readonly tagName = 'media-playback-rate-radio-group';\n\n static override properties = {\n ...MenuRadioGroupElement.properties,\n disabled: { type: Boolean },\n } satisfies PropertyDeclarationMap<'value' | 'disabled'>;\n\n disabled = false;\n formatRate = PlaybackRateRadioGroupCore.defaultProps.formatRate;\n\n readonly #core = new PlaybackRateRadioGroupCore();\n readonly #i18n = new I18nController(this, i18nContext);\n readonly #mediaState = new PlayerController(this, playerContext, selectPlaybackRate);\n readonly #options = new RadioOptionsController<PlaybackRateRadioGroupOption>(this, {\n setItemAttributes: (item, option) => item.setAttribute('data-rate', option.value),\n onValueChange: (value) => {\n const media = this.#mediaState.value;\n if (media) this.#core.selectValue(media, value);\n },\n });\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.destroyed) return;\n\n if (__DEV__ && !this.#mediaState.value && this.#mediaState.displayName) {\n logMissingFeature(this.localName, this.#mediaState.displayName);\n }\n }\n\n protected override update(changed: PropertyValues): void {\n const media = this.#mediaState.value;\n let state: PlaybackRateRadioGroupCore.State | null = null;\n\n if (media) {\n this.#core.setProps({ formatRate: this.formatRate, disabled: this.disabled });\n this.#core.setMedia(media);\n state = this.#core.getState();\n\n this.applyDefaultAriaLabel(\n translateText(this.#core.getLabel(state), this.#i18n.value, this.#core.getLabelParams(state))\n );\n this.#options.sync(state, this.#i18n.value, this.#i18n.locale);\n this.publishMenuTriggerState(state.disabled, state.availability);\n }\n\n super.update(changed);\n\n if (state) applyStateDataAttrs(this, state, PlaybackRateRadioGroupDataAttrs);\n }\n}\n\nexport namespace PlaybackRateRadioGroupElement {\n export type State = PlaybackRateRadioGroupCore.State;\n}\n","import { SeekButtonCore, SeekButtonDataAttrs } from '@videojs/core';\nimport { selectTime } from '@videojs/core/dom';\nimport type { PropertyDeclarationMap } from '@videojs/element';\nimport type { MediaTimeState } from '@videojs/media';\n\nimport { playerContext } from '../../player/context';\nimport { PlayerController } from '../../player/player-controller';\nimport { MediaButtonElement } from '../media-button-element';\n\nexport class SeekButtonElement extends MediaButtonElement<SeekButtonCore> {\n static readonly tagName = 'media-seek-button';\n\n static override properties: PropertyDeclarationMap = {\n ...MediaButtonElement.properties,\n seconds: { type: Number },\n };\n\n seconds = SeekButtonCore.defaultProps.seconds;\n\n protected readonly core = new SeekButtonCore();\n protected readonly stateAttrMap = SeekButtonDataAttrs;\n protected readonly mediaState = new PlayerController(this, playerContext, selectTime);\n protected override readonly hotkeyAction = 'seekStep';\n\n protected override get hotkeyValue(): number | undefined {\n return this.seconds;\n }\n\n protected activate(state: MediaTimeState): void {\n this.core.seek(state);\n }\n}\n"],"mappings":";;;;;;;;;AAMA,GAAA,CAAI,sBAAA,CAAA,CAAA,CAAyB,KAAA,CAAM,sBAAA,CAAuB;AACzD,CAAA,MAAA,CAAO,YAAA,CAAA,CAAA,CAAe;AACrB,CAAA,CAAA,KAAA,CAAA,CAAO,CAAA,CAAA;AACP,CAAA,CAAA,QAAA,CAAA,CAAU,KAAA;AACV,CAAA,CAAA,WAAA,CAAA,CAAa;AACd,CAAA,CAAA;AACA,CAAA,KAAA,CAAA,CAAA,CAAQ,WAAA,CAAY;AACnB,CAAA,CAAA,IAAA,CAAA,CAAM,CAAA;AACN,CAAA,CAAA,KAAA,CAAA,CAAO,CAAA;AACR,CAAA,CAAC,CAAA;AACD,CAAA,CAAA,KAAA,CAAA,CAAA,CAAS,CAAA,CAAE,CAAA,CAAA,CAAG,sBAAA,CAAuB,YAAA,CAAa,CAAA;AAClD,CAAA,CAAA,KAAA,CAAA,CAAA,CAAS,IAAA;AACT,CAAA,WAAA,CAAY,KAAA,CAAA,CAAO;AAClB,CAAA,CAAA,EAAA,CAAA,CAAI,KAAA,CAAA,CAAO,IAAA,CAAK,QAAA,CAAS,KAAK,CAAA;AAC/B,CAAA;AACA,C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9D,CAAA,CAAA,IAAA,CAAA,OAAA,CAAA,CAAA,CAAA,cAAA,CAAe,YAAA,CAAa,OAAA;AAEZ,CAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,CAAA,GAAA,CAAI,cAAA,CAAe,CAAA;AACX,CAAA,CAAA,IAAA,CAAA,YAAA,CAAA,CAAA,CAAA,mBAAA;AACF,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,CAAA,CAAA,GAAA,CAAI,gBAAA,CAAiB,IAAA,CAAA,CAAM,aAAA,CAAA,CAAe,UAAU,CAAA;AACzC,CAAA,CAAA,IAAA,CAAA,YAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA;;;AAZjB,CAAA,CAAA,IAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,IAAA,CAAA,MAAA,CAAA;;;AAE2B,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,CAAA,CAAA;AACnD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,kBAAA,CAAmB,UAAA;AACtB,CAAA,CAAA,CAAA,OAAA,CAAA,CAAS,CAAA,CAAE,IAAA,CAAA,CAAM,MAAA,CAAO;AAC1B,CAAA,CAAA,CAAA;;AASA,CAAA,GAAA,CAAuB,WAAA,CAAA,CAAA,CAAkC;AACvD,CAAA,CAAA,MAAA,CAAO,IAAA,CAAK,OAAA;AACd,CAAA;AAEA,CAAA,QAAU,CAAS,KAAA,CAAA,CAA6B;AAC9C,CAAA,CAAA,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,KAAK,CAAA;AACtB,CAAA;AACF,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u as e}from"./predicate-LbFu-fPH.js";import{B as t,C as n,I as r,K as i,S as a,_ as o,g as s,rt as c,v as l,w as u,y as d}from"./compounds-CHlzbAKu.js";import{r as f}from"./translate-text-TzSgu_oe.js";import{r as p}from"./context-C2rsoDxk.js";import{c as m,r as h}from"./container-element-Dd0ZCdhK.js";import{c as g,n as _}from"./create-player-LjvbIxIq.js";import{translateText as v}from"./i18n.js";var y=class e{static defaultProps={label:``,disabled:!1,menuTrigger:!1};state=g({rate:1,label:``});#e={...e.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(t){this.#e=c(t,e.defaultProps)}getLabel(e){let t=a(this.#e.label,e);return t===void 0?d:t}getLabelParams(e){if(a(this.#e.label,e)===void 0)return{rate:e.rate}}getAttrs(e){return{"aria-label":this.getLabel(e),"aria-disabled":this.#e.disabled?`true`:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t;return this.state.patch({rate:e.playbackRate}),this.state.patch({label:f(this.getLabel(this.state.current))}),this.state.current}cycle(e){if(this.#e.disabled||this.#e.menuTrigger)return;let{playbackRates:t,playbackRate:n}=e;if(t.length===0)return;let r=t.indexOf(n),i=r===-1?t.find(e=>e>n)??t[0]:t[(r+1)%t.length];e.setPlaybackRate(i)}};const b={rate:`data-rate`};function x(e){return`${e}×`}var S=class t{static defaultProps={label:``,formatRate:x,disabled:!1};state=g({rate:1,value:`1`,options:[],disabled:!0,hidden:!0,availability:`unavailable`,label:``});#e={...t.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(e){this.#e=c(e,t.defaultProps)}getLabel(e){let t=a(this.#e.label,e);return t===void 0?i:t}getLabelParams(e){}getRateLabel(e){return this.#e.formatRate(e)}getRateValue(e){return String(e)}getAttrs(e){return{"aria-label":this.getLabel(e),"aria-disabled":e.disabled?`true`:void 0,hidden:e.hidden?``:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t,t=e.playbackRates.length>0?`available`:`unavailable`;return this.state.patch({rate:e.playbackRate,value:this.getRateValue(e.playbackRate),options:e.playbackRates.map(e=>({rate:e,value:this.getRateValue(e),label:this.getRateLabel(e),disabled:!1})),disabled:this.#e.disabled||e.playbackRates.length===0,hidden:t===`unavailable`,availability:t}),this.state.patch({label:f(this.getLabel(this.state.current))}),this.state.current}select(e,t){this.#e.disabled||e.playbackRates.includes(t)&&e.setPlaybackRate(t)}selectValue(t,n){let r=t.playbackRates.find(e=>this.getRateValue(e)===n);e(r)||this.select(t,r)}};const C={rate:`data-rate`,disabled:`data-disabled`,hidden:`data-hidden`,availability:`data-availability`},w=`seek.`,T={key:`${w}forward`,text:`Seek forward {seconds} seconds`},E={key:`${w}backward`,text:`Seek backward {seconds} seconds`};var D=class e{static defaultProps={seconds:30,label:``,disabled:!1};state=g({seeking:!1,direction:`forward`,label:``});#e={...e.defaultProps};#t=null;constructor(e){e&&this.setProps(e)}setProps(t){this.#e=c(t,e.defaultProps)}getLabel(e){let t=a(this.#e.label,e);return t===void 0?e.direction===`backward`?E:T:t}getLabelParams(e){if(a(this.#e.label,e)===void 0)return{seconds:Math.abs(this.#e.seconds)}}getAttrs(e){return{"aria-label":this.getLabel(e),"aria-disabled":this.#e.disabled?`true`:void 0}}setMedia(e){this.#t=e}getState(){let e=this.#t,t=this.#e.seconds<0?`backward`:`forward`;return this.state.patch({seeking:e.seeking,direction:t}),this.state.patch({label:f(this.getLabel(this.state.current))}),this.state.current}async seek(e){this.#e.disabled||await e.seek(e.currentTime+this.#e.seconds)}};const O={seeking:`data-seeking`,direction:`data-direction`};var k=class extends l{constructor(...e){super(...e),this.commandfor=void 0,this.core=new y,this.stateAttrMap=b,this.mediaState=new _(this,p,r),this.hotkeyAction=`speedUp`}static{this.tagName=`media-playback-rate-button`}static{this.properties={label:{type:String},disabled:{type:Boolean},commandfor:{type:String}}}activate(e,t){if(this.commandfor){t instanceof KeyboardEvent&&this.click();return}this.core.cycle(e)}getIsButtonDisabled(){let e=this.mediaState.value;return!!(super.getIsButtonDisabled()||this.commandfor&&e&&e.playbackRates.length===0)}willUpdate(e){super.willUpdate(e),e.has(`commandfor`)&&(this.commandfor?this.setAttribute(`commandfor`,this.commandfor):this.removeAttribute(`commandfor`))}update(e){super.update(e),!(!this.mediaState.value||!this.commandfor)&&u(this,{"aria-disabled":this.getIsButtonDisabled()?`true`:void 0})}},A=class extends o{constructor(...e){super(...e),this.disabled=!1,this.formatRate=S.defaultProps.formatRate,this.#e=new S,this.#t=new h(this,m),this.#n=new _(this,p,r),this.#r=new s(this,{setItemAttributes:(e,t)=>e.setAttribute(`data-rate`,t.value),onValueChange:e=>{let t=this.#n.value;t&&this.#e.selectValue(t,e)}})}static{this.tagName=`media-playback-rate-radio-group`}static{this.properties={...o.properties,disabled:{type:Boolean}}}#e;#t;#n;#r;connectedCallback(){super.connectedCallback(),this.destroyed}update(e){let t=this.#n.value,r=null;t&&(this.#e.setProps({formatRate:this.formatRate,disabled:this.disabled}),this.#e.setMedia(t),r=this.#e.getState(),this.applyDefaultAriaLabel(v(this.#e.getLabel(r),this.#t.value,this.#e.getLabelParams(r))),this.#r.sync(r,this.#t.value,this.#t.locale),this.publishMenuTriggerState(r.disabled,r.availability)),super.update(e),r&&n(this,r,C)}},j=class extends l{constructor(...e){super(...e),this.seconds=D.defaultProps.seconds,this.core=new D,this.stateAttrMap=O,this.mediaState=new _(this,p,t),this.hotkeyAction=`seekStep`}static{this.tagName=`media-seek-button`}static{this.properties={...l.properties,seconds:{type:Number}}}get hotkeyValue(){return this.seconds}activate(e){this.core.seek(e)}};export{A as n,k as r,j as t};
|
|
2
|
-
//# sourceMappingURL=seek-button-element-CgaXVFPS.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{tt as e}from"./compounds-CHlzbAKu.js";import{r as t}from"./media-element-Cp5PrNre.js";import{n,r,t as i}from"./shadow-styles-DQiIr3u8.js";var a=`video-player,live-video-player,media-i18n{display:contents}video-player video,video-player [slot=poster],live-video-player video,live-video-player [slot=poster]{width:100%;height:100%;display:block}video-player video::-webkit-media-text-track-container,live-video-player video::-webkit-media-text-track-container{z-index:1;scale:.98;translate:0 var(--media-caption-track-y,0);transition:translate var(--media-caption-track-duration,0) ease-out;transition-delay:var(--media-caption-track-delay,0);font-family:inherit}`;const o=n(`media-tooltip-group{display:contents}:host{width:100%;display:grid}media-container{min-width:0;min-height:0}.media-popover--volume:has(media-volume-slider[data-hidden]){display:none}`);var s=class extends t{static{this.shadowRootOptions={mode:`open`}}constructor(){if(super(),r(`__media-styles`,a),!this.shadowRoot){let t=this.constructor;this.attachShadow(t.shadowRootOptions),t.template&&e(this.shadowRoot,t.template);let n=[o];t.styles&&n.push(t.styles),i(this.shadowRoot,n)}}};export{s as t};
|
|
2
|
-
//# sourceMappingURL=skin-element-DE8OodF5.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u as e}from"./predicate-LbFu-fPH.js";import{nt as t}from"./compounds-CHlzbAKu.js";import{r as n}from"./media-element-Cp5PrNre.js";import{c as r,i,l as a,r as o}from"./container-element-Dd0ZCdhK.js";import{DEFAULT_LOCALE as s,createTranslator as c,findLocaleKeys as l,getBrowserTranslations as u,getI18nTranslations as d,loadLocale as f,onI18nRegistryChange as p,registerI18n as m,shouldAttemptBrowserTranslation as h,translateText as g}from"./i18n.js";function _(t,n,r=`en`){return!e(t)&&t.trim()!==``?t:!e(n)&&n.trim()!==``?n:r}function v(e){let t=e.getAttribute(`lang`)?.trim();if(t)return t;if(`lang`in e&&typeof e.lang==`string`){let t=e.lang.trim();if(t)return t}}function y(e){return t(e,v)}async function b(e,t,n){let r=n(e),i=await Promise.all(r.map(e=>t(e))),a=[],o={};for(let e=0;e<r.length;e++){let t=i[e];t&&Object.keys(t).length>0&&a.push(r[e])}for(let e=r.length-1;e>=0;e--){let t=i[e];t&&Object.assign(o,t)}return{merged:o,loadedTags:a}}function x(t){if(!(e(t)||t.trim()===``))return t.trim()}const S=new Set;let C,w=!1;const T=()=>{w=!1;for(let e of S)e()},E=()=>{w||(w=!0,queueMicrotask(T))};function D(){C||typeof document>`u`||(C=new MutationObserver(E),C.observe(document.documentElement,{subtree:!0,attributes:!0,attributeFilter:[`lang`],childList:!0}))}function O(){S.size||!C||(C.disconnect(),C=void 0,w=!1)}function k(e){return typeof document>`u`?()=>{}:(S.add(e),D(),()=>{S.delete(e),O()})}function A(e,t){return _(e,t)}function j(e){return A(x(e.lang),x(y(e.parentElement??(typeof document<`u`?document.documentElement:null))))}function M({context:e,loader:t=f}){return n=>{class r extends n{constructor(...t){super(...t),this.lang=``,this.#e=new a(this,{context:e,initialValue:{translator:i(),locale:s}}),this.#r=0,this.#i={},this.#a=0,this.#c={translator:i(),locale:s},this.#u=-1}static{this.properties={...n.properties,lang:{type:String,reflect:!0}}}#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;get i18nValue(){return this.#c}connectedCallback(){super.connectedCallback(),this.#t=p(()=>{this.#r+=1,this.requestUpdate()}),this.#n=k(()=>this.requestUpdate()),this.#f(),this.#m(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),this.#t?.(),this.#t=void 0,this.#n?.(),this.#n=void 0,this.#a+=1,this.#i={},this.#o=void 0,this.#s=void 0}willUpdate(e){super.willUpdate(e);let t=j(this);if(this.#o!==t){let e=this.#o!==void 0;this.#o=t;let n=!e&&this.#s!==void 0&&t!==this.#s;(e||n)&&this.#f()}this.#m()}#f(){let e=j(this);this.#s=e,this.#a+=1;let n=this.#a;this.#i={},(async()=>{let{merged:r,loadedTags:i}=await b(e,t,l);if(n===this.#a){if(h(e,i,r)){let t=await u(e);if(n!==this.#a)return;Object.keys(t).length&&m(e,t)}n===this.#a&&(this.#i=r,this.requestUpdate())}})()}#p(){return j(this)}#m(){let e=this.#p();if(this.#l===e&&this.#u===this.#r&&this.#d===this.#i)return;let t=c({...d(e),...this.#i},e);this.#c={translator:t,locale:e},this.#l=e,this.#u=this.#r,this.#d=this.#i,this.#e.setValue(this.#c)}}return r}}const N=M({context:r});var P=class extends N(n){static{this.tagName=`media-i18n`}};function F({context:e}){return t=>{class n extends t{constructor(...t){super(...t),this.#e=new o(this,e),this.token=``}static{this.properties={token:{type:String}}}#e;#t;connectedCallback(){this.#t??=this.textContent?.trim()??``,super.connectedCallback()}updated(e){if(super.updated(e),!this.#t){this.textContent=``;return}let t=this.token?{key:this.token,text:this.#t}:this.#t;this.textContent=typeof t==`string`?t:g(t,this.#e.value)}}return n}}const I=F({context:r});var L=class extends I(n){static{this.tagName=`media-text`}};export{P as n,L as t};
|
|
2
|
-
//# sourceMappingURL=text-element-BJyj7nLo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-element-BJyj7nLo.js","names":["nearestLang","defaultLoader","ContextProvider","#i18nProvider","#i18nValue","#registryUnsubscribe","#registryEpoch","#ambientUnsubscribe","#resetLazyAndLoad","#publish","#lazySeq","#lazyLayer","#resolvedLocaleForLazy","#lazyResetStartedForLocale","#resolvedLocale","#publishedLocale","#publishedRegistryEpoch","#publishedLazyLayer","#i18n","#text"],"sources":["../../utils/dist/dom/locale/effective-locale.js","../../utils/dist/dom/locale/find-nearest-lang.js","../../utils/dist/dom/locale/merge-locale-overlays.js","../../utils/dist/dom/locale/resolve-lang-attr.js","../../utils/dist/dom/locale/subscribe-ambient-lang.js","../src/i18n/locale.ts","../src/i18n/provider-mixin.ts","../src/i18n/provider-element.ts","../src/i18n/text-mixin.ts","../src/ui/text/text-element.ts"],"sourcesContent":["import \"../../i18n.js\";\nimport { isUndefined } from \"../../predicate/predicate.js\";\n//#region src/dom/locale/effective-locale.ts\n/** Resolves locale: explicit non-empty value → ambient `lang` → {@link fallback}. */\nfunction effectiveLocale(explicitLocale, ambientLang, fallback = \"en\") {\n\tif (!isUndefined(explicitLocale) && explicitLocale.trim() !== \"\") return explicitLocale;\n\tif (!isUndefined(ambientLang) && ambientLang.trim() !== \"\") return ambientLang;\n\treturn fallback;\n}\n//#endregion\nexport { effectiveLocale };\n\n//# sourceMappingURL=effective-locale.js.map","import { walkAncestors } from \"../walk-ancestors.js\";\n//#region src/dom/locale/find-nearest-lang.ts\nfunction getElementLang(node) {\n\tconst fromAttribute = node.getAttribute(\"lang\")?.trim();\n\tif (fromAttribute) return fromAttribute;\n\tif (\"lang\" in node && typeof node.lang === \"string\") {\n\t\tconst fromProperty = node.lang.trim();\n\t\tif (fromProperty) return fromProperty;\n\t}\n}\n/** First non-empty `lang` on `start` or an ancestor (HTML language inheritance). */\nfunction findNearestLang(start) {\n\treturn walkAncestors(start, getElementLang);\n}\n//#endregion\nexport { findNearestLang };\n\n//# sourceMappingURL=find-nearest-lang.js.map","//#region src/dom/locale/merge-locale-overlays.ts\n/**\n* Loads overlay layers for each resolved locale key, least-specific first, then merges\n* most-specific-last (same semantics as the core i18n registry).\n*/\nasync function mergeLocaleOverlays(locale, load, findKeys) {\n\tconst chain = findKeys(locale);\n\tconst layers = await Promise.all(chain.map((tag) => load(tag)));\n\tconst loadedTags = [];\n\tconst merged = {};\n\tfor (let i = 0; i < chain.length; i++) {\n\t\tconst layer = layers[i];\n\t\tif (layer && Object.keys(layer).length > 0) loadedTags.push(chain[i]);\n\t}\n\tfor (let i = chain.length - 1; i >= 0; i--) {\n\t\tconst layer = layers[i];\n\t\tif (layer) Object.assign(merged, layer);\n\t}\n\treturn {\n\t\tmerged,\n\t\tloadedTags\n\t};\n}\n//#endregion\nexport { mergeLocaleOverlays };\n\n//# sourceMappingURL=merge-locale-overlays.js.map","import { isUndefined } from \"../../predicate/predicate.js\";\n//#region src/dom/locale/resolve-lang-attr.ts\n/**\n* Normalizes a raw `lang` string (e.g. from {@link findNearestLang}): empty or whitespace-only →\n* `undefined`, otherwise the trimmed value.\n*/\nfunction resolveLangAttr(raw) {\n\tif (isUndefined(raw) || raw.trim() === \"\") return;\n\treturn raw.trim();\n}\n//#endregion\nexport { resolveLangAttr };\n\n//# sourceMappingURL=resolve-lang-attr.js.map","//#region src/dom/locale/subscribe-ambient-lang.ts\nconst subscribers = /* @__PURE__ */ new Set();\nlet observer;\nlet queued = false;\nconst flush = () => {\n\tqueued = false;\n\tfor (const cb of subscribers) cb();\n};\nconst schedule = () => {\n\tif (!queued) {\n\t\tqueued = true;\n\t\tqueueMicrotask(flush);\n\t}\n};\nfunction start() {\n\tif (observer || typeof document === \"undefined\") return;\n\tobserver = new MutationObserver(schedule);\n\tobserver.observe(document.documentElement, {\n\t\tsubtree: true,\n\t\tattributes: true,\n\t\tattributeFilter: [\"lang\"],\n\t\tchildList: true\n\t});\n}\nfunction stop() {\n\tif (subscribers.size || !observer) return;\n\tobserver.disconnect();\n\tobserver = void 0;\n\tqueued = false;\n}\n/**\n* Subscribes to DOM updates that can change inherited `lang`: any `lang` attribute edit,\n* or subtree structural changes under `<html>` (which can move nodes between labeled ancestors).\n*/\nfunction subscribeAmbientLang(onStoreChange) {\n\tif (typeof document === \"undefined\") return () => {};\n\tsubscribers.add(onStoreChange);\n\tstart();\n\treturn () => {\n\t\tsubscribers.delete(onStoreChange);\n\t\tstop();\n\t};\n}\n//#endregion\nexport { subscribeAmbientLang };\n\n//# sourceMappingURL=subscribe-ambient-lang.js.map","import type { Locale } from '@videojs/core/i18n';\nimport { effectiveLocale, nearestLang, resolveLangAttr } from '@videojs/utils/dom';\n\n/** Delegates to {@link effectiveLocale}; result is typed as {@link Locale} for player UI. */\nexport function resolvePlayerLocale(explicit: Locale | undefined, inherited: Locale | undefined): Locale {\n return effectiveLocale<Locale>(explicit, inherited);\n}\n\n/** Effective locale for an i18n provider element (explicit `lang` → ancestor `lang` chain → `en`). */\nexport function resolveProviderLocale(host: HTMLElement & { lang?: string }): Locale {\n const explicit = resolveLangAttr<Locale>(host.lang);\n const root = host.parentElement ?? (typeof document !== 'undefined' ? document.documentElement : null);\n const inherited = resolveLangAttr<Locale>(nearestLang(root));\n return resolvePlayerLocale(explicit, inherited);\n}\n","import {\n createTranslator,\n DEFAULT_LOCALE,\n loadLocale as defaultLoader,\n type FlatTranslations,\n findLocaleKeys,\n getBrowserTranslations,\n getI18nTranslations,\n type Locale,\n onI18nRegistryChange,\n registerI18n,\n shouldAttemptBrowserTranslation,\n} from '@videojs/core/i18n';\nimport type { PropertyValues, ReactiveElement } from '@videojs/element';\nimport { ContextProvider } from '@videojs/element/context';\nimport { mergeLocaleOverlays, subscribeAmbientLang } from '@videojs/utils/dom';\nimport type { Constructor } from '@videojs/utils/types';\n\nimport type { I18nContext, I18nContextValue } from './context';\nimport { getFallbackTranslator } from './controller';\nimport { resolveProviderLocale } from './locale';\nimport type { LocaleLoader, ReactiveElementMixinBase } from './types';\n\nexport interface I18nProviderConfig {\n context: I18nContext;\n /** Override lazy loading of shipped locale packs (tests or custom loaders). */\n loader?: LocaleLoader | undefined;\n}\n\nexport type I18nProviderMixin = <Base extends ReactiveElementMixinBase>(\n Base: Base\n) => Constructor<ReactiveElement> & Base;\n\nexport function createI18nProviderMixin({ context, loader = defaultLoader }: I18nProviderConfig): I18nProviderMixin {\n return <Base extends ReactiveElementMixinBase>(Base: Base) => {\n class I18nProviderElement extends Base {\n static properties = {\n ...Base.properties,\n lang: { type: String, reflect: true },\n };\n\n lang = '';\n\n readonly #i18nProvider = new ContextProvider(this, {\n context,\n initialValue: {\n translator: getFallbackTranslator(),\n locale: DEFAULT_LOCALE,\n },\n });\n\n #registryUnsubscribe: (() => void) | undefined;\n #ambientUnsubscribe: (() => void) | undefined;\n #registryEpoch = 0;\n #lazyLayer: Partial<FlatTranslations> = {};\n #lazySeq = 0;\n /** Tracks locale used for `#lazyLayer`; ambient `lang` can change without the `lang` property. */\n #resolvedLocaleForLazy: Locale | undefined;\n /** Locale snapshot when the current `#lazySeq` async load was started (see `willUpdate` drift guard). */\n #lazyResetStartedForLocale: Locale | undefined;\n #i18nValue: I18nContextValue = {\n translator: getFallbackTranslator(),\n locale: DEFAULT_LOCALE,\n };\n #publishedLocale: Locale | undefined;\n #publishedRegistryEpoch = -1;\n #publishedLazyLayer: Partial<FlatTranslations> | undefined;\n\n protected get i18nValue(): I18nContextValue {\n return this.#i18nValue;\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.#registryUnsubscribe = onI18nRegistryChange(() => {\n this.#registryEpoch += 1;\n this.requestUpdate();\n });\n this.#ambientUnsubscribe = subscribeAmbientLang(() => this.requestUpdate());\n this.#resetLazyAndLoad();\n this.#publish();\n this.requestUpdate();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#registryUnsubscribe?.();\n this.#registryUnsubscribe = undefined;\n this.#ambientUnsubscribe?.();\n this.#ambientUnsubscribe = undefined;\n this.#lazySeq += 1;\n this.#lazyLayer = {};\n this.#resolvedLocaleForLazy = undefined;\n this.#lazyResetStartedForLocale = undefined;\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n const locale = resolveProviderLocale(this);\n if (this.#resolvedLocaleForLazy !== locale) {\n const hadLocale = this.#resolvedLocaleForLazy !== undefined;\n this.#resolvedLocaleForLazy = locale;\n const localeDriftedBeforeFirstPaint =\n !hadLocale && this.#lazyResetStartedForLocale !== undefined && locale !== this.#lazyResetStartedForLocale;\n if (hadLocale || localeDriftedBeforeFirstPaint) {\n this.#resetLazyAndLoad();\n }\n }\n this.#publish();\n }\n\n #resetLazyAndLoad(): void {\n const localeSnapshot = resolveProviderLocale(this);\n this.#lazyResetStartedForLocale = localeSnapshot;\n this.#lazySeq += 1;\n const seq = this.#lazySeq;\n this.#lazyLayer = {};\n void (async () => {\n const { merged, loadedTags } = await mergeLocaleOverlays(localeSnapshot, loader, findLocaleKeys);\n if (seq !== this.#lazySeq) return;\n if (shouldAttemptBrowserTranslation(localeSnapshot, loadedTags, merged)) {\n const browser = await getBrowserTranslations(localeSnapshot);\n if (seq !== this.#lazySeq) return;\n if (Object.keys(browser).length) registerI18n(localeSnapshot, browser);\n }\n if (seq !== this.#lazySeq) return;\n this.#lazyLayer = merged;\n this.requestUpdate();\n })();\n }\n\n #resolvedLocale(): Locale {\n return resolveProviderLocale(this);\n }\n\n #publish(): void {\n const locale = this.#resolvedLocale();\n if (\n this.#publishedLocale === locale &&\n this.#publishedRegistryEpoch === this.#registryEpoch &&\n this.#publishedLazyLayer === this.#lazyLayer\n ) {\n return;\n }\n const registryLayer = getI18nTranslations(locale);\n const translations: FlatTranslations = {\n ...registryLayer,\n ...this.#lazyLayer,\n };\n const translator = createTranslator(translations, locale);\n this.#i18nValue = { translator, locale };\n this.#publishedLocale = locale;\n this.#publishedRegistryEpoch = this.#registryEpoch;\n this.#publishedLazyLayer = this.#lazyLayer;\n this.#i18nProvider.setValue(this.#i18nValue);\n }\n }\n return I18nProviderElement;\n };\n}\n","import { ReactiveElement } from '@videojs/element';\nimport { i18nContext } from './context';\nimport { createI18nProviderMixin, type I18nProviderMixin as ProviderMixin } from './provider-mixin';\n\nexport const I18nProviderMixin: ProviderMixin = createI18nProviderMixin({ context: i18nContext });\n\nexport class I18nProviderElement extends I18nProviderMixin(ReactiveElement) {\n static readonly tagName = 'media-i18n';\n}\n\nexport { I18nProviderElement as MediaI18nProviderElement };\n","import { type Text, translateText } from '@videojs/core/i18n';\nimport type { PropertyValues, ReactiveElement } from '@videojs/element';\nimport type { Constructor } from '@videojs/utils/types';\nimport type { I18nContext } from './context';\nimport { I18nController } from './controller';\nimport type { ReactiveElementMixinBase } from './types';\n\nexport type I18nTextMixin = <Base extends ReactiveElementMixinBase>(Base: Base) => Constructor<ReactiveElement> & Base;\n\nexport interface TextMixinConfig {\n context: I18nContext;\n}\n\nexport function createTextMixin({ context }: TextMixinConfig): I18nTextMixin {\n return (Base) => {\n class MediaText extends Base {\n static override properties = {\n token: { type: String },\n };\n\n readonly #i18n = new I18nController(this, context);\n #text: string | undefined;\n token = '';\n\n override connectedCallback(): void {\n this.#text ??= this.textContent?.trim() ?? '';\n super.connectedCallback();\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated(changed);\n if (!this.#text) {\n this.textContent = '';\n return;\n }\n\n const text: Text | string = this.token ? { key: this.token, text: this.#text } : this.#text;\n this.textContent = typeof text === 'string' ? text : translateText(text, this.#i18n.value);\n }\n }\n\n return MediaText;\n };\n}\n","import { ReactiveElement } from '@videojs/element';\n\nimport { i18nContext } from '../../i18n/context';\nimport { createTextMixin, type I18nTextMixin as TextMixin } from '../../i18n/text-mixin';\n\nexport const I18nTextMixin: TextMixin = createTextMixin({ context: i18nContext });\n\nexport class TextElement extends I18nTextMixin(ReactiveElement) {\n static readonly tagName = 'media-text';\n}\n\nexport { TextElement as MediaTextElement };\n"],"mappings":"2cAIA,SAAS,EAAgB,EAAgB,EAAa,EAAW,KAAM,CAGtE,MAFI,CAAC,EAAY,CAAc,GAAK,EAAe,KAAK,IAAM,GAAW,EACrE,CAAC,EAAY,CAAW,GAAK,EAAY,KAAK,IAAM,GAAW,EAC5D,CACR,CCNA,SAAS,EAAe,EAAM,CAC7B,IAAM,EAAgB,EAAK,aAAa,MAAM,CAAC,EAAE,KAAK,EACtD,GAAI,EAAe,OAAO,EAC1B,GAAI,SAAU,GAAQ,OAAO,EAAK,MAAS,SAAU,CACpD,IAAM,EAAe,EAAK,KAAK,KAAK,EACpC,GAAI,EAAc,OAAO,CAC1B,CACD,CAEA,SAAS,EAAgB,EAAO,CAC/B,OAAO,EAAc,EAAO,CAAc,CAC3C,CCRA,eAAe,EAAoB,EAAQ,EAAM,EAAU,CAC1D,IAAM,EAAQ,EAAS,CAAM,EACvB,EAAS,MAAM,QAAQ,IAAI,EAAM,IAAK,GAAQ,EAAK,CAAG,CAAC,CAAC,EACxD,EAAa,CAAC,EACd,EAAS,CAAC,EAChB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAM,OAAQ,IAAK,CACtC,IAAM,EAAQ,EAAO,GACjB,GAAS,OAAO,KAAK,CAAK,CAAC,CAAC,OAAS,GAAG,EAAW,KAAK,EAAM,EAAE,CACrE,CACA,IAAK,IAAI,EAAI,EAAM,OAAS,EAAG,GAAK,EAAG,IAAK,CAC3C,IAAM,EAAQ,EAAO,GACjB,GAAO,OAAO,OAAO,EAAQ,CAAK,CACvC,CACA,MAAO,CACN,SACA,YACD,CACD,CChBA,SAAS,EAAgB,EAAK,CACzB,OAAY,CAAG,GAAK,EAAI,KAAK,IAAM,IACvC,OAAO,EAAI,KAAK,CACjB,CCRA,MAAM,EAA8B,IAAI,IACxC,IAAI,EACA,EAAS,GACb,MAAM,MAAc,CACnB,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