@hopeplayer/core 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HopePlayerElement.d.ts +42 -2
- package/dist/HopePlayerElement.d.ts.map +1 -1
- package/dist/chunks/NativeEme-CXosVcw8.js +80 -0
- package/dist/chunks/NativeEme-CXosVcw8.js.map +1 -0
- package/dist/chunks/{accessibility-DeUIoAda.js → accessibility-DFx4CE0H.js} +9 -8
- package/dist/chunks/{accessibility-DeUIoAda.js.map → accessibility-DFx4CE0H.js.map} +1 -1
- package/dist/chunks/adTriggers-BIAWe8o4.js +419 -0
- package/dist/chunks/adTriggers-BIAWe8o4.js.map +1 -0
- package/dist/chunks/{ads-CdWbE9aD.js → ads-DlpHPpR9.js} +3 -3
- package/dist/chunks/ads-DlpHPpR9.js.map +1 -0
- package/dist/chunks/analytics-DEjTAJO9.js +281 -0
- package/dist/chunks/analytics-DEjTAJO9.js.map +1 -0
- package/dist/chunks/{cast-BQ-suTcF.js → cast-vHyi7oV_.js} +2 -2
- package/dist/chunks/{cast-BQ-suTcF.js.map → cast-vHyi7oV_.js.map} +1 -1
- package/dist/chunks/dash-CWjy-y7B.js +22 -0
- package/dist/chunks/dash-CWjy-y7B.js.map +1 -0
- package/dist/chunks/docPip-wybMVP1H.js +82 -0
- package/dist/chunks/docPip-wybMVP1H.js.map +1 -0
- package/dist/chunks/heatmap-Bb7neaYU.js +92 -0
- package/dist/chunks/heatmap-Bb7neaYU.js.map +1 -0
- package/dist/chunks/{history-DAbqEhNB.js → history-CwqLXiZi.js} +2 -2
- package/dist/chunks/{history-DAbqEhNB.js.map → history-CwqLXiZi.js.map} +1 -1
- package/dist/chunks/interactive-CgltIneu.js +189 -0
- package/dist/chunks/interactive-CgltIneu.js.map +1 -0
- package/dist/chunks/keySystems-CNzjRq6e.js +70 -0
- package/dist/chunks/keySystems-CNzjRq6e.js.map +1 -0
- package/dist/chunks/{loopSection-CvF4l5uf.js → loopSection-Bwk4W8vz.js} +16 -16
- package/dist/chunks/loopSection-Bwk4W8vz.js.map +1 -0
- package/dist/chunks/{markers-B04NMI79.js → markers-L69W3kj6.js} +53 -51
- package/dist/chunks/markers-L69W3kj6.js.map +1 -0
- package/dist/chunks/player-D2_HRzot.js +4351 -0
- package/dist/chunks/player-D2_HRzot.js.map +1 -0
- package/dist/chunks/{playlist-C6Mh9BE8.js → playlist-CHfStNbQ.js} +29 -21
- package/dist/chunks/playlist-CHfStNbQ.js.map +1 -0
- package/dist/chunks/plugin-style-CPJELe-i.js +17 -0
- package/dist/chunks/plugin-style-CPJELe-i.js.map +1 -0
- package/dist/chunks/pluginHost-cN2uGFeG.js +566 -0
- package/dist/chunks/pluginHost-cN2uGFeG.js.map +1 -0
- package/dist/chunks/redirectScreen-TIqLdvBY.js +239 -0
- package/dist/chunks/redirectScreen-TIqLdvBY.js.map +1 -0
- package/dist/chunks/{rewardedUnlock-CGhQyWOk.js → rewardedUnlock-DUqYwXTr.js} +2 -2
- package/dist/chunks/{rewardedUnlock-CGhQyWOk.js.map → rewardedUnlock-DUqYwXTr.js.map} +1 -1
- package/dist/chunks/segments-Ds-c1b5e.js +66 -0
- package/dist/chunks/segments-Ds-c1b5e.js.map +1 -0
- package/dist/chunks/{skipSegments-BbWzPpXz.js → skipSegments-ByNoF1qZ.js} +2 -2
- package/dist/chunks/{skipSegments-BbWzPpXz.js.map → skipSegments-ByNoF1qZ.js.map} +1 -1
- package/dist/chunks/{spriteThumbnails-B7oDZFTo.js → spriteThumbnails-Cr9UmkM9.js} +74 -51
- package/dist/chunks/spriteThumbnails-Cr9UmkM9.js.map +1 -0
- package/dist/chunks/{statsPanel-DSClIwA3.js → statsPanel-D0DtoFgS.js} +2 -2
- package/dist/chunks/statsPanel-D0DtoFgS.js.map +1 -0
- package/dist/chunks/{sticky-D_eLCNFk.js → sticky-BDStzjBM.js} +27 -26
- package/dist/chunks/sticky-BDStzjBM.js.map +1 -0
- package/dist/chunks/{story-BLBij82f.js → story-CodA2dfn.js} +2 -2
- package/dist/chunks/{story-BLBij82f.js.map → story-CodA2dfn.js.map} +1 -1
- package/dist/chunks/transcript-LG7E9UYE.js +186 -0
- package/dist/chunks/transcript-LG7E9UYE.js.map +1 -0
- package/dist/controls/ContextMenu.d.ts +1 -0
- package/dist/controls/ContextMenu.d.ts.map +1 -1
- package/dist/controls/ControlBar.d.ts +6 -0
- package/dist/controls/ControlBar.d.ts.map +1 -1
- package/dist/controls/SeekBar.d.ts +5 -2
- package/dist/controls/SeekBar.d.ts.map +1 -1
- package/dist/controls/SettingsMenu.d.ts +2 -1
- package/dist/controls/SettingsMenu.d.ts.map +1 -1
- package/dist/drm/NativeEme.d.ts +23 -0
- package/dist/drm/NativeEme.d.ts.map +1 -0
- package/dist/drm/keySystems.d.ts +18 -0
- package/dist/drm/keySystems.d.ts.map +1 -0
- package/dist/hls/SourceManager.d.ts +31 -5
- package/dist/hls/SourceManager.d.ts.map +1 -1
- package/dist/hls/dashEngine.d.ts +85 -0
- package/dist/hls/dashEngine.d.ts.map +1 -0
- package/dist/hls/sourceGroups.d.ts.map +1 -1
- package/dist/hope-player.js +1 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/types.d.ts +28 -0
- package/dist/i18n/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/keyboard/KeyboardController.d.ts +14 -0
- package/dist/keyboard/KeyboardController.d.ts.map +1 -1
- package/dist/plugin-api/PluginAds.d.ts +61 -0
- package/dist/plugin-api/PluginAds.d.ts.map +1 -0
- package/dist/plugin-api/PluginHost.d.ts +6 -0
- package/dist/plugin-api/PluginHost.d.ts.map +1 -1
- package/dist/plugin-api/types.d.ts +39 -0
- package/dist/plugin-api/types.d.ts.map +1 -1
- package/dist/plugins/accessibility/Accessibility.d.ts.map +1 -1
- package/dist/plugins/ad-triggers/AdTriggers.d.ts +5 -0
- package/dist/plugins/ad-triggers/AdTriggers.d.ts.map +1 -1
- package/dist/plugins/ads/AdsController.d.ts +2 -0
- package/dist/plugins/ads/AdsController.d.ts.map +1 -1
- package/dist/plugins/analytics/QoeTracker.d.ts +71 -0
- package/dist/plugins/analytics/QoeTracker.d.ts.map +1 -0
- package/dist/plugins/analytics/index.d.ts +6 -0
- package/dist/plugins/analytics/index.d.ts.map +1 -0
- package/dist/plugins/doc-pip/DocumentPip.d.ts +44 -0
- package/dist/plugins/doc-pip/DocumentPip.d.ts.map +1 -0
- package/dist/plugins/doc-pip/index.d.ts +5 -0
- package/dist/plugins/doc-pip/index.d.ts.map +1 -0
- package/dist/plugins/heatmap/Heatmap.d.ts +36 -0
- package/dist/plugins/heatmap/Heatmap.d.ts.map +1 -0
- package/dist/plugins/heatmap/index.d.ts +6 -0
- package/dist/plugins/heatmap/index.d.ts.map +1 -0
- package/dist/plugins/interactive/Interactive.d.ts +45 -0
- package/dist/plugins/interactive/Interactive.d.ts.map +1 -0
- package/dist/plugins/interactive/index.d.ts +6 -0
- package/dist/plugins/interactive/index.d.ts.map +1 -0
- package/dist/plugins/markers/MarkProgress.d.ts +3 -1
- package/dist/plugins/markers/MarkProgress.d.ts.map +1 -1
- package/dist/plugins/playlist/PlaylistRunner.d.ts +2 -0
- package/dist/plugins/playlist/PlaylistRunner.d.ts.map +1 -1
- package/dist/plugins/redirect-screen/RedirectScreen.d.ts +3 -1
- package/dist/plugins/redirect-screen/RedirectScreen.d.ts.map +1 -1
- package/dist/plugins/segments/Segments.d.ts +1 -0
- package/dist/plugins/segments/Segments.d.ts.map +1 -1
- package/dist/plugins/sprite-thumbnails/SpriteThumbnails.d.ts +9 -0
- package/dist/plugins/sprite-thumbnails/SpriteThumbnails.d.ts.map +1 -1
- package/dist/plugins/sticky/StickyManager.d.ts +2 -0
- package/dist/plugins/sticky/StickyManager.d.ts.map +1 -1
- package/dist/plugins/transcript/Transcript.d.ts +65 -0
- package/dist/plugins/transcript/Transcript.d.ts.map +1 -0
- package/dist/plugins/transcript/index.d.ts +6 -0
- package/dist/plugins/transcript/index.d.ts.map +1 -0
- package/dist/screens/ErrorScreen.d.ts +1 -1
- package/dist/screens/ErrorScreen.d.ts.map +1 -1
- package/dist/subtitles/attachTracks.d.ts +6 -0
- package/dist/subtitles/attachTracks.d.ts.map +1 -1
- package/dist/types/index.d.ts +320 -16
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/plugin-style.d.ts +5 -0
- package/dist/utils/plugin-style.d.ts.map +1 -0
- package/package.json +2 -1
- package/dist/chunks/adTriggers-DXmtF4t2.js +0 -410
- package/dist/chunks/adTriggers-DXmtF4t2.js.map +0 -1
- package/dist/chunks/ads-CdWbE9aD.js.map +0 -1
- package/dist/chunks/loopSection-CvF4l5uf.js.map +0 -1
- package/dist/chunks/markers-B04NMI79.js.map +0 -1
- package/dist/chunks/player-D7WQxMzr.js +0 -3894
- package/dist/chunks/player-D7WQxMzr.js.map +0 -1
- package/dist/chunks/playlist-C6Mh9BE8.js.map +0 -1
- package/dist/chunks/pluginHost-DjvLmMYZ.js +0 -376
- package/dist/chunks/pluginHost-DjvLmMYZ.js.map +0 -1
- package/dist/chunks/redirectScreen-5HAVRtxe.js +0 -208
- package/dist/chunks/redirectScreen-5HAVRtxe.js.map +0 -1
- package/dist/chunks/segments-gCPrWRig.js +0 -63
- package/dist/chunks/segments-gCPrWRig.js.map +0 -1
- package/dist/chunks/spriteThumbnails-B7oDZFTo.js.map +0 -1
- package/dist/chunks/statsPanel-DSClIwA3.js.map +0 -1
- package/dist/chunks/sticky-D_eLCNFk.js.map +0 -1
|
@@ -0,0 +1,4351 @@
|
|
|
1
|
+
var Ye = Object.defineProperty;
|
|
2
|
+
var Ze = (n, t, e) => t in n ? Ye(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var a = (n, t, e) => Ze(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
const de = '/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--hp-font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--hp-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--hp-color-black:#000;--hp-color-white:#fff;--hp-spacing:.25rem;--hp-container-xs:20rem;--hp-text-xs:.75rem;--hp-text-xs--line-height:calc(1 / .75);--hp-text-sm:.875rem;--hp-text-sm--line-height:calc(1.25 / .875);--hp-text-base:1rem;--hp-text-base--line-height: 1.5 ;--hp-text-lg:1.125rem;--hp-text-lg--line-height:calc(1.75 / 1.125);--hp-text-xl:1.25rem;--hp-text-xl--line-height:calc(1.75 / 1.25);--hp-text-2xl:1.5rem;--hp-text-2xl--line-height:calc(2 / 1.5);--hp-font-weight-medium:500;--hp-font-weight-semibold:600;--hp-radius-lg:.5rem;--hp-animate-spin:spin 1s linear infinite;--hp-aspect-video:16 / 9;--hp-default-transition-duration:.15s;--hp-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--hp-default-font-family:var(--hp-font-sans);--hp-default-mono-font-family:var(--hp-font-mono);--hp-color-accent:#fff;--hp-color-on-accent:#0a0a0a;--hp-color-surface:#0a0a0a;--hp-color-surface-elev:#1a1a1a;--hp-color-on-surface:#fff;--hp-color-on-surface-muted:#a3a3a3}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--hp-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--hp-default-font-feature-settings,normal);font-variation-settings:var(--hp-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--hp-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--hp-default-mono-font-feature-settings,normal);font-variation-settings:var(--hp-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.hp\\:pointer-events-auto{pointer-events:auto}.hp\\:pointer-events-none{pointer-events:none}.hp\\:absolute{position:absolute}.hp\\:relative{position:relative}.hp\\:sticky{position:sticky}.hp\\:inset-0{top:0;right:0;bottom:0;left:0}.hp\\:inset-x-0{inset-inline:0}.hp\\:inset-y-0{inset-block:0}.hp\\:top-1{top:var(--hp-spacing)}.hp\\:top-1\\/2{top:50%}.hp\\:right-0{right:0}.hp\\:right-1{right:var(--hp-spacing)}.hp\\:right-2{right:calc(var(--hp-spacing) * 2)}.hp\\:bottom-0{bottom:0}.hp\\:bottom-full{bottom:100%}.hp\\:left-1\\/2{left:50%}.hp\\:z-10{z-index:10}.hp\\:z-20{z-index:20}.hp\\:z-30{z-index:30}.hp\\:z-40{z-index:40}.hp\\:m-0{margin:0}.hp\\:my-1{margin-block:var(--hp-spacing)}.hp\\:mt-0\\.5{margin-top:calc(var(--hp-spacing) * .5)}.hp\\:mt-1{margin-top:var(--hp-spacing)}.hp\\:mt-2{margin-top:calc(var(--hp-spacing) * 2)}.hp\\:mt-8{margin-top:calc(var(--hp-spacing) * 8)}.hp\\:mb-1{margin-bottom:var(--hp-spacing)}.hp\\:mb-2{margin-bottom:calc(var(--hp-spacing) * 2)}.hp\\:mb-16{margin-bottom:calc(var(--hp-spacing) * 16)}.hp\\:ml-1{margin-left:var(--hp-spacing)}.hp\\:block{display:block}.hp\\:flex{display:flex}.hp\\:hidden{display:none}.hp\\:inline-block{display:inline-block}.hp\\:aspect-\\[9\\/16\\]{aspect-ratio:9/16}.hp\\:aspect-video{aspect-ratio:var(--hp-aspect-video)}.hp\\:h-0\\.5{height:calc(var(--hp-spacing) * .5)}.hp\\:h-1{height:var(--hp-spacing)}.hp\\:h-1\\/3{height:33.3333%}.hp\\:h-3{height:calc(var(--hp-spacing) * 3)}.hp\\:h-6{height:calc(var(--hp-spacing) * 6)}.hp\\:h-7{height:calc(var(--hp-spacing) * 7)}.hp\\:h-8{height:calc(var(--hp-spacing) * 8)}.hp\\:h-9{height:calc(var(--hp-spacing) * 9)}.hp\\:h-10{height:calc(var(--hp-spacing) * 10)}.hp\\:h-16{height:calc(var(--hp-spacing) * 16)}.hp\\:h-20{height:calc(var(--hp-spacing) * 20)}.hp\\:h-\\[var\\(--hp-ctrl-btn-size\\)\\]{height:var(--hp-ctrl-btn-size)}.hp\\:h-\\[var\\(--hp-seek-hit-h\\)\\]{height:var(--hp-seek-hit-h)}.hp\\:h-\\[var\\(--hp-seek-track-h\\)\\]{height:var(--hp-seek-track-h)}.hp\\:h-full{height:100%}.hp\\:max-h-64{max-height:calc(var(--hp-spacing) * 64)}.hp\\:max-h-80{max-height:calc(var(--hp-spacing) * 80)}.hp\\:w-0{width:0}.hp\\:w-1{width:var(--hp-spacing)}.hp\\:w-1\\.5{width:calc(var(--hp-spacing) * 1.5)}.hp\\:w-3{width:calc(var(--hp-spacing) * 3)}.hp\\:w-6{width:calc(var(--hp-spacing) * 6)}.hp\\:w-7{width:calc(var(--hp-spacing) * 7)}.hp\\:w-8{width:calc(var(--hp-spacing) * 8)}.hp\\:w-9{width:calc(var(--hp-spacing) * 9)}.hp\\:w-10{width:calc(var(--hp-spacing) * 10)}.hp\\:w-14{width:calc(var(--hp-spacing) * 14)}.hp\\:w-16{width:calc(var(--hp-spacing) * 16)}.hp\\:w-48{width:calc(var(--hp-spacing) * 48)}.hp\\:w-72{width:calc(var(--hp-spacing) * 72)}.hp\\:w-\\[var\\(--hp-ctrl-btn-size\\)\\]{width:var(--hp-ctrl-btn-size)}.hp\\:w-full{width:100%}.hp\\:max-w-\\[80\\%\\]{max-width:80%}.hp\\:max-w-\\[85\\%\\]{max-width:85%}.hp\\:max-w-full{max-width:100%}.hp\\:max-w-xs{max-width:var(--hp-container-xs)}.hp\\:min-w-0{min-width:0}.hp\\:flex-1{flex:1}.hp\\:flex-shrink-0,.hp\\:shrink-0{flex-shrink:0}.hp\\:animate-spin{animation:var(--hp-animate-spin)}.hp\\:cursor-pointer{cursor:pointer}.hp\\:touch-none{touch-action:none}.hp\\:list-none{list-style-type:none}.hp\\:flex-col{flex-direction:column}.hp\\:flex-wrap{flex-wrap:wrap}.hp\\:items-center{align-items:center}.hp\\:items-end{align-items:flex-end}.hp\\:justify-between{justify-content:space-between}.hp\\:justify-center{justify-content:center}.hp\\:gap-0\\.5{gap:calc(var(--hp-spacing) * .5)}.hp\\:gap-1{gap:var(--hp-spacing)}.hp\\:gap-1\\.5{gap:calc(var(--hp-spacing) * 1.5)}.hp\\:gap-2{gap:calc(var(--hp-spacing) * 2)}.hp\\:gap-3{gap:calc(var(--hp-spacing) * 3)}.hp\\:self-end{align-self:flex-end}.hp\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.hp\\:overflow-hidden{overflow:hidden}.hp\\:overflow-y-auto{overflow-y:auto}.hp\\:rounded{border-radius:.25rem}.hp\\:rounded-full{border-radius:3.40282e38px}.hp\\:rounded-lg{border-radius:var(--hp-radius-lg)}.hp\\:border{border-style:var(--tw-border-style);border-width:1px}.hp\\:border-0{border-style:var(--tw-border-style);border-width:0}.hp\\:border-2{border-style:var(--tw-border-style);border-width:2px}.hp\\:border-\\[3px\\]{border-style:var(--tw-border-style);border-width:3px}.hp\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.hp\\:border-on-surface\\/10{border-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:border-on-surface\\/10{border-color:color-mix(in oklab,var(--hp-color-on-surface) 10%,transparent)}}.hp\\:border-on-surface\\/20{border-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:border-on-surface\\/20{border-color:color-mix(in oklab,var(--hp-color-on-surface) 20%,transparent)}}.hp\\:border-on-surface\\/30{border-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:border-on-surface\\/30{border-color:color-mix(in oklab,var(--hp-color-on-surface) 30%,transparent)}}.hp\\:border-t-accent{border-top-color:var(--hp-color-accent)}.hp\\:bg-accent,.hp\\:bg-accent\\/15{background-color:var(--hp-color-accent)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-accent\\/15{background-color:color-mix(in oklab,var(--hp-color-accent) 15%,transparent)}}.hp\\:bg-black,.hp\\:bg-black\\/30{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/30{background-color:color-mix(in oklab,var(--hp-color-black) 30%,transparent)}}.hp\\:bg-black\\/40{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/40{background-color:color-mix(in oklab,var(--hp-color-black) 40%,transparent)}}.hp\\:bg-black\\/60{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/60{background-color:color-mix(in oklab,var(--hp-color-black) 60%,transparent)}}.hp\\:bg-black\\/70{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/70{background-color:color-mix(in oklab,var(--hp-color-black) 70%,transparent)}}.hp\\:bg-black\\/85{background-color:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-black\\/85{background-color:color-mix(in oklab,var(--hp-color-black) 85%,transparent)}}.hp\\:bg-on-surface\\/20{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-on-surface\\/20{background-color:color-mix(in oklab,var(--hp-color-on-surface) 20%,transparent)}}.hp\\:bg-on-surface\\/25{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-on-surface\\/25{background-color:color-mix(in oklab,var(--hp-color-on-surface) 25%,transparent)}}.hp\\:bg-on-surface\\/40{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-on-surface\\/40{background-color:color-mix(in oklab,var(--hp-color-on-surface) 40%,transparent)}}.hp\\:bg-surface{background-color:var(--hp-color-surface)}.hp\\:bg-surface-elev{background-color:var(--hp-color-surface-elev)}.hp\\:bg-transparent{background-color:#0000}.hp\\:bg-white,.hp\\:bg-white\\/15{background-color:var(--hp-color-white)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-white\\/15{background-color:color-mix(in oklab,var(--hp-color-white) 15%,transparent)}}.hp\\:bg-white\\/30{background-color:var(--hp-color-white)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-white\\/30{background-color:color-mix(in oklab,var(--hp-color-white) 30%,transparent)}}.hp\\:bg-white\\/40{background-color:var(--hp-color-white)}@supports (color:color-mix(in lab,red,red)){.hp\\:bg-white\\/40{background-color:color-mix(in oklab,var(--hp-color-white) 40%,transparent)}}.hp\\:bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hp\\:from-black\\/80{--tw-gradient-from:var(--hp-color-black)}@supports (color:color-mix(in lab,red,red)){.hp\\:from-black\\/80{--tw-gradient-from:color-mix(in oklab, var(--hp-color-black) 80%, transparent)}}.hp\\:from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hp\\:to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hp\\:bg-cover{background-size:cover}.hp\\:bg-center{background-position:50%}.hp\\:object-cover{object-fit:cover}.hp\\:p-0{padding:0}.hp\\:p-1\\.5{padding:calc(var(--hp-spacing) * 1.5)}.hp\\:p-2{padding:calc(var(--hp-spacing) * 2)}.hp\\:p-3{padding:calc(var(--hp-spacing) * 3)}.hp\\:p-4{padding:calc(var(--hp-spacing) * 4)}.hp\\:px-1{padding-inline:var(--hp-spacing)}.hp\\:px-1\\.5{padding-inline:calc(var(--hp-spacing) * 1.5)}.hp\\:px-2{padding-inline:calc(var(--hp-spacing) * 2)}.hp\\:px-3{padding-inline:calc(var(--hp-spacing) * 3)}.hp\\:px-4{padding-inline:calc(var(--hp-spacing) * 4)}.hp\\:py-1{padding-block:var(--hp-spacing)}.hp\\:py-1\\.5{padding-block:calc(var(--hp-spacing) * 1.5)}.hp\\:py-2{padding-block:calc(var(--hp-spacing) * 2)}.hp\\:pt-6{padding-top:calc(var(--hp-spacing) * 6)}.hp\\:pb-2{padding-bottom:calc(var(--hp-spacing) * 2)}.hp\\:text-center{text-align:center}.hp\\:text-left{text-align:left}.hp\\:font-mono{font-family:var(--hp-font-mono)}.hp\\:text-2xl{font-size:var(--hp-text-2xl);line-height:var(--tw-leading,var(--hp-text-2xl--line-height))}.hp\\:text-base{font-size:var(--hp-text-base);line-height:var(--tw-leading,var(--hp-text-base--line-height))}.hp\\:text-lg{font-size:var(--hp-text-lg);line-height:var(--tw-leading,var(--hp-text-lg--line-height))}.hp\\:text-sm{font-size:var(--hp-text-sm);line-height:var(--tw-leading,var(--hp-text-sm--line-height))}.hp\\:text-xl{font-size:var(--hp-text-xl);line-height:var(--tw-leading,var(--hp-text-xl--line-height))}.hp\\:text-xs{font-size:var(--hp-text-xs);line-height:var(--tw-leading,var(--hp-text-xs--line-height))}.hp\\:text-\\[length\\:var\\(--hp-ctrl-icon-size\\)\\]{font-size:var(--hp-ctrl-icon-size)}.hp\\:leading-none{--tw-leading:1;line-height:1}.hp\\:font-medium{--tw-font-weight:var(--hp-font-weight-medium);font-weight:var(--hp-font-weight-medium)}.hp\\:font-semibold{--tw-font-weight:var(--hp-font-weight-semibold);font-weight:var(--hp-font-weight-semibold)}.hp\\:whitespace-nowrap{white-space:nowrap}.hp\\:text-accent{color:var(--hp-color-accent)}.hp\\:text-on-accent{color:var(--hp-color-on-accent)}.hp\\:text-on-surface{color:var(--hp-color-on-surface)}.hp\\:text-on-surface-muted{color:var(--hp-color-on-surface-muted)}.hp\\:text-white{color:var(--hp-color-white)}.hp\\:tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.hp\\:underline{text-decoration-line:underline}.hp\\:opacity-0{opacity:0}.hp\\:opacity-60{opacity:.6}.hp\\:opacity-70{opacity:.7}.hp\\:opacity-80{opacity:.8}.hp\\:opacity-90{opacity:.9}.hp\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hp\\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hp\\:drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hp\\:transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--hp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hp-default-transition-duration))}.hp\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--hp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hp-default-transition-duration))}.hp\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--hp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hp-default-transition-duration))}.hp\\:duration-100{--tw-duration:.1s;transition-duration:.1s}.hp\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.hp\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.hp\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.hp\\:will-change-\\[opacity\\]{will-change:opacity}.hp\\:select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.hp\\:group-hover\\:h-\\[var\\(--hp-seek-track-h-hover\\)\\]:is(:where(.hp\\:group):hover *){height:var(--hp-seek-track-h-hover)}.hp\\:hover\\:bg-on-surface\\/5:hover{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:hover\\:bg-on-surface\\/5:hover{background-color:color-mix(in oklab,var(--hp-color-on-surface) 5%,transparent)}}.hp\\:hover\\:bg-on-surface\\/10:hover{background-color:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp\\:hover\\:bg-on-surface\\/10:hover{background-color:color-mix(in oklab,var(--hp-color-on-surface) 10%,transparent)}}.hp\\:hover\\:opacity-80:hover{opacity:.8}}.hp\\:data-\\[active\\=true\\]\\:bg-accent\\/15[data-active=true]{background-color:var(--hp-color-accent)}@supports (color:color-mix(in lab,red,red)){.hp\\:data-\\[active\\=true\\]\\:bg-accent\\/15[data-active=true]{background-color:color-mix(in oklab,var(--hp-color-accent) 15%,transparent)}}.hp\\:data-\\[active\\=true\\]\\:text-on-surface[data-active=true]{color:var(--hp-color-on-surface)}}.hp-icon{font-variant:normal;text-transform:none;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:hope-icons;font-style:normal;font-weight:400;line-height:1}.hp-icon-airplay:before{content:""}.hp-icon-cast-connected:before{content:""}.hp-icon-cast:before{content:""}.hp-icon-check:before{content:""}.hp-icon-chevron-left:before{content:""}.hp-icon-close:before{content:""}.hp-icon-fullscreen-enter:before{content:""}.hp-icon-fullscreen-exit:before{content:""}.hp-icon-grid:before{content:""}.hp-icon-loop:before{content:""}.hp-icon-pause:before{content:""}.hp-icon-pip:before{content:""}.hp-icon-play:before{content:""}.hp-icon-settings:before{content:""}.hp-icon-skip-back:before{content:""}.hp-icon-skip-forward:before{content:""}.hp-icon-transcript:before{content:""}.hp-icon-volume-high:before{content:""}.hp-icon-volume-low:before{content:""}.hp-icon-volume-muted:before{content:""}.hp-icon-warning:before{content:""}:host{--hp-radius:8px;--hp-chip-bg:#ffffff14;--hp-chip-bg-hover:#ffffff2e;--hp-chip-bg-active:#ffffff42;--hp-chip-border:#ffffff29;--hp-chip-border-hover:#ffffff4d;--hp-chip-blur:14px;--hp-chip-shadow:0 4px 18px #00000047, inset 0 1px 0 #ffffff12;--hp-chip-radius:10px;--hp-chip-text:var(--hp-color-on-surface,#fff);--hp-chrome-scrim:linear-gradient(to top, #00000080 0%, #0000003d 50%, #0000 100%);--hp-chrome-scrim-height:min(150px, 45%);--hp-chip-backdrop-brightness:.78;--hp-ctrl-shadow:drop-shadow(0 1px 1.5px #0000008c);--hp-panel-bg:#ffffffb8;--hp-panel-blur:26px;--hp-panel-border:#0f11171a;--hp-panel-text:#15171c;--hp-panel-text-muted:#5b6270;--hp-panel-text-shadow:none;--hp-ctrl-btn-size:32px;--hp-ctrl-icon-size:16px;--hp-seek-hit-h:16px;--hp-seek-track-h:4px;--hp-seek-track-h-hover:6px;--hp-seek-thumb-size:12px;--hp-tooltip-bg:#ffffffe6;--hp-tooltip-text:#15171c;--hp-tooltip-key-bg:#0f11171a;--hp-tooltip-key-text:#15171c;--hp-caption-font-size:16px;--hp-caption-bg:#000000bf;--hp-caption-text:#fff;--hp-caption-radius:4px;background:var(--hp-color-surface,#0a0a0a);width:100%;color:var(--hp-color-on-surface,#fff);border-radius:var(--hp-radius);font-family:system-ui,-apple-system,sans-serif;line-height:1;display:block}.hp-chip{background:var(--hp-chip-bg);border:1px solid var(--hp-chip-border);border-radius:var(--hp-chip-radius);-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%);box-shadow:var(--hp-chip-shadow);color:var(--hp-chip-text);transition:background-color .16s,border-color .16s,box-shadow .16s,transform .12s}.hp-chip:hover{background:var(--hp-chip-bg-hover);border-color:var(--hp-chip-border-hover)}button.hp-chip:active{background:var(--hp-chip-bg-active);transform:scale(.94)}.hp-chip:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-chip-panel,.hp-chip-panel:hover{background:var(--hp-panel-bg);border-color:var(--hp-panel-border);-webkit-backdrop-filter:blur(var(--hp-panel-blur)) saturate(160%);text-shadow:var(--hp-panel-text-shadow,none)}.hp-chip-panel{--hp-color-on-surface:var(--hp-panel-text);--hp-color-on-surface-muted:var(--hp-panel-text-muted);color:var(--hp-panel-text)}.hp-tooltip{background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);border-radius:calc(var(--hp-radius) * .75);-webkit-backdrop-filter:blur(12px)saturate(160%);font-weight:500;box-shadow:0 4px 14px #00000059}.hp-tooltip-key{background:var(--hp-tooltip-key-bg);min-width:16px;height:16px;color:var(--hp-tooltip-key-text);text-transform:uppercase;border-radius:4px;justify-content:center;align-items:center;padding:0 4px;font-size:10px;font-weight:700;line-height:16px;display:inline-flex}.hp-group{background:var(--hp-chip-bg);border:1px solid var(--hp-chip-border);-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%) brightness(var(--hp-chip-backdrop-brightness,1));box-shadow:var(--hp-chip-shadow);border-radius:9999px}.hp-group-left{position:relative}.hp-loading-ring{border-radius:inherit;pointer-events:none;opacity:0;filter:drop-shadow(0 0 3px var(--hp-color-accent,#fff));transition:opacity .22s;position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px}@supports (color:color-mix(in lab,red,red)){.hp-loading-ring{filter:drop-shadow(0 0 3px color-mix(in srgb,var(--hp-color-accent,#fff) 70%,transparent))}}.hp-loading-ring-mask{border-radius:inherit;-webkit-mask-composite:xor;padding:2px;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor,source-over;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}.hp-loading-ring-mask>span{aspect-ratio:1;background:conic-gradient(from 0deg,transparent 0deg 150deg,var(--hp-color-accent,#fff) 260deg,var(--hp-color-accent,#fff) 340deg,transparent 360deg);width:max(100%,160px);position:absolute;top:50%;left:50%;translate:-50% -50%}@supports (color:color-mix(in lab,red,red)){.hp-loading-ring-mask>span{background:conic-gradient(from 0deg,transparent 0deg 150deg,color-mix(in srgb,var(--hp-color-accent,#fff) 30%,transparent) 260deg,var(--hp-color-accent,#fff) 340deg,transparent 360deg)}}.hp-loading-ring-mask>span{animation:1.1s linear infinite paused hp-loading-ring-spin}.hp-group-left[data-loading]>.hp-loading-ring{opacity:1}.hp-group-left[data-loading]>.hp-loading-ring .hp-loading-ring-mask>span{animation-play-state:running}@keyframes hp-loading-ring-spin{to{rotate:360deg}}@media(prefers-reduced-motion:reduce){.hp-loading-ring-mask>span{background:var(--hp-color-accent,#fff);animation:none}.hp-group-left[data-loading]>.hp-loading-ring{animation:1.6s ease-in-out infinite hp-loading-ring-pulse}}@keyframes hp-loading-ring-pulse{50%{opacity:.35}}.hp-center-play>.hp-chip{-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%) brightness(var(--hp-chip-backdrop-brightness,1))}.hp-group .hp-icon,.hp-group [part=time-display],.hp-group .hp-live-badge,.hp-group [part=live-clock],.hp-group .hp-skip-num,.hp-center-play .hp-icon{filter:var(--hp-ctrl-shadow,none)}.hp-chrome:before{content:"";height:var(--hp-chrome-scrim-height);background:var(--hp-chrome-scrim);pointer-events:none;position:absolute;bottom:0;left:0;right:0}.video-area[data-compact]>.hp-chrome:after{content:"";background:var(--hp-chrome-scrim);opacity:.7;pointer-events:none;height:min(90px,30%);position:absolute;top:0;left:0;right:0;transform:scaleY(-1)}.hp-group button.hp-chip{box-shadow:none;-webkit-backdrop-filter:none;background:0 0;border-color:#0000}.hp-group button.hp-chip:hover{background:var(--hp-chip-bg-hover)}.hp-group button.hp-chip:active{background:var(--hp-chip-bg-active)}:host([data-theme=glass-dark]),:host([data-theme=neo-dark]),:host([data-theme=mono]){--hp-panel-bg:#0a0a0e8c;--hp-panel-border:#ffffff1a;--hp-panel-text:#fff;--hp-panel-text-muted:#a3a3a3;--hp-panel-text-shadow:0 1px 3px #000000a6;--hp-tooltip-bg:#0a0a0aeb;--hp-tooltip-text:#fff;--hp-tooltip-key-bg:#ffffff2e;--hp-tooltip-key-text:#fff}:host([data-theme=glass-dark]){--hp-chip-bg:#0a0a0e73;--hp-chip-bg-hover:#0a0a0e9e;--hp-chip-bg-active:#0a0a0ebf;--hp-chip-border:#ffffff14;--hp-chip-border-hover:#ffffff29;--hp-chip-shadow:0 4px 18px #0006, inset 0 1px 0 #ffffff0a;--hp-panel-bg:#08080cb8;--hp-chip-backdrop-brightness:1}:host([data-theme=neo-dark]){--hp-chip-bg:#24242a;--hp-chip-bg-hover:#2a2a31;--hp-chip-bg-active:#1e1e23;--hp-chip-border:transparent;--hp-chip-border-hover:transparent;--hp-chip-blur:0px;--hp-chip-shadow:5px 5px 10px #00000080, -4px -4px 9px #ffffff09;--hp-chip-radius:12px;--hp-color-surface:#1b1b20;--hp-panel-bg:#1e1e23;--hp-panel-text-shadow:none;--hp-chrome-scrim:none;--hp-chip-backdrop-brightness:1;--hp-ctrl-shadow:none}:host([data-theme=neo-dark]) button.hp-chip:active{box-shadow:inset 3px 3px 6px #00000080,inset -2px -2px 5px #ffffff08}:host([data-theme=mono]){--hp-chip-bg:#ffffff0a;--hp-chip-bg-hover:#ffffff1a;--hp-chip-border:#ffffff14;--hp-chip-border-hover:#ffffff24;--hp-chip-blur:0px;--hp-chip-shadow:none;--hp-panel-bg:#0a0a0aeb;--hp-panel-text-shadow:none}@media(pointer:coarse){:host{--hp-ctrl-btn-size:40px;--hp-ctrl-icon-size:18px;--hp-seek-hit-h:22px;--hp-seek-track-h:5px;--hp-seek-track-h-hover:7px;--hp-seek-thumb-size:14px;--hp-caption-font-size:19px}}:host(:is(:fullscreen,:-webkit-full-screen)){--hp-ctrl-btn-size:44px;--hp-ctrl-icon-size:20px;--hp-seek-hit-h:26px;--hp-seek-track-h:6px;--hp-seek-track-h-hover:8px;--hp-seek-thumb-size:18px;--hp-caption-font-size:22px}:host(:is(:fullscreen,:-webkit-full-screen)) [part=control-bar]{padding:28px 20px 18px}.video-area{width:100%;aspect-ratio:var(--hp-aspect-ratio,16 / 9);border-radius:var(--hp-radius);background:var(--hp-color-surface,#0a0a0a);position:relative;overflow:hidden}.video-area[data-compact]{--hp-caption-font-size:13px}.video-area[data-story]{aspect-ratio:9/16;max-width:49.5vh;max-height:88vh;margin:0 auto}:host(:is(:fullscreen,:-webkit-full-screen)){background:#000;border-radius:0}:host(:is(:fullscreen,:-webkit-full-screen)) .hp-root{height:100%}:host(:is(:fullscreen,:-webkit-full-screen)) .video-area{aspect-ratio:auto;background:#000;border-radius:0;width:100%;height:100%}:host(:is(:fullscreen,:-webkit-full-screen)) .video-area[data-story]{aspect-ratio:9/16;width:auto;max-width:100%;height:100%;max-height:none;margin:0 auto}.media-layer{position:absolute;top:0;right:0;bottom:0;left:0}.media-layer video{object-fit:contain;background:#000;width:100%;height:100%}.hp-center-x{transform:translate(-50%)}.hp-center-y{transform:translateY(-50%)}.hp-chip-panel[data-drop]{margin-top:8px;margin-bottom:0;top:100%;bottom:auto}.hp-top-bar{pointer-events:none;display:flex;position:absolute;top:8px;right:8px}.hp-top-bar>*{pointer-events:auto}.hp-story-list-btn{top:calc(8px + var(--hp-ctrl-btn-size) + 18px);right:12px}:host([data-cursor-hidden]),:host([data-cursor-hidden]) *{cursor:none!important}.hp-unmute-badge{z-index:25;background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);-webkit-backdrop-filter:blur(12px)saturate(160%);font:inherit;cursor:pointer;border:0;border-radius:9999px;align-items:center;gap:6px;padding:6px 12px 6px 10px;font-size:13px;font-weight:600;display:none;position:absolute;top:10px;left:10px;box-shadow:0 4px 14px #00000059}@media(hover:none)and (pointer:coarse){.hp-volume{display:none!important}.hp-unmute-badge[data-visible]{display:inline-flex}}.hp-error-screen{z-index:30;background:var(--hp-color-surface);justify-content:center;align-items:center;padding:12px;display:none;position:absolute;top:0;right:0;bottom:0;left:0}@supports (color:color-mix(in lab,red,red)){.hp-error-screen{background:color-mix(in srgb,var(--hp-color-surface) 94%,transparent)}}.hp-error-screen{-webkit-backdrop-filter:blur(16px)saturate(140%);color:var(--hp-color-on-surface);text-align:center;container-type:size}.hp-error-screen[data-visible]{animation:.22s hp-error-in;display:flex}@keyframes hp-error-in{0%{opacity:0}}.hp-error-card{flex-direction:column;align-items:center;gap:10px;max-width:340px;display:flex}.hp-error-icon{border:1px solid var(--hp-color-on-surface);border-radius:9999px;place-items:center;width:48px;height:48px;display:grid}@supports (color:color-mix(in lab,red,red)){.hp-error-icon{border:1px solid color-mix(in srgb,var(--hp-color-on-surface) 18%,transparent)}}.hp-error-icon{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-error-icon{background:color-mix(in srgb,var(--hp-color-on-surface) 8%,transparent)}}.hp-error-icon{margin-bottom:2px;font-size:22px}.hp-error-message{margin:0;font-size:14px;font-weight:600;line-height:1.45}.hp-error-code{color:var(--hp-color-on-surface-muted);font-variant-numeric:tabular-nums;margin:-4px 0 0;font-size:12px}.hp-error-retry{border:1px solid var(--hp-chip-border);background:var(--hp-chip-bg);color:var(--hp-color-on-surface);font:inherit;cursor:pointer;border-radius:9999px;align-items:center;gap:6px;margin-top:6px;padding:7px 14px 7px 12px;font-size:13px;font-weight:600;transition:background-color .15s,border-color .15s;display:inline-flex}.hp-error-retry:hover{background:var(--hp-chip-bg-hover);border-color:var(--hp-chip-border-hover)}.hp-error-retry:focus-visible{outline:2px solid var(--hp-color-accent);outline-offset:2px}@container (max-height:240px){.hp-error-card{gap:6px}.hp-error-icon{width:36px;height:36px;margin-bottom:0;font-size:16px}.hp-error-message{font-size:13px}.hp-error-code{margin-top:-2px;font-size:11px}.hp-error-retry{margin-top:2px;padding:5px 12px 5px 10px;font-size:12px}}.hp-context-menu,.hp-stats,.hp-debug{border:1px solid var(--hp-panel-border);background:var(--hp-panel-bg);-webkit-backdrop-filter:blur(var(--hp-panel-blur)) saturate(160%);color:var(--hp-panel-text);text-shadow:var(--hp-panel-text-shadow,none);border-radius:10px;position:absolute;box-shadow:0 8px 28px #00000059}.hp-context-menu{z-index:40;min-width:200px;padding:4px;font-size:13px;display:none}.hp-context-menu[data-open]{animation:.12s hp-context-menu-in;display:block}@keyframes hp-context-menu-in{0%{opacity:0;transform:scale(.97)}}.hp-context-menu-item{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:space-between;align-items:center;gap:16px;padding:8px 10px;display:flex}.hp-context-menu-item[data-info]{cursor:default;font-weight:600}button.hp-context-menu-item:hover,button.hp-context-menu-item:focus-visible{background:var(--hp-panel-text)}@supports (color:color-mix(in lab,red,red)){button.hp-context-menu-item:hover,button.hp-context-menu-item:focus-visible{background:color-mix(in srgb,var(--hp-panel-text) 10%,transparent)}}button.hp-context-menu-item:hover,button.hp-context-menu-item:focus-visible{outline:none}.hp-context-menu-item+.hp-context-menu-item{margin-top:2px}.hp-context-menu-meta{color:var(--hp-panel-text-muted);font-variant-numeric:tabular-nums;font-weight:500}.hp-stats{z-index:28;width:min(360px,100% - 20px);max-height:calc(100% - 20px);padding:8px 12px 10px;font-size:11.5px;top:10px;left:10px;overflow:auto}.hp-stats-header{justify-content:space-between;align-items:center;margin-bottom:6px;font-size:12px;font-weight:700;display:flex}.hp-stats-close{color:inherit;cursor:pointer;background:0 0;border:0;border-radius:9999px;padding:4px;display:inline-flex}.hp-stats-close:hover{background:var(--hp-panel-text)}@supports (color:color-mix(in lab,red,red)){.hp-stats-close:hover{background:color-mix(in srgb,var(--hp-panel-text) 12%,transparent)}}.hp-stats-body{grid-template-columns:auto 1fr;gap:3px 12px;margin:0;display:grid}.hp-stats-body dt{color:var(--hp-panel-text-muted);white-space:nowrap}.hp-stats-body dd{text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.hp-seek-fb{z-index:8;border:1px solid var(--hp-chip-border);background:var(--hp-chip-bg);-webkit-backdrop-filter:blur(var(--hp-chip-blur)) saturate(160%);box-shadow:var(--hp-chip-shadow);color:var(--hp-chip-text);pointer-events:none;opacity:0;border-radius:9999px;align-items:center;gap:10px;padding:12px 20px 12px 16px;transition:opacity .18s,translate .22s cubic-bezier(.2,.8,.2,1);display:flex;position:absolute;top:50%}.hp-seek-fb[data-side=forward]{right:7%;translate:14px -50%}.hp-seek-fb[data-side=back]{flex-direction:row-reverse;padding:12px 16px 12px 20px;left:7%;translate:-14px -50%}.hp-seek-fb[data-visible]{opacity:1;translate:0 -50%}.hp-seek-fb-chevrons{display:flex}.hp-seek-fb-chevrons svg{fill:currentColor;opacity:.25;width:16px;height:16px;margin:0 -3px;animation:.9s ease-in-out infinite hp-seek-fb-chevron}.hp-seek-fb[data-side=back] .hp-seek-fb-chevrons{transform:scaleX(-1)}.hp-seek-fb-chevrons svg:nth-child(2){animation-delay:.15s}.hp-seek-fb-chevrons svg:nth-child(3){animation-delay:.3s}@keyframes hp-seek-fb-chevron{0%,to{opacity:.25}40%{opacity:1}}.hp-seek-fb-value{white-space:nowrap;align-items:baseline;gap:3px;display:flex}.hp-seek-fb-num{font-variant-numeric:tabular-nums;font-size:20px;font-weight:700;line-height:1;display:inline-block}.hp-seek-fb-unit{opacity:.75;font-size:12px;font-weight:600}.hp-seek-fb-bump{animation:.26s cubic-bezier(.2,.8,.2,1) hp-seek-fb-bump}@keyframes hp-seek-fb-bump{0%{transform:scale(1.25)}to{transform:scale(1)}}.video-area[data-compact] .hp-seek-fb{padding:8px 12px}.video-area[data-compact] .hp-seek-fb[data-side=forward]{right:4%}.video-area[data-compact] .hp-seek-fb[data-side=back]{padding:8px 12px;left:4%}.video-area[data-compact] .hp-seek-fb-chevrons{display:none}.video-area[data-compact] .hp-seek-fb-num{font-size:16px}.hp-sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}@media(prefers-reduced-motion:reduce){.hp-seek-fb,.hp-seek-fb-chevrons svg,.hp-seek-fb-bump{transition:none;animation:none}.hp-seek-fb-chevrons svg{opacity:.8}}.hp-skip-btn{position:relative}.hp-skip-btn>.hp-icon{font-size:calc(var(--hp-ctrl-icon-size) * 1.45)}.hp-skip-num{padding-top:calc(var(--hp-ctrl-icon-size) * .14);font-size:calc(var(--hp-ctrl-icon-size) * .56);letter-spacing:-.02em;font-variant-numeric:tabular-nums;pointer-events:none;justify-content:center;align-items:center;font-weight:700;line-height:1;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.hp-skip-num[data-long]{font-size:calc(var(--hp-ctrl-icon-size) * .42)}.hp-skip-btn:disabled{opacity:.4;cursor:default}.hp-center-play>.hp-chip{z-index:7;position:relative}.video-area[data-center-play-shifted] .hp-center-play>.hp-chip{width:var(--hp-center-play-size);height:var(--hp-center-play-size);translate:var(--hp-center-play-shift-x,0px) var(--hp-center-play-shift)}.video-area[data-pause-ad-ready]>:is(.media-layer,.hp-chrome,.hp-center-play,.hp-caption-layer,.hp-error-screen,.hp-mini-progress){right:var(--hp-pause-ad-w,0px);transition:right .38s cubic-bezier(.2,.8,.2,1),opacity .2s}.video-area[data-pause-ad] .media-layer video{object-fit:cover}.hp-pause-ad{z-index:25;width:var(--hp-pause-ad-panel-w,332px);box-sizing:border-box;background:var(--hp-color-surface,#0a0a0a);color:var(--hp-color-on-surface,#fff);visibility:hidden;flex-direction:column;justify-content:center;gap:10px;padding:12px 16px;transition:transform .38s cubic-bezier(.2,.8,.2,1),visibility 0s linear .38s;display:flex;position:absolute;top:0;bottom:0;right:0;transform:translate(100%)}.hp-pause-ad[data-open]{visibility:visible;transition:transform .38s cubic-bezier(.2,.8,.2,1);transform:none}.hp-pause-ad-header{justify-content:space-between;align-items:center;gap:8px;display:flex}.hp-pause-ad-label{color:var(--hp-color-on-surface-muted,#ffffffb3);font-size:13px;font-weight:600}.hp-pause-ad-close{width:28px;height:28px;color:var(--hp-color-on-surface,#fff);cursor:pointer;background:0 0;border:0;border-radius:9999px;justify-content:center;align-items:center;padding:0;transition:background-color .15s;display:inline-flex}.hp-pause-ad-close:hover{background:var(--hp-chip-bg-hover)}.hp-pause-ad-body{border-radius:8px;justify-content:center;display:flex;overflow:hidden}.hp-pause-ad-resume{border:1px solid var(--hp-chip-border);background:var(--hp-chip-bg);color:var(--hp-color-on-surface,#fff);font:inherit;cursor:pointer;border-radius:9999px;align-self:stretch;padding:9px 14px;font-size:13px;font-weight:600;transition:background-color .15s,border-color .15s}.hp-pause-ad-resume:hover{background:var(--hp-chip-bg-hover);border-color:var(--hp-chip-border-hover)}.hp-pause-ad-close:focus-visible,.hp-pause-ad-resume:focus-visible{outline:2px solid var(--hp-color-accent);outline-offset:2px}@media(prefers-reduced-motion:reduce){.video-area[data-pause-ad-ready]>:is(.media-layer,.hp-chrome,.hp-center-play,.hp-caption-layer,.hp-error-screen,.hp-mini-progress),.hp-pause-ad,.hp-pause-ad[data-open]{transition:none}}.hp-seek-thumb{width:var(--hp-seek-thumb-size);height:var(--hp-seek-thumb-size);background:var(--hp-color-accent);will-change:translate,scale;pointer-events:none;z-index:2;border-radius:9999px;transition:scale .15s;position:absolute;left:0;scale:.5}.hp-seekbar:hover .hp-seek-thumb,.hp-seekbar:active .hp-seek-thumb,.hp-seekbar:focus-visible .hp-seek-thumb{scale:1}.hp-seekbar[data-no-duration] .hp-seek-thumb{display:none}.hp-seek-hover-dot{width:var(--hp-seek-track-h-hover);height:var(--hp-seek-track-h-hover);background:var(--hp-color-on-surface);opacity:0;pointer-events:none;z-index:1;border-radius:9999px;transition:opacity .12s;position:absolute;top:50%;left:0;box-shadow:0 0 0 1px #00000073}.hp-seek-hover-dot[data-visible]{opacity:.9}.hp-seek-marker{width:var(--hp-seek-marker-size,6px);height:var(--hp-seek-marker-size,6px);background:var(--hp-seek-marker-color,var(--hp-color-on-surface,#fff));pointer-events:none;z-index:1;border-radius:9999px;transition:scale .15s,opacity .15s;position:absolute;top:50%;translate:-50% -50%;box-shadow:0 0 0 1.5px #00000073,0 1px 4px #00000059}.hp-seekbar:hover .hp-seek-marker,.hp-seekbar:focus-visible .hp-seek-marker{scale:1.35}.hp-seek-marker[data-passed]{opacity:.6}.hp-seekbar .hp-seek-marker[data-hover]{opacity:1;scale:1.8}.hp-seek-time-label{text-overflow:ellipsis;vertical-align:top;max-width:220px;padding-bottom:1px;font-weight:600;line-height:1.4;display:inline-block;overflow:hidden}.hp-seek-marker.hp-seek-marker-loop{background:var(--hp-color-accent,#fff);opacity:1;border-radius:2px;width:3px;height:14px}.hp-seekbar:hover .hp-seek-marker-loop{scale:1 1.15}@media(prefers-reduced-motion:reduce){.hp-seek-marker{transition:none}}.hp-mini-progress{z-index:6;pointer-events:none;background:var(--hp-color-on-surface);height:1px;position:absolute;bottom:0;left:0;right:0}@supports (color:color-mix(in lab,red,red)){.hp-mini-progress{background:color-mix(in srgb,var(--hp-color-on-surface) 25%,transparent)}}.hp-mini-progress{opacity:0;transition:opacity .2s}.hp-mini-progress[data-visible]:not([data-disabled]){opacity:1}.hp-mini-progress-fill{transform-origin:0;will-change:transform;position:absolute;top:0;right:0;bottom:0;left:0;transform:scaleX(0)}.hp-mini-progress-buffered{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-mini-progress-buffered{background:color-mix(in srgb,var(--hp-color-on-surface) 40%,transparent)}}.hp-mini-progress-played{background:var(--hp-color-accent)}.hp-seek-time{border-radius:calc(var(--hp-radius) * .75);background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);-webkit-backdrop-filter:blur(12px)saturate(160%);font-variant-numeric:tabular-nums;white-space:nowrap;pointer-events:none;visibility:hidden;z-index:20;padding:3px 7px;font-size:12px;font-weight:500;line-height:1.4;position:absolute;bottom:calc(100% + 8px);left:0;box-shadow:0 4px 14px #00000059}.hp-seek-time[data-visible]{visibility:visible}.hp-sprite-tooltip{pointer-events:none;visibility:hidden;z-index:20;flex-direction:column;align-items:center;gap:4px;display:flex;position:absolute;bottom:calc(100% + 8px);left:0}.hp-sprite-tooltip[data-visible]{visibility:visible}.hp-sprite-image{border-radius:calc(var(--hp-radius) * .75);border:2px solid var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-sprite-image{border:2px solid color-mix(in srgb,var(--hp-color-on-surface) 85%,transparent)}}.hp-sprite-image{background-color:#000;background-repeat:no-repeat;box-shadow:0 4px 14px #00000059}.hp-sprite-time{background:var(--hp-tooltip-bg);color:var(--hp-tooltip-text);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:4px;padding:2px 6px;font-size:12px}.hp-live-badge{height:var(--hp-ctrl-btn-size);color:var(--hp-color-on-surface);font:inherit;letter-spacing:.04em;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:9999px;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:600;display:inline-flex}.hp-live-badge:hover{background:var(--hp-chip-bg-hover)}.hp-live-badge:focus-visible,[part=time-display]:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-live-dot{background:var(--hp-live-color,red);border-radius:50%;width:8px;height:8px;transition:background-color .16s}.hp-live-badge[data-behind]{color:var(--hp-color-on-surface-muted)}.hp-live-badge[data-behind] .hp-live-dot{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-live-badge[data-behind] .hp-live-dot{background:color-mix(in srgb,var(--hp-color-on-surface) 45%,transparent)}}.hp-chapters{pointer-events:none;inset-inline:0;align-items:center;gap:2px;display:flex;position:absolute;top:0;bottom:0}.hp-chapter{min-width:1px;height:var(--hp-seek-track-h);background:var(--hp-color-on-surface);border-radius:1px;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.hp-chapter{background:color-mix(in srgb,var(--hp-color-on-surface) 25%,transparent)}}.hp-chapter{transition:height .15s}.hp-seekbar:hover .hp-chapter{height:var(--hp-seek-track-h-hover)}.hp-seekbar .hp-chapter[data-hover]{height:calc(var(--hp-seek-track-h-hover) * 1.6)}.hp-chapter-fill{transform-origin:0;will-change:transform;position:absolute;top:0;right:0;bottom:0;left:0;transform:scaleX(0)}.hp-chapter-buffered{background:var(--hp-color-on-surface)}@supports (color:color-mix(in lab,red,red)){.hp-chapter-buffered{background:color-mix(in srgb,var(--hp-color-on-surface) 40%,transparent)}}.hp-chapter-played{background:var(--hp-color-accent)}.hp-chapter-tooltip{background:var(--hp-tooltip-bg);max-width:240px;color:var(--hp-tooltip-text);border-radius:calc(var(--hp-radius) * .75);-webkit-backdrop-filter:blur(12px)saturate(160%);text-align:center;pointer-events:none;white-space:nowrap;visibility:hidden;z-index:40;flex-direction:column;align-items:center;gap:2px;padding:4px 8px;font-size:12px;line-height:1.3;display:flex;position:absolute;bottom:calc(100% + 6px);left:0;box-shadow:0 4px 14px #00000059}.hp-chapter-tooltip[data-visible]{visibility:visible}.hp-chapter-tooltip-title{text-overflow:ellipsis;max-width:100%;font-weight:600;overflow:hidden}.hp-chapter-tooltip-time{opacity:.75;font-variant-numeric:tabular-nums}:host([data-sticky]){z-index:2147483000;border-radius:var(--hp-radius);box-shadow:0 8px 28px #00000073;width:min(360px,92vw)!important;aspect-ratio:var(--hp-aspect-ratio,16 / 9)!important;position:fixed!important}:host([data-sticky][data-sticky-corner=br]){inset:auto 16px 16px auto}:host([data-sticky][data-sticky-corner=bl]){inset:auto auto 16px 16px}:host([data-sticky][data-sticky-corner=tr]){inset:16px 16px auto auto}:host([data-sticky][data-sticky-corner=tl]){inset:16px auto auto 16px}.hp-caption-layer{z-index:5;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.hp-caption-bubble{background:var(--hp-caption-bg);width:max-content;max-width:86%;color:var(--hp-caption-text);border-radius:var(--hp-caption-radius);font-size:calc(var(--hp-caption-font-size) * var(--hp-caption-size-multiplier,1));text-align:center;white-space:pre-line;cursor:grab;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none;padding:.3em .6em;line-height:1.4;transition:transform .24s cubic-bezier(.25,.8,.25,1);display:none;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.hp-caption-bubble.hp-caption-visible{display:inline-block}.hp-caption-bubble.hp-caption-dragging,.hp-caption-bubble.hp-caption-no-transition{transition:none}.hp-caption-bubble.hp-caption-dragging{cursor:grabbing}[part=ad-layer][data-nonlinear]{top:auto;bottom:var(--hp-nonlinear-ad-offset,72px);height:var(--hp-nonlinear-ad-height,33%);pointer-events:none}[part=ad-layer][data-nonlinear] *{pointer-events:none}[part=ad-layer][data-nonlinear] :is(iframe,img,a,button){pointer-events:auto}.hp-debug{--hp-panel-text:#f1f1f4;--hp-panel-text-muted:#f1f1f49e;--hp-panel-border:#ffffff1f;text-shadow:none;z-index:30;background:#0e0e12f2;flex-direction:column;min-width:0;font-size:12px;line-height:1.45;display:flex;top:8px;right:8px;bottom:8px;left:8px;overflow:hidden}.hp-debug:focus{outline:none}.hp-debug-header{border-bottom:1px solid var(--hp-panel-border);flex-shrink:0;justify-content:space-between;align-items:center;gap:8px;padding:8px 8px 8px 12px;display:flex}.hp-debug-title{white-space:nowrap;align-items:center;gap:8px;min-width:0;font-size:13px;font-weight:700;display:flex}.hp-debug-count{font-variant-numeric:tabular-nums;background:#f8717138;border-radius:9999px;padding:1px 7px;font-size:11px}.hp-debug-count:empty{display:none}.hp-debug-actions{flex-shrink:0;align-items:center;gap:4px;display:flex}.hp-debug-btn{border:1px solid var(--hp-panel-border);color:inherit;font:inherit;cursor:pointer;background:0 0;border-radius:9999px;padding:4px 10px;font-size:11.5px}.hp-debug-btn:hover:not(:disabled){background:var(--hp-panel-text)}@supports (color:color-mix(in lab,red,red)){.hp-debug-btn:hover:not(:disabled){background:color-mix(in srgb,var(--hp-panel-text) 12%,transparent)}}.hp-debug-btn:disabled{opacity:.45;cursor:default}.hp-debug-list{overscroll-behavior:contain;flex:1;min-height:0;margin:0;padding:6px 12px 10px;list-style:none;overflow:hidden auto}.hp-debug-row{border-left:2px solid var(--hp-panel-text);padding:8px 0 8px 10px}@supports (color:color-mix(in lab,red,red)){.hp-debug-row{border-left:2px solid color-mix(in srgb,var(--hp-panel-text) 25%,transparent)}}.hp-debug-row{min-width:0}.hp-debug-row+.hp-debug-row{margin-top:6px}.hp-debug-row[data-fatal]{border-left-color:#f87171}.hp-debug-row-head{flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:2px;display:flex}.hp-debug-time{color:var(--hp-panel-text-muted);font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.hp-debug-source,.hp-debug-fatal{background:var(--hp-panel-text);border-radius:9999px;padding:1px 7px;font-size:10.5px;font-weight:600}@supports (color:color-mix(in lab,red,red)){.hp-debug-source,.hp-debug-fatal{background:color-mix(in srgb,var(--hp-panel-text) 12%,transparent)}}.hp-debug-source[data-source=ads]{background:#f5c4513d}.hp-debug-source[data-source=stream],.hp-debug-source[data-source=media]{background:#60a5fa3d}.hp-debug-fatal{background:#f8717147}.hp-debug-message{overflow-wrap:anywhere;font-weight:600}.hp-debug-repeat{color:var(--hp-panel-text-muted);font-weight:500}.hp-debug-details{grid-template-columns:max-content minmax(0,1fr);gap:1px 10px;margin:4px 0 0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;display:grid}.hp-debug-details dt{color:var(--hp-panel-text-muted)}.hp-debug-details dd{overflow-wrap:anywhere;min-width:0;margin:0}.hp-debug-empty{color:var(--hp-panel-text-muted);margin:auto;padding:16px}.hp-debug-empty[hidden]{display:none}.hp-ad-return{z-index:25;color:#fff;cursor:pointer;-webkit-tap-highlight-color:transparent;background:#0e0e12d1;border:1px solid #ffffff40;border-radius:999px;padding:10px 16px;font:600 14px/1.2 system-ui,-apple-system,sans-serif;animation:.2s ease-out hp-ad-return-in;position:absolute;bottom:64px;right:12px}@keyframes hp-ad-return-in{0%{opacity:0;transform:translateY(6px)}}:host([data-audio]) .hp-center-play{display:none}.hp-audio{z-index:1;text-align:left;pointer-events:none;color:#fff;background:linear-gradient(160deg,#2a1f2b,#0c0c10);background:radial-gradient(80% 90% at 20% 10%,var(--hp-color-accent,#e5484d),transparent 70%),linear-gradient(160deg,#1d1d24,#0c0c10);position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.hp-audio{background:radial-gradient(80% 90% at 20% 10%,color-mix(in srgb,var(--hp-color-accent,#e5484d) 38%,transparent),transparent 70%),linear-gradient(160deg,#1d1d24,#0c0c10)}}.hp-audio-backdrop{position:absolute;top:-8%;right:-8%;bottom:-8%;left:-8%}.hp-audio-backdrop img{object-fit:cover;filter:blur(28px)saturate(1.3)brightness(.55);width:100%;height:100%;transform:scale(1.08)}.hp-audio:not([data-cover]) .hp-audio-backdrop,.hp-audio:not([data-cover]) .hp-audio-sleeve img{display:none}.hp-audio-meta{z-index:3;text-shadow:0 1px 6px #0009;line-height:1.25;display:none;position:absolute;top:12px;left:14px;right:64px}.hp-audio[data-meta] .hp-audio-meta{display:block}.hp-audio-title{white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:700;overflow:hidden}.hp-audio-artist{opacity:.8;white-space:nowrap;text-overflow:ellipsis;margin-top:2px;font-size:12.5px;overflow:hidden}.hp-audio-area{inset:0 0 var(--hp-audio-bottom-space,66px) 0;justify-content:center;align-items:center;display:flex;position:absolute}.hp-audio[data-meta] .hp-audio-area{top:44px}.hp-audio-deck{height:var(--hp-deck-h,0px);flex:none;align-items:center;display:flex;position:relative}.hp-audio[data-position=left] .hp-audio-deck{flex-direction:row-reverse}.hp-audio-sleeve{z-index:2;width:var(--hp-deck-h,0px);height:var(--hp-deck-h,0px);background:radial-gradient(70% 70% at 30% 25%,#e5484d,#0000 75%),#26262d;background:radial-gradient(70% 70% at 30% 25%,var(--hp-color-accent,#e5484d),transparent 75%),#26262d;border-radius:6px;flex:none;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.hp-audio-sleeve{background:radial-gradient(70% 70% at 30% 25%,color-mix(in srgb,var(--hp-color-accent,#e5484d) 70%,#fff 0%),transparent 75%),#26262d}}.hp-audio-sleeve{box-shadow:0 18px 40px -12px #000000bf,0 0 0 1px #ffffff14}.hp-audio-sleeve img{object-fit:cover;width:100%;height:100%;display:block}.hp-audio-sleeve[hidden],.hp-vinyl[hidden],.hp-tonearm-holder[hidden]{display:none}.hp-vinyl{z-index:1;width:calc(var(--hp-deck-h,0px) * .96);height:calc(var(--hp-deck-h,0px) * .96);pointer-events:auto;touch-action:none;-webkit-tap-highlight-color:transparent;filter:drop-shadow(0 14px 26px #0009);border-radius:50%;outline:none;flex:none;transition:margin .45s cubic-bezier(.2,.8,.2,1);position:relative}.hp-audio[data-position=right] .hp-vinyl{margin-left:calc(var(--hp-deck-h) * -.56)}.hp-audio[data-position=left] .hp-vinyl{margin-right:calc(var(--hp-deck-h) * -.56)}.hp-audio[data-position=right][data-playing] .hp-vinyl{margin-left:calc(var(--hp-deck-h) * -.46)}.hp-audio[data-position=left][data-playing] .hp-vinyl{margin-right:calc(var(--hp-deck-h) * -.46)}.hp-audio:not([data-laid-out]) .hp-vinyl{transition:none}.hp-vinyl[data-scratch]:not([data-live]){cursor:grab}.hp-audio[data-scratching] .hp-vinyl{cursor:grabbing}.hp-vinyl:focus-visible{box-shadow:0 0 0 3px #ffffffb3;box-shadow:0 0 0 3px var(--hp-color-accent,#e5484d)}@supports (color:color-mix(in lab,red,red)){.hp-vinyl:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--hp-color-accent,#e5484d) 80%,transparent)}}.hp-vinyl-disc{will-change:transform;position:absolute;top:0;right:0;bottom:0;left:0}.hp-vinyl-disc svg,.hp-tonearm svg{width:100%;height:100%;display:block}.hp-vinyl-sheen{pointer-events:none;background:conic-gradient(from 200deg,#0000,#ffffff21 22deg,#0000 48deg,#0000 180deg,#ffffff17 205deg,#0000 232deg);border-radius:50%;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-mask:radial-gradient(circle,#0000 0 35%,#000 36% 99%,#0000 100%);mask:radial-gradient(circle,#0000 0 35%,#000 36% 99%,#0000 100%)}.hp-tonearm-holder{pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.hp-audio[data-position=left] .hp-tonearm-holder{transform:scaleX(-1)}.hp-tonearm{transform-origin:70% 11%;filter:drop-shadow(0 6px 8px #00000080);width:46%;height:92%;transition:transform .6s cubic-bezier(.3,.7,.2,1);position:absolute;top:-6%;right:-14%;transform:rotate(-26deg)}.hp-audio[data-playing] .hp-tonearm{transform:rotate(0)}@media(prefers-reduced-motion:reduce){.hp-vinyl,.hp-tonearm{transition:none}}.hp-audio[data-short][data-meta] .hp-audio-meta{display:none}.hp-audio[data-short][data-meta] .hp-audio-area{top:6px}[part=ad-layer][data-audio-ad]{background:0 0}[part=ad-layer][data-audio-ad] video{opacity:0}.hp-audio:after{content:"";pointer-events:none;z-index:2;background:linear-gradient(#0000,#00000047 45%,#0000009e);height:min(140px,45%);position:absolute;bottom:0;left:0;right:0}:host([data-audio-compact]) .video-area{aspect-ratio:auto;height:var(--hp-audio-bar-height,84px);overflow:visible}:host([data-audio-compact]) .hp-audio{border-radius:var(--hp-radius);background:linear-gradient(120deg,#24242c,#141418);background:linear-gradient(120deg,var(--hp-color-accent,#e5484d),transparent 60%),var(--hp-color-surface,#141418)}@supports (color:color-mix(in lab,red,red)){:host([data-audio-compact]) .hp-audio{background:linear-gradient(120deg,color-mix(in srgb,var(--hp-color-accent,#e5484d) 16%,transparent),transparent 60%),var(--hp-color-surface,#141418)}}:host([data-audio-compact]) .hp-audio>*,:host([data-audio-compact]) .hp-audio:after,:host([data-audio-compact]) .hp-caption-layer,:host([data-audio-compact]) .hp-loading-spinner,:host([data-audio-compact]) .hp-chrome:before,:host([data-audio-compact]) .hp-chrome:after{display:none}.hp-bar-meta{min-width:0;color:var(--hp-color-on-surface,#fff);pointer-events:none;align-items:center;gap:10px;padding:0 6px;display:flex}.hp-bar-meta[data-empty] .hp-bar-text{display:none}.hp-bar-text{flex-direction:column;min-width:0;line-height:1.25;display:flex}.hp-bar-title{white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:700;overflow:hidden}.hp-bar-sub{opacity:.72;white-space:nowrap;text-overflow:ellipsis;font-size:11.5px;overflow:hidden}.hp-bar-sub:empty{display:none}.hp-bar-eq{flex:none;align-items:flex-end;gap:2px;width:14px;height:14px;display:inline-flex}.hp-bar-eq i{background:var(--hp-color-accent,#fff);border-radius:1px;flex:1;height:30%;transition:height .2s}.hp-bar-meta[data-playing] .hp-bar-eq i{animation:.9s ease-in-out infinite alternate hp-bar-eq}.hp-bar-meta[data-playing] .hp-bar-eq i:nth-child(2){animation-duration:.7s;animation-delay:-.3s}.hp-bar-meta[data-playing] .hp-bar-eq i:nth-child(3){animation-duration:1.1s;animation-delay:-.6s}@keyframes hp-bar-eq{0%{height:25%}to{height:100%}}@media(prefers-reduced-motion:reduce){.hp-bar-meta[data-playing] .hp-bar-eq i{height:70%;animation:none}}.hp-lock{vertical-align:-2px;display:inline-block}.hp-rw-button{color:#fff;cursor:pointer;pointer-events:auto;-webkit-tap-highlight-color:transparent;background:#0c0c10b8;border:1px solid #ffffff38;border-radius:999px;align-items:center;gap:6px;padding:7px 12px;font:600 12.5px/1 system-ui,-apple-system,sans-serif;display:inline-flex;position:absolute;top:12px;left:12px;box-shadow:0 6px 18px -8px #000000b3}.hp-rw-button:hover{background:#0c0c10e0}.hp-rw-button[hidden]{display:none}.hp-rw-button .hp-lock{color:var(--hp-color-accent,#fff)}.hp-rw-dialog{z-index:45;color:#fff;text-align:center;background:#0000009e;justify-content:center;align-items:center;padding:12px;animation:.18s ease-out hp-rw-fade;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.hp-rw-card{background:#14141af5;border:1px solid #ffffff24;border-radius:14px;width:min(360px,100%);max-height:100%;padding:18px 18px 16px;overflow:auto;box-shadow:0 20px 50px -20px #000c}.hp-rw-icon{color:var(--hp-color-accent,#fff);background:#ffffff14;border-radius:50%;padding:9px;display:inline-flex}.hp-rw-icon .hp-lock{width:18px;height:18px}.hp-rw-title{margin-top:10px;font-size:15px;font-weight:700}.hp-rw-text{opacity:.82;margin-top:6px;font-size:13px;line-height:1.45}.hp-rw-actions{justify-content:center;gap:8px;margin-top:14px;display:flex}.hp-rw-actions:empty{display:none}.hp-rw-btn{color:#fff;cursor:pointer;background:0 0;border:1px solid #fff3;border-radius:999px;padding:8px 14px;font:600 13px/1 system-ui,-apple-system,sans-serif}.hp-rw-btn-primary{background:var(--hp-color-accent,#fff);color:var(--hp-color-on-accent,#0a0a0a);border-color:#0000}.hp-rw-spinner{border:2px solid #ffffff40;border-top-color:#fff;border-radius:50%;width:22px;height:22px;margin:4px auto 0;animation:.8s linear infinite hp-rw-spin}.hp-rw-toast{z-index:45;color:#fff;pointer-events:none;background:#0c0c10d9;border-radius:999px;padding:8px 14px;font:600 13px/1 system-ui,-apple-system,sans-serif;animation:.2s ease-out hp-rw-fade;position:absolute;top:12px;left:50%;transform:translate(-50%)}@keyframes hp-rw-fade{0%{opacity:0}}@keyframes hp-rw-spin{to{transform:rotate(360deg)}}.hp-settings-panel [data-locked],.hp-chip-panel [data-locked]{opacity:.85}.hp-sponsor-logo{z-index:21;width:var(--hp-sponsor-logo-w,96px);color:#fff;filter:drop-shadow(0 2px 6px #0000008c);flex-direction:column;align-items:center;gap:4px;text-decoration:none;transition:opacity .25s,right .35s cubic-bezier(.2,.8,.2,1),bottom .35s cubic-bezier(.2,.8,.2,1);animation:.4s ease-out hp-rw-fade;display:flex;position:absolute}.hp-sponsor-logo[data-position=top-left]{top:12px;left:12px}.hp-sponsor-logo[data-position=top-right]{top:12px;right:var(--hp-sponsor-avoid-right,12px)}.hp-sponsor-logo[data-position=bottom-left]{bottom:var(--hp-sponsor-avoid-bottom,76px);left:12px}.hp-sponsor-logo[data-position=bottom-right]{bottom:var(--hp-sponsor-avoid-bottom,76px);right:12px}.video-area[data-chrome-hidden] .hp-sponsor-logo[data-position=top-right]{right:12px}.video-area[data-chrome-hidden] .hp-sponsor-logo[data-position=bottom-left],.video-area[data-chrome-hidden] .hp-sponsor-logo[data-position=bottom-right]{bottom:12px}.hp-sponsor-logo img{width:100%;height:auto;display:block}.hp-sponsor-label{text-align:center;white-space:nowrap;text-overflow:ellipsis;letter-spacing:.08em;text-transform:uppercase;opacity:.85;max-width:100%;font:600 10px/1 system-ui,-apple-system,sans-serif;overflow:hidden}.video-area:has(.hp-rw-button:not([hidden])) .hp-sponsor-logo[data-position=top-left]{top:52px}.hp-sponsor-intro{z-index:22;color:#fff;pointer-events:none;background:#0c0c10d1;border-radius:999px;align-items:center;gap:10px;max-width:calc(100% - 32px);padding:8px 16px 8px 8px;font:600 14px/1.2 system-ui,-apple-system,sans-serif;transition:opacity .35s,transform .35s;animation:.45s cubic-bezier(.2,.8,.2,1) hp-sponsor-in;display:flex;position:absolute;bottom:84px;left:50%;transform:translate(-50%);box-shadow:0 12px 30px -12px #000c}.hp-sponsor-intro[data-leaving]{opacity:0;transform:translate(-50%,8px)}.hp-sponsor-intro img{border-radius:6px;width:auto;max-width:96px;height:28px}.hp-sponsor-intro span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}@keyframes hp-sponsor-in{0%{opacity:0;transform:translate(-50%,12px)scale(.96)}}:host([data-sponsor-hidden]) .hp-sponsor-logo,:host([data-sponsor-hidden]) .hp-sponsor-intro{display:none}.hp-adtrigger{z-index:26;box-sizing:border-box;pointer-events:none;justify-content:center;align-items:center;padding:12px;display:none;position:absolute;top:0;right:0;bottom:0;left:0}.hp-adtrigger[data-open]{animation:.3s ease-out hp-adtrigger-in;display:flex}.hp-adtrigger[data-backdrop]{pointer-events:auto;background:#0000009e}.hp-adtrigger[data-layout=full]{padding:0}.hp-adtrigger[data-layout=none]{justify-content:flex-start;align-items:flex-start;padding:0}.hp-adtrigger[data-layout=none] .hp-adtrigger-frame{position:static}.hp-adtrigger[data-layout=top]{align-items:flex-start}.hp-adtrigger[data-layout=bottom]{align-items:flex-end;padding-bottom:72px}.hp-adtrigger[data-layout=top-left]{justify-content:flex-start;align-items:flex-start}.hp-adtrigger[data-layout=top-right]{justify-content:flex-end;align-items:flex-start}.hp-adtrigger[data-layout=bottom-left]{justify-content:flex-start;align-items:flex-end;padding-bottom:72px}.hp-adtrigger[data-layout=bottom-right]{justify-content:flex-end;align-items:flex-end;padding-bottom:72px}.hp-adtrigger-frame{pointer-events:auto;max-width:100%;max-height:100%;position:relative}.hp-adtrigger[data-layout=full] .hp-adtrigger-frame{width:100%;height:100%}.hp-adtrigger-frame[data-sized]{width:min(var(--hp-adtrigger-w),100%);height:min(var(--hp-adtrigger-h),100%)}.hp-adtrigger[data-layout=full] ::slotted(*),.hp-adtrigger-frame[data-sized] ::slotted(*){width:100%;height:100%;display:block}.hp-adtrigger-label{z-index:1;color:#fff;letter-spacing:.08em;text-transform:uppercase;pointer-events:none;background:#000000a8;border-radius:4px;padding:3px 7px;font:600 10px/1 system-ui,-apple-system,sans-serif;position:absolute;top:8px;left:8px}.hp-adtrigger-close{z-index:2;color:#fff;cursor:pointer;background:#000000b8;border:0;border-radius:999px;place-items:center;width:30px;height:30px;padding:0;display:grid;position:absolute;top:6px;right:6px}.hp-adtrigger-close[hidden]{display:none}.hp-adtrigger-close:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-cast-overlay{z-index:12;color:#fff;text-align:center;pointer-events:none;background:radial-gradient(#14141adb,#060609f5);flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:16px;font:600 15px/1.3 system-ui,-apple-system,sans-serif;display:none;position:absolute;top:0;right:0;bottom:0;left:0}.hp-cast-overlay[data-open]{display:flex}.hp-cast-overlay .hp-icon{color:var(--hp-color-accent,#fff);font-size:44px}.hp-cast-overlay-ad{background:#ffffff24;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:600;display:none}.hp-cast-overlay[data-break] .hp-cast-overlay-ad{display:inline-block}.video-area[data-casting] video{visibility:hidden}[part=cast-button][data-connecting] .hp-icon{animation:1s ease-in-out infinite hp-cast-pulse}@keyframes hp-cast-pulse{50%{opacity:.35}}@keyframes hp-adtrigger-in{0%{opacity:0}}@media(prefers-reduced-motion:reduce){.hp-sponsor-intro,.hp-rw-dialog,.hp-rw-toast{animation:none}}@media(hover:none)and (pointer:coarse){.video-area:has(.hp-unmute-badge[data-visible]) .hp-rw-button,.video-area:has(.hp-unmute-badge[data-visible]) .hp-sponsor-logo[data-position=top-left]{top:52px}.video-area:has(.hp-unmute-badge[data-visible]):has(.hp-rw-button:not([hidden])) .hp-sponsor-logo[data-position=top-left]{top:92px}}.video-area[data-compact] .hp-rw-icon{display:none}.video-area[data-compact] .hp-rw-card{padding:12px 14px}.video-area[data-compact] .hp-rw-title{margin-top:0;font-size:14px}.video-area[data-compact] .hp-rw-text{font-size:12px;line-height:1.4}.video-area[data-compact] .hp-rw-actions{margin-top:10px}.hp-sponsor-logo[data-compact]{width:min(var(--hp-sponsor-logo-w,96px),48px);gap:2px}.hp-sponsor-logo[data-compact] .hp-sponsor-label{font-size:8.5px}:host([data-sponsor-intro]) .hp-sponsor-logo{pointer-events:none;opacity:0!important}@keyframes hp-redirect-in{0%{opacity:0;transform:translateY(10px)scale(.97)}}@keyframes hp-redirect-fade{0%{opacity:0}}.hp-skip-segment{z-index:23;color:#fff;letter-spacing:.01em;cursor:pointer;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0e0e12b8;border:1px solid #ffffff8c;border-radius:8px;align-items:center;gap:8px;padding:10px 16px;font:600 14px/1.2 system-ui,-apple-system,sans-serif;transition:opacity .25s,bottom .25s,background-color .15s;animation:.3s cubic-bezier(.2,.8,.2,1) hp-redirect-in;display:inline-flex;position:absolute;overflow:hidden;box-shadow:0 10px 28px -12px #000c}.hp-skip-segment:hover{color:#111;background:#ffffffeb}.hp-skip-segment:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-skip-segment>*{position:relative}.hp-skip-segment-icon{font-size:16px}.hp-skip-segment[data-auto]:before{content:"";transform-origin:0;transform:scaleX(var(--hp-skip-progress,0));background:#ffffff38;transition:transform .25s linear;position:absolute;top:0;right:0;bottom:0;left:0}.hp-skip-segment[data-position=bottom-right]{bottom:76px;right:16px}.hp-skip-segment[data-position=bottom-left]{bottom:76px;left:16px}.hp-skip-segment[data-position=top-right]{top:16px;right:16px}.hp-skip-segment[data-position=top-left]{top:16px;left:16px}.video-area[data-chrome-hidden] .hp-skip-segment[data-position^=bottom]{bottom:16px}.video-area[data-chrome-hidden] .hp-skip-segment[data-faded]{opacity:0;pointer-events:none}.video-area[data-compact] .hp-skip-segment{padding:7px 12px;font-size:12px}.video-area[data-compact] .hp-skip-segment[data-position^=bottom]{bottom:56px}.video-area[data-compact][data-chrome-hidden] .hp-skip-segment[data-position^=bottom]{bottom:10px}@media(prefers-reduced-motion:reduce){.hp-skip-segment{animation:none}}.hp-quality-badge{background:var(--hp-quality-badge-bg,var(--hp-color-accent,#fff));color:var(--hp-quality-badge-color,var(--hp-color-on-accent,#0a0a0a));letter-spacing:.02em;pointer-events:none;border-radius:3px;padding:0 2px;font:800 8px/1.3 system-ui,-apple-system,sans-serif;position:absolute;top:1px;right:-5px;box-shadow:0 1px 3px #00000073}.hp-quality-badge[hidden]{display:none}.video-area[data-compact] .hp-quality-badge{font-size:7px;top:0}.hp-quality-badge[data-low]{color:#0a0a0a;background:#ffffffb3}.hp-chevron-forward{font-size:11px;display:inline-block;transform:rotate(180deg)}:host([data-large-controls]){--hp-ctrl-btn-size:48px;--hp-ctrl-icon-size:22px;--hp-seek-hit-h:30px;--hp-seek-track-h:8px;--hp-seek-track-h-hover:10px;--hp-seek-thumb-size:20px;--hp-caption-font-size:24px}:host([data-large-controls]) .video-area[data-compact]{--hp-caption-font-size:17px}:host([data-zoomed]) video{cursor:grab}:host([data-zoomed]) video:active{cursor:grabbing}.hp-shortcuts{z-index:40;background:#0000008c;place-items:center;padding:12px;animation:.2s hp-redirect-fade;display:grid;position:absolute;top:0;right:0;bottom:0;left:0}.hp-shortcuts-box{color:#fff;background:#0e0e12f0;border-radius:12px;width:min(420px,100%);max-height:100%;padding:14px 16px 16px;font:400 13px/1.4 system-ui,-apple-system,sans-serif;overflow-y:auto;box-shadow:0 18px 40px -14px #000000e6}.hp-shortcuts-head{justify-content:space-between;align-items:center;margin-bottom:10px;display:flex}.hp-shortcuts-head h2{margin:0;font-size:15px;font-weight:700}.hp-shortcuts-close{color:#fff;cursor:pointer;background:#ffffff1f;border:0;border-radius:999px;place-items:center;width:30px;height:30px;padding:0;font-size:13px;display:grid}.hp-shortcuts-close:hover{background:#ffffff3d}.hp-shortcuts-close:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.hp-shortcuts-list{grid-template-columns:auto 1fr;align-items:center;gap:8px 14px;margin:0;display:grid}.hp-shortcuts-list dt{white-space:nowrap;flex-wrap:wrap;align-items:center;gap:4px;margin:0;display:flex}.hp-shortcuts-list dd{color:#ffffffd1;margin:0}.hp-shortcuts-list kbd{text-align:center;background:#ffffff14;border:1px solid #ffffff47;border-bottom-width:2px;border-radius:5px;min-width:22px;padding:2px 6px;font:600 11.5px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}.video-area[data-compact] .hp-shortcuts-box{padding:10px 12px 12px;font-size:12px}@media(prefers-reduced-motion:reduce){.hp-shortcuts{animation:none}}.hp-history-notice{z-index:23;color:#fff;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0e0e12d1;border-radius:999px;align-items:center;gap:12px;max-width:calc(100% - 32px);padding:8px 8px 8px 14px;font:500 13px/1.3 system-ui,-apple-system,sans-serif;transition:bottom .25s;animation:.3s cubic-bezier(.2,.8,.2,1) hp-redirect-in;display:inline-flex;position:absolute;bottom:76px;left:16px;box-shadow:0 10px 28px -12px #000c}.video-area[data-chrome-hidden] .hp-history-notice{bottom:16px}.hp-history-restart{background:var(--hp-color-accent,#fff);color:var(--hp-color-on-accent,#0a0a0a);cursor:pointer;border:0;border-radius:999px;flex-shrink:0;padding:6px 12px;font:600 12.5px/1.2 system-ui,-apple-system,sans-serif}.hp-history-restart:focus-visible{outline:2px solid var(--hp-color-accent,#fff);outline-offset:2px}.video-area[data-compact] .hp-history-notice{gap:8px;padding:6px 6px 6px 10px;font-size:11.5px;bottom:56px;left:8px}.video-area[data-compact][data-chrome-hidden] .hp-history-notice{bottom:10px}@media(prefers-reduced-motion:reduce){.hp-history-notice{animation:none}}.hp-plugin-layer{z-index:5;transition:opacity .2s;position:absolute}.hp-plugin-layer[data-above]{z-index:30}.hp-plugin-layer[hidden]{display:none}.hp-plugin-layer:not([data-interactive]){pointer-events:none}.hp-plugin-layer:not([data-interactive]) :is(button,a,input,select,textarea,[data-interactive]){pointer-events:auto}.hp-plugin-layer[data-position=fill]{top:0;right:0;bottom:0;left:0}.hp-plugin-layer[data-position=top]{top:12px;left:50%;transform:translate(-50%)}.hp-plugin-layer[data-position=bottom]{bottom:76px;left:50%;transform:translate(-50%)}.hp-plugin-layer[data-position=center]{top:50%;left:50%;transform:translate(-50%,-50%)}.hp-plugin-layer[data-position=top-left]{top:12px;left:12px}.hp-plugin-layer[data-position=top-right]{top:12px;right:12px}.hp-plugin-layer[data-position=bottom-left]{bottom:76px;left:12px}.hp-plugin-layer[data-position=bottom-right]{bottom:76px;right:12px}.video-area[data-chrome-hidden] .hp-plugin-layer:is([data-position=bottom],[data-position=bottom-left],[data-position=bottom-right]){bottom:12px}.video-area[data-compact] .hp-plugin-layer:is([data-position=bottom],[data-position=bottom-left],[data-position=bottom-right]){bottom:56px}.video-area[data-chrome-hidden] .hp-plugin-layer[data-autohide]{opacity:0;pointer-events:none}.video-area[data-chrome-hidden] .hp-plugin-layer[data-autohide] *{pointer-events:none}.hp-plugin-btn svg{width:var(--hp-ctrl-icon-size);height:var(--hp-ctrl-icon-size)}.hp-plugin-btn[aria-pressed=true]{color:var(--hp-color-accent,#fff);background:var(--hp-color-accent,#fff)}@supports (color:color-mix(in lab,red,red)){.hp-plugin-btn[aria-pressed=true]{background:color-mix(in srgb,var(--hp-color-accent,#fff) 18%,transparent)}}.hp-plugin-toast{z-index:35;color:#fff;opacity:0;pointer-events:none;background:#0e0e12d9;border-radius:999px;max-width:calc(100% - 32px);padding:8px 14px;font:500 13px/1.3 system-ui,-apple-system,sans-serif;transition:opacity .2s,transform .2s;position:absolute;top:16px;left:50%;transform:translate(-50%,-6px)}.hp-plugin-toast[data-visible]{opacity:1;transform:translate(-50%)}@media(prefers-reduced-motion:reduce){.hp-plugin-layer,.hp-plugin-toast{transition:none}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';
|
|
5
|
+
function ie(n) {
|
|
6
|
+
return !!n && /MediaSinkAudio/i.test(n.message || "");
|
|
7
|
+
}
|
|
8
|
+
function Je(n) {
|
|
9
|
+
return !!n.error && !ie(n.error);
|
|
10
|
+
}
|
|
11
|
+
function ue() {
|
|
12
|
+
try {
|
|
13
|
+
return crypto.randomUUID();
|
|
14
|
+
} catch {
|
|
15
|
+
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function me() {
|
|
19
|
+
if (typeof navigator > "u") return !1;
|
|
20
|
+
const n = navigator.userAgent, t = /iP(hone|od|ad)/.test(n) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, e = /^((?!chrome|chromium|android|crios|fxios|edg|opr).)*safari/i.test(n);
|
|
21
|
+
return t || e;
|
|
22
|
+
}
|
|
23
|
+
function $(n) {
|
|
24
|
+
return !!n && Object.values(n).some((t) => !!(t != null && t.licenseUrl));
|
|
25
|
+
}
|
|
26
|
+
function j() {
|
|
27
|
+
const n = window;
|
|
28
|
+
return typeof n.MediaSource < "u" || typeof n.ManagedMediaSource < "u";
|
|
29
|
+
}
|
|
30
|
+
function De(n, t) {
|
|
31
|
+
var i;
|
|
32
|
+
const e = (i = t == null ? void 0 : t.split(";")[0]) == null ? void 0 : i.trim().toLowerCase();
|
|
33
|
+
return e === "application/vnd.apple.mpegurl" || e === "application/x-mpegurl" || /\.m3u8(?:$|[?#])/i.test(n) ? "hls" : e === "application/dash+xml" || /\.mpd(?:$|[?#])/i.test(n) ? "dash" : e === "video/mp4" || /\.mp4(?:$|[?#])/i.test(n) ? "mp4" : "unknown";
|
|
34
|
+
}
|
|
35
|
+
class et {
|
|
36
|
+
constructor(t, e) {
|
|
37
|
+
a(this, "hls", null);
|
|
38
|
+
a(this, "video");
|
|
39
|
+
/** Son yüklenen kaynak — `reload()` (hata ekranındaki "Tekrar dene") için. */
|
|
40
|
+
a(this, "last", null);
|
|
41
|
+
/** Native HLS denemesi sürerken (ilk loadedmetadata'ya kadar) — başarısız olursa hls.js'e geçilir. */
|
|
42
|
+
a(this, "nativeHlsProbe", null);
|
|
43
|
+
a(this, "engineInfo", { engine: "native" });
|
|
44
|
+
a(this, "hlsOptions", {});
|
|
45
|
+
a(this, "streamTextTracks", /* @__PURE__ */ new Map());
|
|
46
|
+
/** Safari native HLS ses izi dinleyicilerini kaldırır. */
|
|
47
|
+
a(this, "nativeAudioCleanup", null);
|
|
48
|
+
a(this, "dash", null);
|
|
49
|
+
a(this, "dashOptions");
|
|
50
|
+
a(this, "drm");
|
|
51
|
+
a(this, "nativeEme", null);
|
|
52
|
+
a(this, "qualityLimit");
|
|
53
|
+
a(this, "cmcd", null);
|
|
54
|
+
/** Her `load()`'da yenilenir. */
|
|
55
|
+
a(this, "sid", ue());
|
|
56
|
+
this.callbacks = e, this.video = t;
|
|
57
|
+
}
|
|
58
|
+
/** `options.hls` — sonraki `load()`'da uygulanır. */
|
|
59
|
+
configure(t, e) {
|
|
60
|
+
this.hlsOptions = t ?? {}, this.cmcd = (e == null ? void 0 : e.cmcd) ?? null, this.qualityLimit = e == null ? void 0 : e.qualityLimit, this.dashOptions = e == null ? void 0 : e.dash, this.drm = e == null ? void 0 : e.drm;
|
|
61
|
+
}
|
|
62
|
+
/** Bu kaynak zaten yüklü ve hatasız mı — aynı kaynak için yeniden yükleme (başa sarma) gerekmez. */
|
|
63
|
+
isLoaded(t, e) {
|
|
64
|
+
return !!this.last && this.last.src === t && this.last.type === e && !Je(this.video) && this.video.readyState > 0;
|
|
65
|
+
}
|
|
66
|
+
/** O anki oynatma oturumu (CMCD `sid`). */
|
|
67
|
+
get sessionId() {
|
|
68
|
+
return this.sid;
|
|
69
|
+
}
|
|
70
|
+
async load(t, e) {
|
|
71
|
+
var o, l;
|
|
72
|
+
this.last = { src: t, type: e }, this.sid = ue(), this.destroy(), this.video.pause();
|
|
73
|
+
const i = De(t, e);
|
|
74
|
+
if (this.callbacks.onLevelsChanged([], -1), this.callbacks.onAudioTracksChanged([], -1), this.streamTextTracks.clear(), this.callbacks.onTextTracksFound([]), i === "dash") {
|
|
75
|
+
await this.attachDash(t);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (i !== "hls") {
|
|
79
|
+
if (this.engineInfo = { engine: "native" }, await this.prepareNativeDrm(), ((o = this.last) == null ? void 0 : o.src) !== t) return;
|
|
80
|
+
this.video.src = t;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const s = this.hlsOptions.engine ?? "auto", r = this.video.canPlayType("application/vnd.apple.mpegurl") !== "";
|
|
84
|
+
if (s === "native" && r) {
|
|
85
|
+
await this.prepareNativeDrm(), this.loadNativeHls(t, "option");
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (s !== "hls.js" && r && (me() || !j())) {
|
|
89
|
+
if (await this.prepareNativeDrm(), ((l = this.last) == null ? void 0 : l.src) !== t) return;
|
|
90
|
+
this.loadNativeHls(t, me() ? "apple-native" : "no-mse");
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
await this.attachHlsJs(t);
|
|
94
|
+
}
|
|
95
|
+
/** Şu anki oynatma yolu — docs demosu/entegratör teşhisi için (ör. CORS yüzünden native'e düşüldü mü). */
|
|
96
|
+
get engine() {
|
|
97
|
+
return this.engineInfo;
|
|
98
|
+
}
|
|
99
|
+
/** hls.js ile oynatılıyorsa instance (gelişmiş kullanım: olaylar, istatistik); değilse null. */
|
|
100
|
+
get hlsInstance() {
|
|
101
|
+
return this.hls;
|
|
102
|
+
}
|
|
103
|
+
/** Native oynatmada şifreli içerik için EME işleyicisi (kaynak atanmadan önce). */
|
|
104
|
+
async prepareNativeDrm() {
|
|
105
|
+
var e;
|
|
106
|
+
if (!$(this.drm)) return;
|
|
107
|
+
const { NativeEme: t } = await import("./NativeEme-CXosVcw8.js");
|
|
108
|
+
(e = this.nativeEme) == null || e.destroy(), this.nativeEme = new t(this.video, this.drm, {
|
|
109
|
+
onError: (i, s) => {
|
|
110
|
+
var r, o;
|
|
111
|
+
(o = (r = this.callbacks).onStreamError) == null || o.call(r, { type: "drm", details: i, fatal: !0, engine: "eme", reason: s }), this.callbacks.onFatalError("drm");
|
|
112
|
+
},
|
|
113
|
+
onLicense: (i) => {
|
|
114
|
+
this.engineInfo = { ...this.engineInfo, drm: i };
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
async attachDash(t) {
|
|
119
|
+
var i, s;
|
|
120
|
+
if (!j()) {
|
|
121
|
+
this.engineInfo = { engine: "dash.js" }, this.video.removeAttribute("src"), this.video.load(), this.callbacks.onFatalError("unsupported");
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const { DashEngine: e } = await import("./dash-CWjy-y7B.js");
|
|
125
|
+
((i = this.last) == null ? void 0 : i.src) === t && (this.engineInfo = { engine: "dash.js" }, this.dash = new e(this.video, t, { dash: this.dashOptions, drm: this.drm, autoplay: this.video.autoplay, fitPlayer: !!((s = this.qualityLimit) != null && s.fitPlayer), cmcd: this.cmcd ? { ...this.cmcd, sessionId: this.sid } : null }, {
|
|
126
|
+
onLevels: (r, o) => this.callbacks.onLevelsChanged(r, o),
|
|
127
|
+
onAudioTracks: (r, o) => this.callbacks.onAudioTracksChanged(r, o),
|
|
128
|
+
onFatal: (r) => this.callbacks.onFatalError(r),
|
|
129
|
+
onError: (r) => {
|
|
130
|
+
var o, l;
|
|
131
|
+
return (l = (o = this.callbacks).onStreamError) == null ? void 0 : l.call(o, { type: "dash", details: `${r.code}: ${r.message}`, fatal: r.fatal, engine: "dash.js" });
|
|
132
|
+
},
|
|
133
|
+
onTextTracks: (r) => {
|
|
134
|
+
this.streamTextTracks.clear();
|
|
135
|
+
for (const o of r) this.streamTextTracks.set(o.id, o);
|
|
136
|
+
this.callbacks.onTextTracksFound([...this.streamTextTracks.values()]);
|
|
137
|
+
},
|
|
138
|
+
onCues: (r, o) => this.callbacks.onCues(r, o),
|
|
139
|
+
onDrm: (r) => {
|
|
140
|
+
this.engineInfo = { ...this.engineInfo, drm: r };
|
|
141
|
+
}
|
|
142
|
+
}));
|
|
143
|
+
}
|
|
144
|
+
/** O an oynayan kalite (ABR'de de gerçek seviye). */
|
|
145
|
+
currentLevel() {
|
|
146
|
+
if (this.dash) return this.dash.currentLevel();
|
|
147
|
+
if (this.hls) {
|
|
148
|
+
const t = this.hls.levels[this.hls.currentLevel];
|
|
149
|
+
return t ? { height: t.height, bitrate: t.bitrate } : null;
|
|
150
|
+
}
|
|
151
|
+
return this.video.videoHeight ? { height: this.video.videoHeight, bitrate: null } : null;
|
|
152
|
+
}
|
|
153
|
+
loadNativeHls(t, e) {
|
|
154
|
+
this.engineInfo = { engine: "native-hls", reason: e }, this.probeNativeHls(t), this.watchNativeAudioTracks(), this.video.src = t;
|
|
155
|
+
}
|
|
156
|
+
/** Native HLS denemesi sürüyor mu — ErrorScreen bu sırada gelen hatayı göstermez (hls.js'e geçilecek). */
|
|
157
|
+
isRecovering() {
|
|
158
|
+
return this.nativeHlsProbe !== null;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Bazı ortamlar canPlayType'a "maybe" deyip HLS'i native oynatamıyor (bazı Android tarayıcıları/WebView'lar).
|
|
162
|
+
* İlk metadata'dan önce kod 4 gelirse ve MSE varsa hls.js'e geç.
|
|
163
|
+
*/
|
|
164
|
+
probeNativeHls(t) {
|
|
165
|
+
if (!j() || this.engineInfo.reason === "hlsjs-failed" || this.engineInfo.reason === "option") return;
|
|
166
|
+
const e = () => s(), i = () => {
|
|
167
|
+
var o, l;
|
|
168
|
+
const r = ((o = this.video.error) == null ? void 0 : o.code) === 4;
|
|
169
|
+
s(), r && ((l = this.nativeAudioCleanup) == null || l.call(this), this.attachHlsJs(t));
|
|
170
|
+
}, s = () => {
|
|
171
|
+
this.video.removeEventListener("loadedmetadata", e), this.video.removeEventListener("error", i), this.nativeHlsProbe = null;
|
|
172
|
+
};
|
|
173
|
+
this.video.addEventListener("loadedmetadata", e), this.video.addEventListener("error", i), this.nativeHlsProbe = s;
|
|
174
|
+
}
|
|
175
|
+
/** Safari native HLS: alternatif ses izleri `video.audioTracks`'te (diğer tarayıcılarda bu API yok). */
|
|
176
|
+
watchNativeAudioTracks() {
|
|
177
|
+
const t = this.video.audioTracks;
|
|
178
|
+
if (!t) return;
|
|
179
|
+
const e = () => {
|
|
180
|
+
const i = Array.from(t, (s, r) => ({ index: r, label: s.label || s.language || `${r + 1}`, lang: s.language }));
|
|
181
|
+
this.callbacks.onAudioTracksChanged(i, Array.from(t).findIndex((s) => s.enabled));
|
|
182
|
+
};
|
|
183
|
+
for (const i of ["addtrack", "removetrack", "change"]) t.addEventListener(i, e);
|
|
184
|
+
this.nativeAudioCleanup = () => {
|
|
185
|
+
for (const i of ["addtrack", "removetrack", "change"]) t.removeEventListener(i, e);
|
|
186
|
+
this.nativeAudioCleanup = null;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
async attachHlsJs(t) {
|
|
190
|
+
var f, v;
|
|
191
|
+
const e = this.hlsOptions.build === "light" && !$(this.drm) && !this.cmcd ? "light" : "full", { default: i } = e === "light" ? await import("./hlsLight-CCe_8eOw.js") : await import("./hls-DAtZkTUi.js");
|
|
192
|
+
if (((f = this.last) == null ? void 0 : f.src) !== t) return;
|
|
193
|
+
if (!i.isSupported()) {
|
|
194
|
+
this.engineInfo = { engine: "native-hls", reason: "no-mse" }, this.video.src = t;
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const s = $(this.drm) ? (await import("./keySystems-CNzjRq6e.js")).hlsDrmConfig(this.drm, this.hlsOptions.config ?? {}) : {};
|
|
198
|
+
if (((v = this.last) == null ? void 0 : v.src) !== t) return;
|
|
199
|
+
const r = new i(this.buildHlsConfig(s));
|
|
200
|
+
this.hls = r, this.engineInfo = { engine: "hls.js", build: e };
|
|
201
|
+
let o = !1, l = !1;
|
|
202
|
+
r.on(i.Events.ERROR, (m, d) => {
|
|
203
|
+
var g, y, w, S, T, A;
|
|
204
|
+
if (this.hls === r) {
|
|
205
|
+
const E = d;
|
|
206
|
+
(A = (T = this.callbacks).onStreamError) == null || A.call(T, {
|
|
207
|
+
engine: "hls.js",
|
|
208
|
+
type: String(d.type),
|
|
209
|
+
details: String(d.details),
|
|
210
|
+
fatal: !!d.fatal,
|
|
211
|
+
url: E.url ?? ((g = E.frag) == null ? void 0 : g.url) ?? ((y = E.context) == null ? void 0 : y.url),
|
|
212
|
+
httpStatus: (w = E.response) == null ? void 0 : w.code,
|
|
213
|
+
reason: E.reason ?? ((S = E.error) == null ? void 0 : S.message)
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
if (!d.fatal || this.hls !== r) return;
|
|
217
|
+
const x = [i.ErrorDetails.MANIFEST_LOAD_ERROR, i.ErrorDetails.MANIFEST_LOAD_TIMEOUT].includes(d.details);
|
|
218
|
+
if (!o && x && this.video.canPlayType("application/vnd.apple.mpegurl") !== "") {
|
|
219
|
+
r.destroy(), this.hls = null, this.loadNativeHls(t, "hlsjs-failed");
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (d.type === i.ErrorTypes.MEDIA_ERROR && !l) {
|
|
223
|
+
l = !0, r.recoverMediaError();
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
r.stopLoad();
|
|
227
|
+
const k = d.type === i.ErrorTypes.KEY_SYSTEM_ERROR ? "drm" : d.type === i.ErrorTypes.NETWORK_ERROR ? "network" : "media";
|
|
228
|
+
this.callbacks.onFatalError(k);
|
|
229
|
+
});
|
|
230
|
+
const h = () => r.levels.map((m, d) => ({ index: d, height: m.height, bitrate: m.bitrate }));
|
|
231
|
+
r.on(i.Events.MANIFEST_PARSED, () => {
|
|
232
|
+
o = !0, this.callbacks.onLevelsChanged(h(), r.currentLevel);
|
|
233
|
+
}), r.on(i.Events.LEVEL_SWITCHED, (m, d) => {
|
|
234
|
+
this.callbacks.onLevelsChanged(h(), r.autoLevelEnabled ? -1 : d.level);
|
|
235
|
+
});
|
|
236
|
+
const c = () => r.audioTracks.map((m, d) => ({ index: d, label: m.name || m.lang || `${d + 1}`, lang: m.lang ?? "" }));
|
|
237
|
+
r.on(i.Events.AUDIO_TRACKS_UPDATED, () => this.callbacks.onAudioTracksChanged(c(), r.audioTrack)), r.on(i.Events.AUDIO_TRACK_SWITCHED, (m, d) => this.callbacks.onAudioTracksChanged(c(), d.id)), r.on(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND, (m, d) => {
|
|
238
|
+
var x;
|
|
239
|
+
for (const k of d.tracks) {
|
|
240
|
+
const g = k.subtitleTrack, y = g ? `sub:${g.id}` : `cc:${k._id ?? k.label}`, w = k.kind === "captions" ? "captions" : "subtitles";
|
|
241
|
+
this.streamTextTracks.set(y, { id: y, kind: w, label: k.label, lang: (g == null ? void 0 : g.lang) ?? ((x = k.closedCaptions) == null ? void 0 : x.lang) ?? "" });
|
|
242
|
+
}
|
|
243
|
+
this.callbacks.onTextTracksFound([...this.streamTextTracks.values()]);
|
|
244
|
+
}), r.on(i.Events.CUES_PARSED, (m, d) => {
|
|
245
|
+
const x = d.type === "subtitles" && d.subtitleTrack ? `sub:${d.subtitleTrack.id}` : `cc:${d.track}`;
|
|
246
|
+
this.callbacks.onCues(x, d.cues);
|
|
247
|
+
}), r.attachMedia(this.video), r.loadSource(t);
|
|
248
|
+
}
|
|
249
|
+
buildHlsConfig(t) {
|
|
250
|
+
var s;
|
|
251
|
+
const e = this.hlsOptions.config ?? {}, i = {
|
|
252
|
+
enableWorker: !0,
|
|
253
|
+
renderTextTracksNatively: !1,
|
|
254
|
+
liveDurationInfinity: !0,
|
|
255
|
+
...(s = this.qualityLimit) != null && s.fitPlayer ? { capLevelToPlayerSize: !0 } : {},
|
|
256
|
+
...this.cmcd ? { cmcd: { sessionId: this.sid, contentId: this.cmcd.contentId, useHeaders: this.cmcd.mode === "header" } } : {},
|
|
257
|
+
...e,
|
|
258
|
+
...t
|
|
259
|
+
};
|
|
260
|
+
if (this.hlsOptions.withCredentials) {
|
|
261
|
+
const { xhrSetup: r, fetchSetup: o } = e;
|
|
262
|
+
i.xhrSetup = (l, h, c) => (l.withCredentials = !0, r == null ? void 0 : r(l, h, c)), i.fetchSetup = (l, h) => {
|
|
263
|
+
const c = { ...h, credentials: "include" };
|
|
264
|
+
return o ? o(l, c) : new Request(l.url, c);
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
return i;
|
|
268
|
+
}
|
|
269
|
+
/** Son kaynağı baştan yükler — hls.js ile oynayan kaynakta da çalışır (çıplak video.load() blob'u yeniden açamaz). */
|
|
270
|
+
/** Son `load()` edilen kaynak (playlist/dublaj gibi eklentilerin yüklediği dahil). */
|
|
271
|
+
get currentSrc() {
|
|
272
|
+
var t;
|
|
273
|
+
return ((t = this.last) == null ? void 0 : t.src) ?? null;
|
|
274
|
+
}
|
|
275
|
+
reload() {
|
|
276
|
+
return this.last ? this.load(this.last.src, this.last.type) : Promise.resolve();
|
|
277
|
+
}
|
|
278
|
+
/** ABR'nin çıkabileceği en yüksek seviye (kalite kilidi); -1 = sınır yok. */
|
|
279
|
+
setMaxLevel(t) {
|
|
280
|
+
var e;
|
|
281
|
+
(e = this.dash) == null || e.setMaxLevel(t), this.hls && this.hls.autoLevelCapping !== t && (this.hls.autoLevelCapping = t);
|
|
282
|
+
}
|
|
283
|
+
/** -1 = otomatik kalite (ABR). */
|
|
284
|
+
setLevel(t) {
|
|
285
|
+
var e;
|
|
286
|
+
(e = this.dash) == null || e.setLevel(t), this.hls && (this.hls.currentLevel = t);
|
|
287
|
+
}
|
|
288
|
+
setAudioTrack(t) {
|
|
289
|
+
if (this.dash) {
|
|
290
|
+
this.dash.setAudioTrack(t);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (this.hls) {
|
|
294
|
+
this.hls.audioTrack = t;
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
const e = this.video.audioTracks;
|
|
298
|
+
e && (e[t] && (e[t].enabled = !0), Array.from(e).forEach((i, s) => {
|
|
299
|
+
s !== t && (i.enabled = !1);
|
|
300
|
+
}));
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Yayın altyazısı seçildi (null = yayın altyazısı yok). hls.js manifest altyazısının segmentlerini yalnızca
|
|
304
|
+
* seçili `subtitleTrack` için indirir; CEA-608 cue'ları zaten video segmentlerinden sürekli gelir.
|
|
305
|
+
*/
|
|
306
|
+
selectTextTrack(t) {
|
|
307
|
+
if (this.dash) {
|
|
308
|
+
this.dash.selectText(t);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
if (!this.hls) return;
|
|
312
|
+
const e = t != null && t.startsWith("sub:") ? Number(t.slice(4)) : NaN;
|
|
313
|
+
this.hls.subtitleTrack = Number.isNaN(e) ? -1 : this.hls.subtitleTracks.findIndex((i) => i.id === e);
|
|
314
|
+
}
|
|
315
|
+
destroy() {
|
|
316
|
+
var t, e, i, s;
|
|
317
|
+
(t = this.nativeHlsProbe) == null || t.call(this), (e = this.nativeAudioCleanup) == null || e.call(this), this.hls && (this.hls.destroy(), this.hls = null), (i = this.dash) == null || i.destroy(), this.dash = null, (s = this.nativeEme) == null || s.destroy(), this.nativeEme = null;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
const Y = {
|
|
321
|
+
mp4: "video/mp4",
|
|
322
|
+
m4v: "video/mp4",
|
|
323
|
+
webm: "video/webm",
|
|
324
|
+
ogv: "video/ogg",
|
|
325
|
+
ogg: "video/ogg",
|
|
326
|
+
mov: "video/quicktime",
|
|
327
|
+
mp3: "audio/mpeg",
|
|
328
|
+
m4a: "audio/mp4",
|
|
329
|
+
aac: "audio/aac",
|
|
330
|
+
wav: "audio/wav",
|
|
331
|
+
flac: "audio/flac"
|
|
332
|
+
};
|
|
333
|
+
function He(n) {
|
|
334
|
+
var s, r;
|
|
335
|
+
const t = De(n.src, n.type);
|
|
336
|
+
if (t !== "unknown") return t;
|
|
337
|
+
const e = (r = (s = n.type) == null ? void 0 : s.split(";")[0]) == null ? void 0 : r.trim().toLowerCase();
|
|
338
|
+
if (e) {
|
|
339
|
+
const o = Object.keys(Y).find((l) => Y[l] === e);
|
|
340
|
+
if (o) return o;
|
|
341
|
+
}
|
|
342
|
+
const i = /\.([a-z0-9]{2,5})(?:$|[?#])/i.exec(n.src);
|
|
343
|
+
return i ? i[1].toLowerCase() : "other";
|
|
344
|
+
}
|
|
345
|
+
function tt(n, t) {
|
|
346
|
+
const e = [];
|
|
347
|
+
for (const s of n) {
|
|
348
|
+
const r = He(s), o = e.find((l) => l.format === r);
|
|
349
|
+
o ? o.sources.push(s) : e.push({ format: r, sources: [s] });
|
|
350
|
+
}
|
|
351
|
+
if (!(t != null && t.length)) return e;
|
|
352
|
+
const i = (s) => {
|
|
353
|
+
const r = t.findIndex((o) => o.toLowerCase() === s);
|
|
354
|
+
return r === -1 ? t.length : r;
|
|
355
|
+
};
|
|
356
|
+
return e.sort((s, r) => i(s.format) - i(r.format));
|
|
357
|
+
}
|
|
358
|
+
function it(n, t) {
|
|
359
|
+
var i;
|
|
360
|
+
if (n.format === "dash") {
|
|
361
|
+
const s = window;
|
|
362
|
+
return typeof s.MediaSource > "u" && typeof s.ManagedMediaSource > "u";
|
|
363
|
+
}
|
|
364
|
+
if (n.format === "hls") {
|
|
365
|
+
const s = window;
|
|
366
|
+
return !(typeof s.MediaSource < "u" || typeof s.ManagedMediaSource < "u") && t.canPlayType("application/vnd.apple.mpegurl") === "";
|
|
367
|
+
}
|
|
368
|
+
const e = ((i = n.sources.find((s) => s.type)) == null ? void 0 : i.type) ?? Y[n.format];
|
|
369
|
+
return !!e && t.canPlayType(e) === "";
|
|
370
|
+
}
|
|
371
|
+
function R(n) {
|
|
372
|
+
if (!Number.isFinite(n) || n < 0) return "0:00";
|
|
373
|
+
const t = Math.floor(n), e = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60), s = t % 60, r = e > 0 ? String(i).padStart(2, "0") : String(i), o = String(s).padStart(2, "0");
|
|
374
|
+
return e > 0 ? `${e}:${r}:${o}` : `${r}:${o}`;
|
|
375
|
+
}
|
|
376
|
+
const ge = 0.05;
|
|
377
|
+
function _(n, t) {
|
|
378
|
+
const e = n.duration;
|
|
379
|
+
return !Number.isFinite(e) || e <= ge * 2 ? t : Math.min(t, e - ge);
|
|
380
|
+
}
|
|
381
|
+
function qe(n, t) {
|
|
382
|
+
const e = n.seekable.length ? n.seekable.start(0) : 0, i = Number.isFinite(n.duration) ? n.duration : n.seekable.length ? n.seekable.end(n.seekable.length - 1) : n.currentTime;
|
|
383
|
+
n.currentTime = _(n, Math.max(e, Math.min(i, n.currentTime + t)));
|
|
384
|
+
}
|
|
385
|
+
const st = 10, rt = 1, Ve = 15;
|
|
386
|
+
class at {
|
|
387
|
+
constructor(t, e) {
|
|
388
|
+
a(this, "el");
|
|
389
|
+
a(this, "trackEl");
|
|
390
|
+
a(this, "chaptersEl", null);
|
|
391
|
+
a(this, "chapters", []);
|
|
392
|
+
/** İmlecin üstündeki zaman (varsayılan, plugin gerektirmez) — kendi zamanını gösteren plugin'ler `suppressHoverTime` ile gizler. */
|
|
393
|
+
a(this, "hoverTimeEl");
|
|
394
|
+
a(this, "hoverTimeSuppressors", /* @__PURE__ */ new Set());
|
|
395
|
+
a(this, "playedEl");
|
|
396
|
+
a(this, "bufferedEl");
|
|
397
|
+
a(this, "thumbEl");
|
|
398
|
+
a(this, "hoverDotEl");
|
|
399
|
+
a(this, "video");
|
|
400
|
+
a(this, "labels");
|
|
401
|
+
a(this, "dragging", !1);
|
|
402
|
+
a(this, "markerEls", []);
|
|
403
|
+
a(this, "trackWidth", 0);
|
|
404
|
+
a(this, "resizeObserver");
|
|
405
|
+
a(this, "rafId", null);
|
|
406
|
+
/** Canlıda hover zamanını başka bir bileşen gösteriyor mu (live-wall-clock tooltip'i) — üst üste binmesin. */
|
|
407
|
+
a(this, "liveHoverHandled", !1);
|
|
408
|
+
/**
|
|
409
|
+
* Canlıda oynatıcının hedef konumu (hls.js `liveSyncPosition` — yayını bilerek uçtan ~3 segment geride oynatır).
|
|
410
|
+
* Seek bar'ın sağ ucu burasıdır; verilmezse seekable sonu.
|
|
411
|
+
*/
|
|
412
|
+
a(this, "liveTarget", null);
|
|
413
|
+
a(this, "onHoverMove", (t) => {
|
|
414
|
+
const e = this.timeline(), i = this.ratioAtClientX(t.clientX);
|
|
415
|
+
if (e && !this.dragging ? (this.hoverDotEl.style.transform = `translate(${this.xAtRatio(i)}px, -50%) translateX(-50%)`, this.hoverDotEl.setAttribute("data-visible", "")) : this.hoverDotEl.removeAttribute("data-visible"), this.hoverTimeSuppressors.size || !e || e.live && this.liveHoverHandled) {
|
|
416
|
+
this.hoverTimeEl.removeAttribute("data-visible");
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
const s = this.markerAt(t.clientX), r = s ? Number(s.dataset.ratio) : i, o = e.start + r * (e.end - e.start), l = e.live ? `-${R(e.end - o)}` : R(o), h = (s == null ? void 0 : s.dataset.label) ?? null;
|
|
420
|
+
if (h) {
|
|
421
|
+
const v = document.createElement("span");
|
|
422
|
+
v.className = "hp-seek-time-label", v.textContent = h, this.hoverTimeEl.replaceChildren(v, ` · ${l}`);
|
|
423
|
+
} else
|
|
424
|
+
this.hoverTimeEl.textContent = l;
|
|
425
|
+
this.hoverTimeEl.setAttribute("data-visible", "");
|
|
426
|
+
const c = this.hoverTimeEl.offsetWidth, f = Math.min(Math.max(this.layoutXAtClientX(t.clientX) - c / 2, 0), Math.max(this.trackWidth - c, 0));
|
|
427
|
+
this.hoverTimeEl.style.transform = `translateX(${f}px)`;
|
|
428
|
+
});
|
|
429
|
+
a(this, "onHoverLeave", () => {
|
|
430
|
+
for (const t of this.markerEls) t.removeAttribute("data-hover");
|
|
431
|
+
this.hoverTimeEl.removeAttribute("data-visible"), this.hoverDotEl.removeAttribute("data-visible");
|
|
432
|
+
});
|
|
433
|
+
a(this, "onPointerDown", (t) => {
|
|
434
|
+
this.dragging = !0, this.hoverDotEl.removeAttribute("data-visible"), this.el.setPointerCapture(t.pointerId), this.seekToRatio(this.ratioFromEvent(t)), this.el.addEventListener("pointermove", this.onPointerMove), this.el.addEventListener("pointerup", this.onPointerUp);
|
|
435
|
+
});
|
|
436
|
+
a(this, "onPointerMove", (t) => {
|
|
437
|
+
this.dragging && this.seekToRatio(this.ratioFromEvent(t));
|
|
438
|
+
});
|
|
439
|
+
a(this, "onPointerUp", (t) => {
|
|
440
|
+
this.dragging = !1, this.el.releasePointerCapture(t.pointerId), this.el.removeEventListener("pointermove", this.onPointerMove), this.el.removeEventListener("pointerup", this.onPointerUp);
|
|
441
|
+
});
|
|
442
|
+
/** Odaktayken ←/→ sarma süresi (sn) — player'ın klavye kısayoluyla aynı (options.keyboardSeekStep). */
|
|
443
|
+
a(this, "keyboardStep", 5);
|
|
444
|
+
/** Odaktayken ok tuşuyla sarıldığında (sn, negatif = geri) — sarma bildirimi için. */
|
|
445
|
+
a(this, "onKeyboardSeek", null);
|
|
446
|
+
a(this, "onKeyDown", (t) => {
|
|
447
|
+
var i, s;
|
|
448
|
+
const e = this.timeline();
|
|
449
|
+
e && (t.key === "ArrowRight" ? (this.video.currentTime = _(this.video, Math.min(e.end, this.video.currentTime + this.keyboardStep)), (i = this.onKeyboardSeek) == null || i.call(this, this.keyboardStep), t.preventDefault()) : t.key === "ArrowLeft" && (this.video.currentTime = Math.max(e.start, this.video.currentTime - this.keyboardStep), (s = this.onKeyboardSeek) == null || s.call(this, -this.keyboardStep), t.preventDefault()));
|
|
450
|
+
});
|
|
451
|
+
a(this, "startLoop", () => {
|
|
452
|
+
if (this.rafId !== null) return;
|
|
453
|
+
const t = () => {
|
|
454
|
+
this.render(), this.rafId = requestAnimationFrame(t);
|
|
455
|
+
};
|
|
456
|
+
this.rafId = requestAnimationFrame(t);
|
|
457
|
+
});
|
|
458
|
+
a(this, "stopLoop", () => {
|
|
459
|
+
this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.render();
|
|
460
|
+
});
|
|
461
|
+
a(this, "render", () => {
|
|
462
|
+
const t = this.timeline();
|
|
463
|
+
if (this.el.toggleAttribute("data-no-duration", !t), this.el.toggleAttribute("data-live", !!(t != null && t.live)), !t) {
|
|
464
|
+
this.hoverTimeEl.removeAttribute("data-visible"), this.hoverDotEl.removeAttribute("data-visible"), this.playedEl.style.transform = "scaleX(0)", this.thumbEl.style.translate = "-50% 0", this.bufferedEl.style.transform = "scaleX(0)";
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
const e = t.end - t.start, i = (l) => Math.min(1, Math.max(0, (l - t.start) / e)), s = t.live && this.atLiveEdge(t) ? 1 : i(this.video.currentTime);
|
|
468
|
+
this.thumbEl.style.translate = `calc(${this.xAtRatio(s)}px - 50%) 0`;
|
|
469
|
+
let r = 0;
|
|
470
|
+
for (let l = 0; l < this.video.buffered.length; l++)
|
|
471
|
+
this.video.buffered.start(l) <= this.video.currentTime && (r = Math.max(r, this.video.buffered.end(l)));
|
|
472
|
+
const o = i(r);
|
|
473
|
+
if (this.chapters.length)
|
|
474
|
+
for (const l of this.chapters) {
|
|
475
|
+
const h = l.end - l.start, c = (f) => h > 0 ? Math.min(1, Math.max(0, (f - l.start) / h)) : 0;
|
|
476
|
+
l.playedEl.style.transform = `scaleX(${c(s)})`, l.bufferedEl.style.transform = `scaleX(${c(o)})`;
|
|
477
|
+
}
|
|
478
|
+
else
|
|
479
|
+
this.playedEl.style.transform = `scaleX(${s})`, this.bufferedEl.style.transform = `scaleX(${o})`;
|
|
480
|
+
for (const l of this.markerEls) l.toggleAttribute("data-passed", Number(l.dataset.ratio) <= s);
|
|
481
|
+
this.el.setAttribute("aria-valuemin", String(Math.floor(t.start))), this.el.setAttribute("aria-valuemax", String(Math.floor(t.end))), this.el.setAttribute("aria-valuenow", String(Math.floor(this.video.currentTime)));
|
|
482
|
+
});
|
|
483
|
+
this.video = t, this.labels = e, this.el = document.createElement("div"), this.el.setAttribute("part", "seek-bar"), this.el.className = "hp-seekbar hp:relative hp:h-[var(--hp-seek-hit-h)] hp:flex hp:items-center hp:cursor-pointer hp:group hp:touch-none", this.el.setAttribute("role", "slider"), this.el.setAttribute("tabindex", "0"), this.el.setAttribute("aria-label", e.seekBar), this.el.setAttribute("aria-valuemin", "0"), this.el.setAttribute("aria-valuemax", "0"), this.el.setAttribute("aria-valuenow", "0");
|
|
484
|
+
const i = document.createElement("div");
|
|
485
|
+
i.className = "hp:absolute hp:inset-x-0 hp:h-[var(--hp-seek-track-h)] hp:rounded-full hp:bg-on-surface/25 hp:group-hover:h-[var(--hp-seek-track-h-hover)] hp:transition-[height] hp:duration-150", this.el.appendChild(i), this.trackEl = i, this.bufferedEl = document.createElement("div"), this.bufferedEl.className = "hp:absolute hp:inset-0 hp:rounded-full hp:bg-on-surface/40", this.bufferedEl.style.transformOrigin = "left", this.bufferedEl.style.willChange = "transform", i.appendChild(this.bufferedEl), this.playedEl = document.createElement("div"), this.playedEl.className = "hp:absolute hp:inset-0 hp:rounded-full hp:bg-accent", this.playedEl.style.transformOrigin = "left", this.playedEl.style.willChange = "transform", i.appendChild(this.playedEl), this.thumbEl = document.createElement("div"), this.thumbEl.className = "hp-seek-thumb", this.thumbEl.setAttribute("part", "seek-thumb"), this.el.appendChild(this.thumbEl), this.hoverDotEl = document.createElement("div"), this.hoverDotEl.className = "hp-seek-hover-dot", this.hoverDotEl.setAttribute("part", "seek-hover-dot"), this.el.appendChild(this.hoverDotEl), this.hoverTimeEl = document.createElement("div"), this.hoverTimeEl.className = "hp-seek-time", this.hoverTimeEl.setAttribute("part", "seek-time"), this.el.appendChild(this.hoverTimeEl), this.el.addEventListener("pointerdown", this.onPointerDown), this.el.addEventListener("pointermove", this.onHoverMove), this.el.addEventListener("pointerleave", this.onHoverLeave), this.el.addEventListener("keydown", this.onKeyDown), t.addEventListener("play", this.startLoop), t.addEventListener("pause", this.stopLoop), t.addEventListener("ended", this.stopLoop), t.addEventListener("timeupdate", this.render), t.addEventListener("progress", this.render), t.addEventListener("loadedmetadata", this.render), t.paused || this.startLoop(), this.resizeObserver = new ResizeObserver(() => {
|
|
486
|
+
this.trackWidth = this.layoutWidth(), this.measureChapters(), this.render();
|
|
487
|
+
}), this.resizeObserver.observe(this.el), this.trackWidth = this.layoutWidth();
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Seek bar'ın temsil ettiği zaman aralığı: VOD'da 0 → süre; canlıda (duration Infinity) yayının izin verdiği
|
|
491
|
+
* geri sarma penceresi (seekable başı → canlı hedef konum). Pencere çok kısaysa (DVR yok) ya da süre bilinmiyorsa null.
|
|
492
|
+
*/
|
|
493
|
+
timeline() {
|
|
494
|
+
var l;
|
|
495
|
+
const t = this.video.duration;
|
|
496
|
+
if (Number.isFinite(t) && t > 0) return { start: 0, end: t, live: !1 };
|
|
497
|
+
if (t !== 1 / 0) return null;
|
|
498
|
+
const { seekable: e } = this.video;
|
|
499
|
+
if (!e.length) return null;
|
|
500
|
+
const i = e.start(0), s = e.end(e.length - 1), r = (l = this.liveTarget) == null ? void 0 : l.call(this), o = r != null && r > i && r <= s ? r : s;
|
|
501
|
+
return o - i >= st ? { start: i, end: o, live: !0 } : null;
|
|
502
|
+
}
|
|
503
|
+
/** Canlıda izleyici canlı konumda mı — kontrol çubuğundaki "● CANLI" rozetiyle aynı ölçü. */
|
|
504
|
+
atLiveEdge(t) {
|
|
505
|
+
return t.end - this.video.currentTime <= Ve;
|
|
506
|
+
}
|
|
507
|
+
/** Kendi zamanını gösteren plugin'ler (sprite/segments) varsayılan hover zamanını gizler — keyed set. */
|
|
508
|
+
suppressHoverTime(t, e) {
|
|
509
|
+
e ? this.hoverTimeSuppressors.add(t) : this.hoverTimeSuppressors.delete(t), e && this.hoverTimeEl.removeAttribute("data-visible");
|
|
510
|
+
}
|
|
511
|
+
ratioFromEvent(t) {
|
|
512
|
+
return this.ratioAtClientX(t.clientX);
|
|
513
|
+
}
|
|
514
|
+
/** Ekran x koordinatını 0–1 zaman oranına çevirir — chapter modunda parça boşluklarını hesaba katar (segments plugin'inin hover popup'ı da bunu kullanıyor). */
|
|
515
|
+
ratioAtClientX(t) {
|
|
516
|
+
const e = this.layoutXAtClientX(t);
|
|
517
|
+
if (!this.chapters.length) return this.trackWidth > 0 ? Math.min(1, Math.max(0, e / this.trackWidth)) : 0;
|
|
518
|
+
for (let i = 0; i < this.chapters.length; i++) {
|
|
519
|
+
const s = this.chapters[i], r = this.chapters[i + 1], o = r ? r.left : 1 / 0;
|
|
520
|
+
if (e < o || !r) {
|
|
521
|
+
const l = s.width > 0 ? Math.min(1, Math.max(0, (e - s.left) / s.width)) : 0;
|
|
522
|
+
return s.start + l * (s.end - s.start);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
return 1;
|
|
526
|
+
}
|
|
527
|
+
/** 0–1 zaman oranının seek bar üzerindeki px konumu (thumb için). */
|
|
528
|
+
xAtRatio(t) {
|
|
529
|
+
if (!this.chapters.length) return t * this.trackWidth;
|
|
530
|
+
const e = this.chapters.find((r) => t < r.end) ?? this.chapters[this.chapters.length - 1], i = e.end - e.start, s = i > 0 ? Math.min(1, Math.max(0, (t - e.start) / i)) : 0;
|
|
531
|
+
return e.left + s * e.width;
|
|
532
|
+
}
|
|
533
|
+
/** Track'i sıralı, 0→1'i kesintisiz kapsayan oran aralıklarına göre ayrı parçalara böler. */
|
|
534
|
+
setChapters(t) {
|
|
535
|
+
if (this.clearChapters(), !t.length) return [];
|
|
536
|
+
const e = document.createElement("div");
|
|
537
|
+
return e.className = "hp-chapters", this.chapters = t.map((i) => {
|
|
538
|
+
const s = document.createElement("div");
|
|
539
|
+
s.className = "hp-chapter", s.setAttribute("part", "segment-band"), s.style.flex = `${Math.max(i.end - i.start, 0)} 1 0px`;
|
|
540
|
+
const r = document.createElement("div");
|
|
541
|
+
r.className = "hp-chapter-fill hp-chapter-buffered";
|
|
542
|
+
const o = document.createElement("div");
|
|
543
|
+
return o.className = "hp-chapter-fill hp-chapter-played", i.color && (o.style.background = i.color), s.append(r, o), e.appendChild(s), { ...i, el: s, bufferedEl: r, playedEl: o, left: 0, width: 0 };
|
|
544
|
+
}), this.trackEl.style.display = "none", this.trackEl.after(e), this.chaptersEl = e, this.measureChapters(), this.render(), this.chapters.map((i) => i.el);
|
|
545
|
+
}
|
|
546
|
+
clearChapters() {
|
|
547
|
+
var t;
|
|
548
|
+
(t = this.chaptersEl) == null || t.remove(), this.chaptersEl = null, this.chapters = [], this.trackEl.style.display = "", this.render();
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Seek bar'ın DÜZEN genişliği (px). getBoundingClientRect() ata elementlerin CSS transform'undan etkilenir: player
|
|
552
|
+
* ölçekli bir giriş animasyonuyla (ör. scale(0.985)) gösterilirken ölçülürse genişlik küçük kalıyor, animasyon
|
|
553
|
+
* bitince düzen boyutu değişmediği için ResizeObserver tekrar tetiklenmiyor ve thumb dolu kısmın gerisinde kalıyordu.
|
|
554
|
+
*/
|
|
555
|
+
/** Ekran x koordinatının seek bar içindeki DÜZEN px'i (ata transform'u ölçekliyorsa ona göre düzeltilmiş). */
|
|
556
|
+
layoutXAtClientX(t) {
|
|
557
|
+
const e = this.el.getBoundingClientRect();
|
|
558
|
+
return e.width > 0 ? (t - e.left) * this.trackWidth / e.width : 0;
|
|
559
|
+
}
|
|
560
|
+
layoutWidth() {
|
|
561
|
+
return parseFloat(getComputedStyle(this.el).width) || this.el.offsetWidth;
|
|
562
|
+
}
|
|
563
|
+
measureChapters() {
|
|
564
|
+
if (!this.chapters.length) return;
|
|
565
|
+
const t = this.el.getBoundingClientRect(), e = t.width > 0 ? this.trackWidth / t.width : 1;
|
|
566
|
+
for (const i of this.chapters) {
|
|
567
|
+
const s = i.el.getBoundingClientRect();
|
|
568
|
+
i.left = (s.left - t.left) * e, i.width = s.width * e;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
seekToRatio(t) {
|
|
572
|
+
const e = this.timeline();
|
|
573
|
+
if (!e) return;
|
|
574
|
+
const i = e.start + t * (e.end - e.start);
|
|
575
|
+
this.video.currentTime = e.live ? Math.min(i, e.end - rt) : _(this.video, i), this.render();
|
|
576
|
+
}
|
|
577
|
+
/** 0–1 arası oranda, çizginin ortasına bir işaret noktası ekler (markers, etkileşimli öğeler, A-B döngü). */
|
|
578
|
+
addMarker(t, e = "", i) {
|
|
579
|
+
const s = Math.min(1, Math.max(0, t)), r = document.createElement("div");
|
|
580
|
+
return r.className = `hp-seek-marker ${e}`.trim(), r.setAttribute("part", "seek-marker"), r.dataset.ratio = String(s), i && (r.dataset.label = i), r.style.left = `${s * 100}%`, this.el.appendChild(r), this.markerEls.push(r), this.render(), r;
|
|
581
|
+
}
|
|
582
|
+
/** İmlecin yakınındaki (±8 px) etiketli işaretin metni — önizleme balonları "Etiket · 0:42" gösterir. */
|
|
583
|
+
markerLabelAt(t) {
|
|
584
|
+
var e;
|
|
585
|
+
return ((e = this.markerAt(t)) == null ? void 0 : e.dataset.label) ?? null;
|
|
586
|
+
}
|
|
587
|
+
markerAt(t) {
|
|
588
|
+
const e = this.layoutXAtClientX(t);
|
|
589
|
+
let i = null, s = 8;
|
|
590
|
+
for (const r of this.markerEls) {
|
|
591
|
+
if (!r.dataset.label || !r.isConnected) continue;
|
|
592
|
+
const o = Math.abs(this.xAtRatio(Number(r.dataset.ratio)) - e);
|
|
593
|
+
o <= s && (i = r, s = o);
|
|
594
|
+
}
|
|
595
|
+
for (const r of this.markerEls) r.toggleAttribute("data-hover", r === i);
|
|
596
|
+
return i;
|
|
597
|
+
}
|
|
598
|
+
clearMarkers() {
|
|
599
|
+
this.markerEls.forEach((t) => t.remove()), this.markerEls.length = 0;
|
|
600
|
+
}
|
|
601
|
+
refreshLabels() {
|
|
602
|
+
this.el.setAttribute("aria-label", this.labels.seekBar);
|
|
603
|
+
}
|
|
604
|
+
destroy() {
|
|
605
|
+
var t;
|
|
606
|
+
this.rafId !== null && cancelAnimationFrame(this.rafId), this.resizeObserver.disconnect(), this.el.removeEventListener("pointermove", this.onHoverMove), this.el.removeEventListener("pointerleave", this.onHoverLeave), this.video.removeEventListener("play", this.startLoop), this.video.removeEventListener("pause", this.stopLoop), this.video.removeEventListener("ended", this.stopLoop), this.video.removeEventListener("timeupdate", this.render), this.video.removeEventListener("progress", this.render), this.video.removeEventListener("loadedmetadata", this.render), this.clearMarkers(), (t = this.chaptersEl) == null || t.remove();
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
function z(n, t = "") {
|
|
610
|
+
const e = document.createElement("i");
|
|
611
|
+
return e.className = `hp-icon hp-icon-${n}${t ? ` ${t}` : ""}`, e.setAttribute("aria-hidden", "true"), e;
|
|
612
|
+
}
|
|
613
|
+
function F(n, t) {
|
|
614
|
+
n.className = n.className.replace(/hp-icon-[\w-]+/, `hp-icon-${t}`);
|
|
615
|
+
}
|
|
616
|
+
const H = 0.05, ot = 150;
|
|
617
|
+
class nt {
|
|
618
|
+
constructor(t, e, i) {
|
|
619
|
+
a(this, "el");
|
|
620
|
+
/** Dokunmatikte ses butonu gizli; sessiz oynarken görünen "Sesi aç" rozeti (chrome dışında monte edilir, otomatik gizlenmez). */
|
|
621
|
+
a(this, "unmuteBadge");
|
|
622
|
+
a(this, "unmuteText");
|
|
623
|
+
a(this, "button");
|
|
624
|
+
a(this, "iconEl");
|
|
625
|
+
a(this, "slider");
|
|
626
|
+
a(this, "sliderFill");
|
|
627
|
+
a(this, "video");
|
|
628
|
+
a(this, "labels");
|
|
629
|
+
a(this, "adHooks");
|
|
630
|
+
a(this, "dragging", !1);
|
|
631
|
+
a(this, "hideTimer", null);
|
|
632
|
+
a(this, "openNow", () => {
|
|
633
|
+
this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.slider.style.opacity = "1", this.slider.style.pointerEvents = "auto";
|
|
634
|
+
});
|
|
635
|
+
a(this, "scheduleHide", () => {
|
|
636
|
+
this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => {
|
|
637
|
+
this.hideTimer = null, this.slider.style.opacity = "0", this.slider.style.pointerEvents = "none";
|
|
638
|
+
}, ot);
|
|
639
|
+
});
|
|
640
|
+
a(this, "onWheel", (t) => {
|
|
641
|
+
if (t.preventDefault(), this.adHooks.isAdActive()) {
|
|
642
|
+
const s = this.adHooks.getVolume();
|
|
643
|
+
this.adHooks.setVolume(Math.min(1, Math.max(0, s + (t.deltaY < 0 ? H : -H)))), this.render();
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
const e = this.video.muted ? 0 : this.video.volume, i = Math.min(1, Math.max(0, e + (t.deltaY < 0 ? H : -H)));
|
|
647
|
+
this.video.volume = i, this.video.muted = i === 0;
|
|
648
|
+
});
|
|
649
|
+
a(this, "onToggleMute", () => {
|
|
650
|
+
if (this.adHooks.isAdActive()) {
|
|
651
|
+
this.adHooks.toggleMute(), this.render();
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
654
|
+
this.video.muted = !this.video.muted, !this.video.muted && this.video.volume === 0 && (this.video.volume = 0.5);
|
|
655
|
+
});
|
|
656
|
+
a(this, "onSliderPointerDown", (t) => {
|
|
657
|
+
this.dragging = !0, this.slider.setPointerCapture(t.pointerId), this.setFromClientY(t.clientY), this.slider.addEventListener("pointermove", this.onSliderPointerMove), this.slider.addEventListener("pointerup", this.onSliderPointerUp);
|
|
658
|
+
});
|
|
659
|
+
a(this, "onSliderPointerMove", (t) => {
|
|
660
|
+
this.dragging && this.setFromClientY(t.clientY);
|
|
661
|
+
});
|
|
662
|
+
a(this, "onSliderPointerUp", (t) => {
|
|
663
|
+
this.dragging = !1, this.slider.releasePointerCapture(t.pointerId), this.slider.removeEventListener("pointermove", this.onSliderPointerMove), this.slider.removeEventListener("pointerup", this.onSliderPointerUp);
|
|
664
|
+
});
|
|
665
|
+
a(this, "onSliderKeyDown", (t) => {
|
|
666
|
+
if (this.adHooks.isAdActive()) {
|
|
667
|
+
if (t.key === "ArrowUp")
|
|
668
|
+
this.adHooks.setVolume(Math.min(1, this.adHooks.getVolume() + 0.1)), t.preventDefault();
|
|
669
|
+
else if (t.key === "ArrowDown")
|
|
670
|
+
this.adHooks.setVolume(Math.max(0, this.adHooks.getVolume() - 0.1)), t.preventDefault();
|
|
671
|
+
else
|
|
672
|
+
return;
|
|
673
|
+
this.render();
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
676
|
+
t.key === "ArrowUp" ? (this.video.volume = Math.min(1, this.video.volume + 0.1), this.video.muted = !1, t.preventDefault()) : t.key === "ArrowDown" && (this.video.volume = Math.max(0, this.video.volume - 0.1), t.preventDefault());
|
|
677
|
+
});
|
|
678
|
+
a(this, "render", () => {
|
|
679
|
+
const t = this.adHooks.isAdActive() ? this.adHooks.getVolume() : this.video.muted ? 0 : this.video.volume;
|
|
680
|
+
this.sliderFill.style.height = `${t * 100}%`, this.slider.setAttribute("aria-valuenow", String(Math.round(t * 100)));
|
|
681
|
+
const e = t === 0 ? this.labels.unmute : this.labels.mute;
|
|
682
|
+
this.button.setAttribute("aria-label", e);
|
|
683
|
+
const i = this.adHooks.isAdActive() || !this.video.paused;
|
|
684
|
+
this.unmuteBadge.toggleAttribute("data-visible", t === 0 && i), this.unmuteText.textContent = this.labels.unmute, t === 0 ? F(this.iconEl, "volume-muted") : t < 0.5 ? F(this.iconEl, "volume-low") : F(this.iconEl, "volume-high");
|
|
685
|
+
});
|
|
686
|
+
this.video = t, this.labels = e, this.adHooks = i, this.el = document.createElement("div"), this.el.className = "hp-volume hp:relative hp:flex hp:items-center", this.unmuteBadge = document.createElement("button"), this.unmuteBadge.type = "button", this.unmuteBadge.className = "hp-unmute-badge", this.unmuteBadge.setAttribute("part", "unmute-badge"), this.unmuteBadge.appendChild(z("volume-muted", "hp:text-base")), this.unmuteText = document.createElement("span"), this.unmuteText.textContent = e.unmute, this.unmuteBadge.appendChild(this.unmuteText), this.unmuteBadge.addEventListener("pointerdown", (r) => r.stopPropagation()), this.unmuteBadge.addEventListener("click", (r) => {
|
|
687
|
+
r.stopPropagation(), this.unmute();
|
|
688
|
+
}), this.button = document.createElement("button"), this.button.type = "button", this.button.setAttribute("part", "volume-button"), this.button.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-[var(--hp-ctrl-btn-size)] hp:h-[var(--hp-ctrl-btn-size)] hp:cursor-pointer", this.button.setAttribute("aria-label", e.mute), this.button.dataset.shortcut = "M", this.iconEl = z("volume-high", "hp:text-[length:var(--hp-ctrl-icon-size)]"), this.button.appendChild(this.iconEl), this.el.appendChild(this.button), this.slider = document.createElement("div"), this.slider.setAttribute("part", "volume-slider"), this.slider.className = "hp-chip hp:absolute hp:bottom-full hp:left-1/2 hp-center-x hp:mb-2 hp:w-7 hp:h-20 hp:rounded-full hp:cursor-pointer hp:flex hp:items-end hp:justify-center hp:p-1.5 hp:pointer-events-none hp:transition-opacity hp:duration-150 hp:will-change-[opacity]", this.slider.style.opacity = "0", this.slider.style.borderRadius = "9999px", this.slider.setAttribute("role", "slider"), this.slider.setAttribute("tabindex", "0"), this.slider.setAttribute("aria-label", e.volume), this.slider.setAttribute("aria-orientation", "vertical"), this.slider.setAttribute("aria-valuemin", "0"), this.slider.setAttribute("aria-valuemax", "100");
|
|
689
|
+
const s = document.createElement("div");
|
|
690
|
+
s.className = "hp:relative hp:w-1.5 hp:h-full hp:rounded-full hp:bg-on-surface/25 hp:overflow-hidden", this.slider.appendChild(s), this.sliderFill = document.createElement("div"), this.sliderFill.className = "hp:absolute hp:inset-x-0 hp:bottom-0 hp:bg-accent", s.appendChild(this.sliderFill), this.el.appendChild(this.slider), this.button.addEventListener("click", this.onToggleMute), this.slider.addEventListener("pointerdown", this.onSliderPointerDown), this.slider.addEventListener("keydown", this.onSliderKeyDown), this.el.addEventListener("mouseenter", this.openNow), this.el.addEventListener("mouseleave", this.scheduleHide), this.el.addEventListener("focusin", this.openNow), this.el.addEventListener("focusout", this.scheduleHide), this.el.addEventListener("wheel", this.onWheel, { passive: !1 }), t.addEventListener("volumechange", this.render), t.addEventListener("play", this.render), t.addEventListener("pause", this.render), this.render();
|
|
691
|
+
}
|
|
692
|
+
/** "Sesi aç" rozeti: yalnızca AÇAR (toggle değil) — reklam sırasında reklamın sesini. */
|
|
693
|
+
unmute() {
|
|
694
|
+
if (this.adHooks.isAdActive()) {
|
|
695
|
+
this.adHooks.getVolume() === 0 && this.adHooks.toggleMute(), this.render();
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
this.video.muted = !1, this.video.volume === 0 && (this.video.volume = 0.5);
|
|
699
|
+
}
|
|
700
|
+
/** Dikey çubukta: üst = tam ses (1), alt = sessiz (0) — Y ekseni ters çevrilir. */
|
|
701
|
+
setFromClientY(t) {
|
|
702
|
+
const e = this.slider.getBoundingClientRect(), i = e.height > 0 ? 1 - Math.min(1, Math.max(0, (t - e.top) / e.height)) : 0;
|
|
703
|
+
if (this.adHooks.isAdActive()) {
|
|
704
|
+
this.adHooks.setVolume(i), this.render();
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
this.video.volume = i, this.video.muted = i === 0;
|
|
708
|
+
}
|
|
709
|
+
refreshLabels() {
|
|
710
|
+
this.slider.setAttribute("aria-label", this.labels.volume), this.render();
|
|
711
|
+
}
|
|
712
|
+
/** Reklam modu açılıp/kapanınca (`ControlBar.setAdMode`) görüntüyü hemen ad/içerik ses kaynağına göre tazeler — `volumechange` event'i beklemeden. */
|
|
713
|
+
refreshForAdMode() {
|
|
714
|
+
this.render();
|
|
715
|
+
}
|
|
716
|
+
destroy() {
|
|
717
|
+
this.hideTimer && clearTimeout(this.hideTimer), this.el.removeEventListener("mouseenter", this.openNow), this.el.removeEventListener("mouseleave", this.scheduleHide), this.el.removeEventListener("focusin", this.openNow), this.el.removeEventListener("focusout", this.scheduleHide), this.el.removeEventListener("wheel", this.onWheel), this.video.removeEventListener("volumechange", this.render), this.video.removeEventListener("play", this.render), this.video.removeEventListener("pause", this.render), this.unmuteBadge.remove();
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
const lt = '<svg class="hp-lock" viewBox="0 0 24 24" width="14" height="14" aria-hidden="true"><path fill="currentColor" d="M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5Zm-3 8V7a3 3 0 1 1 6 0v3H9Z"/></svg>', W = 8, I = 8, fe = 100, q = 256;
|
|
721
|
+
function ht(n) {
|
|
722
|
+
return n.replace(/[&<>"']/g, (t) => `&#${t.charCodeAt(0)};`);
|
|
723
|
+
}
|
|
724
|
+
function pt(n, t) {
|
|
725
|
+
if (!n || !t) return null;
|
|
726
|
+
const e = Math.min(n, t), i = Math.max(n, t);
|
|
727
|
+
return e >= 4e3 || i >= 7600 ? "8K" : e >= 2e3 || i >= 3800 ? "4K" : e >= 1400 || i >= 2500 ? "2K" : e >= 700 || i >= 1260 ? "HD" : String(ct.reduce((s, r) => Math.abs(r - e) < Math.abs(s - e) ? r : s));
|
|
728
|
+
}
|
|
729
|
+
const ct = [144, 240, 360, 480, 540, 576];
|
|
730
|
+
class dt {
|
|
731
|
+
constructor(t, e, i) {
|
|
732
|
+
a(this, "el");
|
|
733
|
+
a(this, "button");
|
|
734
|
+
a(this, "badge");
|
|
735
|
+
a(this, "quickSlot");
|
|
736
|
+
/** Paneli en son açan hızlı erişim butonu — aynı butona tekrar basınca kapatmak için. */
|
|
737
|
+
a(this, "quickOwner", null);
|
|
738
|
+
a(this, "quickObserver");
|
|
739
|
+
a(this, "badgeEnabled", !0);
|
|
740
|
+
a(this, "panel");
|
|
741
|
+
a(this, "video");
|
|
742
|
+
a(this, "playbackRates");
|
|
743
|
+
a(this, "labels");
|
|
744
|
+
a(this, "qualities", []);
|
|
745
|
+
a(this, "activeQualityLabel");
|
|
746
|
+
a(this, "captions", []);
|
|
747
|
+
a(this, "activeCaptionLabel");
|
|
748
|
+
a(this, "captionAppearance", null);
|
|
749
|
+
a(this, "qrResumeToggle", null);
|
|
750
|
+
a(this, "open", !1);
|
|
751
|
+
/** Menü açılıp kapanınca — HopePlayerElement açıkken kontrolleri otomatik gizlemez. */
|
|
752
|
+
a(this, "onOpenChange", null);
|
|
753
|
+
a(this, "panelObserver");
|
|
754
|
+
a(this, "currentPanel", "main");
|
|
755
|
+
a(this, "submenus", []);
|
|
756
|
+
/** Eklenti aç / kapa satırları. */
|
|
757
|
+
a(this, "toggles", /* @__PURE__ */ new Map());
|
|
758
|
+
/**
|
|
759
|
+
* Rozet gerçekten oynayan görüntüden okunur (`videoWidth` / `videoHeight`): menüde "Otomatik" seçiliyken de ABR'nin
|
|
760
|
+
* o an indirdiği kaliteyi gösterir; MP4, hls.js ve Safari'nin kendi HLS oynatıcısında aynı çalışır. Dikey videoda
|
|
761
|
+
* kısa kenar sayılır (1080×1920 → HD). Ses modu / görüntüsüz kaynakta rozet yok.
|
|
762
|
+
*/
|
|
763
|
+
a(this, "updateBadge", () => {
|
|
764
|
+
const t = this.badgeEnabled ? pt(this.video.videoWidth, this.video.videoHeight) : null;
|
|
765
|
+
this.badge.textContent = t ?? "", this.badge.hidden = !t, t ? this.badge.setAttribute("data-quality", t) : this.badge.removeAttribute("data-quality"), this.badge.toggleAttribute("data-low", !!t && /^\d+$/.test(t));
|
|
766
|
+
});
|
|
767
|
+
/**
|
|
768
|
+
* Yön + yükseklik player'a göre: kompakt düzende (buton üst bardaysa) aşağı açılır; her iki yönde de
|
|
769
|
+
* yükseklik player içinde kalan alanla sınırlı — küçük player'da menü dışarı taşmaz, kendi içinde kayar.
|
|
770
|
+
*/
|
|
771
|
+
a(this, "fitToPlayer", () => {
|
|
772
|
+
var h;
|
|
773
|
+
if (!this.open) return;
|
|
774
|
+
const t = this.el.closest(".video-area");
|
|
775
|
+
if (!t) return;
|
|
776
|
+
if ((h = this.el.getRootNode().host) != null && h.hasAttribute("data-audio-compact")) {
|
|
777
|
+
this.fitToViewport();
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
const e = t.getBoundingClientRect(), i = this.button.getBoundingClientRect(), s = this.el.getBoundingClientRect(), r = !!this.el.closest(".hp-top-bar");
|
|
781
|
+
this.panel.toggleAttribute("data-drop", r), Object.assign(this.panel.style, { top: "", bottom: "", marginTop: "", marginBottom: "" });
|
|
782
|
+
const o = this.panel.scrollHeight, l = (r ? e.bottom - i.bottom : i.top - e.top) - W - I;
|
|
783
|
+
if (o <= l || l >= fe) {
|
|
784
|
+
this.panel.style.maxHeight = `${Math.min(q, l)}px`;
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
this.panel.style.maxHeight = `${Math.min(q, e.height - 2 * I)}px`, r ? Object.assign(this.panel.style, { top: `${e.top + I - s.top}px`, marginTop: "0" }) : Object.assign(this.panel.style, { bottom: `${s.bottom - (e.bottom - I)}px`, marginBottom: "0" });
|
|
788
|
+
});
|
|
789
|
+
/** PiP penceresi gibi ek bir belgede de dışarı tıklayınca kapansın. */
|
|
790
|
+
a(this, "onDocumentClick", (t) => {
|
|
791
|
+
this.open && !t.composedPath().includes(this.el) && this.close();
|
|
792
|
+
});
|
|
793
|
+
/** İç içe alt menüde geri dönülecek üst menüler (en üstteki = açık olanın bir üstü). */
|
|
794
|
+
a(this, "submenuStack", []);
|
|
795
|
+
a(this, "backToCaptionSettings", () => {
|
|
796
|
+
this.currentPanel = "captions-settings", this.renderCaptionSettings();
|
|
797
|
+
});
|
|
798
|
+
this.video = t, this.playbackRates = e, this.labels = i, this.activeQualityLabel = i.autoQuality, this.activeCaptionLabel = i.captionsOff, this.el = document.createElement("div"), this.el.className = "hp:relative", this.button = document.createElement("button"), this.button.type = "button", this.button.setAttribute("aria-label", i.settings), this.button.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-[var(--hp-ctrl-btn-size)] hp:h-[var(--hp-ctrl-btn-size)] hp:cursor-pointer", this.button.appendChild(z("settings", "hp:text-[length:var(--hp-ctrl-icon-size)]")), this.badge = document.createElement("span"), this.badge.className = "hp-quality-badge", this.badge.setAttribute("part", "quality-badge"), this.badge.setAttribute("aria-hidden", "true"), this.badge.hidden = !0;
|
|
799
|
+
for (const r of ["resize", "loadedmetadata", "emptied"]) t.addEventListener(r, this.updateBadge);
|
|
800
|
+
this.panel = document.createElement("div"), this.panel.className = "hp-chip hp-chip-panel hp:hidden hp:absolute hp:bottom-full hp:right-0 hp:mb-2 hp:w-48 hp:max-h-64 hp:overflow-y-auto hp:text-sm hp:py-1", this.panelObserver = new MutationObserver(this.fitToPlayer), this.panelObserver.observe(this.panel, { childList: !0 });
|
|
801
|
+
const s = document.createElement("span");
|
|
802
|
+
s.className = "hp:relative hp:flex", s.appendChild(this.button), s.appendChild(this.badge), this.quickSlot = document.createElement("span"), this.quickSlot.className = "hp-quick-slot hp:flex hp:items-center hp:gap-1", this.quickSlot.hidden = !0, this.quickObserver = new MutationObserver(() => {
|
|
803
|
+
this.quickSlot.hidden = this.quickSlot.childElementCount === 0, this.quickOwner && !this.quickOwner.isConnected && (this.quickOwner = null);
|
|
804
|
+
}), this.quickObserver.observe(this.quickSlot, { childList: !0 }), this.el.className = "hp:relative hp:flex hp:items-center hp:gap-1", this.el.append(s, this.quickSlot, this.panel), this.button.addEventListener("click", (r) => {
|
|
805
|
+
r.stopPropagation(), this.toggle();
|
|
806
|
+
}), document.addEventListener("click", this.onDocumentClick, !0), this.renderMain();
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Ayarlar butonunun sağına hızlı erişim butonu ekler; `def` verilen alt menüyü doğrudan açar (aynı butona tekrar
|
|
810
|
+
* basınca kapanır). `parents`: alt menüdeki "geri" satırının döneceği üst menüler. Kaldırmak için `btn.remove()`.
|
|
811
|
+
*/
|
|
812
|
+
addQuickButton(t, e, i = () => []) {
|
|
813
|
+
t.addEventListener("click", (s) => {
|
|
814
|
+
s.stopPropagation();
|
|
815
|
+
const r = e();
|
|
816
|
+
if (this.open && this.currentPanel === `custom:${r.key}` && this.quickOwner === t) {
|
|
817
|
+
this.close();
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
this.openSubmenu(r, i()), this.quickOwner = t;
|
|
821
|
+
}), this.quickSlot.appendChild(t);
|
|
822
|
+
}
|
|
823
|
+
/** Menüyü doğrudan bir alt menüde açar (hızlı erişim butonları için). */
|
|
824
|
+
openSubmenu(t, e = []) {
|
|
825
|
+
var i;
|
|
826
|
+
this.open || (this.open = !0, this.panel.classList.remove("hp:hidden"), (i = this.onOpenChange) == null || i.call(this, !0)), this.currentPanel = `custom:${t.key}`, this.renderSubmenu(t, e), this.fitToPlayer();
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* `options.playbackRates` — menüdeki hızlar (sıralanır, tekrarlar atılır, geçersizler yok sayılır). Boş dizi: "Oynatma
|
|
830
|
+
* hızı" satırı kalkar. Liste o anki hızı içermiyorsa ve 1 (normal) listedeyse hız 1'e döner — menüde seçili satır
|
|
831
|
+
* olmayan bir hızda kalınmasın.
|
|
832
|
+
*/
|
|
833
|
+
setPlaybackRates(t) {
|
|
834
|
+
this.playbackRates = [...new Set(t.filter((e) => Number.isFinite(e) && e > 0 && e <= 16))].sort((e, i) => e - i), this.playbackRates.length && !this.playbackRates.includes(this.video.playbackRate) && this.playbackRates.includes(1) && (this.video.playbackRate = 1), this.open && (this.currentPanel === "main" || this.currentPanel === "speed") && this.renderMain();
|
|
835
|
+
}
|
|
836
|
+
/** `options.qualityBadge` — false ise rozet hiç gösterilmez. */
|
|
837
|
+
setQualityBadgeEnabled(t) {
|
|
838
|
+
this.badgeEnabled = t, this.updateBadge();
|
|
839
|
+
}
|
|
840
|
+
setQualities(t, e) {
|
|
841
|
+
this.qualities = t, this.activeQualityLabel = e, (this.currentPanel === "main" || this.currentPanel === "quality") && this.render();
|
|
842
|
+
}
|
|
843
|
+
setCaptions(t, e) {
|
|
844
|
+
this.captions = t, this.activeCaptionLabel = e, (this.currentPanel === "main" || this.currentPanel === "captions") && this.render();
|
|
845
|
+
}
|
|
846
|
+
/** Seçili altyazıyı dışarıdan günceller (ör. iOS native tam ekranda yapılan seçim) — seçenekler aynı kalır. */
|
|
847
|
+
setActiveCaption(t) {
|
|
848
|
+
this.activeCaptionLabel !== t && (this.activeCaptionLabel = t, (this.currentPanel === "main" || this.currentPanel === "captions") && this.render());
|
|
849
|
+
}
|
|
850
|
+
/** Altyazı AÇIKKEN "Altyazı" alt menüsüne eklenecek Boyut/Renk/Konum satırları — `null` kaldırır. */
|
|
851
|
+
setCaptionAppearance(t) {
|
|
852
|
+
this.captionAppearance = t, (this.currentPanel === "captions" || this.currentPanel === "captions-settings" || this.currentPanel === "captions-size" || this.currentPanel === "captions-bg" || this.currentPanel === "captions-text") && this.render();
|
|
853
|
+
}
|
|
854
|
+
/** Ana menüye tek aç/kapa satırı ekler (ör. QrResume). */
|
|
855
|
+
setQrResumeToggle(t) {
|
|
856
|
+
this.qrResumeToggle = t, this.currentPanel === "main" && this.renderMain();
|
|
857
|
+
}
|
|
858
|
+
/** Plugin'lerin (ör. dubbing) ana menüye kendi satır + alt menüsünü eklemesi için. */
|
|
859
|
+
registerSubmenu(t) {
|
|
860
|
+
this.submenus = this.submenus.filter((e) => e.key !== t.key), this.submenus.push(t), this.currentPanel === "main" && this.renderMain();
|
|
861
|
+
}
|
|
862
|
+
/** Aç / kapa satırı ekler (aynı anahtar yerine geçer). */
|
|
863
|
+
registerToggle(t, e) {
|
|
864
|
+
this.toggles.set(t, e), this.open && this.currentPanel === "main" && this.renderMain();
|
|
865
|
+
}
|
|
866
|
+
unregisterToggle(t) {
|
|
867
|
+
this.toggles.delete(t) && this.open && this.currentPanel === "main" && this.renderMain();
|
|
868
|
+
}
|
|
869
|
+
unregisterSubmenu(t) {
|
|
870
|
+
this.submenus = this.submenus.filter((e) => e.key !== t), this.currentPanel === "main" ? this.renderMain() : this.currentPanel === `custom:${t}` && this.renderMain();
|
|
871
|
+
}
|
|
872
|
+
toggle() {
|
|
873
|
+
this.open ? this.close() : this.openMenu();
|
|
874
|
+
}
|
|
875
|
+
openMenu() {
|
|
876
|
+
var t;
|
|
877
|
+
this.open = !0, this.currentPanel = "main", this.panel.classList.remove("hp:hidden"), this.renderMain(), this.fitToPlayer(), (t = this.onOpenChange) == null || t.call(this, !0);
|
|
878
|
+
}
|
|
879
|
+
get isOpen() {
|
|
880
|
+
return this.open;
|
|
881
|
+
}
|
|
882
|
+
/** Açıksa menü panelinin ekran dikdörtgeni (tooltip çakışma kontrolü için). */
|
|
883
|
+
get panelRect() {
|
|
884
|
+
return this.open ? this.panel.getBoundingClientRect() : null;
|
|
885
|
+
}
|
|
886
|
+
fitToViewport() {
|
|
887
|
+
const t = this.button.getBoundingClientRect();
|
|
888
|
+
Object.assign(this.panel.style, { top: "", bottom: "", marginTop: "", marginBottom: "" });
|
|
889
|
+
const e = this.panel.scrollHeight, i = t.top - W - I, s = window.innerHeight - t.bottom - W - I, r = i < Math.min(e, q) && s > i;
|
|
890
|
+
this.panel.toggleAttribute("data-drop", r), this.panel.style.maxHeight = `${Math.max(fe, Math.min(q, r ? s : i))}px`;
|
|
891
|
+
}
|
|
892
|
+
/** Düzen değişince (ör. kompakt ↔ normal) açık menüyü kapat — eski konumunda asılı kalmasın. */
|
|
893
|
+
closeMenu() {
|
|
894
|
+
this.open && this.close();
|
|
895
|
+
}
|
|
896
|
+
close() {
|
|
897
|
+
var t;
|
|
898
|
+
this.open = !1, this.quickOwner = null, this.panel.classList.add("hp:hidden"), (t = this.onOpenChange) == null || t.call(this, !1);
|
|
899
|
+
}
|
|
900
|
+
row(t, e, i) {
|
|
901
|
+
const s = document.createElement("button");
|
|
902
|
+
return s.type = "button", s.className = "hp:flex hp:items-center hp:justify-between hp:w-full hp:px-3 hp:py-2 hp:text-left hp:bg-transparent hp:border-0 hp:cursor-pointer hp:text-on-surface hp:hover:bg-on-surface/10", s.innerHTML = `<span>${t}</span><span class="hp:text-on-surface-muted hp:text-xs hp:flex hp:items-center hp:gap-1">${e}</span>`, s.addEventListener("click", i), s;
|
|
903
|
+
}
|
|
904
|
+
backRow(t, e) {
|
|
905
|
+
const i = document.createElement("button");
|
|
906
|
+
i.type = "button", i.className = "hp:flex hp:items-center hp:gap-2 hp:w-full hp:px-3 hp:py-2 hp:text-left hp:bg-transparent hp:border-0 hp:cursor-pointer hp:text-on-surface hp:font-medium hp:hover:bg-on-surface/10", i.appendChild(z("chevron-left", "hp:text-sm"));
|
|
907
|
+
const s = document.createElement("span");
|
|
908
|
+
return s.textContent = t, i.appendChild(s), i.addEventListener("click", e), i;
|
|
909
|
+
}
|
|
910
|
+
render() {
|
|
911
|
+
if (this.currentPanel === "main") this.renderMain();
|
|
912
|
+
else if (this.currentPanel === "speed") this.renderSpeed();
|
|
913
|
+
else if (this.currentPanel === "quality") this.renderQuality();
|
|
914
|
+
else if (this.currentPanel === "captions") this.renderCaptions();
|
|
915
|
+
else if (this.currentPanel === "captions-settings") this.renderCaptionSettings();
|
|
916
|
+
else if (this.currentPanel === "captions-size") this.renderCaptionsSize();
|
|
917
|
+
else if (this.currentPanel === "captions-bg") this.renderCaptionColorPanel("bg");
|
|
918
|
+
else if (this.currentPanel === "captions-text") this.renderCaptionColorPanel("text");
|
|
919
|
+
else {
|
|
920
|
+
const t = this.currentPanel.slice(7), e = this.submenus.find((i) => i.key === t);
|
|
921
|
+
e ? this.renderSubmenu(e) : this.renderMain();
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
renderMain() {
|
|
925
|
+
this.currentPanel = "main", this.panel.innerHTML = "", this.playbackRates.length && this.panel.appendChild(
|
|
926
|
+
this.row(this.labels.playbackSpeed, this.video.playbackRate === 1 ? this.labels.normal : `${this.video.playbackRate}x`, () => {
|
|
927
|
+
this.currentPanel = "speed", this.renderSpeed();
|
|
928
|
+
})
|
|
929
|
+
), this.qualities.length > 0 && this.panel.appendChild(
|
|
930
|
+
this.row(this.labels.quality, this.activeQualityLabel, () => {
|
|
931
|
+
this.currentPanel = "quality", this.renderQuality();
|
|
932
|
+
})
|
|
933
|
+
), this.captions.length > 0 && this.panel.appendChild(
|
|
934
|
+
this.row(this.labels.captions, this.activeCaptionLabel, () => {
|
|
935
|
+
this.currentPanel = "captions", this.renderCaptions();
|
|
936
|
+
})
|
|
937
|
+
);
|
|
938
|
+
for (const t of this.submenus)
|
|
939
|
+
this.panel.appendChild(
|
|
940
|
+
this.row(t.title, t.getValueLabel(), () => {
|
|
941
|
+
this.currentPanel = `custom:${t.key}`, this.renderSubmenu(t);
|
|
942
|
+
})
|
|
943
|
+
);
|
|
944
|
+
for (const t of this.toggles.values())
|
|
945
|
+
this.panel.appendChild(
|
|
946
|
+
this.row(t.label, t.getValueLabel(), () => {
|
|
947
|
+
t.onToggle(), this.renderMain();
|
|
948
|
+
})
|
|
949
|
+
);
|
|
950
|
+
if (this.qrResumeToggle) {
|
|
951
|
+
const t = this.qrResumeToggle;
|
|
952
|
+
this.panel.appendChild(
|
|
953
|
+
this.row(t.label, t.getValueLabel(), () => {
|
|
954
|
+
t.onToggle(), this.renderMain();
|
|
955
|
+
})
|
|
956
|
+
);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
renderSubmenu(t, e = []) {
|
|
960
|
+
this.submenuStack = e, this.panel.innerHTML = "", this.panel.appendChild(
|
|
961
|
+
this.backRow(t.title, () => {
|
|
962
|
+
const i = e[e.length - 1];
|
|
963
|
+
i ? this.renderSubmenu(i, e.slice(0, -1)) : this.renderMain();
|
|
964
|
+
})
|
|
965
|
+
);
|
|
966
|
+
for (const i of t.getItems()) {
|
|
967
|
+
const s = i.children ? '<i class="hp-icon hp-icon-chevron-left hp-chevron-forward"></i>' : i.active ? '<i class="hp-icon hp-icon-check"></i>' : "", r = this.row(i.label, i.value !== void 0 ? ht(i.value) + (i.children ? s : "") : s, () => {
|
|
968
|
+
if (i.children) {
|
|
969
|
+
this.renderSubmenu(i.children(), [...e, t]);
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
972
|
+
i.onSelect(), i.keepOpen ? this.renderSubmenu(t, e) : this.close();
|
|
973
|
+
});
|
|
974
|
+
this.panel.appendChild(r);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
renderSpeed() {
|
|
978
|
+
this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.playbackSpeed, () => this.renderMain()));
|
|
979
|
+
for (const t of this.playbackRates) {
|
|
980
|
+
const e = this.video.playbackRate === t, i = this.row(t === 1 ? this.labels.normal : `${t}x`, e ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
|
|
981
|
+
this.video.playbackRate = t, this.close();
|
|
982
|
+
});
|
|
983
|
+
this.panel.appendChild(i);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
renderQuality() {
|
|
987
|
+
this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.quality, () => this.renderMain()));
|
|
988
|
+
for (const t of this.qualities) {
|
|
989
|
+
const e = t.label === this.activeQualityLabel, i = this.row(t.label, t.locked ? lt : e ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
|
|
990
|
+
t.onSelect(), this.close();
|
|
991
|
+
});
|
|
992
|
+
t.locked && i.setAttribute("data-locked", ""), this.panel.appendChild(i);
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
renderCaptions() {
|
|
996
|
+
this.panel.innerHTML = "", this.panel.appendChild(this.backRow(this.labels.captions, () => this.renderMain()));
|
|
997
|
+
for (const t of this.captions) {
|
|
998
|
+
const e = t.label === this.activeCaptionLabel;
|
|
999
|
+
this.panel.appendChild(
|
|
1000
|
+
this.row(t.label, e ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
|
|
1001
|
+
t.onSelect(), this.close();
|
|
1002
|
+
})
|
|
1003
|
+
);
|
|
1004
|
+
}
|
|
1005
|
+
if (this.captionAppearance && this.activeCaptionLabel !== this.labels.captionsOff) {
|
|
1006
|
+
const t = document.createElement("div");
|
|
1007
|
+
t.className = "hp:my-1 hp:border-t hp:border-on-surface/10", t.setAttribute("role", "separator"), this.panel.appendChild(t), this.panel.appendChild(
|
|
1008
|
+
this.row(this.labels.captionSettings, "", () => {
|
|
1009
|
+
this.currentPanel = "captions-settings", this.renderCaptionSettings();
|
|
1010
|
+
})
|
|
1011
|
+
);
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
/** Altyazı → Altyazı ayarları: boyut, arka plan / yazı rengi, konumu sıfırla — her satırda o anki değer. */
|
|
1015
|
+
renderCaptionSettings() {
|
|
1016
|
+
var i, s, r;
|
|
1017
|
+
this.panel.innerHTML = "", this.panel.appendChild(
|
|
1018
|
+
this.backRow(this.labels.captionSettings, () => {
|
|
1019
|
+
this.currentPanel = "captions", this.renderCaptions();
|
|
1020
|
+
})
|
|
1021
|
+
);
|
|
1022
|
+
const t = this.captionAppearance;
|
|
1023
|
+
if (!t) return;
|
|
1024
|
+
const e = (o) => o ? `<span class="hp:inline-block hp:w-3 hp:h-3 hp:rounded-full hp:border hp:border-on-surface/30" style="background:${o}"></span>` : "";
|
|
1025
|
+
this.panel.appendChild(
|
|
1026
|
+
this.row(t.sizeLabel, ((i = t.getSizeOptions().find((o) => o.active)) == null ? void 0 : i.label) ?? "", () => {
|
|
1027
|
+
this.currentPanel = "captions-size", this.renderCaptionsSize();
|
|
1028
|
+
})
|
|
1029
|
+
), this.panel.appendChild(
|
|
1030
|
+
this.row(t.bgColorLabel, e((s = t.getBgColorOptions().find((o) => o.active)) == null ? void 0 : s.value), () => {
|
|
1031
|
+
this.currentPanel = "captions-bg", this.renderCaptionColorPanel("bg");
|
|
1032
|
+
})
|
|
1033
|
+
), this.panel.appendChild(
|
|
1034
|
+
this.row(t.textColorLabel, e((r = t.getTextColorOptions().find((o) => o.active)) == null ? void 0 : r.value), () => {
|
|
1035
|
+
this.currentPanel = "captions-text", this.renderCaptionColorPanel("text");
|
|
1036
|
+
})
|
|
1037
|
+
), this.panel.appendChild(
|
|
1038
|
+
this.row(t.resetPositionLabel, "", () => {
|
|
1039
|
+
t.onResetPosition(), this.close();
|
|
1040
|
+
})
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
renderCaptionsSize() {
|
|
1044
|
+
this.panel.innerHTML = "";
|
|
1045
|
+
const t = this.captionAppearance;
|
|
1046
|
+
if (this.panel.appendChild(this.backRow((t == null ? void 0 : t.sizeLabel) ?? this.labels.captionSize, this.backToCaptionSettings)), !!t)
|
|
1047
|
+
for (const e of t.getSizeOptions())
|
|
1048
|
+
this.panel.appendChild(
|
|
1049
|
+
this.row(e.label, e.active ? '<i class="hp-icon hp-icon-check"></i>' : "", () => {
|
|
1050
|
+
e.onSelect(), this.close();
|
|
1051
|
+
})
|
|
1052
|
+
);
|
|
1053
|
+
}
|
|
1054
|
+
/** "Arka Plan Rengi" / "Yazı Rengi" — düz metin satırları yerine renkli swatch grid'i (YouTube'un kendi altyazı renk seçici deseni). */
|
|
1055
|
+
renderCaptionColorPanel(t) {
|
|
1056
|
+
this.panel.innerHTML = "";
|
|
1057
|
+
const e = this.captionAppearance, i = t === "bg" ? (e == null ? void 0 : e.bgColorLabel) ?? this.labels.captionBgColor : (e == null ? void 0 : e.textColorLabel) ?? this.labels.captionTextColor;
|
|
1058
|
+
if (this.panel.appendChild(this.backRow(i, this.backToCaptionSettings)), !e) return;
|
|
1059
|
+
const s = document.createElement("div");
|
|
1060
|
+
s.className = "hp:flex hp:flex-wrap hp:gap-2 hp:px-3 hp:py-2";
|
|
1061
|
+
const r = t === "bg" ? e.getBgColorOptions() : e.getTextColorOptions();
|
|
1062
|
+
for (const o of r) {
|
|
1063
|
+
const l = document.createElement("button");
|
|
1064
|
+
l.type = "button", l.setAttribute("aria-label", o.ariaLabel), l.className = "hp:w-7 hp:h-7 hp:rounded-full hp:cursor-pointer hp:flex-shrink-0 hp:border hp:border-on-surface/20", l.style.background = o.value, l.style.outline = o.active ? "2px solid currentColor" : "2px solid transparent", l.style.outlineOffset = "2px", l.addEventListener("click", () => {
|
|
1065
|
+
o.onSelect(), this.render();
|
|
1066
|
+
}), s.appendChild(l);
|
|
1067
|
+
}
|
|
1068
|
+
this.panel.appendChild(s);
|
|
1069
|
+
}
|
|
1070
|
+
/** Dil sonradan değişince statik buton etiketini tazeler + mevcut panel zaten güncel `this.labels`'ı okuyarak yeniden render edilir. */
|
|
1071
|
+
refreshLabels() {
|
|
1072
|
+
this.button.setAttribute("aria-label", this.labels.settings), this.render();
|
|
1073
|
+
}
|
|
1074
|
+
destroy() {
|
|
1075
|
+
document.removeEventListener("click", this.onDocumentClick, !0);
|
|
1076
|
+
for (const t of ["resize", "loadedmetadata", "emptied"]) this.video.removeEventListener(t, this.updateBadge);
|
|
1077
|
+
this.panelObserver.disconnect(), this.quickObserver.disconnect();
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
const ut = 480, mt = 150, be = ["waiting", "seeking"], ve = ["playing", "canplay", "canplaythrough", "seeked", "pause", "error", "emptied"];
|
|
1081
|
+
function ye(n, t) {
|
|
1082
|
+
const { btn: e } = N("", `skip-${n}`);
|
|
1083
|
+
e.classList.add("hp-skip-btn"), e.setAttribute("part", t);
|
|
1084
|
+
const i = document.createElement("span");
|
|
1085
|
+
return i.className = "hp-skip-num", i.setAttribute("aria-hidden", "true"), e.appendChild(i), e.style.display = "none", { btn: e, num: i };
|
|
1086
|
+
}
|
|
1087
|
+
function O(n, t) {
|
|
1088
|
+
n.setAttribute("aria-label", t);
|
|
1089
|
+
}
|
|
1090
|
+
function N(n, t, e) {
|
|
1091
|
+
const i = document.createElement("button");
|
|
1092
|
+
i.type = "button", O(i, n), e && (i.dataset.shortcut = e), i.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-[var(--hp-ctrl-btn-size)] hp:h-[var(--hp-ctrl-btn-size)] hp:cursor-pointer hp:shrink-0";
|
|
1093
|
+
const s = z(t, "hp:text-[length:var(--hp-ctrl-icon-size)]");
|
|
1094
|
+
return i.appendChild(s), { btn: i, icon: s };
|
|
1095
|
+
}
|
|
1096
|
+
class gt {
|
|
1097
|
+
constructor(t, e, i, s) {
|
|
1098
|
+
a(this, "el");
|
|
1099
|
+
a(this, "seekBar");
|
|
1100
|
+
a(this, "volumePanel");
|
|
1101
|
+
a(this, "settingsMenu");
|
|
1102
|
+
a(this, "video");
|
|
1103
|
+
a(this, "labels");
|
|
1104
|
+
a(this, "playButton");
|
|
1105
|
+
a(this, "playIcon");
|
|
1106
|
+
a(this, "pipButton");
|
|
1107
|
+
a(this, "skipBack");
|
|
1108
|
+
a(this, "skipForward");
|
|
1109
|
+
/** Etkin sarma süreleri (sn); null = buton gizli. */
|
|
1110
|
+
a(this, "skipSeconds", { back: null, forward: null });
|
|
1111
|
+
a(this, "seekingEnabled", !0);
|
|
1112
|
+
a(this, "leftGroup");
|
|
1113
|
+
a(this, "loadingTimer", null);
|
|
1114
|
+
/** Halkayı açık tutan sebepler: 'media' (buffer bekleniyor) ve player'ın verdikleri (ör. 'preroll'). */
|
|
1115
|
+
a(this, "loadingReasons", /* @__PURE__ */ new Set());
|
|
1116
|
+
/** Preroll beklenirken video duraklatılmış olsa da kullanıcı oynatmak istedi — buton "duraklat" görünür. */
|
|
1117
|
+
a(this, "pendingPlay", !1);
|
|
1118
|
+
/** Sarma butonuyla sarıldığında (sn, negatif = geri) — sarma bildirimi için. */
|
|
1119
|
+
a(this, "onSkip", null);
|
|
1120
|
+
a(this, "fullscreenButton");
|
|
1121
|
+
a(this, "fullscreenIcon");
|
|
1122
|
+
a(this, "timeLabel");
|
|
1123
|
+
/** Reklam sırasında süre etiketinin yerinde: "Reklam 2/3 · 0:12". */
|
|
1124
|
+
a(this, "adInfoEl");
|
|
1125
|
+
a(this, "showRemaining", !1);
|
|
1126
|
+
/** Kompakt düzende (player < 480px) sağ grubun taşındığı üst bar; tam ekran altta kalır. */
|
|
1127
|
+
a(this, "topEl");
|
|
1128
|
+
a(this, "bottomRow");
|
|
1129
|
+
a(this, "rightGroup");
|
|
1130
|
+
a(this, "fullscreenSlot");
|
|
1131
|
+
a(this, "compact", !1);
|
|
1132
|
+
/** İnce ses çubuğu (audio.layout: 'compact'): dar ekranda da tek satır — üst bar yok. */
|
|
1133
|
+
a(this, "forceInline", !1);
|
|
1134
|
+
/** İnce ses çubuğunda başlık / sanatçı (+ çalarken ekolayzır) — boşluk elemanının içinde. */
|
|
1135
|
+
a(this, "barMetaEl", null);
|
|
1136
|
+
a(this, "spacerEl");
|
|
1137
|
+
a(this, "resizeObserver");
|
|
1138
|
+
a(this, "liveBadge");
|
|
1139
|
+
a(this, "liveText");
|
|
1140
|
+
a(this, "adMode", !1);
|
|
1141
|
+
a(this, "hideLiveSeekBar", !1);
|
|
1142
|
+
/** Ses modu: tam ekran / PiP yok — dar düzende tam ekran kutusu da boş kalmasın. */
|
|
1143
|
+
a(this, "audioMode", !1);
|
|
1144
|
+
a(this, "showPipButton", !0);
|
|
1145
|
+
a(this, "showFullscreenButton", !0);
|
|
1146
|
+
a(this, "callbacks");
|
|
1147
|
+
a(this, "row");
|
|
1148
|
+
a(this, "extraButtonAnchor");
|
|
1149
|
+
/** Süre etiketine tıklama: geçen süre ↔ kalan süre. */
|
|
1150
|
+
a(this, "onTimeClick", (t) => {
|
|
1151
|
+
t.stopPropagation(), this.toggleTimeMode();
|
|
1152
|
+
});
|
|
1153
|
+
a(this, "docPipAvailable", !1);
|
|
1154
|
+
a(this, "docPipActive", !1);
|
|
1155
|
+
a(this, "renderPlayState", () => {
|
|
1156
|
+
var e;
|
|
1157
|
+
const t = this.callbacks.isAdActive() ? this.callbacks.adIsPaused() : this.video.paused && !this.pendingPlay;
|
|
1158
|
+
F(this.playIcon, t ? "play" : "pause"), O(this.playButton, t ? this.labels.play : this.labels.pause), (e = this.barMetaEl) == null || e.toggleAttribute("data-playing", !t && !this.callbacks.isAdActive());
|
|
1159
|
+
});
|
|
1160
|
+
a(this, "renderTime", () => {
|
|
1161
|
+
var s, r;
|
|
1162
|
+
const t = this.video.duration === 1 / 0;
|
|
1163
|
+
if (this.applySeekBarVisibility(), this.timeLabel.style.display = this.adMode || t ? "none" : "", this.liveBadge.style.display = !this.adMode && t ? "" : "none", !t) {
|
|
1164
|
+
const o = this.video.duration, l = this.video.currentTime;
|
|
1165
|
+
if (this.showRemaining) {
|
|
1166
|
+
const h = Number.isFinite(o) ? Math.floor(o) : 0, c = Math.max(0, h - Math.floor(l));
|
|
1167
|
+
this.timeLabel.textContent = `-${R(c)} / ${R(o)}`;
|
|
1168
|
+
} else
|
|
1169
|
+
this.timeLabel.textContent = `${R(l)} / ${R(o)}`;
|
|
1170
|
+
return;
|
|
1171
|
+
}
|
|
1172
|
+
const e = ((r = (s = this.callbacks).liveSyncPosition) == null ? void 0 : r.call(s)) ?? this.liveEdge(), i = e !== null && e - this.video.currentTime > Ve;
|
|
1173
|
+
this.liveBadge.toggleAttribute("data-behind", i);
|
|
1174
|
+
});
|
|
1175
|
+
/** Buffer bekleniyor (oynarken takılma ya da buffer'lanmamış bir yere atlama). */
|
|
1176
|
+
a(this, "onLoadingStart", (t) => {
|
|
1177
|
+
t.type === "seeking" && this.video.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA || this.loadingTimer || this.loadingReasons.has("media") || (this.loadingTimer = setTimeout(() => {
|
|
1178
|
+
this.loadingTimer = null, this.setLoading("media", !0);
|
|
1179
|
+
}, mt));
|
|
1180
|
+
});
|
|
1181
|
+
a(this, "onLoadingEnd", (t) => {
|
|
1182
|
+
t.type === "seeked" && this.video.readyState < HTMLMediaElement.HAVE_FUTURE_DATA && !this.video.paused || (this.loadingTimer && clearTimeout(this.loadingTimer), this.loadingTimer = null, this.setLoading("media", !1));
|
|
1183
|
+
});
|
|
1184
|
+
a(this, "goToLive", () => {
|
|
1185
|
+
var i, s;
|
|
1186
|
+
const t = (s = (i = this.callbacks).liveSyncPosition) == null ? void 0 : s.call(i), e = this.liveEdge();
|
|
1187
|
+
e === null && t == null || (this.video.currentTime = t ?? Math.max(0, e - 1), this.video.paused && this.video.play().catch(() => {
|
|
1188
|
+
}), this.renderTime());
|
|
1189
|
+
});
|
|
1190
|
+
this.video = t, this.callbacks = i, this.labels = s, this.el = document.createElement("div"), this.el.setAttribute("part", "control-bar"), this.el.className = "hp:absolute hp:inset-x-0 hp:bottom-0 hp:flex hp:flex-col hp:gap-1 hp:px-3 hp:pb-2 hp:pt-6 hp:pointer-events-none hp:transition-opacity hp:duration-200", this.seekBar = new at(t, s), this.seekBar.el.classList.add("hp:pointer-events-auto"), this.seekBar.liveTarget = () => {
|
|
1191
|
+
var k, g;
|
|
1192
|
+
return ((g = (k = this.callbacks).liveSyncPosition) == null ? void 0 : g.call(k)) ?? null;
|
|
1193
|
+
}, this.el.appendChild(this.seekBar.el);
|
|
1194
|
+
const r = document.createElement("div");
|
|
1195
|
+
r.className = "hp:flex hp:items-center hp:gap-2", this.el.appendChild(r), this.bottomRow = r;
|
|
1196
|
+
const o = document.createElement("div");
|
|
1197
|
+
o.className = "hp-group hp-group-left hp:flex hp:items-center hp:gap-1 hp:px-1.5 hp:py-1 hp:shrink-0 hp:pointer-events-auto", r.appendChild(o), this.leftGroup = o;
|
|
1198
|
+
const l = document.createElement("span");
|
|
1199
|
+
l.className = "hp-loading-ring", l.setAttribute("aria-hidden", "true");
|
|
1200
|
+
const h = document.createElement("span");
|
|
1201
|
+
h.className = "hp-loading-ring-mask", h.appendChild(document.createElement("span")), l.appendChild(h), o.appendChild(l);
|
|
1202
|
+
const c = N(s.play, "play", "K");
|
|
1203
|
+
this.playButton = c.btn, this.playIcon = c.icon, this.playButton.setAttribute("part", "play-pause-button"), this.playButton.addEventListener("click", () => this.togglePlay()), o.appendChild(this.playButton), this.skipBack = ye("back", "skip-back-button"), this.skipBack.btn.addEventListener("click", () => this.skip(-(this.skipSeconds.back ?? 0))), this.skipForward = ye("forward", "skip-forward-button"), this.skipForward.btn.addEventListener("click", () => this.skip(this.skipSeconds.forward ?? 0)), o.append(this.skipBack.btn, this.skipForward.btn), this.volumePanel = new nt(t, s, i.adVolume), o.appendChild(this.volumePanel.el), this.timeLabel = document.createElement("button"), this.timeLabel.type = "button", this.timeLabel.setAttribute("part", "time-display"), this.timeLabel.className = "hp:text-xs hp:text-on-surface hp:tabular-nums hp:whitespace-nowrap hp:px-1 hp:bg-transparent hp:border-0 hp:cursor-pointer hp:select-none hp:p-0 hp:hover:opacity-80 hp:transition-opacity hp:rounded", this.timeLabel.textContent = "0:00 / 0:00", this.timeLabel.addEventListener("click", this.onTimeClick), o.appendChild(this.timeLabel), this.adInfoEl = document.createElement("span"), this.adInfoEl.setAttribute("part", "ad-countdown"), this.adInfoEl.className = "hp:text-xs hp:text-on-surface hp:tabular-nums hp:whitespace-nowrap hp:px-1 hp:select-none", this.adInfoEl.setAttribute("aria-live", "off"), this.adInfoEl.style.display = "none", this.liveBadge = document.createElement("button"), this.liveBadge.type = "button", this.liveBadge.className = "hp-live-badge", this.liveBadge.setAttribute("part", "live-badge"), this.liveBadge.setAttribute("aria-label", s.goToLive);
|
|
1204
|
+
const f = document.createElement("span");
|
|
1205
|
+
f.className = "hp-live-dot", this.liveText = document.createElement("span"), this.liveText.textContent = s.live, this.liveBadge.append(f, this.liveText), this.liveBadge.style.display = "none", this.liveBadge.addEventListener("click", this.goToLive), o.appendChild(this.liveBadge), o.appendChild(this.adInfoEl);
|
|
1206
|
+
const v = document.createElement("div");
|
|
1207
|
+
v.className = "hp:flex-1 hp:min-w-0", r.appendChild(v), this.spacerEl = v;
|
|
1208
|
+
const m = document.createElement("div");
|
|
1209
|
+
m.className = "hp-group hp:flex hp:items-center hp:gap-1 hp:px-1.5 hp:py-1 hp:shrink-0 hp:pointer-events-auto", r.appendChild(m), this.rightGroup = m, this.settingsMenu = new dt(t, e, s), m.appendChild(this.settingsMenu.el), this.extraButtonAnchor = this.settingsMenu.el, this.row = m;
|
|
1210
|
+
const d = N(s.pip, "pip");
|
|
1211
|
+
this.pipButton = d.btn, this.pipButton.addEventListener("click", () => this.togglePip()), m.appendChild(this.pipButton);
|
|
1212
|
+
const x = N(s.fullscreenEnter, "fullscreen-enter", "F");
|
|
1213
|
+
this.fullscreenButton = x.btn, this.fullscreenIcon = x.icon, this.fullscreenButton.addEventListener("click", () => this.toggleFullscreen()), m.appendChild(this.fullscreenButton), document.pictureInPictureEnabled || (this.pipButton.style.display = "none"), this.topEl = document.createElement("div"), this.topEl.className = "hp-top-bar", this.topEl.setAttribute("part", "top-bar"), this.fullscreenSlot = document.createElement("div"), this.fullscreenSlot.className = "hp-group hp:items-center hp:px-1.5 hp:py-1 hp:shrink-0 hp:pointer-events-auto", this.fullscreenSlot.style.display = "none", r.appendChild(this.fullscreenSlot), this.resizeObserver = new ResizeObserver(() => this.updateLayout()), this.resizeObserver.observe(this.el), t.addEventListener("play", this.renderPlayState), t.addEventListener("pause", this.renderPlayState), t.addEventListener("timeupdate", this.renderTime), t.addEventListener("loadedmetadata", this.renderTime), t.addEventListener("durationchange", this.renderTime), t.addEventListener("progress", this.renderTime), t.addEventListener("emptied", this.renderTime);
|
|
1214
|
+
for (const k of be) t.addEventListener(k, this.onLoadingStart);
|
|
1215
|
+
for (const k of ve) t.addEventListener(k, this.onLoadingEnd);
|
|
1216
|
+
this.renderPlayState(), this.renderTime();
|
|
1217
|
+
}
|
|
1218
|
+
/** Player genişliğine göre normal / kompakt (mobil) düzen arasında geçiş — yalnızca eşik geçilince DOM taşınır. */
|
|
1219
|
+
updateLayout() {
|
|
1220
|
+
var i;
|
|
1221
|
+
const t = this.el.getBoundingClientRect().width;
|
|
1222
|
+
if (t === 0) return;
|
|
1223
|
+
const e = !this.forceInline && t < ut;
|
|
1224
|
+
e !== this.compact && (this.compact = e, this.settingsMenu.closeMenu(), this.el.toggleAttribute("data-compact", e), (i = this.el.closest(".video-area")) == null || i.toggleAttribute("data-compact", e), e ? (this.fullscreenSlot.appendChild(this.fullscreenButton), this.applyButtonVisibility(), this.topEl.appendChild(this.rightGroup)) : (this.rightGroup.appendChild(this.fullscreenButton), this.bottomRow.insertBefore(this.rightGroup, this.fullscreenSlot), this.fullscreenSlot.style.display = "none"));
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* İnce ses çubuğu: başlık / sanatçı kontrol satırının ortasında; dar ekranda da kompakt (üst bar) düzene geçilmez.
|
|
1228
|
+
* `null` kaldırır.
|
|
1229
|
+
*/
|
|
1230
|
+
setAudioBar(t) {
|
|
1231
|
+
var e;
|
|
1232
|
+
if (this.forceInline = !!t, t) {
|
|
1233
|
+
if (!this.barMetaEl) {
|
|
1234
|
+
const i = document.createElement("div");
|
|
1235
|
+
i.className = "hp-bar-meta", i.setAttribute("part", "audio-bar-meta"), i.innerHTML = '<span class="hp-bar-eq" aria-hidden="true"><i></i><i></i><i></i></span><span class="hp-bar-text"><span class="hp-bar-title"></span><span class="hp-bar-sub"></span></span>', this.spacerEl.appendChild(i), this.barMetaEl = i;
|
|
1236
|
+
}
|
|
1237
|
+
this.barMetaEl.querySelector(".hp-bar-title").textContent = t.title, this.barMetaEl.querySelector(".hp-bar-sub").textContent = t.subtitle, this.barMetaEl.toggleAttribute("data-empty", !t.title && !t.subtitle);
|
|
1238
|
+
} else
|
|
1239
|
+
(e = this.barMetaEl) == null || e.remove(), this.barMetaEl = null;
|
|
1240
|
+
this.renderPlayState(), this.updateLayout();
|
|
1241
|
+
}
|
|
1242
|
+
/** Ses modu: görüntü olmadığı için tam ekran ve PiP butonları gizlenir. */
|
|
1243
|
+
setAudioMode(t) {
|
|
1244
|
+
this.audioMode = t, this.applyButtonVisibility();
|
|
1245
|
+
}
|
|
1246
|
+
/** `options.pipButton` / `options.fullscreenButton` — false ise buton gösterilmez. */
|
|
1247
|
+
setButtonsVisible({ pip: t, fullscreen: e }) {
|
|
1248
|
+
this.showPipButton = t, this.showFullscreenButton = e, this.applyButtonVisibility();
|
|
1249
|
+
}
|
|
1250
|
+
/**
|
|
1251
|
+
* Tam ekran ve PiP butonlarının görünürlüğü tek yerden: seçenek, ses modu (görüntü yok), reklam modu, tarayıcı
|
|
1252
|
+
* desteği (PiP) ve kompakt düzende tam ekranın ayrı yuvası — hepsi birlikte değerlendirilir, biri diğerini açmasın.
|
|
1253
|
+
*/
|
|
1254
|
+
applyButtonVisibility() {
|
|
1255
|
+
const t = this.showFullscreenButton && !this.audioMode && !this.docPipActive;
|
|
1256
|
+
this.fullscreenButton.style.display = t ? "" : "none", this.compact && (this.fullscreenSlot.style.display = t && !this.adMode ? "flex" : "none"), this.pipButton.style.display = this.showPipButton && !this.audioMode && (document.pictureInPictureEnabled || this.docPipAvailable) ? "" : "none";
|
|
1257
|
+
}
|
|
1258
|
+
setFullscreenState(t) {
|
|
1259
|
+
F(this.fullscreenIcon, t ? "fullscreen-exit" : "fullscreen-enter"), O(this.fullscreenButton, t ? this.labels.fullscreenExit : this.labels.fullscreenEnter);
|
|
1260
|
+
}
|
|
1261
|
+
/** Dil sonradan değişince (`options.locale`/`labels`) statik (reaktif olarak yeniden render edilmeyen) etiketleri tazeler. */
|
|
1262
|
+
/** Geri/ileri sarma butonları — `null` süre o butonu gizler. */
|
|
1263
|
+
setSkipButtons(t, e) {
|
|
1264
|
+
this.skipSeconds = { back: t, forward: e }, this.renderSkipButtons();
|
|
1265
|
+
}
|
|
1266
|
+
/** DAI reklam arasında seek kapalıyken sarma butonları da devre dışı. */
|
|
1267
|
+
setSeekingEnabled(t) {
|
|
1268
|
+
this.seekingEnabled = t, this.skipBack.btn.disabled = !t, this.skipForward.btn.disabled = !t;
|
|
1269
|
+
}
|
|
1270
|
+
renderSkipButtons() {
|
|
1271
|
+
const t = (e, i, s) => {
|
|
1272
|
+
e.btn.style.display = i === null || this.adMode ? "none" : "", i !== null && (e.num.textContent = String(i), e.num.toggleAttribute("data-long", String(i).length > 2), O(e.btn, s(i)));
|
|
1273
|
+
};
|
|
1274
|
+
t(this.skipBack, this.skipSeconds.back, this.labels.skipBack), t(this.skipForward, this.skipSeconds.forward, this.labels.skipForward);
|
|
1275
|
+
}
|
|
1276
|
+
skip(t) {
|
|
1277
|
+
var e;
|
|
1278
|
+
!t || !this.seekingEnabled || (qe(this.video, t), (e = this.onSkip) == null || e.call(this, t));
|
|
1279
|
+
}
|
|
1280
|
+
refreshLabels() {
|
|
1281
|
+
this.renderPlayState(), this.renderSkipButtons(), O(this.pipButton, this.labels.pip), O(this.liveBadge, this.labels.goToLive), this.liveText.textContent = this.labels.live, this.setFullscreenState(this.callbacks.isFullscreen()), this.seekBar.refreshLabels(), this.volumePanel.refreshLabels(), this.settingsMenu.refreshLabels();
|
|
1282
|
+
}
|
|
1283
|
+
/** Reklam modu: seek bar, süre ve sağ grup gizlenir; oynat/duraklat + ses kalır. */
|
|
1284
|
+
setAdMode(t) {
|
|
1285
|
+
const e = t ? "none" : "";
|
|
1286
|
+
this.adMode = t, this.renderSkipButtons(), this.applySeekBarVisibility(), this.row.style.display = e, this.applyButtonVisibility(), this.renderTime(), t || this.setAdInfo(null), this.renderPlayState(), this.volumePanel.refreshForAdMode();
|
|
1287
|
+
}
|
|
1288
|
+
/**
|
|
1289
|
+
* Reklam geri sayımı + pod göstergesi ("Reklam 2/3 · 0:12"). `null` → gizle. Pod tek reklamsa yalnızca "Reklam · 0:12";
|
|
1290
|
+
* kalan süre bilinmiyorsa (bazı VPAID reklamları) yalnızca etiket.
|
|
1291
|
+
*/
|
|
1292
|
+
setAdInfo(t) {
|
|
1293
|
+
if (!t || !this.adMode) {
|
|
1294
|
+
this.adInfoEl.style.display = "none", this.adInfoEl.textContent = "";
|
|
1295
|
+
return;
|
|
1296
|
+
}
|
|
1297
|
+
const e = t.total > 1 ? ` ${t.position}/${t.total}` : "", i = t.remaining >= 0 ? ` · ${R(Math.ceil(t.remaining))}` : "";
|
|
1298
|
+
this.adInfoEl.textContent = `${this.labels.adLabel}${e}${i}`, this.adInfoEl.style.display = "";
|
|
1299
|
+
}
|
|
1300
|
+
/** `AdsController`'ın IMA'nın KENDİ UI'ı üzerinden (ör. reklam video'suna tıklama) gelen PAUSED/RESUMED event'leri için — oynat/duraklat ikonunu tazeler. */
|
|
1301
|
+
refreshAdPlayState() {
|
|
1302
|
+
this.renderPlayState();
|
|
1303
|
+
}
|
|
1304
|
+
setQualities(t, e) {
|
|
1305
|
+
this.settingsMenu.setQualities(t, e);
|
|
1306
|
+
}
|
|
1307
|
+
setCaptions(t, e) {
|
|
1308
|
+
this.settingsMenu.setCaptions(t, e);
|
|
1309
|
+
}
|
|
1310
|
+
/** Plugin'lerin (loop-section vb.) kontrol çubuğuna kendi butonlarını eklemesi için — ayarlar menüsünden önce yerleştirilir. */
|
|
1311
|
+
addButton(t, e, i) {
|
|
1312
|
+
const { btn: s, icon: r } = N(t, e);
|
|
1313
|
+
return s.addEventListener("click", i), this.row.insertBefore(s, this.extraButtonAnchor), { btn: s, icon: r };
|
|
1314
|
+
}
|
|
1315
|
+
toggleTimeMode() {
|
|
1316
|
+
this.showRemaining = !this.showRemaining, this.renderTime();
|
|
1317
|
+
}
|
|
1318
|
+
setShowRemaining(t) {
|
|
1319
|
+
this.showRemaining !== t && (this.showRemaining = t, this.renderTime());
|
|
1320
|
+
}
|
|
1321
|
+
getShowRemaining() {
|
|
1322
|
+
return this.showRemaining;
|
|
1323
|
+
}
|
|
1324
|
+
/** Eklenti butonu: sol grubun sonu ya da ayarlardan önce. */
|
|
1325
|
+
addPluginButton(t, e) {
|
|
1326
|
+
e === "left" ? this.leftGroup.appendChild(t) : this.row.insertBefore(t, this.extraButtonAnchor);
|
|
1327
|
+
}
|
|
1328
|
+
/** Plugin'lerin (live-wall-clock vb.) kontrol çubuğuna buton olmayan bir element (ör. saat göstergesi) eklemesi için. */
|
|
1329
|
+
addElement(t) {
|
|
1330
|
+
this.row.insertBefore(t, this.extraButtonAnchor);
|
|
1331
|
+
}
|
|
1332
|
+
togglePlay() {
|
|
1333
|
+
var t, e;
|
|
1334
|
+
if ((e = (t = this.callbacks).interceptTogglePlay) != null && e.call(t)) {
|
|
1335
|
+
this.renderPlayState();
|
|
1336
|
+
return;
|
|
1337
|
+
}
|
|
1338
|
+
if (this.callbacks.isAdActive()) {
|
|
1339
|
+
this.callbacks.adTogglePlay(), this.renderPlayState();
|
|
1340
|
+
return;
|
|
1341
|
+
}
|
|
1342
|
+
this.video.paused ? this.video.play() : this.video.pause();
|
|
1343
|
+
}
|
|
1344
|
+
/** Document PiP kullanılabiliyor (normal PiP olmasa da buton görünsün) / açık (tam ekran butonu gizli). */
|
|
1345
|
+
setDocPip(t, e) {
|
|
1346
|
+
this.docPipAvailable = t, this.docPipActive = e, this.applyButtonVisibility();
|
|
1347
|
+
}
|
|
1348
|
+
async togglePip() {
|
|
1349
|
+
var t, e;
|
|
1350
|
+
if (!((e = (t = this.callbacks).onTogglePip) != null && e.call(t)))
|
|
1351
|
+
try {
|
|
1352
|
+
document.pictureInPictureElement ? await document.exitPictureInPicture() : await this.video.requestPictureInPicture();
|
|
1353
|
+
} catch {
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
toggleFullscreen() {
|
|
1357
|
+
this.callbacks.isFullscreen() ? this.callbacks.onExitFullscreen() : this.callbacks.onRequestFullscreen();
|
|
1358
|
+
}
|
|
1359
|
+
/** Preroll beklemesi: video duraklatılmış ama oynatma istendi — buton "duraklat" görünsün. */
|
|
1360
|
+
setPendingPlay(t) {
|
|
1361
|
+
this.pendingPlay = t, this.renderPlayState();
|
|
1362
|
+
}
|
|
1363
|
+
/** Player'ın kendi bekleme durumları (ör. 'preroll') için yükleme halkası — medya takılmasından bağımsız. */
|
|
1364
|
+
setLoading(t, e) {
|
|
1365
|
+
e ? this.loadingReasons.add(t) : this.loadingReasons.delete(t), this.renderLoading();
|
|
1366
|
+
}
|
|
1367
|
+
get isLoading() {
|
|
1368
|
+
return this.loadingReasons.size > 0;
|
|
1369
|
+
}
|
|
1370
|
+
renderLoading() {
|
|
1371
|
+
var e, i;
|
|
1372
|
+
const t = this.loadingReasons.size > 0;
|
|
1373
|
+
t !== this.leftGroup.hasAttribute("data-loading") && (this.leftGroup.toggleAttribute("data-loading", t), (i = (e = this.callbacks).onLoadingChange) == null || i.call(e, t));
|
|
1374
|
+
}
|
|
1375
|
+
/** Canlı uç (media-time) — seekable sonu; native HLS'te DVR'sız canlıda seekable boş kalabildiği için buffered sonu (bkz. LiveWallClock.isLive notu). */
|
|
1376
|
+
liveEdge() {
|
|
1377
|
+
const { seekable: t, buffered: e } = this.video;
|
|
1378
|
+
return t.length ? t.end(t.length - 1) : e.length ? e.end(e.length - 1) : null;
|
|
1379
|
+
}
|
|
1380
|
+
/** `options.liveSeekBar: false` — canlı yayında ilerleme çubuğu gizlenir. */
|
|
1381
|
+
setLiveSeekBar(t) {
|
|
1382
|
+
this.hideLiveSeekBar = !t, this.applySeekBarVisibility();
|
|
1383
|
+
}
|
|
1384
|
+
/** Reklamda ve (istenirse) canlı yayında seek bar gizli. */
|
|
1385
|
+
applySeekBarVisibility() {
|
|
1386
|
+
const t = this.adMode || this.hideLiveSeekBar && this.video.duration === 1 / 0;
|
|
1387
|
+
this.seekBar.el.style.display = t ? "none" : "";
|
|
1388
|
+
}
|
|
1389
|
+
destroy() {
|
|
1390
|
+
this.timeLabel.removeEventListener("click", this.onTimeClick), this.video.removeEventListener("play", this.renderPlayState), this.video.removeEventListener("pause", this.renderPlayState), this.video.removeEventListener("timeupdate", this.renderTime), this.video.removeEventListener("loadedmetadata", this.renderTime), this.video.removeEventListener("durationchange", this.renderTime), this.video.removeEventListener("progress", this.renderTime), this.video.removeEventListener("emptied", this.renderTime);
|
|
1391
|
+
for (const t of be) this.video.removeEventListener(t, this.onLoadingStart);
|
|
1392
|
+
for (const t of ve) this.video.removeEventListener(t, this.onLoadingEnd);
|
|
1393
|
+
this.loadingTimer && clearTimeout(this.loadingTimer), this.resizeObserver.disconnect(), this.topEl.remove(), this.seekBar.destroy(), this.settingsMenu.destroy();
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
const ft = 450, bt = 60, ke = 8, Q = 6, vt = /* @__PURE__ */ new Set(["seek-bar", "time-display"]);
|
|
1397
|
+
function yt() {
|
|
1398
|
+
return typeof window.matchMedia != "function" || window.matchMedia("(hover: hover)").matches;
|
|
1399
|
+
}
|
|
1400
|
+
class kt {
|
|
1401
|
+
constructor(t) {
|
|
1402
|
+
a(this, "el");
|
|
1403
|
+
a(this, "labelEl");
|
|
1404
|
+
a(this, "keyEl");
|
|
1405
|
+
a(this, "showTimer", null);
|
|
1406
|
+
a(this, "hideTimer", null);
|
|
1407
|
+
a(this, "currentTarget", null);
|
|
1408
|
+
a(this, "isOccluded", null);
|
|
1409
|
+
/** Gösterim gecikmesi (SHOW_DELAY_MS) içinde bekleyen hedef — `currentTarget` yalnızca gerçekten gösterilince set ediliyor. */
|
|
1410
|
+
a(this, "pendingTarget", null);
|
|
1411
|
+
a(this, "onMouseOver", (t) => {
|
|
1412
|
+
const e = this.matchTarget(t.target);
|
|
1413
|
+
!e || e === this.currentTarget || this.scheduleShow(e);
|
|
1414
|
+
});
|
|
1415
|
+
a(this, "onMouseOut", (t) => {
|
|
1416
|
+
const e = this.matchTarget(t.target);
|
|
1417
|
+
if (!e || e !== this.currentTarget && e !== this.pendingTarget) return;
|
|
1418
|
+
const i = t.relatedTarget;
|
|
1419
|
+
i && e.contains(i) || this.scheduleHide();
|
|
1420
|
+
});
|
|
1421
|
+
a(this, "onFocusIn", (t) => {
|
|
1422
|
+
const e = this.matchTarget(t.target);
|
|
1423
|
+
e && this.show(e);
|
|
1424
|
+
});
|
|
1425
|
+
a(this, "onFocusOut", (t) => {
|
|
1426
|
+
const e = this.matchTarget(t.target);
|
|
1427
|
+
!e || e !== this.currentTarget || this.hideNow();
|
|
1428
|
+
});
|
|
1429
|
+
a(this, "hideNow", () => {
|
|
1430
|
+
this.showTimer && (clearTimeout(this.showTimer), this.showTimer = null), this.pendingTarget = null, this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.currentTarget && (this.currentTarget = null, this.el.style.opacity = "0", this.el.style.visibility = "hidden");
|
|
1431
|
+
});
|
|
1432
|
+
this.mountEl = t, this.el = document.createElement("div"), this.el.setAttribute("part", "tooltip"), this.el.setAttribute("role", "tooltip"), this.el.className = "hp-tooltip hp:absolute hp:z-40 hp:flex hp:items-center hp:gap-1.5 hp:px-2 hp:py-1 hp:rounded hp:text-xs hp:whitespace-nowrap hp:pointer-events-none hp:opacity-0 hp:transition-opacity hp:duration-100", this.el.style.visibility = "hidden", this.labelEl = document.createElement("span"), this.el.appendChild(this.labelEl), this.keyEl = document.createElement("span"), this.keyEl.className = "hp-tooltip-key", this.el.appendChild(this.keyEl), t.appendChild(this.el), t.addEventListener("mouseover", this.onMouseOver), t.addEventListener("mouseout", this.onMouseOut), t.addEventListener("focusin", this.onFocusIn), t.addEventListener("focusout", this.onFocusOut), t.addEventListener("pointerdown", this.hideNow);
|
|
1433
|
+
}
|
|
1434
|
+
destroy() {
|
|
1435
|
+
this.showTimer && clearTimeout(this.showTimer), this.hideTimer && clearTimeout(this.hideTimer), this.mountEl.removeEventListener("mouseover", this.onMouseOver), this.mountEl.removeEventListener("mouseout", this.onMouseOut), this.mountEl.removeEventListener("focusin", this.onFocusIn), this.mountEl.removeEventListener("focusout", this.onFocusOut), this.mountEl.removeEventListener("pointerdown", this.hideNow), this.el.remove();
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* Tooltip'i örten bir katman (ör. açık ayarlar menüsü) varsa çakışan tooltip gösterilmez — menü kontrol katmanının
|
|
1439
|
+
* (z-20) içinde olduğundan tooltip'i z-index ile menünün altına almak mümkün değil.
|
|
1440
|
+
*/
|
|
1441
|
+
setOcclusionCheck(t) {
|
|
1442
|
+
this.isOccluded = t, this.recheckOcclusion();
|
|
1443
|
+
}
|
|
1444
|
+
/** Örten katman açıldı/kapandı — görünen tooltip artık çakışıyorsa gizle. */
|
|
1445
|
+
recheckOcclusion() {
|
|
1446
|
+
var t;
|
|
1447
|
+
this.currentTarget && this.el.style.visibility === "visible" && ((t = this.isOccluded) != null && t.call(this, this.el.getBoundingClientRect())) && this.hideNow();
|
|
1448
|
+
}
|
|
1449
|
+
matchTarget(t) {
|
|
1450
|
+
var r;
|
|
1451
|
+
const e = t, i = (r = e == null ? void 0 : e.closest) == null ? void 0 : r.call(e, 'button[aria-label], [role="slider"][aria-label]');
|
|
1452
|
+
if (!i) return null;
|
|
1453
|
+
const s = i.getAttribute("part");
|
|
1454
|
+
return s && vt.has(s) || i.offsetParent === null && i !== document.activeElement ? null : i;
|
|
1455
|
+
}
|
|
1456
|
+
scheduleShow(t) {
|
|
1457
|
+
this.hideTimer && (clearTimeout(this.hideTimer), this.hideTimer = null), this.showTimer && clearTimeout(this.showTimer), this.pendingTarget = t, this.showTimer = setTimeout(() => {
|
|
1458
|
+
this.showTimer = null, this.pendingTarget = null, this.show(t);
|
|
1459
|
+
}, ft);
|
|
1460
|
+
}
|
|
1461
|
+
scheduleHide() {
|
|
1462
|
+
this.showTimer && (clearTimeout(this.showTimer), this.showTimer = null), this.pendingTarget = null, this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => this.hideNow(), bt);
|
|
1463
|
+
}
|
|
1464
|
+
show(t) {
|
|
1465
|
+
if (!yt()) return;
|
|
1466
|
+
const e = t.getAttribute("aria-label");
|
|
1467
|
+
if (!e) return;
|
|
1468
|
+
this.currentTarget = t, this.labelEl.textContent = e;
|
|
1469
|
+
const i = t.dataset.shortcut;
|
|
1470
|
+
i ? (this.keyEl.textContent = i, this.keyEl.style.display = "") : (this.keyEl.textContent = "", this.keyEl.style.display = "none"), this.el.style.visibility = "hidden", this.el.style.opacity = "0", this.el.style.left = "0px", this.el.style.top = "0px", requestAnimationFrame(() => {
|
|
1471
|
+
var s;
|
|
1472
|
+
this.currentTarget === t && (this.position(t), !((s = this.isOccluded) != null && s.call(this, this.el.getBoundingClientRect())) && (this.el.style.visibility = "visible", this.el.style.opacity = "1"));
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
position(t) {
|
|
1476
|
+
const e = this.mountEl.getBoundingClientRect(), i = t.getBoundingClientRect(), s = this.el.getBoundingClientRect();
|
|
1477
|
+
let r = i.top - e.top - s.height - ke;
|
|
1478
|
+
r < Q && (r = i.bottom - e.top + ke);
|
|
1479
|
+
let o = i.left - e.left + i.width / 2 - s.width / 2;
|
|
1480
|
+
const l = e.width - s.width - Q;
|
|
1481
|
+
o = Math.max(Q, Math.min(o, l)), this.el.style.top = `${r}px`, this.el.style.left = `${o}px`;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
const xt = 30, wt = 12;
|
|
1485
|
+
class Et {
|
|
1486
|
+
constructor(t, e, i) {
|
|
1487
|
+
a(this, "host");
|
|
1488
|
+
a(this, "video");
|
|
1489
|
+
a(this, "toggleFullscreen");
|
|
1490
|
+
/** ←/→ ve J/L ile sarma süresi (sn) — options.keyboardSeekStep. */
|
|
1491
|
+
a(this, "seekStep", 5);
|
|
1492
|
+
/** Klavyeyle sarıldığında (sn, negatif = geri) — sarma bildirimi için. */
|
|
1493
|
+
a(this, "onSeek", null);
|
|
1494
|
+
/** Space/K'den önce sorulur — true dönerse işlenmiştir (ör. preroll beklemesini iptal). */
|
|
1495
|
+
a(this, "interceptTogglePlay", null);
|
|
1496
|
+
/** `options.frameRate`; verilmezse oynarken ölçülür. */
|
|
1497
|
+
a(this, "frameRate", null);
|
|
1498
|
+
/** Oynarken ölçülen kare süresi (sn). */
|
|
1499
|
+
a(this, "measuredFrame", null);
|
|
1500
|
+
a(this, "frameSamples", []);
|
|
1501
|
+
a(this, "lastMediaTime", -1);
|
|
1502
|
+
a(this, "frameCb", null);
|
|
1503
|
+
a(this, "resetFrame", () => {
|
|
1504
|
+
this.measuredFrame = null, this.frameSamples = [], this.lastMediaTime = -1;
|
|
1505
|
+
});
|
|
1506
|
+
/** requestVideoFrameCallback ile ardışık karelerin mediaTime farkından kare süresi. */
|
|
1507
|
+
a(this, "measure", () => {
|
|
1508
|
+
const t = this.video;
|
|
1509
|
+
if (this.frameRate || this.measuredFrame || !t.requestVideoFrameCallback || this.frameCb !== null) return;
|
|
1510
|
+
const e = (i, s) => {
|
|
1511
|
+
this.frameCb = null;
|
|
1512
|
+
const r = s.mediaTime - this.lastMediaTime;
|
|
1513
|
+
if (this.lastMediaTime = s.mediaTime, r > 1 / 121 && r < 1 / 7 && this.frameSamples.push(r), this.frameSamples.length >= wt) {
|
|
1514
|
+
const o = [...this.frameSamples].sort((l, h) => l - h);
|
|
1515
|
+
this.measuredFrame = o[0];
|
|
1516
|
+
return;
|
|
1517
|
+
}
|
|
1518
|
+
!t.paused && !t.ended && (this.frameCb = t.requestVideoFrameCallback(e));
|
|
1519
|
+
};
|
|
1520
|
+
this.frameCb = t.requestVideoFrameCallback(e);
|
|
1521
|
+
});
|
|
1522
|
+
a(this, "onKeyDown", (t) => {
|
|
1523
|
+
var s, r, o;
|
|
1524
|
+
if (t.defaultPrevented) return;
|
|
1525
|
+
const e = t.composedPath()[0];
|
|
1526
|
+
if ((t.key === " " || t.key === "Enter") && e instanceof HTMLButtonElement) return;
|
|
1527
|
+
const i = this.video.duration;
|
|
1528
|
+
switch (t.key) {
|
|
1529
|
+
case " ":
|
|
1530
|
+
case "k":
|
|
1531
|
+
if ((s = this.interceptTogglePlay) != null && s.call(this)) {
|
|
1532
|
+
t.preventDefault();
|
|
1533
|
+
break;
|
|
1534
|
+
}
|
|
1535
|
+
this.video.paused ? this.video.play() : this.video.pause(), t.preventDefault();
|
|
1536
|
+
break;
|
|
1537
|
+
case "ArrowRight":
|
|
1538
|
+
case "l":
|
|
1539
|
+
Number.isFinite(i) && (this.video.currentTime = _(this.video, Math.min(i, this.video.currentTime + this.seekStep)), (r = this.onSeek) == null || r.call(this, this.seekStep)), t.preventDefault();
|
|
1540
|
+
break;
|
|
1541
|
+
case "ArrowLeft":
|
|
1542
|
+
case "j":
|
|
1543
|
+
this.video.currentTime = Math.max(0, this.video.currentTime - this.seekStep), (o = this.onSeek) == null || o.call(this, -this.seekStep), t.preventDefault();
|
|
1544
|
+
break;
|
|
1545
|
+
case "ArrowUp":
|
|
1546
|
+
this.video.volume = Math.min(1, this.video.volume + 0.1), this.video.muted = !1, t.preventDefault();
|
|
1547
|
+
break;
|
|
1548
|
+
case "ArrowDown":
|
|
1549
|
+
this.video.volume = Math.max(0, this.video.volume - 0.1), t.preventDefault();
|
|
1550
|
+
break;
|
|
1551
|
+
case "m":
|
|
1552
|
+
this.video.muted = !this.video.muted, t.preventDefault();
|
|
1553
|
+
break;
|
|
1554
|
+
case "f":
|
|
1555
|
+
this.toggleFullscreen(), t.preventDefault();
|
|
1556
|
+
break;
|
|
1557
|
+
case ",":
|
|
1558
|
+
case ".":
|
|
1559
|
+
if (t.ctrlKey || t.metaKey || t.altKey || this.video.readyState < 1) break;
|
|
1560
|
+
this.stepFrame(t.key === "." ? 1 : -1), t.preventDefault();
|
|
1561
|
+
break;
|
|
1562
|
+
}
|
|
1563
|
+
});
|
|
1564
|
+
this.host = t, this.video = e, this.toggleFullscreen = i, this.host.addEventListener("keydown", this.onKeyDown), e.addEventListener("playing", this.measure), e.addEventListener("loadstart", this.resetFrame);
|
|
1565
|
+
}
|
|
1566
|
+
/** Bir karenin süresi (sn). */
|
|
1567
|
+
get frameDuration() {
|
|
1568
|
+
return this.frameRate && this.frameRate > 0 ? 1 / this.frameRate : this.measuredFrame ?? 1 / xt;
|
|
1569
|
+
}
|
|
1570
|
+
/** Bir kare ileri / geri; oynuyorsa önce durdurur. */
|
|
1571
|
+
stepFrame(t) {
|
|
1572
|
+
const e = this.video;
|
|
1573
|
+
e.paused || e.pause();
|
|
1574
|
+
const i = Number.isFinite(e.duration) ? e.duration : 1 / 0;
|
|
1575
|
+
e.currentTime = Math.min(i, Math.max(0, e.currentTime + t * this.frameDuration));
|
|
1576
|
+
}
|
|
1577
|
+
destroy() {
|
|
1578
|
+
var t, e;
|
|
1579
|
+
this.host.removeEventListener("keydown", this.onKeyDown), this.video.removeEventListener("playing", this.measure), this.video.removeEventListener("loadstart", this.resetFrame), this.frameCb !== null && ((e = (t = this.video).cancelVideoFrameCallback) == null || e.call(t, this.frameCb));
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
class Ct {
|
|
1583
|
+
constructor(t) {
|
|
1584
|
+
a(this, "el");
|
|
1585
|
+
a(this, "video");
|
|
1586
|
+
a(this, "show", () => this.el.classList.remove("hp:hidden"));
|
|
1587
|
+
a(this, "hide", () => this.el.classList.add("hp:hidden"));
|
|
1588
|
+
this.video = t, this.el = document.createElement("div"), this.el.className = "hp-loading-spinner hp:absolute hp:inset-0 hp:flex hp:items-center hp:justify-center hp:pointer-events-none hp:hidden", this.el.innerHTML = '<div class="hp:w-10 hp:h-10 hp:border-[3px] hp:border-on-surface/30 hp:border-t-accent hp:rounded-full hp:animate-spin"></div>', t.addEventListener("waiting", this.show), t.addEventListener("playing", this.hide), t.addEventListener("canplay", this.hide), t.addEventListener("pause", this.hide);
|
|
1589
|
+
}
|
|
1590
|
+
destroy() {
|
|
1591
|
+
this.video.removeEventListener("waiting", this.show), this.video.removeEventListener("playing", this.hide), this.video.removeEventListener("canplay", this.hide), this.video.removeEventListener("pause", this.hide);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
const St = '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 11a8 8 0 1 0-2.3 5.7"/><path d="M20 4v7h-7"/></svg>';
|
|
1595
|
+
class Tt {
|
|
1596
|
+
constructor(t, e) {
|
|
1597
|
+
a(this, "el");
|
|
1598
|
+
a(this, "video");
|
|
1599
|
+
a(this, "labels");
|
|
1600
|
+
a(this, "messageEl");
|
|
1601
|
+
a(this, "codeEl");
|
|
1602
|
+
a(this, "retryBtn");
|
|
1603
|
+
a(this, "retryText");
|
|
1604
|
+
a(this, "onRetry", null);
|
|
1605
|
+
/** Ekran gerçekten açıldı (hp:error için) — kurtarılan hatalarda (yedek kaynak, native → hls.js) çağrılmaz. */
|
|
1606
|
+
a(this, "onShown", null);
|
|
1607
|
+
a(this, "shouldShow", () => !0);
|
|
1608
|
+
/** showStreamError ile açılan hatanın kodu (video.error yokken). */
|
|
1609
|
+
a(this, "streamErrorCode", 0);
|
|
1610
|
+
a(this, "show", () => {
|
|
1611
|
+
!this.video.getAttribute("src") && !this.video.querySelector("source") || ie(this.video.error) || this.shouldShow() && this.open();
|
|
1612
|
+
});
|
|
1613
|
+
this.video = t, this.labels = e, this.el = document.createElement("div"), this.el.setAttribute("part", "error-screen"), this.el.setAttribute("role", "alert"), this.el.className = "hp-error-screen";
|
|
1614
|
+
const i = document.createElement("div");
|
|
1615
|
+
i.className = "hp-error-card";
|
|
1616
|
+
const s = document.createElement("div");
|
|
1617
|
+
s.className = "hp-error-icon", s.appendChild(z("warning")), i.appendChild(s), this.messageEl = document.createElement("p"), this.messageEl.className = "hp-error-message", i.appendChild(this.messageEl), this.codeEl = document.createElement("p"), this.codeEl.className = "hp-error-code", i.appendChild(this.codeEl), this.retryBtn = document.createElement("button"), this.retryBtn.type = "button", this.retryBtn.className = "hp-error-retry", this.retryBtn.innerHTML = St, this.retryText = document.createElement("span"), this.retryText.textContent = e.retry, this.retryBtn.appendChild(this.retryText), this.retryBtn.addEventListener("click", () => {
|
|
1618
|
+
var r;
|
|
1619
|
+
this.dismiss(), (r = this.onRetry) == null || r.call(this);
|
|
1620
|
+
}), i.appendChild(this.retryBtn), this.el.appendChild(i), t.addEventListener("error", this.show);
|
|
1621
|
+
}
|
|
1622
|
+
setOnRetry(t) {
|
|
1623
|
+
this.onRetry = t;
|
|
1624
|
+
}
|
|
1625
|
+
setOnShown(t) {
|
|
1626
|
+
this.onShown = t;
|
|
1627
|
+
}
|
|
1628
|
+
open() {
|
|
1629
|
+
var e, i;
|
|
1630
|
+
const t = this.visible;
|
|
1631
|
+
this.render(), this.el.setAttribute("data-visible", ""), t || (i = this.onShown) == null || i.call(this, { code: ((e = this.video.error) == null ? void 0 : e.code) ?? this.streamErrorCode, message: this.messageEl.textContent ?? "" });
|
|
1632
|
+
}
|
|
1633
|
+
/** false dönerse hata gösterilmez (ör. SourceManager native HLS'ten hls.js'e geçerken). */
|
|
1634
|
+
setShouldShow(t) {
|
|
1635
|
+
this.shouldShow = t;
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* hls.js'in ölümcül hataları `video.error` üretmez — player donmuş görünmesin diye ekran elle açılır.
|
|
1639
|
+
* `code`: MediaError kodu (2 = ağ, 3 = çözümleme).
|
|
1640
|
+
*/
|
|
1641
|
+
showStreamError(t) {
|
|
1642
|
+
this.shouldShow() && (this.streamErrorCode = t, this.open());
|
|
1643
|
+
}
|
|
1644
|
+
/** Yeni kaynak yüklenirken önceki hatayı kapat. */
|
|
1645
|
+
dismiss() {
|
|
1646
|
+
this.streamErrorCode = 0, this.hide();
|
|
1647
|
+
}
|
|
1648
|
+
get visible() {
|
|
1649
|
+
return this.el.hasAttribute("data-visible");
|
|
1650
|
+
}
|
|
1651
|
+
refreshLabels() {
|
|
1652
|
+
this.retryText.textContent = this.labels.retry, this.visible && this.render();
|
|
1653
|
+
}
|
|
1654
|
+
render() {
|
|
1655
|
+
var i;
|
|
1656
|
+
const t = this.streamErrorCode === 5 ? 5 : ((i = this.video.error) == null ? void 0 : i.code) ?? this.streamErrorCode, e = {
|
|
1657
|
+
1: this.labels.errorAborted,
|
|
1658
|
+
2: this.labels.errorNetwork,
|
|
1659
|
+
3: this.labels.errorDecode,
|
|
1660
|
+
4: this.labels.errorSrcNotSupported,
|
|
1661
|
+
5: this.labels.errorDrm
|
|
1662
|
+
};
|
|
1663
|
+
this.messageEl.textContent = e[t] ?? this.labels.errorGeneric, this.codeEl.textContent = t ? `${this.labels.errorCode} ${t}` : "", this.codeEl.style.display = t ? "" : "none";
|
|
1664
|
+
}
|
|
1665
|
+
hide() {
|
|
1666
|
+
this.el.removeAttribute("data-visible");
|
|
1667
|
+
}
|
|
1668
|
+
destroy() {
|
|
1669
|
+
this.video.removeEventListener("error", this.show);
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
const Z = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakSet(), U = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap();
|
|
1673
|
+
function fi(n) {
|
|
1674
|
+
const t = se.get(n);
|
|
1675
|
+
if (t) return t;
|
|
1676
|
+
const e = n.cues;
|
|
1677
|
+
return e ? Array.from(e, (i) => ({ start: i.startTime, end: i.endTime, text: i.text ?? "" })) : null;
|
|
1678
|
+
}
|
|
1679
|
+
function At(n) {
|
|
1680
|
+
return Ke.has(n);
|
|
1681
|
+
}
|
|
1682
|
+
function Ge(n, t, e, i, s) {
|
|
1683
|
+
let r = Z.get(n);
|
|
1684
|
+
r || Z.set(n, r = /* @__PURE__ */ new Map());
|
|
1685
|
+
const o = `${t}\0${e}\0${i}\0${s}`;
|
|
1686
|
+
let l = r.get(o);
|
|
1687
|
+
return l || (l = n.addTextTrack(e, i, s), Ke.add(l), r.set(o, l)), l;
|
|
1688
|
+
}
|
|
1689
|
+
function _e(n, t) {
|
|
1690
|
+
for (const [e, i] of Z.get(n) ?? [])
|
|
1691
|
+
if (e.startsWith(`${t}\0`)) {
|
|
1692
|
+
se.delete(i), i.mode = "hidden";
|
|
1693
|
+
for (const s of Array.from(i.cues ?? [])) i.removeCue(s);
|
|
1694
|
+
i.mode = "disabled";
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
function Pt(n, t) {
|
|
1698
|
+
Ue(n);
|
|
1699
|
+
const e = U.get(n), i = [];
|
|
1700
|
+
for (const s of t) {
|
|
1701
|
+
const r = Ge(n, "options", "subtitles", s.label, s.srclang);
|
|
1702
|
+
r.mode = s.default ? "hidden" : "disabled", i.push({ label: s.label, track: r }), Mt(n, r, s.src, e);
|
|
1703
|
+
}
|
|
1704
|
+
return i;
|
|
1705
|
+
}
|
|
1706
|
+
function Ue(n) {
|
|
1707
|
+
U.set(n, (U.get(n) ?? 0) + 1), _e(n, "options");
|
|
1708
|
+
}
|
|
1709
|
+
function Lt(n, t) {
|
|
1710
|
+
let e = null;
|
|
1711
|
+
for (const { label: i, track: s } of n) {
|
|
1712
|
+
const r = i === t;
|
|
1713
|
+
s.mode = r ? "hidden" : "disabled", r && (e = s);
|
|
1714
|
+
}
|
|
1715
|
+
return e;
|
|
1716
|
+
}
|
|
1717
|
+
async function Mt(n, t, e, i) {
|
|
1718
|
+
let s;
|
|
1719
|
+
try {
|
|
1720
|
+
const o = await fetch(e);
|
|
1721
|
+
if (!o.ok) throw new Error(`HTTP ${o.status}`);
|
|
1722
|
+
s = await o.text();
|
|
1723
|
+
} catch (o) {
|
|
1724
|
+
console.warn("[HopePlayer] altyazı yüklenemedi:", e, o), n.dispatchEvent(new CustomEvent("hp-internal:subtitle-error", { detail: { src: e, message: String(o) } }));
|
|
1725
|
+
return;
|
|
1726
|
+
}
|
|
1727
|
+
if (U.get(n) !== i || typeof VTTCue != "function") return;
|
|
1728
|
+
const r = Rt(s);
|
|
1729
|
+
se.set(t, r);
|
|
1730
|
+
for (const o of r) {
|
|
1731
|
+
const l = new VTTCue(o.start, o.end, o.text);
|
|
1732
|
+
zt(l, o.settings), t.addCue(l);
|
|
1733
|
+
}
|
|
1734
|
+
n.dispatchEvent(new CustomEvent("hp-internal:subtitle-loaded"));
|
|
1735
|
+
}
|
|
1736
|
+
const xe = "(?:\\d+:)?\\d{1,2}:\\d{2}(?:[.,]\\d{1,3})?", Bt = new RegExp(`^(${xe})\\s+-->\\s+(${xe})(.*)$`);
|
|
1737
|
+
function we(n) {
|
|
1738
|
+
return n.replace(",", ".").split(":").reduce((t, e) => t * 60 + Number(e), 0);
|
|
1739
|
+
}
|
|
1740
|
+
function Rt(n) {
|
|
1741
|
+
const t = [], e = n.replace(/^/, "").replace(/\r\n?/g, `
|
|
1742
|
+
`).split(/\n{2,}/);
|
|
1743
|
+
for (const i of e) {
|
|
1744
|
+
const s = i.split(`
|
|
1745
|
+
`), r = s.findIndex((h) => h.includes("-->"));
|
|
1746
|
+
if (r < 0) continue;
|
|
1747
|
+
const o = Bt.exec(s[r].trim());
|
|
1748
|
+
if (!o) continue;
|
|
1749
|
+
const l = s.slice(r + 1).join(`
|
|
1750
|
+
`);
|
|
1751
|
+
l.trim() && t.push({ start: we(o[1]), end: we(o[2]), settings: o[3].trim(), text: l });
|
|
1752
|
+
}
|
|
1753
|
+
return t;
|
|
1754
|
+
}
|
|
1755
|
+
function zt(n, t) {
|
|
1756
|
+
for (const e of t.split(/\s+/)) {
|
|
1757
|
+
const [i, s] = e.split(":");
|
|
1758
|
+
if (!i || !s) continue;
|
|
1759
|
+
const [r] = s.split(",");
|
|
1760
|
+
try {
|
|
1761
|
+
i === "align" ? n.align = r : i === "vertical" ? n.vertical = r : i === "size" ? n.size = parseFloat(r) : i === "position" ? n.position = parseFloat(r) : i === "line" && (n.snapToLines = !r.endsWith("%"), n.line = parseFloat(r));
|
|
1762
|
+
} catch {
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
const K = 6, It = 20, Ot = 14, Nt = 6, Ft = 10, Dt = 3, $e = "hope-caption-row", je = "hope-caption-font-size", Ee = "hope-caption-bg-color", Ce = "hope-caption-text-color", Ht = {
|
|
1767
|
+
small: 0.78,
|
|
1768
|
+
normal: 1,
|
|
1769
|
+
large: 1.35
|
|
1770
|
+
}, Se = [
|
|
1771
|
+
"rgba(0, 0, 0, 0.75)",
|
|
1772
|
+
"rgba(0, 0, 0, 0)",
|
|
1773
|
+
"rgba(255, 255, 255, 0.85)",
|
|
1774
|
+
"rgba(183, 28, 28, 0.8)",
|
|
1775
|
+
"rgba(13, 71, 161, 0.8)",
|
|
1776
|
+
"rgba(27, 94, 32, 0.8)"
|
|
1777
|
+
], Te = ["#ffffff", "#000000", "#ffeb3b", "#ff5252", "#18ffff", "#69f0ae"];
|
|
1778
|
+
function qt() {
|
|
1779
|
+
try {
|
|
1780
|
+
const n = window.localStorage.getItem($e), t = n === null ? 0 : Number(n);
|
|
1781
|
+
return Number.isFinite(t) && t >= 0 && t < K ? t : 0;
|
|
1782
|
+
} catch {
|
|
1783
|
+
return 0;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
function Vt() {
|
|
1787
|
+
try {
|
|
1788
|
+
const n = window.localStorage.getItem(je);
|
|
1789
|
+
return n === "small" || n === "normal" || n === "large" ? n : "normal";
|
|
1790
|
+
} catch {
|
|
1791
|
+
return "normal";
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
function Ae(n, t) {
|
|
1795
|
+
const e = t[0] ?? "";
|
|
1796
|
+
try {
|
|
1797
|
+
const i = window.localStorage.getItem(n);
|
|
1798
|
+
return i !== null && t.includes(i) ? i : e;
|
|
1799
|
+
} catch {
|
|
1800
|
+
return e;
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
class D {
|
|
1804
|
+
constructor(t, e, i, s) {
|
|
1805
|
+
a(this, "layerEl");
|
|
1806
|
+
a(this, "bubbleEl");
|
|
1807
|
+
a(this, "videoArea");
|
|
1808
|
+
a(this, "seekBarEl");
|
|
1809
|
+
a(this, "labels");
|
|
1810
|
+
a(this, "activeTrack", null);
|
|
1811
|
+
a(this, "fontSize", Vt());
|
|
1812
|
+
a(this, "bgColor", Ae(Ee, Se));
|
|
1813
|
+
a(this, "textColor", Ae(Ce, Te));
|
|
1814
|
+
a(this, "rowIndex", qt());
|
|
1815
|
+
a(this, "dragging", !1);
|
|
1816
|
+
/** Kontrol çubuğu görünür mü — görünürken altyazı seek bar'ın üstünde, değilken en altta. */
|
|
1817
|
+
a(this, "chromeVisible", !0);
|
|
1818
|
+
a(this, "dragStartClientY", 0);
|
|
1819
|
+
a(this, "dragStartBottomPx", 0);
|
|
1820
|
+
a(this, "dragMoved", !1);
|
|
1821
|
+
a(this, "rafId", null);
|
|
1822
|
+
a(this, "pendingDeltaPx", 0);
|
|
1823
|
+
a(this, "resizeObserver");
|
|
1824
|
+
a(this, "onCueChange", () => {
|
|
1825
|
+
var e;
|
|
1826
|
+
const t = (e = this.activeTrack) == null ? void 0 : e.activeCues;
|
|
1827
|
+
if (!this.activeTrack || !t || t.length === 0) {
|
|
1828
|
+
this.bubbleEl.classList.remove("hp-caption-visible"), this.bubbleEl.textContent = "";
|
|
1829
|
+
return;
|
|
1830
|
+
}
|
|
1831
|
+
this.bubbleEl.textContent = "";
|
|
1832
|
+
for (let i = 0; i < t.length; i++) {
|
|
1833
|
+
i > 0 && this.bubbleEl.appendChild(document.createElement("br"));
|
|
1834
|
+
const s = t[i];
|
|
1835
|
+
typeof s.getCueAsHTML == "function" ? this.bubbleEl.appendChild(s.getCueAsHTML()) : this.bubbleEl.appendChild(document.createTextNode(s.text ?? ""));
|
|
1836
|
+
}
|
|
1837
|
+
this.bubbleEl.classList.add("hp-caption-visible");
|
|
1838
|
+
});
|
|
1839
|
+
a(this, "onPointerDown", (t) => {
|
|
1840
|
+
t.button !== 0 && t.pointerType === "mouse" || (t.preventDefault(), this.dragging = !0, this.dragMoved = !1, this.dragStartClientY = t.clientY, this.dragStartBottomPx = this.pxForRow(this.rowIndex), this.bubbleEl.setPointerCapture(t.pointerId), this.bubbleEl.classList.add("hp-caption-dragging"), this.bubbleEl.addEventListener("pointermove", this.onPointerMove), this.bubbleEl.addEventListener("pointerup", this.onPointerUp), this.bubbleEl.addEventListener("pointercancel", this.onPointerUp));
|
|
1841
|
+
});
|
|
1842
|
+
a(this, "onPointerMove", (t) => {
|
|
1843
|
+
this.dragging && (this.pendingDeltaPx = t.clientY - this.dragStartClientY, Math.abs(this.pendingDeltaPx) > Dt && (this.dragMoved = !0), this.rafId === null && (this.rafId = requestAnimationFrame(this.applyPendingDrag)));
|
|
1844
|
+
});
|
|
1845
|
+
a(this, "applyPendingDrag", () => {
|
|
1846
|
+
if (this.rafId = null, !this.dragging) return;
|
|
1847
|
+
const { min: t, max: e } = this.bounds(), i = Math.min(e, Math.max(t, this.dragStartBottomPx - this.pendingDeltaPx)), s = this.dragStartBottomPx - i;
|
|
1848
|
+
this.bubbleEl.style.transform = `translateX(-50%) translateY(${s}px)`;
|
|
1849
|
+
});
|
|
1850
|
+
a(this, "onPointerUp", (t) => {
|
|
1851
|
+
if (!this.dragging || (this.dragging = !1, this.bubbleEl.releasePointerCapture(t.pointerId), this.bubbleEl.removeEventListener("pointermove", this.onPointerMove), this.bubbleEl.removeEventListener("pointerup", this.onPointerUp), this.bubbleEl.removeEventListener("pointercancel", this.onPointerUp), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.bubbleEl.classList.remove("hp-caption-dragging"), !this.dragMoved)) return;
|
|
1852
|
+
const { min: e, max: i } = this.bounds(), s = Math.min(i, Math.max(e, this.dragStartBottomPx - this.pendingDeltaPx)), r = i > e ? (s - e) / (i - e) : 0, o = Math.round(r * (K - 1));
|
|
1853
|
+
this.setRowIndex(o, !0);
|
|
1854
|
+
});
|
|
1855
|
+
this.videoArea = e, this.seekBarEl = i, this.labels = s, this.layerEl = document.createElement("div"), this.layerEl.className = "hp-caption-layer", this.layerEl.setAttribute("part", "caption-layer"), this.bubbleEl = document.createElement("div"), this.bubbleEl.className = "hp-caption-bubble", this.bubbleEl.setAttribute("part", "caption-bubble"), this.bubbleEl.setAttribute("role", "note"), this.bubbleEl.setAttribute("aria-label", s.captionDragHandle), this.bubbleEl.tabIndex = -1, this.applyFontSizeVar(), this.bubbleEl.style.setProperty("--hp-caption-bg", this.bgColor), this.bubbleEl.style.setProperty("--hp-caption-text", this.textColor), this.layerEl.appendChild(this.bubbleEl), this.bubbleEl.addEventListener("pointerdown", this.onPointerDown), this.resizeObserver = new ResizeObserver(() => this.recomputePosition()), this.resizeObserver.observe(this.videoArea), this.recomputePosition();
|
|
1856
|
+
}
|
|
1857
|
+
/** `applyOptions()`'tan — hangi track aktif (ya da null = kapalı). */
|
|
1858
|
+
setActiveTrack(t) {
|
|
1859
|
+
this.activeTrack && this.activeTrack.removeEventListener("cuechange", this.onCueChange), this.activeTrack = t, this.activeTrack && this.activeTrack.addEventListener("cuechange", this.onCueChange), this.onCueChange();
|
|
1860
|
+
}
|
|
1861
|
+
getFontSize() {
|
|
1862
|
+
return this.fontSize;
|
|
1863
|
+
}
|
|
1864
|
+
setFontSize(t) {
|
|
1865
|
+
this.fontSize = t, this.applyFontSizeVar(), this.recomputePosition();
|
|
1866
|
+
try {
|
|
1867
|
+
window.localStorage.setItem(je, t);
|
|
1868
|
+
} catch {
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
getBgColor() {
|
|
1872
|
+
return this.bgColor;
|
|
1873
|
+
}
|
|
1874
|
+
setBgColor(t) {
|
|
1875
|
+
this.bgColor = t, this.bubbleEl.style.setProperty("--hp-caption-bg", t);
|
|
1876
|
+
try {
|
|
1877
|
+
window.localStorage.setItem(Ee, t);
|
|
1878
|
+
} catch {
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
getTextColor() {
|
|
1882
|
+
return this.textColor;
|
|
1883
|
+
}
|
|
1884
|
+
setTextColor(t) {
|
|
1885
|
+
this.textColor = t, this.bubbleEl.style.setProperty("--hp-caption-text", t);
|
|
1886
|
+
try {
|
|
1887
|
+
window.localStorage.setItem(Ce, t);
|
|
1888
|
+
} catch {
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
/** Ayarlar menüsündeki "Konumu sıfırla". */
|
|
1892
|
+
resetPosition() {
|
|
1893
|
+
this.setRowIndex(0, !0);
|
|
1894
|
+
}
|
|
1895
|
+
/** Dil sonradan değişince aria-label'ı tazeler. */
|
|
1896
|
+
refreshLabels(t) {
|
|
1897
|
+
this.labels = t, this.bubbleEl.setAttribute("aria-label", t.captionDragHandle);
|
|
1898
|
+
}
|
|
1899
|
+
applyFontSizeVar() {
|
|
1900
|
+
this.bubbleEl.style.setProperty("--hp-caption-size-multiplier", String(Ht[this.fontSize]));
|
|
1901
|
+
}
|
|
1902
|
+
bounds() {
|
|
1903
|
+
const t = this.videoArea.getBoundingClientRect(), e = this.seekBarEl.getBoundingClientRect(), s = (this.bubbleEl.getBoundingClientRect().height || 32) + It, r = Math.max(Ft, Math.round(t.height * 0.04)), o = this.chromeVisible && e.height > 0 ? Math.max(0, Math.round(t.bottom - e.top + (this.videoArea.hasAttribute("data-compact") ? Nt : Ot))) : r, l = Math.max(o, Math.round(t.height - s));
|
|
1904
|
+
return { min: o, max: l };
|
|
1905
|
+
}
|
|
1906
|
+
pxForRow(t) {
|
|
1907
|
+
const { min: e, max: i } = this.bounds(), s = t / (K - 1);
|
|
1908
|
+
return Math.round(e + s * (i - e));
|
|
1909
|
+
}
|
|
1910
|
+
/**
|
|
1911
|
+
* Balonun EKRANDA şu an durduğu konum (bottom, px): yazılı `bottom` + o anki transform'un dikey kayması.
|
|
1912
|
+
* Sürükleme her karede bir kez çiziliyor — hızlı fırlatmada son hareket çizilmeden bırakılınca, son fare konumundan
|
|
1913
|
+
* başlayan animasyon balonu önce oraya ışınlıyordu (zıplama). Süren bir kayma animasyonunun ortası da böyle okunur.
|
|
1914
|
+
*/
|
|
1915
|
+
visualBottomPx() {
|
|
1916
|
+
const t = parseFloat(this.bubbleEl.style.bottom || "0");
|
|
1917
|
+
try {
|
|
1918
|
+
const e = getComputedStyle(this.bubbleEl).transform;
|
|
1919
|
+
return !e || e === "none" ? t : t - new DOMMatrixReadOnly(e).m42;
|
|
1920
|
+
} catch {
|
|
1921
|
+
return t;
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
/** FLIP: bottom anında yazılır, yalnızca transform animasyonlanır — bottom'u animasyonlamak bırakınca zıplatıyordu. */
|
|
1925
|
+
setRowIndex(t, e) {
|
|
1926
|
+
this.rowIndex = Math.min(K - 1, Math.max(0, t));
|
|
1927
|
+
const i = this.pxForRow(this.rowIndex), s = this.visualBottomPx();
|
|
1928
|
+
e && Math.abs(s - i) > 0.5 ? (this.bubbleEl.classList.add("hp-caption-no-transition"), this.bubbleEl.style.bottom = `${i}px`, this.bubbleEl.style.transform = `translateX(-50%) translateY(${i - s}px)`, this.bubbleEl.offsetHeight, this.bubbleEl.classList.remove("hp-caption-no-transition"), this.bubbleEl.style.transform = "translateX(-50%)") : (this.bubbleEl.classList.add("hp-caption-no-transition"), this.bubbleEl.style.transform = "translateX(-50%)", this.bubbleEl.style.bottom = `${i}px`, this.bubbleEl.offsetHeight, this.bubbleEl.classList.remove("hp-caption-no-transition"));
|
|
1929
|
+
try {
|
|
1930
|
+
window.localStorage.setItem($e, String(this.rowIndex));
|
|
1931
|
+
} catch {
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
/** Boyut değişimi (ör. fullscreen'e giriş) sonrası AYNI satıra, YENİ sınırlara göre yeniden konumlan — animasyonsuz (boyut değişimi anlık olmalı). */
|
|
1935
|
+
/** HopePlayerElement.setChromeOpacity'den — kontroller açılıp kapanınca balon yumuşakça yukarı/aşağı kayar (satır korunur). */
|
|
1936
|
+
setChromeVisible(t) {
|
|
1937
|
+
t !== this.chromeVisible && (this.chromeVisible = t, this.dragging || this.setRowIndex(this.rowIndex, !0));
|
|
1938
|
+
}
|
|
1939
|
+
recomputePosition() {
|
|
1940
|
+
this.dragging || this.setRowIndex(this.rowIndex, !1);
|
|
1941
|
+
}
|
|
1942
|
+
destroy() {
|
|
1943
|
+
this.activeTrack && this.activeTrack.removeEventListener("cuechange", this.onCueChange), this.resizeObserver.disconnect(), this.rafId !== null && cancelAnimationFrame(this.rafId), this.bubbleEl.removeEventListener("pointerdown", this.onPointerDown);
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
a(D, "BG_COLOR_PRESETS", Se), a(D, "TEXT_COLOR_PRESETS", Te);
|
|
1947
|
+
class Kt {
|
|
1948
|
+
constructor(t) {
|
|
1949
|
+
a(this, "el");
|
|
1950
|
+
a(this, "bufferedEl");
|
|
1951
|
+
a(this, "playedEl");
|
|
1952
|
+
a(this, "visible", !1);
|
|
1953
|
+
a(this, "rafId", null);
|
|
1954
|
+
a(this, "sync", () => {
|
|
1955
|
+
this.render(), this.visible && !this.video.paused ? this.start() : this.stop();
|
|
1956
|
+
});
|
|
1957
|
+
a(this, "render", () => {
|
|
1958
|
+
const t = this.video.duration, e = Number.isFinite(t) && t > 0;
|
|
1959
|
+
if (this.el.toggleAttribute("data-disabled", !e), !this.visible || !e) return;
|
|
1960
|
+
this.playedEl.style.transform = `scaleX(${Math.min(1, this.video.currentTime / t)})`;
|
|
1961
|
+
const { buffered: i } = this.video;
|
|
1962
|
+
let s = 0;
|
|
1963
|
+
for (let r = 0; r < i.length; r++)
|
|
1964
|
+
i.start(r) <= this.video.currentTime && (s = Math.max(s, i.end(r)));
|
|
1965
|
+
this.bufferedEl.style.transform = `scaleX(${Math.min(1, s / t)})`;
|
|
1966
|
+
});
|
|
1967
|
+
this.video = t, this.el = document.createElement("div"), this.el.className = "hp-mini-progress", this.el.setAttribute("part", "mini-progress"), this.el.setAttribute("aria-hidden", "true"), this.bufferedEl = document.createElement("div"), this.bufferedEl.className = "hp-mini-progress-fill hp-mini-progress-buffered", this.playedEl = document.createElement("div"), this.playedEl.className = "hp-mini-progress-fill hp-mini-progress-played", this.el.append(this.bufferedEl, this.playedEl), t.addEventListener("play", this.sync), t.addEventListener("pause", this.sync), t.addEventListener("timeupdate", this.render), t.addEventListener("progress", this.render), t.addEventListener("durationchange", this.render);
|
|
1968
|
+
}
|
|
1969
|
+
setVisible(t) {
|
|
1970
|
+
t !== this.visible && (this.visible = t, this.el.toggleAttribute("data-visible", t), this.sync());
|
|
1971
|
+
}
|
|
1972
|
+
destroy() {
|
|
1973
|
+
this.stop(), this.video.removeEventListener("play", this.sync), this.video.removeEventListener("pause", this.sync), this.video.removeEventListener("timeupdate", this.render), this.video.removeEventListener("progress", this.render), this.video.removeEventListener("durationchange", this.render), this.el.remove();
|
|
1974
|
+
}
|
|
1975
|
+
start() {
|
|
1976
|
+
if (this.rafId !== null) return;
|
|
1977
|
+
const t = () => {
|
|
1978
|
+
this.render(), this.rafId = requestAnimationFrame(t);
|
|
1979
|
+
};
|
|
1980
|
+
this.rafId = requestAnimationFrame(t);
|
|
1981
|
+
}
|
|
1982
|
+
stop() {
|
|
1983
|
+
this.rafId !== null && cancelAnimationFrame(this.rafId), this.rafId = null;
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
const Gt = 1e3, _t = 800, Ut = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9.3 5.3a1.2 1.2 0 0 1 1.7 0l5.8 5.8a1.2 1.2 0 0 1 0 1.8l-5.8 5.8a1.2 1.2 0 0 1-1.7-1.7l4.9-5-4.9-5a1.2 1.2 0 0 1 0-1.7z"/></svg>';
|
|
1987
|
+
class $t {
|
|
1988
|
+
constructor(t) {
|
|
1989
|
+
a(this, "el");
|
|
1990
|
+
a(this, "valueEl");
|
|
1991
|
+
a(this, "unitEl");
|
|
1992
|
+
a(this, "liveEl");
|
|
1993
|
+
a(this, "total", 0);
|
|
1994
|
+
a(this, "lastAt", 0);
|
|
1995
|
+
a(this, "hideTimer", null);
|
|
1996
|
+
this.labels = t, this.el = document.createElement("div"), this.el.className = "hp-seek-fb", this.el.setAttribute("part", "seek-feedback");
|
|
1997
|
+
const e = document.createElement("span");
|
|
1998
|
+
e.className = "hp-seek-fb-chevrons", e.innerHTML = Ut.repeat(3);
|
|
1999
|
+
const i = document.createElement("span");
|
|
2000
|
+
i.className = "hp-seek-fb-value", this.valueEl = document.createElement("span"), this.valueEl.className = "hp-seek-fb-num", this.unitEl = document.createElement("span"), this.unitEl.className = "hp-seek-fb-unit", i.append(this.valueEl, this.unitEl), this.liveEl = document.createElement("span"), this.liveEl.className = "hp-sr-only", this.liveEl.setAttribute("aria-live", "polite"), this.el.append(e, i, this.liveEl);
|
|
2001
|
+
}
|
|
2002
|
+
/** `delta` saniye sarıldı (negatif = geri). */
|
|
2003
|
+
show(t) {
|
|
2004
|
+
if (!t) return;
|
|
2005
|
+
const e = Date.now(), i = Math.sign(t) === Math.sign(this.total);
|
|
2006
|
+
this.total = i && e - this.lastAt < Gt ? this.total + t : t, this.lastAt = e;
|
|
2007
|
+
const s = Math.round(Math.abs(this.total) * 10) / 10, r = this.total > 0;
|
|
2008
|
+
this.el.dataset.side = r ? "forward" : "back", this.valueEl.textContent = `${r ? "+" : "−"}${s}`, this.unitEl.textContent = this.labels.secondsShort, this.liveEl.textContent = (r ? this.labels.skipForward : this.labels.skipBack)(s), this.valueEl.classList.remove("hp-seek-fb-bump"), this.valueEl.offsetWidth, this.valueEl.classList.add("hp-seek-fb-bump"), this.el.setAttribute("data-visible", ""), this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = setTimeout(() => {
|
|
2009
|
+
this.el.removeAttribute("data-visible"), this.total = 0;
|
|
2010
|
+
}, _t);
|
|
2011
|
+
}
|
|
2012
|
+
destroy() {
|
|
2013
|
+
this.hideTimer && clearTimeout(this.hideTimer), this.el.remove();
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
class jt {
|
|
2017
|
+
constructor(t) {
|
|
2018
|
+
a(this, "el");
|
|
2019
|
+
a(this, "open", !1);
|
|
2020
|
+
a(this, "doc", document);
|
|
2021
|
+
a(this, "close", () => {
|
|
2022
|
+
if (!this.open) return;
|
|
2023
|
+
this.open = !1, this.el.removeAttribute("data-open");
|
|
2024
|
+
const t = this.doc.defaultView ?? window;
|
|
2025
|
+
this.doc.removeEventListener("pointerdown", this.onOutside, !0), this.doc.removeEventListener("keydown", this.onKeyDown, !0), t.removeEventListener("blur", this.close), t.removeEventListener("resize", this.close), t.removeEventListener("scroll", this.close, !0);
|
|
2026
|
+
});
|
|
2027
|
+
a(this, "onOutside", (t) => {
|
|
2028
|
+
t.composedPath().includes(this.el) || this.close();
|
|
2029
|
+
});
|
|
2030
|
+
a(this, "onKeyDown", (t) => {
|
|
2031
|
+
t.key === "Escape" && (t.stopPropagation(), this.close());
|
|
2032
|
+
});
|
|
2033
|
+
this.container = t, this.el = document.createElement("div"), this.el.className = "hp-context-menu", this.el.setAttribute("part", "context-menu"), this.el.setAttribute("role", "menu"), this.el.addEventListener("contextmenu", (e) => e.preventDefault()), t.appendChild(this.el);
|
|
2034
|
+
}
|
|
2035
|
+
get isOpen() {
|
|
2036
|
+
return this.open;
|
|
2037
|
+
}
|
|
2038
|
+
/** `clientX/Y` ekran koordinatı — menü player'ın içinde kalacak şekilde kaydırılır. */
|
|
2039
|
+
show(t, e, i) {
|
|
2040
|
+
var v;
|
|
2041
|
+
this.el.replaceChildren(
|
|
2042
|
+
...i.map((m) => {
|
|
2043
|
+
const d = document.createElement(m.onSelect ? "button" : "div");
|
|
2044
|
+
d.className = "hp-context-menu-item", m.onSelect ? (d.type = "button", d.setAttribute("role", "menuitem"), d.addEventListener("click", () => {
|
|
2045
|
+
this.close(), m.onSelect();
|
|
2046
|
+
})) : d.setAttribute("data-info", "");
|
|
2047
|
+
const x = document.createElement("span");
|
|
2048
|
+
if (x.textContent = m.label, d.appendChild(x), m.meta) {
|
|
2049
|
+
const k = document.createElement("span");
|
|
2050
|
+
k.className = "hp-context-menu-meta", k.textContent = m.meta, d.appendChild(k);
|
|
2051
|
+
}
|
|
2052
|
+
return d;
|
|
2053
|
+
})
|
|
2054
|
+
), this.el.setAttribute("data-open", ""), this.open = !0;
|
|
2055
|
+
const s = this.container.getBoundingClientRect(), { width: r, height: o } = this.el.getBoundingClientRect(), l = Math.max(4, Math.min(t - s.left, s.width - r - 4)), h = Math.max(4, Math.min(e - s.top, s.height - o - 4));
|
|
2056
|
+
this.el.style.left = `${l}px`, this.el.style.top = `${h}px`, (v = this.el.querySelector("button")) == null || v.focus({ preventScroll: !0 });
|
|
2057
|
+
const c = this.doc = this.el.ownerDocument, f = c.defaultView ?? window;
|
|
2058
|
+
c.addEventListener("pointerdown", this.onOutside, !0), c.addEventListener("keydown", this.onKeyDown, !0), f.addEventListener("blur", this.close), f.addEventListener("resize", this.close), f.addEventListener("scroll", this.close, !0);
|
|
2059
|
+
}
|
|
2060
|
+
destroy() {
|
|
2061
|
+
this.close(), this.el.remove();
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
const Wt = 3e3, Pe = 200;
|
|
2065
|
+
class Qt {
|
|
2066
|
+
constructor() {
|
|
2067
|
+
a(this, "list", []);
|
|
2068
|
+
/** Kayıt eklenince / temizlenince (açık panel canlı güncellenir). */
|
|
2069
|
+
a(this, "onChange", null);
|
|
2070
|
+
}
|
|
2071
|
+
get entries() {
|
|
2072
|
+
return this.list;
|
|
2073
|
+
}
|
|
2074
|
+
add(t) {
|
|
2075
|
+
var s, r;
|
|
2076
|
+
const e = Date.now(), i = this.list[this.list.length - 1];
|
|
2077
|
+
if (i && e - i.time < Wt && i.source === t.source && i.message === t.message && JSON.stringify(i.details ?? {}) === JSON.stringify(t.details ?? {})) {
|
|
2078
|
+
i.count = (i.count ?? 1) + 1, i.time = e, (s = this.onChange) == null || s.call(this);
|
|
2079
|
+
return;
|
|
2080
|
+
}
|
|
2081
|
+
this.list.push({ time: e, ...t }), this.list.length > Pe && this.list.splice(0, this.list.length - Pe), (r = this.onChange) == null || r.call(this);
|
|
2082
|
+
}
|
|
2083
|
+
clear() {
|
|
2084
|
+
var t;
|
|
2085
|
+
this.list.length = 0, (t = this.onChange) == null || t.call(this);
|
|
2086
|
+
}
|
|
2087
|
+
/** Destek ekibine yapıştırılabilir düz metin. */
|
|
2088
|
+
toText() {
|
|
2089
|
+
return this.list.map((t) => {
|
|
2090
|
+
const e = Object.entries(t.details ?? {}).filter(([, s]) => s !== void 0 && s !== "").map(([s, r]) => `${s}=${r}`).join(" "), i = t.count && t.count > 1 ? ` (x${t.count})` : "";
|
|
2091
|
+
return `${new Date(t.time).toISOString()} [${t.source}]${t.fatal ? " [fatal]" : ""} ${t.message}${i}${e ? ` | ${e}` : ""}`;
|
|
2092
|
+
}).join(`
|
|
2093
|
+
`);
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
const Xt = '@font-face{font-family:hope-icons;src:url(data:font/woff2;base64,d09GMgABAAAAAAwEAAsAAAAAI8QAAAu3AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACFCAq3AK89ATYCJANYCy4ABCAFhC4HghcbDx8z0kvOKiMy1fKAJ+NvVGt2KHjZoCp2GUFNK1hg+PNMFWfuARguS/CiAtaBZZmST4xvhCOxh17nN9RAEVjQQ3N91QsMdGe401kkSCYLavmASB3rEwpYGES3IGwfudN/2Da44CTSqFqjCdp5w7RKisjXF/H336Z/dtl7sRjJLkSMsAspVJBN0jqbJUmN6UKE1gk1wyqa1MVSUf19omyas9c552HxkzAypu51N7ZciF7ySXo4oqLL6FzYH62llqlIU1QVLqwLzuRuN3C/DxgmhXQfuKcNoqokkMCsgIUCQldhKmzcG+N77Ld6h9kKzGAVsALOffF154IAwyrYIdp34FhJ975LRjtTSKC9BXFx3Xd3CTuts4qkpLhoIRq8+1XQu6SgfboOHPQf+/9M5jWISGPocZ26XpLg60Bw+nria1boP3Y1x4NtR0AKxMCygWn0XHnsE8Qht8wnhhWbcAS3nCAIbmICAi4a9uZARMQkpOf/wGvSoo3BktGhS48+A4aMcOSgBrRABiCsBOQQsAFBACIIQAwBSCAAKQSgAQFoQgBaEIA2BMBAACwEIIMAdCAAXQhADwLQhwAMIABDCMAIAuAgVCAHwMM+lgGvgvkT7EOg5GM/NiLVLfYc7XCE9PWNkxubkOgcl9il43hSappmNCJJJkkmUexgi5euP4la1l1GCUU0k3J/83769GUzZsz+cpVdTHK2apQht6SYLLGCEbdw2Wb7WVVnfDF7/X2ilz6wVibuRAb7xkeKX/5wLdiXvxzzxi9fBPu5detKxi83V6sv88bNmxlGpidW1U3cyBq52oBsLLqFuto2rurt5dhRL2O8dWGVqyoKjfoDTc2bfaPcUZfN4TItGSdr9UtWCwloqqa4i810YKvrnqZicWOgWc+mKUmlWpaxxUwVDwEPDQ+ZRqx68W6YtcXUGBkZOsj6aVQZ2RqoStggjWwpiwUagejiVDk5QkI9l5QBtHwCQoArBgSF+i0pqysMCgr1QnIxxml0RBRVxIC4Ebw+HSTP7dGi8Ce8ca4upBYH9PClKprKO4g0BvTUJP/GBz4Qv3NidhbbNL4DJbubRixBd7akfOGZU+XV0JGqZG5bsrP8edTRCg2sptz2nRCXLYvrJN7KPry/uEyGLDt1/YG37u0WnVlu4TJQb2Soc6dwlnfJXO+qUBu+CB0ceyAVQUSvLM28AiIILSAIoFTWIBbKuvLUe+RiR9xTn5J64z4okInQ3K5ccw6ZYuiueYrmkKECQkTqv/Ikxzwr0D1JSSxHBcaIprQyQQigkuIC8tL6JD6pT36K/7IchbfTjanzfZ7X9Sxbd4bndYtzMUkaU4piEzjONMViychIdzAbaSzKE5AKaY6SSNQHC5W8C4tM0zapNpxlhklLP5bG0mwrYrXXR6UvhnlLVD+N0MODd1HPWlK7WKWauXTCMnXclBUstY/AImqdTqfzdSwhL2jpbVS9iJ5MryJos6JSFf2PUZ//FVr4GMrfDXE03VCDYnUZ6efQRgX6hgy3aQjU2ZBW5ldNZWirKsz/8eh1iWSdRpeoilNVUvrgIFN/Z0SqUyxUamkbKtXu0qjVl03X0FBTc46uTZ6eDBo7T6W5EmrBTUqergG4stDB6cxwpVeYs+LOZ1nqmUSXqWqJ2fCpe7dWI2uWWPiODruPtzhbDhzYcsBi+TJOi7PWvMSyJOLMou2cqylo+3Sr5lrnV/VsGsZcCXTjq7v5m1y/JVrXqPNQpOXLvVjuFV1ahBmX6PVL3nKeCfTCXIFYLfk9YgGHMMe7PH6p2sVz168gLYejHLPcjKSj5M/NgLvptNkiqgKzvfyH1mKGFwPsfDyHkZHndwiIOVMXYo5vg0lkcnI5VyF5+iKkBXYYPXgjIrkZWNzu99/BKhtEDC96JEnIvyBCNC8KkuQRefqP/xIGCMk7Gasa/AkDhp70b/8l9FGFctA65m/o1w53Hrw15thiL8beYpbDMU1nVkd6oKOiX1JdiuFap0ntYjR9WI2bOsAg7eO2NDNI/fVaDCX0qMt8WjenqkETZh2zGD7uCO3qPprF3NVp5B4QVofyQdu2Cswp+DXz+hVuhT8giDzHYLlbjrUsLxZX+4PuoN/jFXnaiBVTSCCpRAeRAjYZQc3FcsxwVxIQE3kVXcHhqCA20rzo9RCH6pc1ZrVYfm1MkWm3ePvX2rdt2t3PQ4H2B11ml6Fc80aTXHrfcj9OQvBp2AXJ6bGzLMKsweFxSoLDQbdkObH2iXaerr8NoZilEUWzxYLRkfvU8eODoNdbk4CgwhRAEikIDpFFBpfKOYSWhVK3PrHPNlqorwOtQ0fuosKH7JOk17CI4F18X44oDybZMaJ8UWG/5rwQ9VGZXzJT3uc1+9UbPpeEPjGE8n3+YObidZPWvt6TFh04n3f+wKJJvX2tm2TE32K89CJEmQx620SjdZLekJJ6L/Uh0LreFGXM0+tDg6wBfR6pa4+MU5LpKNhgVsgZ1i5gKRzZ3z9aUcBSFFtQET3dI5GwhAU7y8gV8PycLEmXbLP5PxzI1Wh2NpPJDOcLaEpW9K4uIqOE8ji7VWati2pIKqthSoo+13l/QUifkoIbZpBVZz8ks9rjyoUxkYTdRVl0wXmDjEbvLtPwJH+w2ZIlzDat4T9J0nIkNxWVlvbqFQkHa2uD4UivXqWlRSa5QsG6QRDrZoOY08VXGpc9rq5jB4aHddPucWw19f0U+qU47c4e96NkQd2jD9f39VKudjdc/XfluroPJVgjtNQJxW1Em9ydHI5/i2igP+o1BmTQVBQKZC7BDEEpepL0Qsz+oW5d5d+rG7pXK3vtu/7hUd2Ckh/jHt2nFb9Cn/qatjr2aLsNk4FsXfXjssZXik8zg6IdWjJAPSg0rKEziILit0CUvpahuip9gdRDd3npXFLw8OIQDkOEqops1Sv6tSpb+Zp+Ne6NMvZUvlEp+48rtHxl+8ryFQMx/cdmlyEy/+txEdVt+pYqcmivodVHLDPl5YWt+es/TJ7iLIzm9k1HUsv4VzE36iycMvmD1MAazsszybC6P+/qP7BZ7cTVb5YMmMHf1XdsU++qXpuZrRbKCaM0hGjDAiY7aAgd8URwYYooIDzBzZsOLh85sv+Atm2bWSxxNNgNbxZ/aQb0Hzly+fpbVb55Un4qSabmS/N8VbcabcgA4DtasGE5HQG7zMoYMGTIG4um5beqx9AIKtTWB9JJJiCtAjT4EsDnLr4Sl+B0Cq4S3w5jayOmKIc9EFRWKYMBu4OicP4S7elI6VgxqAiKrC6kZcWQIiSyyUrrNoo1iDYPQh6baGDBCEp/AghqYv8CQOwH8ZOYABCL+fMAEPuI5t5VRF/vxUTFwseJkd5HieHeh4ku3mOJKu8nxMDNLSHcALEvxAtipcH9wUNmgdWhdADiAq/oOEkHIAYS2wc/6jYRAQIACAB+muNDj8TmvynUJAAAjOX21xrbin0hfhIrAUABn2IJgN+lQpPGfj5Dfg0wN9LeERDSAa9dPFA/Z8wMmNih8X1+HAoRE8fREc0zBi4OJQOwTGynQoplPjQwrALDUhb7t4y4Zh8lbYTjKQMiurwJMY73LBPbTyHF8y00cNwBw9g/kGWBXjp38K0y6ZcyYZAMjzzIH9HG5J4Ha8Gt+EQgwSC55Xd6yzzLLieP7iPIAJFdT15BtKGa9UU3y9e/9BB53KlYBzxNxIj6QjFBgZTWma/4B6Hac82d1TvzxGX5SYhzzsCAdPaXbTmPWivmOzGZc51gI+eAHAvZCPGJPMTe2gqIzKBKZHcLM9NY5iVDx5JReZcAUuh94hUpVqJUDTXVUltGVpk66qqnvgYaaiSnXF4FzUtDOobtVSxqPjIRRIN0kMx7GDvE/wu3zFqYPELOfqTFCjf5IGoUAPKwDeT6dMSv2UHJlg4wuB/2Mins99EP2tj9iTazRkVPdbbul6FpFJ5vZtkESWeWgTRK63a+DpxG8LWVenZOR95cHPKMk0E65ueoLuXODg==) format("woff2");font-weight:400;font-style:normal;font-display:block}', Le = "hope-player-icon-font";
|
|
2097
|
+
function Yt() {
|
|
2098
|
+
if (typeof document > "u" || document.getElementById(Le)) return;
|
|
2099
|
+
const n = document.createElement("style");
|
|
2100
|
+
n.id = Le, n.textContent = Xt, document.head.appendChild(n);
|
|
2101
|
+
}
|
|
2102
|
+
function bi(n) {
|
|
2103
|
+
if (!n || typeof n.name != "string" || !/^[\w.:-]+$/.test(n.name))
|
|
2104
|
+
throw new TypeError('definePlugin: "name" is required (letters, digits, "-", "_", ".", ":")');
|
|
2105
|
+
if (typeof n.setup != "function") throw new TypeError(`definePlugin(${n.name}): "setup" must be a function`);
|
|
2106
|
+
return n;
|
|
2107
|
+
}
|
|
2108
|
+
const G = [], J = /* @__PURE__ */ new Set();
|
|
2109
|
+
function Zt(n, t) {
|
|
2110
|
+
const e = [n, t];
|
|
2111
|
+
return G.push(e), Be(), () => {
|
|
2112
|
+
const i = G.indexOf(e);
|
|
2113
|
+
i >= 0 && (G.splice(i, 1), Be());
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
function Me() {
|
|
2117
|
+
return G.slice();
|
|
2118
|
+
}
|
|
2119
|
+
function Jt(n) {
|
|
2120
|
+
return J.add(n), () => J.delete(n);
|
|
2121
|
+
}
|
|
2122
|
+
function Be() {
|
|
2123
|
+
for (const n of J)
|
|
2124
|
+
try {
|
|
2125
|
+
n();
|
|
2126
|
+
} catch {
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
function ei() {
|
|
2130
|
+
var i;
|
|
2131
|
+
const t = (i = window.adTaxonomy) == null ? void 0 : i.keyValues;
|
|
2132
|
+
if (!t || typeof t != "object") return "";
|
|
2133
|
+
const e = [];
|
|
2134
|
+
for (const [s, r] of Object.entries(t))
|
|
2135
|
+
r == null || r === "" || e.push(`${s}=${r}`);
|
|
2136
|
+
return e.join("&");
|
|
2137
|
+
}
|
|
2138
|
+
function X(n, t = {}) {
|
|
2139
|
+
const e = encodeURIComponent(document.referrer || window.location.href), i = encodeURIComponent(window.location.href), s = Date.now();
|
|
2140
|
+
let r = n;
|
|
2141
|
+
const o = {
|
|
2142
|
+
referrer_url: e,
|
|
2143
|
+
description_url: i,
|
|
2144
|
+
timestamp: s
|
|
2145
|
+
};
|
|
2146
|
+
for (const [l, h] of Object.entries(o)) {
|
|
2147
|
+
const c = `[${l}]`;
|
|
2148
|
+
if (r.includes(c))
|
|
2149
|
+
r = r.replace(c, String(h));
|
|
2150
|
+
else if (!new URLSearchParams(r.split("?")[1]).has(l)) {
|
|
2151
|
+
const f = r.includes("?") ? "&" : "?";
|
|
2152
|
+
r += `${f}${l}=${h}`;
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
try {
|
|
2156
|
+
const l = new URL(r);
|
|
2157
|
+
if (l.pathname.includes("/vmap/")) return n;
|
|
2158
|
+
const c = [];
|
|
2159
|
+
t.includeRefreshCount && c.push(`adrefreshCount=${t.adRefreshCount ?? 0}`);
|
|
2160
|
+
const f = ei();
|
|
2161
|
+
if (f && c.push(f), c.length) {
|
|
2162
|
+
const v = l.searchParams.get("cust_params");
|
|
2163
|
+
l.searchParams.set("cust_params", v ? `${v}&${c.join("&")}` : c.join("&"));
|
|
2164
|
+
}
|
|
2165
|
+
return l.toString();
|
|
2166
|
+
} catch {
|
|
2167
|
+
return r;
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
function ee(n) {
|
|
2171
|
+
const t = {};
|
|
2172
|
+
if (!n) return t;
|
|
2173
|
+
const e = typeof n == "string" ? [...new URLSearchParams(n.trim().replace(/^\?/, "")).entries()].map(([i, s]) => [i, s.split(",")]) : Object.entries(n);
|
|
2174
|
+
for (const [i, s] of e) {
|
|
2175
|
+
const r = (Array.isArray(s) ? s : [s]).filter((o) => o != null && o !== "").map(String);
|
|
2176
|
+
i && r.length && (t[i] = r);
|
|
2177
|
+
}
|
|
2178
|
+
return t;
|
|
2179
|
+
}
|
|
2180
|
+
function ti(n, t) {
|
|
2181
|
+
const e = Object.entries(ee(t)).filter(([i]) => !i.startsWith("hb_")).map(([i, s]) => `${encodeURIComponent(i)}=${s.map(encodeURIComponent).join(",")}`);
|
|
2182
|
+
if (!e.length) return n;
|
|
2183
|
+
try {
|
|
2184
|
+
const i = new URL(n), s = new Set(e.map((o) => o.slice(0, o.indexOf("=")))), r = (i.searchParams.get("cust_params") ?? "").split("&").filter((o) => o && !s.has(o.split("=")[0]));
|
|
2185
|
+
return i.searchParams.set("cust_params", [...r, ...e].join("&")), i.toString();
|
|
2186
|
+
} catch {
|
|
2187
|
+
return n;
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
const We = {
|
|
2191
|
+
play: "Oynat",
|
|
2192
|
+
pause: "Duraklat",
|
|
2193
|
+
mute: "Sessize al",
|
|
2194
|
+
unmute: "Sesi aç",
|
|
2195
|
+
volume: "Ses seviyesi",
|
|
2196
|
+
seekBar: "Video konumu",
|
|
2197
|
+
settings: "Ayarlar",
|
|
2198
|
+
pip: "Resim içinde resim",
|
|
2199
|
+
skipBack: (n) => `${n} saniye geri`,
|
|
2200
|
+
skipForward: (n) => `${n} saniye ileri`,
|
|
2201
|
+
secondsShort: "sn",
|
|
2202
|
+
audioTrack: "Ses",
|
|
2203
|
+
statsTitle: "İstatistikler",
|
|
2204
|
+
statsClose: "İstatistikleri kapat",
|
|
2205
|
+
statsEngine: "Motor",
|
|
2206
|
+
statsResolution: "Video / ekran",
|
|
2207
|
+
statsQuality: "Kalite",
|
|
2208
|
+
statsCodecs: "Codec",
|
|
2209
|
+
statsBandwidth: "Bant genişliği",
|
|
2210
|
+
statsBuffer: "Buffer (ileri)",
|
|
2211
|
+
statsDropped: "Düşen kare",
|
|
2212
|
+
statsLatency: "Canlı gecikme",
|
|
2213
|
+
statsSpeedVolume: "Hız / ses",
|
|
2214
|
+
statsSource: "Kaynak",
|
|
2215
|
+
statsVersion: "Sürüm",
|
|
2216
|
+
debugTitle: "Hata ayıklama",
|
|
2217
|
+
debugClose: "Hata ayıklamayı kapat",
|
|
2218
|
+
debugCopy: "Kopyala",
|
|
2219
|
+
debugCopied: "Kopyalandı",
|
|
2220
|
+
debugClear: "Temizle",
|
|
2221
|
+
debugEmpty: "Kayıtlı hata yok.",
|
|
2222
|
+
debugFatal: "Oynatmayı durdurdu",
|
|
2223
|
+
debugSourceMedia: "Medya",
|
|
2224
|
+
debugSourceStream: "Yayın",
|
|
2225
|
+
debugSourceAds: "Reklam",
|
|
2226
|
+
debugSourceSubtitles: "Altyazı",
|
|
2227
|
+
debugSourcePlayer: "Player",
|
|
2228
|
+
adLabel: "Reklam",
|
|
2229
|
+
adReturnFullscreen: "Tam ekrana dön",
|
|
2230
|
+
adReturnPip: "Küçük pencereye dön",
|
|
2231
|
+
audioVinyl: "Plak — ileri / geri sarmak için çevirin",
|
|
2232
|
+
fullscreenEnter: "Tam ekran",
|
|
2233
|
+
fullscreenExit: "Tam ekrandan çık",
|
|
2234
|
+
playbackSpeed: "Oynatma Hızı",
|
|
2235
|
+
normal: "Normal",
|
|
2236
|
+
quality: "Kalite",
|
|
2237
|
+
captions: "Altyazı",
|
|
2238
|
+
captionsOff: "Kapalı",
|
|
2239
|
+
captionSettings: "Altyazı ayarları",
|
|
2240
|
+
rewardedButton: "{quality} kilidini aç",
|
|
2241
|
+
rewardedTitle: "{quality} kalitesini aç",
|
|
2242
|
+
rewardedBody: "Kısa bir reklam izleyin, {quality} kalitesi {duration} açık kalsın. Vazgeçerseniz video şu anki kalitede devam eder.",
|
|
2243
|
+
rewardedWatch: "Reklamı izle",
|
|
2244
|
+
rewardedDecline: "Vazgeç",
|
|
2245
|
+
rewardedLoading: "Reklam hazırlanıyor…",
|
|
2246
|
+
rewardedNoFill: "Şu an gösterilecek reklam yok. Biraz sonra tekrar deneyin.",
|
|
2247
|
+
rewardedOk: "Tamam",
|
|
2248
|
+
rewardedUnlocked: "{quality} açıldı",
|
|
2249
|
+
rewardedUnlockedNoAd: "Şu an reklam yoktu — {quality} yine de açıldı",
|
|
2250
|
+
rewardedForVideo: "bu video boyunca",
|
|
2251
|
+
rewardedForSession: "bu oturum boyunca",
|
|
2252
|
+
rewardedForMinutes: "{n} dakika boyunca",
|
|
2253
|
+
sponsorPresents: "{name} sunar",
|
|
2254
|
+
captionSize: "Yazı Boyutu",
|
|
2255
|
+
captionSizeSmall: "Küçük",
|
|
2256
|
+
captionSizeNormal: "Normal",
|
|
2257
|
+
captionSizeLarge: "Büyük",
|
|
2258
|
+
captionResetPosition: "Konumu sıfırla",
|
|
2259
|
+
captionBgColor: "Arka Plan Rengi",
|
|
2260
|
+
captionTextColor: "Yazı Rengi",
|
|
2261
|
+
captionDragHandle: "Altyazı konumu — tutup sürükleyin",
|
|
2262
|
+
autoQuality: "Oto",
|
|
2263
|
+
loop: "Döngü",
|
|
2264
|
+
close: "Kapat",
|
|
2265
|
+
retry: "Tekrar Dene",
|
|
2266
|
+
errorAborted: "Video yüklemesi iptal edildi.",
|
|
2267
|
+
errorNetwork: "Ağ hatası — video yüklenemedi.",
|
|
2268
|
+
errorDecode: "Video kodu çözülemedi.",
|
|
2269
|
+
errorSrcNotSupported: "Bu video kaynağı desteklenmiyor.",
|
|
2270
|
+
errorDrm: "Bu korumalı video bu cihazda ya da tarayıcıda oynatılamıyor.",
|
|
2271
|
+
errorGeneric: "Video oynatılırken bir hata oluştu.",
|
|
2272
|
+
errorCode: "Hata kodu",
|
|
2273
|
+
countdownRemaining: "Kalan süre",
|
|
2274
|
+
geoDefaultWarning: "Erişim engellendi.",
|
|
2275
|
+
geoUnknownCountry: "Ülke bilgisi bulunamadı.",
|
|
2276
|
+
redirectCancel: "İptal",
|
|
2277
|
+
redirectPlayNow: "Şimdi Oynat",
|
|
2278
|
+
redirectCountdown: (n) => `Sıradaki video ${n} saniye içinde oynatılacak.`,
|
|
2279
|
+
redirectNowPlaying: "Video oynatılıyor...",
|
|
2280
|
+
redirectUpNext: "Sıradaki",
|
|
2281
|
+
redirectCancelCard: "Sıradakini iptal et",
|
|
2282
|
+
redirectSuggestions: "Önerilen videolar",
|
|
2283
|
+
redirectReplay: "Tekrar izle",
|
|
2284
|
+
redirectCloseSuggestions: "Önerileri kapat",
|
|
2285
|
+
transcript: "Transkript",
|
|
2286
|
+
transcriptSearch: "Transkriptte ara",
|
|
2287
|
+
transcriptClose: "Transkripti kapat",
|
|
2288
|
+
transcriptTrack: "Transkript dili",
|
|
2289
|
+
transcriptEmpty: "Bu video için altyazı yok.",
|
|
2290
|
+
transcriptNoResults: "Sonuç bulunamadı.",
|
|
2291
|
+
transcriptWaiting: "Altyazılar yükleniyor…",
|
|
2292
|
+
pipPlaying: "Resim içinde resim penceresinde oynatılıyor",
|
|
2293
|
+
pipBack: "Buraya geri al",
|
|
2294
|
+
interactivePoll: "Anket",
|
|
2295
|
+
interactiveQuiz: "Soru",
|
|
2296
|
+
interactiveCorrect: "Doğru!",
|
|
2297
|
+
interactiveWrong: "Yanlış",
|
|
2298
|
+
interactiveBuy: "Satın al",
|
|
2299
|
+
interactiveGo: "Git",
|
|
2300
|
+
interactiveSponsored: "Sponsorlu",
|
|
2301
|
+
interactiveClose: "Kapat",
|
|
2302
|
+
interactiveVotes: (n) => `%${n}`,
|
|
2303
|
+
skipIntro: "İntroyu atla",
|
|
2304
|
+
skipRecap: "Özeti atla",
|
|
2305
|
+
skipCredits: "Jeneriği atla",
|
|
2306
|
+
skipSegment: "Atla",
|
|
2307
|
+
a11yMenu: "Erişilebilirlik",
|
|
2308
|
+
a11yZoom: "Yakınlaştırma",
|
|
2309
|
+
a11yFilter: "Görüntü filtresi",
|
|
2310
|
+
a11yFilterNone: "Doğal",
|
|
2311
|
+
a11yFilterGrayscale: "Siyah-beyaz",
|
|
2312
|
+
a11yFilterDaylight: "Gün ışığı",
|
|
2313
|
+
a11yFilterNight: "Gece ışığı",
|
|
2314
|
+
a11yFilterContrast: "Yüksek kontrast",
|
|
2315
|
+
a11yFilterProtanopia: "Kırmızı körlüğü",
|
|
2316
|
+
a11yFilterDeuteranopia: "Yeşil körlüğü",
|
|
2317
|
+
a11yFilterTritanopia: "Mavi körlüğü",
|
|
2318
|
+
a11yMono: "Mono ses",
|
|
2319
|
+
a11yBoost: "Ses güçlendirme",
|
|
2320
|
+
a11yLargeControls: "Büyük kontroller",
|
|
2321
|
+
a11yShortcuts: "Klavye kısayolları",
|
|
2322
|
+
a11yOn: "Açık",
|
|
2323
|
+
a11yOff: "Kapalı",
|
|
2324
|
+
a11yUnavailable: "Kullanılamaz",
|
|
2325
|
+
a11yZoomReset: "Yakınlaştırmayı sıfırla",
|
|
2326
|
+
a11yClose: "Kapat",
|
|
2327
|
+
a11yKeyPlay: "Oynat / duraklat",
|
|
2328
|
+
a11yKeySeek: (n) => `${n} sn geri / ileri`,
|
|
2329
|
+
a11yKeyVolume: "Sesi aç / kıs",
|
|
2330
|
+
a11yKeyMute: "Sesi kapat / aç",
|
|
2331
|
+
a11yKeyFullscreen: "Tam ekran",
|
|
2332
|
+
a11yKeyFrame: "Bir kare geri / ileri",
|
|
2333
|
+
a11yKeyZoom: "Yakınlaştır / uzaklaştır, sıfırla",
|
|
2334
|
+
a11yKeyPan: "Yakınlaştırılmış görüntüde gezin",
|
|
2335
|
+
a11yKeyShortcuts: "Bu listeyi aç / kapat",
|
|
2336
|
+
historyResumed: (n) => `Kaldığınız yerden devam: ${n}`,
|
|
2337
|
+
historyRestart: "Baştan başla",
|
|
2338
|
+
qrResumeTitle: "Devam etmek için kodu telefonunuzla okutun",
|
|
2339
|
+
qrResumeDontShowAgain: "Bir daha gösterme",
|
|
2340
|
+
qrResumeContinue: "Devam Et",
|
|
2341
|
+
qrResumeMenuLabel: "QR ile Devam Et",
|
|
2342
|
+
qrResumeOn: "Açık",
|
|
2343
|
+
qrResumeOff: "Kapalı",
|
|
2344
|
+
pauseAdLabel: "Sponsorlu",
|
|
2345
|
+
pauseAdClose: "Reklamı kapat",
|
|
2346
|
+
adTriggerLabel: "Reklam",
|
|
2347
|
+
castButton: "TV'ye yayınla",
|
|
2348
|
+
airplayButton: "AirPlay",
|
|
2349
|
+
castPlayingOn: "{device} cihazında oynatılıyor",
|
|
2350
|
+
castDeviceFallback: "TV",
|
|
2351
|
+
castAdOnTv: "TV'de reklam oynatılıyor",
|
|
2352
|
+
airplayPlaying: "AirPlay ile oynatılıyor",
|
|
2353
|
+
pauseAdResume: "Videoya devam et",
|
|
2354
|
+
markerLearnMore: "Daha fazla bilgi",
|
|
2355
|
+
markerContinue: "Devam et",
|
|
2356
|
+
playlistTitle: "Oynatma Listesi",
|
|
2357
|
+
playlistPrev: "Önceki",
|
|
2358
|
+
playlistNext: "Sonraki",
|
|
2359
|
+
videoFallbackTitle: (n) => `Video ${n + 1}`,
|
|
2360
|
+
storyPrev: "Önceki video",
|
|
2361
|
+
storyNext: "Sonraki video",
|
|
2362
|
+
storyAllVideos: "Tüm videolar",
|
|
2363
|
+
dubbingTitle: "Ses / Dil",
|
|
2364
|
+
liveClock: "Canlı saat",
|
|
2365
|
+
live: "CANLI",
|
|
2366
|
+
goToLive: "Canlıya git"
|
|
2367
|
+
}, ii = {
|
|
2368
|
+
play: "Play",
|
|
2369
|
+
pause: "Pause",
|
|
2370
|
+
mute: "Mute",
|
|
2371
|
+
unmute: "Unmute",
|
|
2372
|
+
volume: "Volume",
|
|
2373
|
+
seekBar: "Seek",
|
|
2374
|
+
settings: "Settings",
|
|
2375
|
+
pip: "Picture-in-picture",
|
|
2376
|
+
skipBack: (n) => `Back ${n} seconds`,
|
|
2377
|
+
skipForward: (n) => `Forward ${n} seconds`,
|
|
2378
|
+
secondsShort: "s",
|
|
2379
|
+
audioTrack: "Audio",
|
|
2380
|
+
statsTitle: "Stats",
|
|
2381
|
+
statsClose: "Close stats",
|
|
2382
|
+
statsEngine: "Engine",
|
|
2383
|
+
statsResolution: "Video / viewport",
|
|
2384
|
+
statsQuality: "Quality",
|
|
2385
|
+
statsCodecs: "Codecs",
|
|
2386
|
+
statsBandwidth: "Bandwidth",
|
|
2387
|
+
statsBuffer: "Buffer (ahead)",
|
|
2388
|
+
statsDropped: "Dropped frames",
|
|
2389
|
+
statsLatency: "Live latency",
|
|
2390
|
+
statsSpeedVolume: "Speed / volume",
|
|
2391
|
+
statsSource: "Source",
|
|
2392
|
+
statsVersion: "Version",
|
|
2393
|
+
debugTitle: "Debug log",
|
|
2394
|
+
debugClose: "Close debug log",
|
|
2395
|
+
debugCopy: "Copy",
|
|
2396
|
+
debugCopied: "Copied",
|
|
2397
|
+
debugClear: "Clear",
|
|
2398
|
+
debugEmpty: "No errors logged.",
|
|
2399
|
+
debugFatal: "Stopped playback",
|
|
2400
|
+
debugSourceMedia: "Media",
|
|
2401
|
+
debugSourceStream: "Stream",
|
|
2402
|
+
debugSourceAds: "Ads",
|
|
2403
|
+
debugSourceSubtitles: "Subtitles",
|
|
2404
|
+
debugSourcePlayer: "Player",
|
|
2405
|
+
adLabel: "Ad",
|
|
2406
|
+
adReturnFullscreen: "Back to full screen",
|
|
2407
|
+
adReturnPip: "Back to picture-in-picture",
|
|
2408
|
+
audioVinyl: "Record — turn it to scrub",
|
|
2409
|
+
fullscreenEnter: "Fullscreen",
|
|
2410
|
+
fullscreenExit: "Exit fullscreen",
|
|
2411
|
+
playbackSpeed: "Playback speed",
|
|
2412
|
+
normal: "Normal",
|
|
2413
|
+
quality: "Quality",
|
|
2414
|
+
captions: "Captions",
|
|
2415
|
+
captionsOff: "Off",
|
|
2416
|
+
captionSettings: "Subtitle settings",
|
|
2417
|
+
rewardedButton: "Unlock {quality}",
|
|
2418
|
+
rewardedTitle: "Unlock {quality}",
|
|
2419
|
+
rewardedBody: "Watch a short ad to keep {quality} unlocked {duration}. If you skip it, the video keeps playing at the current quality.",
|
|
2420
|
+
rewardedWatch: "Watch ad",
|
|
2421
|
+
rewardedDecline: "No thanks",
|
|
2422
|
+
rewardedLoading: "Loading ad…",
|
|
2423
|
+
rewardedNoFill: "No ad is available right now. Please try again in a moment.",
|
|
2424
|
+
rewardedOk: "OK",
|
|
2425
|
+
rewardedUnlocked: "{quality} unlocked",
|
|
2426
|
+
rewardedUnlockedNoAd: "No ad right now — {quality} unlocked anyway",
|
|
2427
|
+
rewardedForVideo: "for this video",
|
|
2428
|
+
rewardedForSession: "for this session",
|
|
2429
|
+
rewardedForMinutes: "for {n} minutes",
|
|
2430
|
+
sponsorPresents: "Presented by {name}",
|
|
2431
|
+
captionSize: "Font Size",
|
|
2432
|
+
captionSizeSmall: "Small",
|
|
2433
|
+
captionSizeNormal: "Normal",
|
|
2434
|
+
captionSizeLarge: "Large",
|
|
2435
|
+
captionResetPosition: "Reset position",
|
|
2436
|
+
captionBgColor: "Background Color",
|
|
2437
|
+
captionTextColor: "Text Color",
|
|
2438
|
+
captionDragHandle: "Caption position — drag to move",
|
|
2439
|
+
autoQuality: "Auto",
|
|
2440
|
+
loop: "Loop",
|
|
2441
|
+
close: "Close",
|
|
2442
|
+
retry: "Retry",
|
|
2443
|
+
errorAborted: "Video loading was aborted.",
|
|
2444
|
+
errorNetwork: "Network error — the video could not load.",
|
|
2445
|
+
errorDecode: "The video could not be decoded.",
|
|
2446
|
+
errorSrcNotSupported: "This video source is not supported.",
|
|
2447
|
+
errorDrm: "This protected video cannot be played on this device or browser.",
|
|
2448
|
+
errorGeneric: "An error occurred while playing the video.",
|
|
2449
|
+
errorCode: "Error code",
|
|
2450
|
+
countdownRemaining: "Time remaining",
|
|
2451
|
+
geoDefaultWarning: "Access denied.",
|
|
2452
|
+
geoUnknownCountry: "No country information found.",
|
|
2453
|
+
redirectCancel: "Cancel",
|
|
2454
|
+
redirectPlayNow: "Play now",
|
|
2455
|
+
redirectCountdown: (n) => `Next video will play in ${n} seconds.`,
|
|
2456
|
+
redirectUpNext: "Up next",
|
|
2457
|
+
redirectCancelCard: "Cancel up next",
|
|
2458
|
+
redirectSuggestions: "Recommended videos",
|
|
2459
|
+
redirectReplay: "Watch again",
|
|
2460
|
+
redirectCloseSuggestions: "Close suggestions",
|
|
2461
|
+
transcript: "Transcript",
|
|
2462
|
+
transcriptSearch: "Search transcript",
|
|
2463
|
+
transcriptClose: "Close transcript",
|
|
2464
|
+
transcriptTrack: "Transcript language",
|
|
2465
|
+
transcriptEmpty: "No captions for this video.",
|
|
2466
|
+
transcriptNoResults: "No results.",
|
|
2467
|
+
transcriptWaiting: "Loading captions…",
|
|
2468
|
+
pipPlaying: "Playing in picture-in-picture",
|
|
2469
|
+
pipBack: "Bring it back",
|
|
2470
|
+
interactivePoll: "Poll",
|
|
2471
|
+
interactiveQuiz: "Quiz",
|
|
2472
|
+
interactiveCorrect: "Correct!",
|
|
2473
|
+
interactiveWrong: "Wrong",
|
|
2474
|
+
interactiveBuy: "Buy now",
|
|
2475
|
+
interactiveGo: "Open",
|
|
2476
|
+
interactiveSponsored: "Sponsored",
|
|
2477
|
+
interactiveClose: "Close",
|
|
2478
|
+
interactiveVotes: (n) => `${n}%`,
|
|
2479
|
+
skipIntro: "Skip intro",
|
|
2480
|
+
skipRecap: "Skip recap",
|
|
2481
|
+
skipCredits: "Skip credits",
|
|
2482
|
+
skipSegment: "Skip",
|
|
2483
|
+
a11yMenu: "Accessibility",
|
|
2484
|
+
a11yZoom: "Zoom",
|
|
2485
|
+
a11yFilter: "Picture filter",
|
|
2486
|
+
a11yFilterNone: "Natural",
|
|
2487
|
+
a11yFilterGrayscale: "Black and white",
|
|
2488
|
+
a11yFilterDaylight: "Daylight",
|
|
2489
|
+
a11yFilterNight: "Night light",
|
|
2490
|
+
a11yFilterContrast: "High contrast",
|
|
2491
|
+
a11yFilterProtanopia: "Red-blind",
|
|
2492
|
+
a11yFilterDeuteranopia: "Green-blind",
|
|
2493
|
+
a11yFilterTritanopia: "Blue-blind",
|
|
2494
|
+
a11yMono: "Mono audio",
|
|
2495
|
+
a11yBoost: "Volume boost",
|
|
2496
|
+
a11yLargeControls: "Large controls",
|
|
2497
|
+
a11yShortcuts: "Keyboard shortcuts",
|
|
2498
|
+
a11yOn: "On",
|
|
2499
|
+
a11yOff: "Off",
|
|
2500
|
+
a11yUnavailable: "Unavailable",
|
|
2501
|
+
a11yZoomReset: "Reset zoom",
|
|
2502
|
+
a11yClose: "Close",
|
|
2503
|
+
a11yKeyPlay: "Play / pause",
|
|
2504
|
+
a11yKeySeek: (n) => `Back / forward ${n} s`,
|
|
2505
|
+
a11yKeyVolume: "Volume up / down",
|
|
2506
|
+
a11yKeyMute: "Mute / unmute",
|
|
2507
|
+
a11yKeyFullscreen: "Fullscreen",
|
|
2508
|
+
a11yKeyFrame: "Previous / next frame",
|
|
2509
|
+
a11yKeyZoom: "Zoom in / out, reset",
|
|
2510
|
+
a11yKeyPan: "Move around the zoomed picture",
|
|
2511
|
+
a11yKeyShortcuts: "Open / close this list",
|
|
2512
|
+
historyResumed: (n) => `Resumed at ${n}`,
|
|
2513
|
+
historyRestart: "Start over",
|
|
2514
|
+
redirectNowPlaying: "Now playing...",
|
|
2515
|
+
qrResumeTitle: "Scan to continue watching on your phone",
|
|
2516
|
+
qrResumeDontShowAgain: "Don't show again",
|
|
2517
|
+
qrResumeContinue: "Continue",
|
|
2518
|
+
qrResumeMenuLabel: "Continue via QR",
|
|
2519
|
+
qrResumeOn: "On",
|
|
2520
|
+
qrResumeOff: "Off",
|
|
2521
|
+
pauseAdLabel: "Sponsored",
|
|
2522
|
+
pauseAdClose: "Close ad",
|
|
2523
|
+
adTriggerLabel: "Advertisement",
|
|
2524
|
+
castButton: "Cast to TV",
|
|
2525
|
+
airplayButton: "AirPlay",
|
|
2526
|
+
castPlayingOn: "Playing on {device}",
|
|
2527
|
+
castDeviceFallback: "TV",
|
|
2528
|
+
castAdOnTv: "An ad is playing on the TV",
|
|
2529
|
+
airplayPlaying: "Playing via AirPlay",
|
|
2530
|
+
pauseAdResume: "Resume video",
|
|
2531
|
+
markerLearnMore: "Learn more",
|
|
2532
|
+
markerContinue: "Continue",
|
|
2533
|
+
playlistTitle: "Playlist",
|
|
2534
|
+
playlistPrev: "Previous",
|
|
2535
|
+
playlistNext: "Next",
|
|
2536
|
+
videoFallbackTitle: (n) => `Video ${n + 1}`,
|
|
2537
|
+
storyPrev: "Previous video",
|
|
2538
|
+
storyNext: "Next video",
|
|
2539
|
+
storyAllVideos: "All videos",
|
|
2540
|
+
dubbingTitle: "Audio / Language",
|
|
2541
|
+
liveClock: "Live clock",
|
|
2542
|
+
live: "LIVE",
|
|
2543
|
+
goToLive: "Go to live"
|
|
2544
|
+
}, si = { tr: We, en: ii };
|
|
2545
|
+
function Qe(n, t) {
|
|
2546
|
+
return { ...si[n ?? "tr"] ?? We, ...t };
|
|
2547
|
+
}
|
|
2548
|
+
function ri(n, t, e) {
|
|
2549
|
+
Object.assign(n, Qe(t, e));
|
|
2550
|
+
}
|
|
2551
|
+
const te = 8e3;
|
|
2552
|
+
function ai(n) {
|
|
2553
|
+
var t;
|
|
2554
|
+
return (t = n.live) != null && t.scte35 && !n.adTagPreroll && !n.adTagVmap ? !1 : !!(n.adTagPreroll || n.adTagVmap);
|
|
2555
|
+
}
|
|
2556
|
+
class oi {
|
|
2557
|
+
constructor(t) {
|
|
2558
|
+
/** Kapı kurulu (preroll bekleniyor) mu. */
|
|
2559
|
+
a(this, "armed", !1);
|
|
2560
|
+
/** Kapı kuruluyken kullanıcı / autoplay oynatmak istedi mi. */
|
|
2561
|
+
a(this, "playIntent", !1);
|
|
2562
|
+
/** Kapının kendi pause() çağrısının ürettiği 'pause' olayı yutulsun. */
|
|
2563
|
+
a(this, "swallowNextPause", !1);
|
|
2564
|
+
a(this, "timeoutMs", te);
|
|
2565
|
+
a(this, "timer", null);
|
|
2566
|
+
/** İlk oynatma isteği (reklam plugin'i bekleyen preroll'u başlatır). */
|
|
2567
|
+
a(this, "onPlayIntent", null);
|
|
2568
|
+
/** Zaman aşımı — reklam plugin'i geç gelecek cevabı iptal eder. Kapı bundan sonra içeriği başlatarak açılır. */
|
|
2569
|
+
a(this, "onTimeout", null);
|
|
2570
|
+
/** "Preroll bekleniyor" durumu değişti (UI: yükleme halkası, merkez buton). */
|
|
2571
|
+
a(this, "onWaitChange", null);
|
|
2572
|
+
a(this, "onPlay", (t) => {
|
|
2573
|
+
this.armed && (t.stopImmediatePropagation(), this.swallowNextPause = !0, this.video.pause(), this.registerIntent());
|
|
2574
|
+
});
|
|
2575
|
+
a(this, "onPause", (t) => {
|
|
2576
|
+
this.swallowNextPause && (this.swallowNextPause = !1, t.stopImmediatePropagation());
|
|
2577
|
+
});
|
|
2578
|
+
this.video = t, t.addEventListener("play", this.onPlay), t.addEventListener("pause", this.onPause);
|
|
2579
|
+
}
|
|
2580
|
+
get isArmed() {
|
|
2581
|
+
return this.armed;
|
|
2582
|
+
}
|
|
2583
|
+
/** Kapı kurulu ve oynatma istendi — kullanıcı preroll'u bekliyor. */
|
|
2584
|
+
get isWaiting() {
|
|
2585
|
+
return this.armed && this.playIntent;
|
|
2586
|
+
}
|
|
2587
|
+
get hasPlayIntent() {
|
|
2588
|
+
return this.playIntent;
|
|
2589
|
+
}
|
|
2590
|
+
arm(t = te) {
|
|
2591
|
+
this.clearTimer(), this.armed = !0, this.playIntent = !1, this.timeoutMs = t;
|
|
2592
|
+
}
|
|
2593
|
+
/**
|
|
2594
|
+
* Elementin `play()`'i için: kapı kuruluysa videoya dokunmadan oynatma isteği kaydedilir (play() promise'i
|
|
2595
|
+
* pause() ile reddedilip konsola "interrupted by a call to pause()" düşmesin). true → istek kapıda.
|
|
2596
|
+
*/
|
|
2597
|
+
interceptPlay() {
|
|
2598
|
+
return this.armed ? (this.registerIntent(), !0) : !1;
|
|
2599
|
+
}
|
|
2600
|
+
/** Bekleme sırasında kullanıcı vazgeçti (duraklat'a bastı). Kapı kurulu kalır; preroll geri döner ama başlatılmaz. */
|
|
2601
|
+
cancelIntent() {
|
|
2602
|
+
var t;
|
|
2603
|
+
this.isWaiting && (this.playIntent = !1, this.clearTimer(), (t = this.onWaitChange) == null || t.call(this, !1));
|
|
2604
|
+
}
|
|
2605
|
+
/** Preroll sonuçlandı. `resume`: oynatma istenmişse içerik şimdi başlasın (reklam yok / hata / zaman aşımı). */
|
|
2606
|
+
release(t) {
|
|
2607
|
+
var i;
|
|
2608
|
+
if (!this.armed) return;
|
|
2609
|
+
const e = this.playIntent;
|
|
2610
|
+
this.armed = !1, this.playIntent = !1, this.clearTimer(), e && ((i = this.onWaitChange) == null || i.call(this, !1)), t && e && this.video.play().catch(() => {
|
|
2611
|
+
});
|
|
2612
|
+
}
|
|
2613
|
+
destroy() {
|
|
2614
|
+
this.clearTimer(), this.video.removeEventListener("play", this.onPlay), this.video.removeEventListener("pause", this.onPause);
|
|
2615
|
+
}
|
|
2616
|
+
registerIntent() {
|
|
2617
|
+
var t, e;
|
|
2618
|
+
this.playIntent || (this.playIntent = !0, (t = this.onWaitChange) == null || t.call(this, !0), this.timer = setTimeout(() => {
|
|
2619
|
+
var i;
|
|
2620
|
+
this.timer = null, (i = this.onTimeout) == null || i.call(this), this.release(!0);
|
|
2621
|
+
}, this.timeoutMs), (e = this.onPlayIntent) == null || e.call(this));
|
|
2622
|
+
}
|
|
2623
|
+
clearTimer() {
|
|
2624
|
+
this.timer && clearTimeout(this.timer), this.timer = null;
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
const ni = [
|
|
2628
|
+
"https://imasdk.googleapis.com",
|
|
2629
|
+
"https://pubads.g.doubleclick.net",
|
|
2630
|
+
"https://securepubads.g.doubleclick.net",
|
|
2631
|
+
"https://pagead2.googlesyndication.com"
|
|
2632
|
+
];
|
|
2633
|
+
let Re = !1;
|
|
2634
|
+
function li() {
|
|
2635
|
+
if (!(Re || typeof document > "u")) {
|
|
2636
|
+
Re = !0;
|
|
2637
|
+
for (const n of ni) {
|
|
2638
|
+
if (document.head.querySelector(`link[rel="preconnect"][href="${n}"]`)) continue;
|
|
2639
|
+
const t = document.createElement("link");
|
|
2640
|
+
t.rel = "preconnect", t.href = n, document.head.appendChild(t);
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
const ze = [0.5, 0.75, 1, 1.25, 1.5, 2], Ie = 1200, hi = 3e3, Oe = 5e3, pi = 10, Ne = 10, ci = 5, Fe = "stream-audio", V = "1.6.0", di = {
|
|
2645
|
+
hls: "application/x-mpegurl",
|
|
2646
|
+
mp4: "video/mp4",
|
|
2647
|
+
webm: "video/webm",
|
|
2648
|
+
mp3: "audio/mpeg",
|
|
2649
|
+
m4a: "audio/mp4",
|
|
2650
|
+
aac: "audio/aac",
|
|
2651
|
+
ogg: "audio/ogg",
|
|
2652
|
+
wav: "audio/wav",
|
|
2653
|
+
flac: "audio/flac"
|
|
2654
|
+
}, ui = (
|
|
2655
|
+
/* html */
|
|
2656
|
+
`
|
|
2657
|
+
<div class="video-area">
|
|
2658
|
+
<div class="media-layer">
|
|
2659
|
+
<video part="video" playsinline webkit-playsinline preload="metadata"></video>
|
|
2660
|
+
<div part="ad-layer" class="hp:absolute hp:inset-0 hp:z-10 hp:hidden"></div>
|
|
2661
|
+
</div>
|
|
2662
|
+
</div>
|
|
2663
|
+
`
|
|
2664
|
+
);
|
|
2665
|
+
function mi(n) {
|
|
2666
|
+
if (typeof n == "number") return Number.isFinite(n) && n > 0 ? String(n) : null;
|
|
2667
|
+
if (typeof n != "string") return null;
|
|
2668
|
+
const t = n.trim().match(/^(\d+(?:\.\d+)?)\s*(?:[:/]\s*(\d+(?:\.\d+)?))?$/);
|
|
2669
|
+
return !t || Number(t[1]) <= 0 || t[2] !== void 0 && Number(t[2]) <= 0 ? null : t[2] !== void 0 ? `${t[1]} / ${t[2]}` : t[1];
|
|
2670
|
+
}
|
|
2671
|
+
class Xe extends HTMLElement {
|
|
2672
|
+
constructor() {
|
|
2673
|
+
super();
|
|
2674
|
+
a(this, "root");
|
|
2675
|
+
a(this, "videoArea");
|
|
2676
|
+
a(this, "videoEl");
|
|
2677
|
+
a(this, "adLayerEl");
|
|
2678
|
+
a(this, "chromeEl");
|
|
2679
|
+
a(this, "centerPlayButton");
|
|
2680
|
+
a(this, "captionRenderer");
|
|
2681
|
+
/** options.miniProgress açıkken kurulur. */
|
|
2682
|
+
a(this, "miniProgress", null);
|
|
2683
|
+
a(this, "chromeVisible", !0);
|
|
2684
|
+
a(this, "sourceManager");
|
|
2685
|
+
a(this, "controlBar");
|
|
2686
|
+
a(this, "tooltip");
|
|
2687
|
+
a(this, "keyboard");
|
|
2688
|
+
a(this, "loadingSpinner");
|
|
2689
|
+
/**
|
|
2690
|
+
* Preroll kapısı — reklam plugin'i yüklenmeden önce kurulur ki autoplay / ilk play araya kaçmasın.
|
|
2691
|
+
* Video'nun 'play'/'pause' dinleyicilerinin İLKİ olmalı (yuttuğu olayları UI ve hp:play görmesin).
|
|
2692
|
+
*/
|
|
2693
|
+
a(this, "prerollGate");
|
|
2694
|
+
/** Ads plugin kurulumu sürüyor — erken başlatılan kurulum ile sonraki bekleme aynı promise'i paylaşır. */
|
|
2695
|
+
a(this, "adsInstall", null);
|
|
2696
|
+
/** Yükleme halkası açık (medya takıldı / preroll bekleniyor) — kontroller bu sırada otomatik gizlenmez. */
|
|
2697
|
+
a(this, "loadingActive", !1);
|
|
2698
|
+
a(this, "errorScreen");
|
|
2699
|
+
/** İleri/geri sarmada sağda/solda beliren anlık bildirim. */
|
|
2700
|
+
a(this, "seekFeedback");
|
|
2701
|
+
a(this, "contextMenu");
|
|
2702
|
+
/** options.contextMenu çözülmüş hali — null = kapalı (tarayıcının kendi menüsü). */
|
|
2703
|
+
a(this, "contextMenuConfig", { stats: !1 });
|
|
2704
|
+
/** İlk açılışta yüklenir (plugins/stats). */
|
|
2705
|
+
a(this, "statsPanel", null);
|
|
2706
|
+
a(this, "debugPanel", null);
|
|
2707
|
+
/** options.debug — sağ tık menüsündeki "Hata ayıklama" girişini açar. */
|
|
2708
|
+
a(this, "debugEnabled", !1);
|
|
2709
|
+
/** Player'ın tüm hataları (medya, yayın, reklam, altyazı) — her zaman tutulur; bkz. `errorLog`. */
|
|
2710
|
+
a(this, "log", new Qt());
|
|
2711
|
+
/** Son basılan işaretçi türü — sağ tık menüsü yalnızca fareyle (dokunmatikte uzun basma gesture'a ait). */
|
|
2712
|
+
a(this, "lastPointerType", "mouse");
|
|
2713
|
+
/** options.tapGestures kuruluysa (plugins/tap-gestures). */
|
|
2714
|
+
a(this, "tapGestures", null);
|
|
2715
|
+
/** Dokunmadan sonra tarayıcının ürettiği uyumluluk mouse olayları ikinci bir dokunuş sayılmasın. */
|
|
2716
|
+
a(this, "lastTouchEndAt", 0);
|
|
2717
|
+
/** Video alanı boyutu değişince merkez play butonunun yerini yeniden hesaplar. */
|
|
2718
|
+
a(this, "centerPlayObserver", null);
|
|
2719
|
+
a(this, "tapToPlay", "auto");
|
|
2720
|
+
a(this, "adsController", null);
|
|
2721
|
+
a(this, "gestureControls", null);
|
|
2722
|
+
a(this, "loopSection", null);
|
|
2723
|
+
a(this, "audioStage", null);
|
|
2724
|
+
/** Kalite kilidi (rewardedUnlock eklentisi) — kilitliyse yüksek kaliteler menüde kilitli, HLS'te üst sınır var. */
|
|
2725
|
+
a(this, "qualityGate", null);
|
|
2726
|
+
a(this, "rewardedUnlock", null);
|
|
2727
|
+
a(this, "sponsorship", null);
|
|
2728
|
+
/** Son uygulanan MP4 kaynak listesi ve seçili etiket — kilit açılınca menü yeniden kurulur. */
|
|
2729
|
+
/** Çalan biçim grubunun kaynakları (kalite menüsü bunlar) — bkz. `sourceGroups`. */
|
|
2730
|
+
a(this, "currentSources", []);
|
|
2731
|
+
/** `sources` biçime göre gruplu, `sourcePriority` sırasıyla; ölümcül hatada sıradakine geçilir. */
|
|
2732
|
+
a(this, "sourceGroups", []);
|
|
2733
|
+
a(this, "activeGroup", 0);
|
|
2734
|
+
/** Sıradaki gruba geçiş başladı — aynı arızanın ikinci hata olayı hata ekranı açmasın. */
|
|
2735
|
+
a(this, "fallbackPending", !1);
|
|
2736
|
+
/** hls.js ölümcül hatasının MediaError karşılığı (video.error oluşmaz) — hp:sourcefallback detayı için. */
|
|
2737
|
+
a(this, "streamErrorCode");
|
|
2738
|
+
a(this, "activeSourceLabel", "");
|
|
2739
|
+
a(this, "lastHlsLevels", []);
|
|
2740
|
+
a(this, "lastHlsActive", -1);
|
|
2741
|
+
/** options.audio — kapak + plak sahnesi, kontroller hep görünür, tam ekran yok. */
|
|
2742
|
+
a(this, "audioMode", !1);
|
|
2743
|
+
a(this, "inViewAutoplay", null);
|
|
2744
|
+
a(this, "unregisterSticky", null);
|
|
2745
|
+
a(this, "playlistRunner", null);
|
|
2746
|
+
a(this, "hopeStory", null);
|
|
2747
|
+
a(this, "markProgress", null);
|
|
2748
|
+
a(this, "segments", null);
|
|
2749
|
+
a(this, "spriteThumbnails", null);
|
|
2750
|
+
a(this, "countdownScreen", null);
|
|
2751
|
+
a(this, "geoChecker", null);
|
|
2752
|
+
a(this, "redirectScreen", null);
|
|
2753
|
+
a(this, "redirectKey", "");
|
|
2754
|
+
a(this, "transcript", null);
|
|
2755
|
+
a(this, "transcriptKey", "");
|
|
2756
|
+
a(this, "heatmap", null);
|
|
2757
|
+
a(this, "heatmapKey", "");
|
|
2758
|
+
a(this, "docPip", null);
|
|
2759
|
+
a(this, "docPipOptions", null);
|
|
2760
|
+
a(this, "interactive", null);
|
|
2761
|
+
a(this, "interactiveKey", "");
|
|
2762
|
+
/** Eklentileri çalıştıran taraf — yalnızca bir eklenti kullanılınca indirilir (plugin-api/PluginHost). */
|
|
2763
|
+
a(this, "pluginHost", null);
|
|
2764
|
+
/** Seçenekler uygulanırken eklenti senkronu bitince çözülür (reklam tag dönüşümü bekler). */
|
|
2765
|
+
a(this, "settlePlugins", () => {
|
|
2766
|
+
});
|
|
2767
|
+
a(this, "pluginsSettled", new Promise((e) => this.settlePlugins = e));
|
|
2768
|
+
/** `player.use()` ile çalışırken eklenenler. */
|
|
2769
|
+
a(this, "runtimePlugins", []);
|
|
2770
|
+
a(this, "offGlobalPlugins", null);
|
|
2771
|
+
a(this, "accessibility", null);
|
|
2772
|
+
a(this, "accessibilityKey", "");
|
|
2773
|
+
a(this, "playbackHistory", null);
|
|
2774
|
+
a(this, "qoeTracker", null);
|
|
2775
|
+
a(this, "analyticsKey", "");
|
|
2776
|
+
a(this, "historyKey", "");
|
|
2777
|
+
a(this, "qrResume", null);
|
|
2778
|
+
a(this, "pauseAd", null);
|
|
2779
|
+
a(this, "adTriggers", null);
|
|
2780
|
+
a(this, "castController", null);
|
|
2781
|
+
/** İçerik Chromecast'te oynuyor (player kumanda) — yerel reklam / otomatik oynatma devre dışı. */
|
|
2782
|
+
a(this, "casting", !1);
|
|
2783
|
+
a(this, "dubbing", null);
|
|
2784
|
+
a(this, "liveWallClock", null);
|
|
2785
|
+
a(this, "daiController", null);
|
|
2786
|
+
a(this, "instanceKey");
|
|
2787
|
+
a(this, "subtitleTracks", []);
|
|
2788
|
+
/** Altyazı seçiminin tek giriş noktası — iOS native tam ekrandan dönüşte de kullanılır. */
|
|
2789
|
+
a(this, "selectCaption", null);
|
|
2790
|
+
/** `applyOptions()`'ta aktif bir altyazı track'i seçiliyken `true` — dil değişince Boyut/Konum görünümünü tazelemek için. */
|
|
2791
|
+
a(this, "captionTrackActive", !1);
|
|
2792
|
+
/** `options.subtitles` izleri. */
|
|
2793
|
+
a(this, "optionTracks", []);
|
|
2794
|
+
/** Yayının izleri: hls.js'ten (havuzda, `sub:`/`cc:`) ya da tarayıcının native HLS in-band izleri (`native:`). */
|
|
2795
|
+
a(this, "streamTracks", []);
|
|
2796
|
+
/** hls.js aynı cue'yu (seek sonrası) yeniden gönderebilir — iz başına eklenenler. */
|
|
2797
|
+
a(this, "streamCueKeys", /* @__PURE__ */ new Map());
|
|
2798
|
+
/** Seçili altyazı — yayın izleri sonradan gelince seçim korunur. */
|
|
2799
|
+
a(this, "activeCaptionLabel", null);
|
|
2800
|
+
a(this, "streamAudio", { tracks: [], active: -1 });
|
|
2801
|
+
/**
|
|
2802
|
+
* countdownScreen varken gerçek init (kaynak + içerik plugin'leri) ertelenir; en güncel options snapshot'ı.
|
|
2803
|
+
* onComplete kaydı tek sefer yapılır (bkz. playbackInitRegistered) — init birden fazla kez tetiklenmesin.
|
|
2804
|
+
*/
|
|
2805
|
+
a(this, "pendingPlaybackOptions", null);
|
|
2806
|
+
a(this, "playbackInitRegistered", !1);
|
|
2807
|
+
/**
|
|
2808
|
+
* countdownScreen gibi alanlar yalnızca .options ile gelir. connectedCallback'teki ilk (options'suz) geçiş chrome'u
|
|
2809
|
+
* bir an açıp player'ı gösteriyordu; 'boot' bloklayıcısı gerçek options gelene kadar bekletir.
|
|
2810
|
+
*/
|
|
2811
|
+
a(this, "bootResolved", !1);
|
|
2812
|
+
a(this, "bootGraceTimer", null);
|
|
2813
|
+
/**
|
|
2814
|
+
* Son uygulanan `.options` nesnesi + attribute'lar. `.options` element sayfaya eklenmeden önce verilince
|
|
2815
|
+
* connectedCallback AYNI seçenekleri yeniden uyguluyordu; değişen bir şey yoksa bu ikinci geçiş atlanır.
|
|
2816
|
+
*/
|
|
2817
|
+
a(this, "lastSynced", null);
|
|
2818
|
+
/**
|
|
2819
|
+
* applyOptions'ın asenkron kısmı (plugin kurulumu + kaynak yükleme) aynı anda tek kez çalışır. İki geçiş
|
|
2820
|
+
* üst üste binince `!this.adsController` gibi kontroller ikisinde de geçiyor, plugin (ör. IMA) iki kez kuruluyordu.
|
|
2821
|
+
* Çalışırken gelen seçenekler bekletilir; bitince yalnızca en sonuncusu uygulanır.
|
|
2822
|
+
*/
|
|
2823
|
+
a(this, "pluginApplyRun", null);
|
|
2824
|
+
a(this, "pendingPluginOptions", null);
|
|
2825
|
+
a(this, "_options", {});
|
|
2826
|
+
a(this, "hideTimer", null);
|
|
2827
|
+
a(this, "cursorTimer", null);
|
|
2828
|
+
/** null = imleç hiç gizlenmez (options.cursorHideDelayMs: false). */
|
|
2829
|
+
a(this, "cursorHideDelayMs", Oe);
|
|
2830
|
+
/** Fare kontrollerin (buton/seek bar) üzerinde mi — üzerindeyken otomatik gizlenmez; videonun üstünde hareketsizse gizlenir. */
|
|
2831
|
+
a(this, "pointerOverControls", !1);
|
|
2832
|
+
/** Kalite menüsünde şu an HLS seviyeleri mi var (kaynak değişince temizlemek için). */
|
|
2833
|
+
a(this, "hlsQualitiesShown", !1);
|
|
2834
|
+
/** Son uygulanan options.showRemainingTime — bkz. applyOptions. */
|
|
2835
|
+
a(this, "appliedShowRemaining");
|
|
2836
|
+
a(this, "autoHideDelayMs", Ie);
|
|
2837
|
+
a(this, "tapCandidate", !1);
|
|
2838
|
+
a(this, "tapStartX", 0);
|
|
2839
|
+
a(this, "tapStartY", 0);
|
|
2840
|
+
/** Tüm UI'ın paylaştığı tek, mutable sözlük — dil değişince referans değil alanlar güncellenir. */
|
|
2841
|
+
a(this, "i18n", Qe("tr"));
|
|
2842
|
+
/** IMA SDK'nın kendi ad-UI dili (skip butonu/sayaç metni) de aynı dili takip etsin diye — bkz. plugins/ads/AdsController. */
|
|
2843
|
+
a(this, "localeCode", "tr");
|
|
2844
|
+
a(this, "onMediaError", () => {
|
|
2845
|
+
const e = this.videoEl.error;
|
|
2846
|
+
if (!e) return;
|
|
2847
|
+
const i = { 1: "MEDIA_ERR_ABORTED", 2: "MEDIA_ERR_NETWORK", 3: "MEDIA_ERR_DECODE", 4: "MEDIA_ERR_SRC_NOT_SUPPORTED" }, s = this.videoEl.currentSrc;
|
|
2848
|
+
this.log.add({
|
|
2849
|
+
source: "media",
|
|
2850
|
+
message: e.message || i[e.code] || `MediaError ${e.code}`,
|
|
2851
|
+
// Ses aygıtı yok (Firefox): video sessiz oynamaya devam ediyor — kayda düşer ama ölümcül değil.
|
|
2852
|
+
fatal: !ie(e),
|
|
2853
|
+
details: { code: e.code, name: i[e.code], src: s && !s.startsWith("blob:") ? s : s ? `MediaSource (${this.sourceManager.engine.engine})` : void 0 }
|
|
2854
|
+
});
|
|
2855
|
+
});
|
|
2856
|
+
a(this, "onSubtitleError", (e) => {
|
|
2857
|
+
const i = e.detail;
|
|
2858
|
+
this.log.add({ source: "subtitles", message: `Subtitle file could not be loaded: ${i.message}`, details: { src: i.src } });
|
|
2859
|
+
});
|
|
2860
|
+
a(this, "onPointerTypeTrack", (e) => {
|
|
2861
|
+
this.lastPointerType = e.pointerType;
|
|
2862
|
+
});
|
|
2863
|
+
/** Sağ tık: tarayıcı menüsü yerine player adı + sürüm (options.contextMenu). */
|
|
2864
|
+
a(this, "onContextMenu", (e) => {
|
|
2865
|
+
const i = this.contextMenuConfig;
|
|
2866
|
+
!i || this.lastPointerType !== "mouse" || (e.preventDefault(), this.contextMenu.show(e.clientX, e.clientY, [
|
|
2867
|
+
{ label: "HopeCorePlayer", meta: `v${V}` },
|
|
2868
|
+
...i.stats ? [{ label: this.i18n.statsTitle, onSelect: () => void this.toggleStats(!0) }] : [],
|
|
2869
|
+
// Yalnızca debug açıkken ve kayıtlı bir hata varsa.
|
|
2870
|
+
...this.debugEnabled && this.log.entries.length ? [{ label: this.i18n.debugTitle, meta: String(this.log.entries.length), onSelect: () => void this.showDebugLog() }] : []
|
|
2871
|
+
]));
|
|
2872
|
+
});
|
|
2873
|
+
a(this, "onStreamTextTracks", (e) => {
|
|
2874
|
+
const i = this.streamTracks.filter((s) => s.id.startsWith("native:"));
|
|
2875
|
+
if (!e.length)
|
|
2876
|
+
_e(this.videoEl, "stream"), this.streamCueKeys.clear(), this.streamTracks = i;
|
|
2877
|
+
else {
|
|
2878
|
+
const s = new Set([...this.optionTracks, ...i].map((r) => r.label));
|
|
2879
|
+
this.streamTracks = [
|
|
2880
|
+
...i,
|
|
2881
|
+
...e.map((r) => {
|
|
2882
|
+
const o = this.uniqueLabel(this.streamTrackLabel(r.label, r.lang) || r.id, r.kind === "captions" ? "CC" : r.lang || r.kind, s);
|
|
2883
|
+
return { id: r.id, label: o, track: Ge(this.videoEl, "stream", r.kind, o, r.lang) };
|
|
2884
|
+
})
|
|
2885
|
+
];
|
|
2886
|
+
}
|
|
2887
|
+
this.rebuildCaptions(this.activeCaptionLabel);
|
|
2888
|
+
});
|
|
2889
|
+
a(this, "onStreamCues", (e, i) => {
|
|
2890
|
+
var o;
|
|
2891
|
+
const s = (o = this.streamTracks.find((l) => l.id === e)) == null ? void 0 : o.track;
|
|
2892
|
+
if (!s) return;
|
|
2893
|
+
let r = this.streamCueKeys.get(s);
|
|
2894
|
+
r || this.streamCueKeys.set(s, r = /* @__PURE__ */ new Set());
|
|
2895
|
+
for (const l of i) {
|
|
2896
|
+
const h = `${l.startTime}|${l.endTime}|${l.text}`;
|
|
2897
|
+
r.has(h) || (r.add(h), s.addCue(l));
|
|
2898
|
+
}
|
|
2899
|
+
});
|
|
2900
|
+
/** Tarayıcının kendi (native HLS) altyazı izleri — bizim havuz izlerimiz ve metadata izleri hariç. */
|
|
2901
|
+
a(this, "onNativeTextTracksChanged", () => {
|
|
2902
|
+
if (this.sourceManager.engine.engine === "dash.js") return;
|
|
2903
|
+
const e = Array.from(this.videoEl.textTracks).filter((o) => (o.kind === "subtitles" || o.kind === "captions") && !At(o)), i = this.streamTracks.some((o) => o.id.startsWith("native:"));
|
|
2904
|
+
if (!e.length && !i) return;
|
|
2905
|
+
const s = this.streamTracks.filter((o) => !o.id.startsWith("native:")), r = new Set([...this.optionTracks, ...s].map((o) => o.label));
|
|
2906
|
+
this.streamTracks = [
|
|
2907
|
+
...s,
|
|
2908
|
+
...e.map((o, l) => ({
|
|
2909
|
+
id: `native:${l}`,
|
|
2910
|
+
label: this.uniqueLabel(o.label || o.language || `${this.i18n.captions} ${l + 1}`, o.language || String(l + 1), r),
|
|
2911
|
+
track: o
|
|
2912
|
+
}))
|
|
2913
|
+
], this.rebuildCaptions(this.activeCaptionLabel);
|
|
2914
|
+
});
|
|
2915
|
+
/** Yayında birden fazla ses izi varsa ayarlarda "Ses" alt menüsü (HLS alternatif ses / Safari audioTracks). */
|
|
2916
|
+
a(this, "onStreamAudioTracks", (e, i) => {
|
|
2917
|
+
this.streamAudio = { tracks: e, active: i };
|
|
2918
|
+
const s = this.controlBar.settingsMenu, r = /* @__PURE__ */ new Set(), o = new Map(e.map((l) => [l.index, this.uniqueLabel(this.streamTrackLabel(l.label, l.lang), String(l.index + 1), r)]));
|
|
2919
|
+
if (e.length <= 1) {
|
|
2920
|
+
s.unregisterSubmenu(Fe);
|
|
2921
|
+
return;
|
|
2922
|
+
}
|
|
2923
|
+
s.registerSubmenu({
|
|
2924
|
+
key: Fe,
|
|
2925
|
+
title: this.i18n.audioTrack,
|
|
2926
|
+
getValueLabel: () => o.get(i) ?? "",
|
|
2927
|
+
getItems: () => e.map((l) => ({ label: o.get(l.index), active: l.index === i, onSelect: () => this.sourceManager.setAudioTrack(l.index) }))
|
|
2928
|
+
});
|
|
2929
|
+
});
|
|
2930
|
+
/** Playlist panelinin monte edileceği, .video-area'nın ALTINDAKİ (shadow root içi) kapsayıcı — ilk ihtiyaçta oluşturulur. */
|
|
2931
|
+
a(this, "panelContainer", null);
|
|
2932
|
+
a(this, "onHlsLevelsChanged", (e, i) => {
|
|
2933
|
+
var x, k;
|
|
2934
|
+
if (this.lastHlsLevels = e, this.lastHlsActive = i, e.length === 0 && this.hlsQualitiesShown) {
|
|
2935
|
+
this.hlsQualitiesShown = !1, this.controlBar.setQualities([], "");
|
|
2936
|
+
return;
|
|
2937
|
+
}
|
|
2938
|
+
if (e.length <= 1) return;
|
|
2939
|
+
this.hlsQualitiesShown = !0;
|
|
2940
|
+
const s = (g) => `${g.height}p`, r = this.qualityGate, o = (g) => !!(r != null && r.isLocked(g.height)), l = (x = this._options.qualityLimit) == null ? void 0 : x.max, h = e.reduce((g, y) => y.height < g.height ? y : g), c = l ? e.filter((g) => g.height <= l) : e;
|
|
2941
|
+
c.length || c.push(h);
|
|
2942
|
+
const f = this.dataSaverHeight(), v = c.filter((g) => !o(g));
|
|
2943
|
+
let m = r ? v.length ? v : [h] : c;
|
|
2944
|
+
if (f) {
|
|
2945
|
+
const g = m.filter((y) => y.height <= f);
|
|
2946
|
+
m = g.length ? g : [m.reduce((y, w) => w.height < y.height ? w : y)];
|
|
2947
|
+
}
|
|
2948
|
+
const d = !!r || !!f || c.length < e.length;
|
|
2949
|
+
this.sourceManager.setMaxLevel(d ? m.reduce((g, y) => y.height > g.height ? y : g).index : -1), this.controlBar.setQualities(
|
|
2950
|
+
[
|
|
2951
|
+
{ label: this.i18n.autoQuality, onSelect: () => this.sourceManager.setLevel(-1) },
|
|
2952
|
+
// Yüksekten düşüğe (hls.js artan sıralıyor) — l.index hls.js'teki gerçek seviye numarası, sıradan bağımsız.
|
|
2953
|
+
...[...c].sort((g, y) => y.height - g.height).map((g) => ({
|
|
2954
|
+
label: s(g),
|
|
2955
|
+
locked: o(g),
|
|
2956
|
+
onSelect: o(g) ? () => r == null ? void 0 : r.requestUnlock() : () => this.sourceManager.setLevel(g.index)
|
|
2957
|
+
}))
|
|
2958
|
+
],
|
|
2959
|
+
i === -1 || !e[i] ? this.i18n.autoQuality : s(e[i])
|
|
2960
|
+
), (k = this.rewardedUnlock) == null || k.onQualitiesChanged();
|
|
2961
|
+
});
|
|
2962
|
+
a(this, "onFullscreenChange", (e) => {
|
|
2963
|
+
this.controlBar.setFullscreenState(this.isFullscreenActive()), (e == null ? void 0 : e.type) === "webkitbeginfullscreen" ? this.showCaptionsNatively() : (e == null ? void 0 : e.type) === "webkitendfullscreen" && this.syncCaptionsFromNative();
|
|
2964
|
+
});
|
|
2965
|
+
// ── Oynatma durumuna göre merkez buton + otomatik gizlenme ──
|
|
2966
|
+
// Değer: 'hidden' (tamamen gizle — countdown/geo) ya da 'reduced' (yalnızca oynat/duraklat + ses — ads).
|
|
2967
|
+
a(this, "chromeBlockers", /* @__PURE__ */ new Map());
|
|
2968
|
+
a(this, "onPlay", () => {
|
|
2969
|
+
this.matches(":hover") && this.scheduleCursorHide(), this.isChromeBlocked || (this.centerPlayButton.style.opacity = "0", this.centerPlayButton.style.pointerEvents = "none", this.scheduleAutoHide()), this.dispatchEvent(new CustomEvent("hp:play"));
|
|
2970
|
+
});
|
|
2971
|
+
a(this, "onPause", () => {
|
|
2972
|
+
this.hideTimer && clearTimeout(this.hideTimer), this.showCursor(), this.isChromeBlocked || (this.centerPlayButton.style.opacity = "1", this.centerPlayButton.style.pointerEvents = "auto", this.showChrome()), this.dispatchEvent(new CustomEvent("hp:pause"));
|
|
2973
|
+
});
|
|
2974
|
+
a(this, "onEnded", () => {
|
|
2975
|
+
this.dispatchEvent(new CustomEvent("hp:ended"));
|
|
2976
|
+
});
|
|
2977
|
+
a(this, "onRateChange", () => {
|
|
2978
|
+
this.dispatchEvent(new CustomEvent("hp:ratechange", { detail: { rate: this.videoEl.playbackRate } }));
|
|
2979
|
+
});
|
|
2980
|
+
a(this, "onPointerDownFocus", () => {
|
|
2981
|
+
var e;
|
|
2982
|
+
this.focus({ preventScroll: !0 }), (e = this.adsController) == null || e.initializeDisplayContainerOnce();
|
|
2983
|
+
});
|
|
2984
|
+
a(this, "onVideoPressStart", (e) => {
|
|
2985
|
+
this.tapCandidate = !0;
|
|
2986
|
+
const i = "touches" in e ? e.touches[0] : e;
|
|
2987
|
+
i && (this.tapStartX = i.clientX, this.tapStartY = i.clientY);
|
|
2988
|
+
});
|
|
2989
|
+
a(this, "onVideoPressEnd", (e) => {
|
|
2990
|
+
var l, h;
|
|
2991
|
+
if (!this.tapCandidate || (this.tapCandidate = !1, this.isChromeBlocked) || (l = this.gestureControls) != null && l.isCurrentlyHolding()) return;
|
|
2992
|
+
const i = "changedTouches" in e;
|
|
2993
|
+
if (!i && Date.now() - this.lastTouchEndAt < 800) return;
|
|
2994
|
+
i && (this.lastTouchEndAt = Date.now());
|
|
2995
|
+
const s = i ? e.changedTouches[0] : e;
|
|
2996
|
+
if (s && Math.hypot(s.clientX - this.tapStartX, s.clientY - this.tapStartY) > pi) {
|
|
2997
|
+
i && !this.isChromeBlocked && this.scheduleAutoHide();
|
|
2998
|
+
return;
|
|
2999
|
+
}
|
|
3000
|
+
const r = i ? "touch" : this.lastPointerType, o = () => this.onBackgroundTap(r, () => {
|
|
3001
|
+
this.videoEl.paused ? this.videoEl.play().catch(() => {
|
|
3002
|
+
}) : this.videoEl.pause();
|
|
3003
|
+
});
|
|
3004
|
+
s && ((h = this.tapGestures) != null && h.handleTap(s.clientX, r === "pen" ? "pen" : r, o)) || o();
|
|
3005
|
+
});
|
|
3006
|
+
a(this, "onVideoPressCancel", () => {
|
|
3007
|
+
this.tapCandidate = !1;
|
|
3008
|
+
});
|
|
3009
|
+
a(this, "onPointerMove", (e) => {
|
|
3010
|
+
if (e.pointerType !== "mouse") {
|
|
3011
|
+
this.chromeVisible && this.scheduleAutoHide();
|
|
3012
|
+
return;
|
|
3013
|
+
}
|
|
3014
|
+
this.pointerOverControls = e.composedPath().includes(this.chromeEl), this.scheduleAutoHide(), e.pointerType === "mouse" && this.scheduleCursorHide();
|
|
3015
|
+
});
|
|
3016
|
+
a(this, "onPointerLeave", (e) => {
|
|
3017
|
+
e.pointerType === "mouse" && (this.pointerOverControls = !1, this.scheduleAutoHide(), this.showCursor());
|
|
3018
|
+
});
|
|
3019
|
+
a(this, "scheduleAutoHide", () => {
|
|
3020
|
+
this.showChrome(), this.hideTimer && clearTimeout(this.hideTimer), !(this.videoEl.paused || this.loadingActive) && (this.audioMode || (this.hideTimer = setTimeout(() => {
|
|
3021
|
+
this.audioMode || this.videoEl.paused || this.loadingActive || this.pointerOverControls || this.controlBar.settingsMenu.isOpen || this.setChromeOpacity("0");
|
|
3022
|
+
}, this.lastPointerType === "mouse" ? this.autoHideDelayMs : Math.max(this.autoHideDelayMs, hi))));
|
|
3023
|
+
});
|
|
3024
|
+
Yt(), this.root = this.attachShadow({ mode: "open" });
|
|
3025
|
+
const e = document.createElement("style");
|
|
3026
|
+
e.textContent = de, this.root.appendChild(e);
|
|
3027
|
+
const i = document.createElement("div");
|
|
3028
|
+
i.className = "hp-root", i.innerHTML = ui, this.root.appendChild(i), this.videoArea = this.root.querySelector(".video-area"), this.videoEl = this.root.querySelector("video"), this.adLayerEl = this.root.querySelector('[part="ad-layer"]'), this.instanceKey = `hp-${Math.random().toString(36).slice(2, 10)}`, this.prerollGate = new oi(this.videoEl), this.prerollGate.onWaitChange = (r) => this.onPrerollWaitChange(r), this.videoEl.addEventListener("error", this.onMediaError), this.videoEl.addEventListener("hp-internal:subtitle-error", this.onSubtitleError);
|
|
3029
|
+
for (const r of ["enterpictureinpicture", "leavepictureinpicture"])
|
|
3030
|
+
this.videoEl.addEventListener(
|
|
3031
|
+
r,
|
|
3032
|
+
() => this.dispatchEvent(new CustomEvent("hp:pip", { detail: { state: r === "enterpictureinpicture" ? "enter" : "exit", mode: "native" } }))
|
|
3033
|
+
);
|
|
3034
|
+
this.loadingSpinner = new Ct(this.videoEl), this.root.querySelector(".media-layer").appendChild(this.loadingSpinner.el), this.errorScreen = new Tt(this.videoEl, this.i18n), this.errorScreen.setOnRetry(() => void this.retrySource()), this.errorScreen.setOnShown(({ code: r, message: o }) => this.dispatchEvent(new CustomEvent("hp:error", { detail: { message: o, code: r } }))), this.videoArea.appendChild(this.errorScreen.el), this.centerPlayButton = document.createElement("button"), this.centerPlayButton.type = "button", this.centerPlayButton.setAttribute("part", "center-play-button"), this.centerPlayButton.setAttribute("aria-label", this.i18n.play), this.centerPlayButton.className = "hp-center-play hp:absolute hp:inset-0 hp:flex hp:items-center hp:justify-center hp:bg-transparent hp:border-0 hp:cursor-pointer hp:text-on-surface hp:transition-opacity";
|
|
3035
|
+
const s = document.createElement("span");
|
|
3036
|
+
s.className = "hp-chip hp:flex hp:items-center hp:justify-center hp:w-16 hp:h-16", s.style.borderRadius = "9999px", s.appendChild(z("play", "hp:text-2xl")), this.centerPlayButton.appendChild(s), this.centerPlayButton.addEventListener("click", (r) => {
|
|
3037
|
+
var f;
|
|
3038
|
+
const o = () => {
|
|
3039
|
+
this.videoEl.paused && this.videoEl.play();
|
|
3040
|
+
}, l = this.lastPointerType === "pen" ? "pen" : this.lastPointerType === "touch" ? "touch" : null, c = r.composedPath().includes(s) ? o : () => this.onBackgroundTap(l ?? "mouse", o);
|
|
3041
|
+
l && ((f = this.tapGestures) != null && f.handleTap(r.clientX, l, c)) || c();
|
|
3042
|
+
}), this.videoArea.appendChild(this.centerPlayButton), this.centerPlayObserver = new ResizeObserver(() => requestAnimationFrame(() => this.layoutCenterPlay())), this.centerPlayObserver.observe(this.videoArea), this.chromeEl = document.createElement("div"), this.chromeEl.className = "hp-chrome hp:absolute hp:inset-0 hp:z-20 hp:pointer-events-none", this.videoArea.appendChild(this.chromeEl), this.sourceManager = new et(this.videoEl, {
|
|
3043
|
+
onLevelsChanged: this.onHlsLevelsChanged,
|
|
3044
|
+
onAudioTracksChanged: this.onStreamAudioTracks,
|
|
3045
|
+
onTextTracksFound: this.onStreamTextTracks,
|
|
3046
|
+
onCues: this.onStreamCues,
|
|
3047
|
+
onFatalError: (r) => {
|
|
3048
|
+
const o = r === "drm" ? 5 : r === "unsupported" ? 4 : r === "network" ? 2 : 3;
|
|
3049
|
+
this.streamErrorCode = o, this.errorScreen.showStreamError(o);
|
|
3050
|
+
},
|
|
3051
|
+
onStreamError: (r) => this.log.add({
|
|
3052
|
+
source: "stream",
|
|
3053
|
+
message: `${r.type}: ${r.details}`,
|
|
3054
|
+
fatal: r.fatal,
|
|
3055
|
+
details: { url: r.url, httpStatus: r.httpStatus, reason: r.reason, engine: r.engine ?? "hls.js" }
|
|
3056
|
+
})
|
|
3057
|
+
}), this.errorScreen.setShouldShow(() => !this.sourceManager.isRecovering() && !this.tryNextSourceGroup()), this.controlBar = new gt(
|
|
3058
|
+
this.videoEl,
|
|
3059
|
+
ze,
|
|
3060
|
+
{
|
|
3061
|
+
onRequestFullscreen: () => this.requestFullscreenCompat(),
|
|
3062
|
+
liveSyncPosition: () => {
|
|
3063
|
+
var r;
|
|
3064
|
+
return ((r = this.sourceManager.hlsInstance) == null ? void 0 : r.liveSyncPosition) ?? null;
|
|
3065
|
+
},
|
|
3066
|
+
onExitFullscreen: () => this.exitFullscreenCompat(),
|
|
3067
|
+
isFullscreen: () => this.isFullscreenActive(),
|
|
3068
|
+
// adsController sonradan kurulur — closure'lar her çağrıda güncel this.adsController'ı okur.
|
|
3069
|
+
isAdActive: () => this.isAdPlaying(),
|
|
3070
|
+
interceptTogglePlay: () => this.cancelPrerollWait(),
|
|
3071
|
+
onLoadingChange: (r) => this.onLoadingChange(r),
|
|
3072
|
+
onTogglePip: () => this.toggleDocPip(),
|
|
3073
|
+
adTogglePlay: () => {
|
|
3074
|
+
var r;
|
|
3075
|
+
return (r = this.adsController) == null ? void 0 : r.toggleAdPlayPause();
|
|
3076
|
+
},
|
|
3077
|
+
adIsPaused: () => {
|
|
3078
|
+
var r;
|
|
3079
|
+
return ((r = this.adsController) == null ? void 0 : r.isAdPaused()) ?? !0;
|
|
3080
|
+
},
|
|
3081
|
+
adVolume: {
|
|
3082
|
+
isAdActive: () => this.isAdPlaying(),
|
|
3083
|
+
getVolume: () => {
|
|
3084
|
+
var r;
|
|
3085
|
+
return ((r = this.adsController) == null ? void 0 : r.getAdVolume()) ?? 1;
|
|
3086
|
+
},
|
|
3087
|
+
setVolume: (r) => {
|
|
3088
|
+
var o;
|
|
3089
|
+
return (o = this.adsController) == null ? void 0 : o.setAdVolume(r);
|
|
3090
|
+
},
|
|
3091
|
+
toggleMute: () => {
|
|
3092
|
+
var r;
|
|
3093
|
+
return (r = this.adsController) == null ? void 0 : r.toggleAdMute();
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
},
|
|
3097
|
+
this.i18n
|
|
3098
|
+
), this.chromeEl.appendChild(this.controlBar.el), this.chromeEl.appendChild(this.controlBar.topEl), this.videoArea.appendChild(this.controlBar.volumePanel.unmuteBadge), this.captionRenderer = new D(this.videoEl, this.videoArea, this.controlBar.seekBar.el, this.i18n), this.videoArea.appendChild(this.captionRenderer.layerEl), this.keyboard = new Et(
|
|
3099
|
+
this,
|
|
3100
|
+
this.videoEl,
|
|
3101
|
+
() => this.isFullscreenActive() ? this.exitFullscreenCompat() : this.requestFullscreenCompat()
|
|
3102
|
+
), this.tooltip = new kt(this.videoArea), this.contextMenu = new jt(this.videoArea), this.seekFeedback = new $t(this.i18n), this.videoArea.appendChild(this.seekFeedback.el), this.controlBar.onSkip = (r) => this.seekFeedback.show(r), this.keyboard.onSeek = (r) => this.seekFeedback.show(r), this.keyboard.interceptTogglePlay = () => this.cancelPrerollWait(), this.controlBar.seekBar.onKeyboardSeek = (r) => this.seekFeedback.show(r), this.blockChrome("boot");
|
|
3103
|
+
}
|
|
3104
|
+
static get observedAttributes() {
|
|
3105
|
+
return ["src", "poster", "autoplay", "muted", "loop", "theme", "locale"];
|
|
3106
|
+
}
|
|
3107
|
+
connectedCallback() {
|
|
3108
|
+
this.offGlobalPlugins ?? (this.offGlobalPlugins = Jt(() => void this.syncPlugins())), this.hasAttribute("tabindex") || (this.tabIndex = 0), this.syncFromAttributes(), this.bootResolved || (this.bootGraceTimer = setTimeout(() => {
|
|
3109
|
+
this.bootGraceTimer = null, this.bootResolved || (this.bootResolved = !0, this.syncFromAttributes());
|
|
3110
|
+
}, 80)), this.videoEl.addEventListener("play", this.onPlay), this.videoEl.addEventListener("pause", this.onPause), this.videoEl.addEventListener("ended", this.onEnded), this.videoEl.addEventListener("ratechange", this.onRateChange), this.addEventListener("pointermove", this.onPointerMove), this.addEventListener("pointerleave", this.onPointerLeave), this.addEventListener("pointerdown", this.onPointerDownFocus), document.addEventListener("fullscreenchange", this.onFullscreenChange), document.addEventListener("webkitfullscreenchange", this.onFullscreenChange), this.videoEl.addEventListener("webkitbeginfullscreen", this.onFullscreenChange), this.videoEl.addEventListener("webkitendfullscreen", this.onFullscreenChange), this.addEventListener("contextmenu", this.onContextMenu), this.addEventListener("pointerdown", this.onPointerTypeTrack, !0), this.videoEl.textTracks.addEventListener("addtrack", this.onNativeTextTracksChanged), this.videoEl.textTracks.addEventListener("removetrack", this.onNativeTextTracksChanged), this.controlBar.settingsMenu.onOpenChange = (e) => {
|
|
3111
|
+
e && this.hideTimer && clearTimeout(this.hideTimer), e || this.scheduleAutoHide(), this.tooltip.recheckOcclusion();
|
|
3112
|
+
}, this.tooltip.setOcclusionCheck((e) => {
|
|
3113
|
+
const i = this.controlBar.settingsMenu.panelRect;
|
|
3114
|
+
return !!i && e.left < i.right && e.right > i.left && e.top < i.bottom && e.bottom > i.top;
|
|
3115
|
+
}), this.videoEl.addEventListener("mousedown", this.onVideoPressStart), this.videoEl.addEventListener("mouseup", this.onVideoPressEnd), this.videoEl.addEventListener("mouseleave", this.onVideoPressCancel), this.videoEl.addEventListener("touchstart", this.onVideoPressStart, { passive: !0 }), this.videoEl.addEventListener("touchend", this.onVideoPressEnd), this.videoEl.addEventListener("touchcancel", this.onVideoPressCancel), queueMicrotask(() => {
|
|
3116
|
+
this.isConnected && this.dispatchEvent(new CustomEvent("hp:ready"));
|
|
3117
|
+
});
|
|
3118
|
+
}
|
|
3119
|
+
disconnectedCallback() {
|
|
3120
|
+
var e, i, s, r, o, l, h, c, f, v, m, d, x, k, g, y, w, S, T, A, E, p, u, b, C, P, M, L, B, re, ae, oe, ne, le, he, pe, ce;
|
|
3121
|
+
(e = this.centerPlayObserver) == null || e.disconnect(), this.showCursor(), (i = this.miniProgress) == null || i.destroy(), this.miniProgress = null, this.videoEl.removeEventListener("play", this.onPlay), this.videoEl.removeEventListener("pause", this.onPause), this.videoEl.removeEventListener("ended", this.onEnded), this.videoEl.removeEventListener("ratechange", this.onRateChange), this.removeEventListener("pointermove", this.onPointerMove), this.removeEventListener("pointerleave", this.onPointerLeave), this.removeEventListener("pointerdown", this.onPointerDownFocus), this.controlBar.settingsMenu.onOpenChange = null, document.removeEventListener("fullscreenchange", this.onFullscreenChange), document.removeEventListener("webkitfullscreenchange", this.onFullscreenChange), this.videoEl.removeEventListener("webkitbeginfullscreen", this.onFullscreenChange), this.videoEl.removeEventListener("webkitendfullscreen", this.onFullscreenChange), this.removeEventListener("contextmenu", this.onContextMenu), this.removeEventListener("pointerdown", this.onPointerTypeTrack, !0), this.videoEl.textTracks.removeEventListener("addtrack", this.onNativeTextTracksChanged), this.videoEl.textTracks.removeEventListener("removetrack", this.onNativeTextTracksChanged), this.videoEl.removeEventListener("mousedown", this.onVideoPressStart), this.videoEl.removeEventListener("mouseup", this.onVideoPressEnd), this.videoEl.removeEventListener("mouseleave", this.onVideoPressCancel), this.videoEl.removeEventListener("touchstart", this.onVideoPressStart), this.videoEl.removeEventListener("touchend", this.onVideoPressEnd), this.videoEl.removeEventListener("touchcancel", this.onVideoPressCancel), this.controlBar.destroy(), this.captionRenderer.destroy(), this.keyboard.destroy(), this.tooltip.destroy(), this.loadingSpinner.destroy(), this.errorScreen.destroy(), this.seekFeedback.destroy(), this.contextMenu.destroy(), (s = this.statsPanel) == null || s.destroy(), (r = this.debugPanel) == null || r.destroy(), this.videoEl.removeEventListener("error", this.onMediaError), this.videoEl.removeEventListener("hp-internal:subtitle-error", this.onSubtitleError), (o = this.tapGestures) == null || o.destroy(), this.sourceManager.destroy(), (l = this.adsController) == null || l.destroy(), (h = this.gestureControls) == null || h.destroy(), (c = this.loopSection) == null || c.destroy(), (f = this.audioStage) == null || f.destroy(), this.audioStage = null, (v = this.rewardedUnlock) == null || v.destroy(), this.rewardedUnlock = null, (m = this.sponsorship) == null || m.destroy(), this.sponsorship = null, (d = this.adTriggers) == null || d.destroy(), this.adTriggers = null, (x = this.castController) == null || x.destroy(), this.castController = null, (k = this.inViewAutoplay) == null || k.destroy(), (g = this.unregisterSticky) == null || g.call(this), (y = this.playlistRunner) == null || y.destroy(), (w = this.hopeStory) == null || w.destroy(), (S = this.markProgress) == null || S.destroy(), (T = this.segments) == null || T.destroy(), (A = this.spriteThumbnails) == null || A.destroy(), (E = this.countdownScreen) == null || E.destroy(), (p = this.geoChecker) == null || p.destroy(), (u = this.redirectScreen) == null || u.destroy(), (b = this.transcript) == null || b.destroy(), (C = this.heatmap) == null || C.destroy(), (P = this.docPip) == null || P.destroy(), (M = this.interactive) == null || M.destroy(), (L = this.pluginHost) == null || L.destroy(), this.pluginHost = null, (B = this.offGlobalPlugins) == null || B.call(this), this.offGlobalPlugins = null, (re = this.accessibility) == null || re.destroy(), this.accessibility = null, this.accessibilityKey = "", (ae = this.playbackHistory) == null || ae.destroy(), this.playbackHistory = null, this.historyKey = "", (oe = this.qoeTracker) == null || oe.destroy(), this.qoeTracker = null, this.analyticsKey = "", (ne = this.qrResume) == null || ne.destroy(), (le = this.pauseAd) == null || le.destroy(), this.pauseAd = null, (he = this.dubbing) == null || he.destroy(), (pe = this.liveWallClock) == null || pe.destroy(), (ce = this.daiController) == null || ce.destroy(), this.prerollGate.release(!1), this.hideTimer && clearTimeout(this.hideTimer), this.bootGraceTimer && clearTimeout(this.bootGraceTimer), this.lastSynced = null;
|
|
3122
|
+
}
|
|
3123
|
+
/** Reklam/consent-farkında plugin'lerin (gesture/sticky/in-view-autoplay) ortak sorgusu. */
|
|
3124
|
+
isAdPlaying() {
|
|
3125
|
+
return this.chromeBlockers.has("ads");
|
|
3126
|
+
}
|
|
3127
|
+
attributeChangedCallback() {
|
|
3128
|
+
this.syncFromAttributes();
|
|
3129
|
+
}
|
|
3130
|
+
get options() {
|
|
3131
|
+
return this._options;
|
|
3132
|
+
}
|
|
3133
|
+
set options(e) {
|
|
3134
|
+
this._options = e ?? {}, this.bootGraceTimer && (clearTimeout(this.bootGraceTimer), this.bootGraceTimer = null), this.bootResolved = !0, this.lastSynced = null, this.syncFromAttributes();
|
|
3135
|
+
}
|
|
3136
|
+
play() {
|
|
3137
|
+
return this.prerollGate.interceptPlay() ? Promise.resolve() : this.videoEl.play();
|
|
3138
|
+
}
|
|
3139
|
+
pause() {
|
|
3140
|
+
this.videoEl.pause();
|
|
3141
|
+
}
|
|
3142
|
+
/** Kaynak yüklenmeden önce kurulur — ilk oynatma ölçülsün. */
|
|
3143
|
+
async applyAnalytics(e) {
|
|
3144
|
+
var r;
|
|
3145
|
+
const i = e.analytics ? JSON.stringify(e.analytics) : "";
|
|
3146
|
+
if (i === this.analyticsKey || (this.analyticsKey = i, (r = this.qoeTracker) == null || r.destroy(), this.qoeTracker = null, !e.analytics)) return;
|
|
3147
|
+
const { installAnalytics: s } = await import("./analytics-DEjTAJO9.js");
|
|
3148
|
+
this.analyticsKey === i && (this.qoeTracker = s(
|
|
3149
|
+
{
|
|
3150
|
+
hostEl: this,
|
|
3151
|
+
videoEl: this.videoEl,
|
|
3152
|
+
currentSrc: () => this.sourceManager.currentSrc,
|
|
3153
|
+
isAdActive: () => this.isAdPlaying(),
|
|
3154
|
+
currentLevel: () => this.sourceManager.currentLevel(),
|
|
3155
|
+
engine: () => this.sourceManager.engine.engine,
|
|
3156
|
+
isFullscreen: () => this.isFullscreenActive(),
|
|
3157
|
+
playerId: () => this._options.id,
|
|
3158
|
+
sessionId: () => this.sourceManager.sessionId
|
|
3159
|
+
},
|
|
3160
|
+
e.analytics === !0 ? {} : e.analytics
|
|
3161
|
+
));
|
|
3162
|
+
}
|
|
3163
|
+
/** Oturumun deneyim (QoE) ölçümleri — `options.analytics` kapalıysa null. */
|
|
3164
|
+
get qoe() {
|
|
3165
|
+
var e;
|
|
3166
|
+
return ((e = this.qoeTracker) == null ? void 0 : e.metrics) ?? null;
|
|
3167
|
+
}
|
|
3168
|
+
/** Şu anki oynatma yolu: `native` (MP4/WebM), `native-hls` (tarayıcının HLS'i), `hls.js` ya da `dash.js` — teşhis için. */
|
|
3169
|
+
get playbackEngine() {
|
|
3170
|
+
return this.sourceManager.engine;
|
|
3171
|
+
}
|
|
3172
|
+
/** Player'ın hata kaydı (medya, yayın, reklam, altyazı) — `options.debug` kapalıyken de tutulur. */
|
|
3173
|
+
get errorLog() {
|
|
3174
|
+
return this.log;
|
|
3175
|
+
}
|
|
3176
|
+
/** Hata ayıklama penceresini aç (sağ tık menüsündeki "Hata ayıklama" ile aynı). */
|
|
3177
|
+
async showDebugLog() {
|
|
3178
|
+
if (!this.debugPanel) {
|
|
3179
|
+
const { installDebugPanel: e } = await import("./debugPanel-Bnc_7GOn.js");
|
|
3180
|
+
this.debugPanel ?? (this.debugPanel = e({ containerEl: this.videoArea, i18n: this.i18n, log: this.log, version: V }));
|
|
3181
|
+
}
|
|
3182
|
+
this.debugPanel.show();
|
|
3183
|
+
}
|
|
3184
|
+
/**
|
|
3185
|
+
* Açık reklam tetikleyici reklamını kapat (adTriggers). `layout: 'none'` kreatifleri kendi kodlarından çağırabilir:
|
|
3186
|
+
* `window.top.document.querySelector('hope-player').closeAdTrigger()`.
|
|
3187
|
+
*/
|
|
3188
|
+
closeAdTrigger() {
|
|
3189
|
+
var e;
|
|
3190
|
+
(e = this.adTriggers) == null || e.close("user");
|
|
3191
|
+
}
|
|
3192
|
+
/** Teknik istatistik panelini aç/kapat (`force`: true = aç, false = kapat). Sağ tık menüsündeki "İstatistikler" ile aynı. */
|
|
3193
|
+
async toggleStats(e) {
|
|
3194
|
+
if (!this.statsPanel) {
|
|
3195
|
+
if (e === !1) return;
|
|
3196
|
+
const { installStats: i } = await import("./statsPanel-D0DtoFgS.js");
|
|
3197
|
+
this.statsPanel ?? (this.statsPanel = i({
|
|
3198
|
+
videoEl: this.videoEl,
|
|
3199
|
+
containerEl: this.videoArea,
|
|
3200
|
+
i18n: this.i18n,
|
|
3201
|
+
version: V,
|
|
3202
|
+
getEngine: () => this.sourceManager.engine,
|
|
3203
|
+
getHls: () => this.sourceManager.hlsInstance
|
|
3204
|
+
}));
|
|
3205
|
+
}
|
|
3206
|
+
this.statsPanel.toggle(e);
|
|
3207
|
+
}
|
|
3208
|
+
/** hls.js ile oynatılıyorsa hls.js instance'ı (olaylar, `bandwidthEstimate`, `levels`...); değilse `null`. */
|
|
3209
|
+
get hls() {
|
|
3210
|
+
return this.sourceManager.hlsInstance;
|
|
3211
|
+
}
|
|
3212
|
+
/** Eklenti ekler (sayfa yenilenene ya da `remove()` çağrılana kadar). */
|
|
3213
|
+
use(e, i) {
|
|
3214
|
+
const s = [e, i];
|
|
3215
|
+
return this.runtimePlugins.push(s), this.syncPlugins(), {
|
|
3216
|
+
name: typeof e == "function" ? "" : e.name,
|
|
3217
|
+
remove: () => {
|
|
3218
|
+
const r = this.runtimePlugins.indexOf(s);
|
|
3219
|
+
r < 0 || (this.runtimePlugins.splice(r, 1), this.syncPlugins());
|
|
3220
|
+
}
|
|
3221
|
+
};
|
|
3222
|
+
}
|
|
3223
|
+
/** Eklentiyi sayfadaki tüm player'lara ekler. */
|
|
3224
|
+
static use(e, i) {
|
|
3225
|
+
return Zt(e, i);
|
|
3226
|
+
}
|
|
3227
|
+
async syncPlugins() {
|
|
3228
|
+
try {
|
|
3229
|
+
await this.doSyncPlugins();
|
|
3230
|
+
} finally {
|
|
3231
|
+
this.settlePlugins();
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
markPluginsPending() {
|
|
3235
|
+
const e = this.settlePlugins;
|
|
3236
|
+
this.pluginsSettled = new Promise((i) => this.settlePlugins = i), e();
|
|
3237
|
+
}
|
|
3238
|
+
async adTagTransform(e, i) {
|
|
3239
|
+
var r, o;
|
|
3240
|
+
return (!!((r = this._options.plugins) != null && r.length) || this.runtimePlugins.length > 0 || Me().length > 0) && await Promise.race([this.pluginsSettled, new Promise((l) => setTimeout(l, 2e3))]), ((o = this.pluginHost) == null ? void 0 : o.transformAdTag(e, i)) ?? e;
|
|
3241
|
+
}
|
|
3242
|
+
async doSyncPlugins() {
|
|
3243
|
+
var r;
|
|
3244
|
+
const e = this._options, i = (r = e.skipSegments) != null && r.length ? [[() => import("./skipSegments-ByNoF1qZ.js").then((o) => o.skipSegmentsPlugin), e.skipSegments]] : [], s = [...Me(), ...e.plugins ?? [], ...this.runtimePlugins];
|
|
3245
|
+
if (!(!i.length && !s.length && !this.pluginHost)) {
|
|
3246
|
+
if (!this.pluginHost) {
|
|
3247
|
+
const { PluginHost: o } = await import("./pluginHost-cN2uGFeG.js");
|
|
3248
|
+
this.pluginHost ?? (this.pluginHost = new o({
|
|
3249
|
+
element: this,
|
|
3250
|
+
video: this.videoEl,
|
|
3251
|
+
videoArea: this.videoArea,
|
|
3252
|
+
chromeEl: this.chromeEl,
|
|
3253
|
+
labels: this.i18n,
|
|
3254
|
+
locale: () => this._options.locale ?? "tr",
|
|
3255
|
+
currentSrc: () => this.sourceManager.currentSrc,
|
|
3256
|
+
isAdPlaying: () => this.isAdPlaying(),
|
|
3257
|
+
blockAds: () => this.blockChrome("ads", "hidden"),
|
|
3258
|
+
unblockAds: () => this.unblockChrome("ads"),
|
|
3259
|
+
isFullscreen: () => this.isFullscreenActive(),
|
|
3260
|
+
addControlButton: (l, h) => this.controlBar.addPluginButton(l, h),
|
|
3261
|
+
settings: {
|
|
3262
|
+
registerToggle: (l) => this.controlBar.settingsMenu.registerToggle(l.key, l),
|
|
3263
|
+
unregisterToggle: (l) => this.controlBar.settingsMenu.unregisterToggle(l),
|
|
3264
|
+
registerSubmenu: (l) => this.controlBar.settingsMenu.registerSubmenu(l),
|
|
3265
|
+
unregisterSubmenu: (l) => this.controlBar.settingsMenu.unregisterSubmenu(l)
|
|
3266
|
+
},
|
|
3267
|
+
log: (l, h) => this.log.add({ source: "player", message: l, details: h })
|
|
3268
|
+
}));
|
|
3269
|
+
}
|
|
3270
|
+
await this.pluginHost.sync(i, s);
|
|
3271
|
+
}
|
|
3272
|
+
}
|
|
3273
|
+
/** `options.qrResume` kuruluysa "telefonundan devam et" QR ekranını manuel göster (ör. entegratörün kendi "telefona gönder" butonu) — otomatik gösterim kuralları (minElapsed/minRemaining) burada uygulanmaz. */
|
|
3274
|
+
showQrResume() {
|
|
3275
|
+
var e;
|
|
3276
|
+
(e = this.qrResume) == null || e.show();
|
|
3277
|
+
}
|
|
3278
|
+
get showRemainingTime() {
|
|
3279
|
+
return this.controlBar.getShowRemaining();
|
|
3280
|
+
}
|
|
3281
|
+
set showRemainingTime(e) {
|
|
3282
|
+
this.controlBar.setShowRemaining(e);
|
|
3283
|
+
}
|
|
3284
|
+
toggleTimeDisplay() {
|
|
3285
|
+
this.controlBar.toggleTimeMode();
|
|
3286
|
+
}
|
|
3287
|
+
syncFromAttributes() {
|
|
3288
|
+
var s;
|
|
3289
|
+
const e = {
|
|
3290
|
+
src: this.getAttribute("src") ?? void 0,
|
|
3291
|
+
poster: this.getAttribute("poster") ?? void 0,
|
|
3292
|
+
autoplay: this.hasAttribute("autoplay"),
|
|
3293
|
+
muted: this.hasAttribute("muted"),
|
|
3294
|
+
loop: this.hasAttribute("loop"),
|
|
3295
|
+
theme: this.getAttribute("theme") ?? void 0,
|
|
3296
|
+
locale: this.getAttribute("locale") ?? void 0
|
|
3297
|
+
}, i = JSON.stringify(e);
|
|
3298
|
+
if (this.bootResolved) {
|
|
3299
|
+
if (((s = this.lastSynced) == null ? void 0 : s.options) === this._options && this.lastSynced.attrs === i) return;
|
|
3300
|
+
this.lastSynced = { options: this._options, attrs: i };
|
|
3301
|
+
}
|
|
3302
|
+
this.applyOptions({ ...e, ...this._options });
|
|
3303
|
+
}
|
|
3304
|
+
queuePluginApply(e) {
|
|
3305
|
+
return this.pendingPluginOptions = e, this.pluginApplyRun || (this.pluginApplyRun = (async () => {
|
|
3306
|
+
for (; this.pendingPluginOptions; ) {
|
|
3307
|
+
const i = this.pendingPluginOptions;
|
|
3308
|
+
this.pendingPluginOptions = null;
|
|
3309
|
+
try {
|
|
3310
|
+
await this.applyPluginsAndPlayback(i);
|
|
3311
|
+
} catch (s) {
|
|
3312
|
+
console.error("[hope-player] options could not be applied:", s);
|
|
3313
|
+
}
|
|
3314
|
+
}
|
|
3315
|
+
})().finally(() => {
|
|
3316
|
+
this.pluginApplyRun = null;
|
|
3317
|
+
})), this.pluginApplyRun;
|
|
3318
|
+
}
|
|
3319
|
+
async applyOptions(e) {
|
|
3320
|
+
var o, l, h, c, f, v, m, d, x, k, g, y, w, S, T, A, E, p, u, b, C, P, M, L, B;
|
|
3321
|
+
this.markPluginsPending(), e.poster && (this.videoEl.poster = e.poster), this.casting || (this.videoEl.autoplay = !!e.autoplay), this.videoEl.muted = !!e.muted, this.videoEl.loop = !!e.loop, this.videoEl.preload = e.preload ?? "metadata", this.videoEl.playsInline = !0, this.videoEl.setAttribute("webkit-playsinline", ""), this.autoHideDelayMs = e.autoHideDelayMs ?? Ie, this.tapToPlay = e.tapToPlay ?? "auto", this.cursorHideDelayMs = e.cursorHideDelayMs === !1 ? null : e.cursorHideDelayMs ?? Oe, this.cursorHideDelayMs === null && this.showCursor(), this.controlBar.settingsMenu.setQualityBadgeEnabled(e.qualityBadge !== !1), this.controlBar.settingsMenu.setPlaybackRates(e.playbackRates ?? ze), this.controlBar.setLiveSeekBar(e.liveSeekBar !== !1), this.controlBar.setButtonsVisible({ pip: e.pipButton !== !1, fullscreen: e.fullscreenButton !== !1 }), this.docPipOptions = e.documentPip && "documentPictureInPicture" in window ? e.documentPip === !0 ? {} : e.documentPip : null, this.controlBar.setDocPip(this.docPipOptions !== null, ((o = this.docPip) == null ? void 0 : o.active) ?? !1), e.miniProgress && !this.miniProgress ? (this.miniProgress = new Kt(this.videoEl), this.videoArea.appendChild(this.miniProgress.el), this.updateMiniProgress()) : !e.miniProgress && this.miniProgress && (this.miniProgress.destroy(), this.miniProgress = null), this.debugEnabled = !!e.debug, this.debugEnabled || (l = this.debugPanel) == null || l.hide(), this.contextMenuConfig = e.contextMenu === !1 ? null : { stats: typeof e.contextMenu == "object" && e.contextMenu.stats === !0 }, this.contextMenuConfig || this.contextMenu.close();
|
|
3322
|
+
const i = e.keyboardSeekStep && e.keyboardSeekStep > 0 ? e.keyboardSeekStep : ci;
|
|
3323
|
+
this.keyboard.seekStep = i, this.keyboard.frameRate = e.frameRate && e.frameRate > 0 ? e.frameRate : null, this.controlBar.seekBar.keyboardStep = i;
|
|
3324
|
+
const s = e.skipButtons === !0 ? {} : e.skipButtons || null;
|
|
3325
|
+
this.controlBar.setSkipButtons(
|
|
3326
|
+
s && s.back !== !1 ? s.back ?? Ne : null,
|
|
3327
|
+
s && s.forward !== !1 ? s.forward ?? Ne : null
|
|
3328
|
+
), e.showRemainingTime !== void 0 && e.showRemainingTime !== this.appliedShowRemaining && (this.appliedShowRemaining = e.showRemainingTime, this.controlBar.setShowRemaining(e.showRemainingTime));
|
|
3329
|
+
const r = mi(e.aspectRatio);
|
|
3330
|
+
r ? this.style.setProperty("--hp-aspect-ratio", r) : this.style.removeProperty("--hp-aspect-ratio"), e.theme ? this.setAttribute("data-theme", e.theme) : this.removeAttribute("data-theme"), this.localeCode = e.locale ?? "tr", ri(this.i18n, e.locale, e.labels), this.centerPlayButton.setAttribute("aria-label", this.i18n.play), this.controlBar.refreshLabels(), this.captionRenderer.refreshLabels(this.i18n), this.captionTrackActive && this.controlBar.settingsMenu.setCaptionAppearance(this.buildCaptionAppearance()), this.errorScreen.refreshLabels(), (h = this.playlistRunner) == null || h.refreshLabels(), (c = this.hopeStory) == null || c.refreshLabels(), (f = this.countdownScreen) == null || f.refreshLabels(), (v = this.geoChecker) == null || v.refreshLabels(), (m = this.redirectScreen) == null || m.refreshLabels(), (d = this.transcript) == null || d.refreshLabels(), (x = this.interactive) == null || x.refreshLabels(), (k = this.pluginHost) == null || k.refreshLabels(), (g = this.accessibility) == null || g.refreshLabels(), (y = this.playbackHistory) == null || y.refreshLabels(), (w = this.qrResume) == null || w.refreshLabels(), (S = this.pauseAd) == null || S.refreshLabels(), (T = this.castController) == null || T.refreshLabels(), (A = this.dubbing) == null || A.refreshLabels(), this.onStreamAudioTracks(this.streamAudio.tracks, this.streamAudio.active), (E = this.statsPanel) == null || E.refreshLabels(), (p = this.debugPanel) == null || p.refreshLabels(), (u = this.liveWallClock) == null || u.refreshLabels(), (b = this.loopSection) == null || b.refreshLabels(), (C = this.audioStage) == null || C.refreshLabels(), (P = this.rewardedUnlock) == null || P.refreshLabels(), (M = this.markProgress) == null || M.refreshLabels(), (B = (L = this.unregisterSticky) == null ? void 0 : L.refreshLabels) == null || B.call(L), this.bootResolved && await this.queuePluginApply(e);
|
|
3331
|
+
}
|
|
3332
|
+
/** applyOptions'ın asenkron kısmı — yalnızca queuePluginApply üzerinden, sırayla çalışır. */
|
|
3333
|
+
async applyPluginsAndPlayback(e) {
|
|
3334
|
+
if (e.ads && !this.adsController) {
|
|
3335
|
+
const s = e.ads === !0 ? {} : e.ads;
|
|
3336
|
+
ai(s) && !this.prerollGate.isArmed && this.prerollGate.arm(s.prerollTimeoutMs ?? te), li(), e.countdownScreen || this.installAdsOnce(e);
|
|
3337
|
+
}
|
|
3338
|
+
await this.applyAudioMode(e);
|
|
3339
|
+
const i = () => ({
|
|
3340
|
+
videoEl: this.videoEl,
|
|
3341
|
+
overlayContainerEl: this.videoArea,
|
|
3342
|
+
blockChrome: () => this.blockChrome("countdown-geo"),
|
|
3343
|
+
unblockChrome: () => this.unblockChrome("countdown-geo"),
|
|
3344
|
+
i18n: this.i18n
|
|
3345
|
+
});
|
|
3346
|
+
if (e.countdownScreen && !this.countdownScreen) {
|
|
3347
|
+
const { installCountdownScreen: s } = await import("./countdownScreen-CI-u6jjA.js");
|
|
3348
|
+
this.countdownScreen = s(i(), e.countdownScreen);
|
|
3349
|
+
}
|
|
3350
|
+
if (e.geoChecker && !this.geoChecker) {
|
|
3351
|
+
const { installGeoChecker: s } = await import("./geoChecker-BRtvHwI-.js");
|
|
3352
|
+
this.geoChecker = s(i(), e.geoChecker);
|
|
3353
|
+
}
|
|
3354
|
+
this.unblockChrome("boot"), this.countdownScreen && !this.countdownScreen.isComplete() ? (this.pendingPlaybackOptions = e, this.playbackInitRegistered || (this.playbackInitRegistered = !0, this.countdownScreen.onComplete(() => {
|
|
3355
|
+
const s = this.pendingPlaybackOptions;
|
|
3356
|
+
this.pendingPlaybackOptions = null, s && this.initPlayback(s);
|
|
3357
|
+
}))) : await this.initPlayback(e);
|
|
3358
|
+
}
|
|
3359
|
+
async initPlayback(e) {
|
|
3360
|
+
var d, x, k, g, y, w, S, T, A, E;
|
|
3361
|
+
const i = e.cmcd ? { ...e.cmcd === !0 ? {} : e.cmcd } : null;
|
|
3362
|
+
i && !i.contentId && e.id && (i.contentId = e.id), this.sourceManager.configure(e.hls, { dash: e.dash, drm: e.drm, qualityLimit: e.qualityLimit, cmcd: i }), await this.applyAnalytics(e), this.errorScreen.dismiss(), await this.applyRewardedUnlock(e);
|
|
3363
|
+
const s = (d = e.sources) != null && d.length ? e.sources : e.src ? [{ src: e.src, label: this.i18n.autoQuality }] : [];
|
|
3364
|
+
this.sourceGroups = tt(s, e.sourcePriority);
|
|
3365
|
+
const r = (p) => this.sourceManager.isLoaded(p.src, p.type) && !this.isSourceLocked(p), o = this.sourceGroups.findIndex((p) => p.sources.some(r));
|
|
3366
|
+
this.activeGroup = o !== -1 ? o : this.firstPlayableGroup();
|
|
3367
|
+
const l = this.limitSources(((x = this.sourceGroups[this.activeGroup]) == null ? void 0 : x.sources) ?? []);
|
|
3368
|
+
this.currentSources = l, this.fallbackPending = !1;
|
|
3369
|
+
const c = l.find(r) ?? this.pickInitialSource(l);
|
|
3370
|
+
if (c && !this.sourceManager.isLoaded(c.src, c.type) && (l.length <= 1 && (this.controlBar.setQualities([], ""), this.hlsQualitiesShown = !1), await this.sourceManager.load(c.src, c.type), e.autoplay && this.videoEl.play().catch(() => {
|
|
3371
|
+
})), c && (this.activeSourceLabel = c.label), this.renderSourceQualities(), await this.installAdsOnce(e), await this.applySponsorship(e), await this.applyAdTriggers(e), await this.applyCast(e), e.gesture && !this.gestureControls) {
|
|
3372
|
+
const p = e.gesture === !0 ? {} : e.gesture, { installGesture: u } = await import("./gesture-BzPCgi87.js");
|
|
3373
|
+
this.gestureControls = u(
|
|
3374
|
+
{ videoEl: this.videoEl, overlayContainerEl: this.videoArea, isAdActive: () => this.isAdPlaying() },
|
|
3375
|
+
p
|
|
3376
|
+
);
|
|
3377
|
+
}
|
|
3378
|
+
if (e.loopSection && !this.loopSection) {
|
|
3379
|
+
const p = e.loopSection === !0 ? {} : e.loopSection, { installLoopSection: u } = await import("./loopSection-Bwk4W8vz.js");
|
|
3380
|
+
this.loopSection = u(
|
|
3381
|
+
{
|
|
3382
|
+
videoEl: this.videoEl,
|
|
3383
|
+
seekBarEl: this.controlBar.seekBar.el,
|
|
3384
|
+
markers: this.controlBar.seekBar,
|
|
3385
|
+
addControlButton: (b, C, P) => this.controlBar.addButton(b, C, P),
|
|
3386
|
+
i18n: this.i18n
|
|
3387
|
+
},
|
|
3388
|
+
p
|
|
3389
|
+
);
|
|
3390
|
+
}
|
|
3391
|
+
if (e.inViewAutoplay && !this.inViewAutoplay) {
|
|
3392
|
+
const p = e.inViewAutoplay === !0 ? {} : e.inViewAutoplay, { installInViewAutoplay: u } = await import("./inViewAutoplay-CRJe7GA4.js");
|
|
3393
|
+
this.inViewAutoplay = u(
|
|
3394
|
+
// Video TV'deyken ya da Document PiP penceresindeyken sayfa kaydırılınca duraklatma.
|
|
3395
|
+
{ videoEl: this.videoEl, observeEl: this, isAdActive: () => {
|
|
3396
|
+
var b;
|
|
3397
|
+
return this.isAdPlaying() || this.casting || !!((b = this.docPip) != null && b.active);
|
|
3398
|
+
} },
|
|
3399
|
+
p
|
|
3400
|
+
);
|
|
3401
|
+
}
|
|
3402
|
+
if (e.sticky && !this.unregisterSticky) {
|
|
3403
|
+
const p = e.sticky === !0 ? {} : e.sticky, { installSticky: u } = await import("./sticky-BDStzjBM.js");
|
|
3404
|
+
this.unregisterSticky = u(
|
|
3405
|
+
{
|
|
3406
|
+
key: this.instanceKey,
|
|
3407
|
+
videoEl: this.videoEl,
|
|
3408
|
+
hostEl: this,
|
|
3409
|
+
wrapperEl: this,
|
|
3410
|
+
closeButtonMountEl: this.videoArea,
|
|
3411
|
+
isAdActive: () => this.isAdPlaying(),
|
|
3412
|
+
isSuspended: () => {
|
|
3413
|
+
var b;
|
|
3414
|
+
return !!((b = this.docPip) != null && b.active);
|
|
3415
|
+
},
|
|
3416
|
+
i18n: this.i18n
|
|
3417
|
+
},
|
|
3418
|
+
p
|
|
3419
|
+
);
|
|
3420
|
+
}
|
|
3421
|
+
if (e.playlist && !this.playlistRunner) {
|
|
3422
|
+
const { installPlaylist: p } = await import("./playlist-CHfStNbQ.js");
|
|
3423
|
+
this.playlistRunner = p(
|
|
3424
|
+
{
|
|
3425
|
+
videoEl: this.videoEl,
|
|
3426
|
+
hostEl: this,
|
|
3427
|
+
panelEl: this.getOrCreatePanelContainer(),
|
|
3428
|
+
loadSource: (u, b) => this.sourceManager.load(u, b),
|
|
3429
|
+
setPoster: (u) => {
|
|
3430
|
+
this.videoEl.poster = u;
|
|
3431
|
+
},
|
|
3432
|
+
requestFreshAd: (u) => {
|
|
3433
|
+
var b;
|
|
3434
|
+
return (b = this.adsController) == null ? void 0 : b.resetForNewItem(u);
|
|
3435
|
+
},
|
|
3436
|
+
isAdActive: () => this.isAdPlaying(),
|
|
3437
|
+
i18n: this.i18n
|
|
3438
|
+
},
|
|
3439
|
+
e.playlist
|
|
3440
|
+
);
|
|
3441
|
+
}
|
|
3442
|
+
if (e.story && !this.hopeStory) {
|
|
3443
|
+
const { installStory: p } = await import("./story-CodA2dfn.js");
|
|
3444
|
+
this.hopeStory = p(
|
|
3445
|
+
{
|
|
3446
|
+
videoEl: this.videoEl,
|
|
3447
|
+
hostEl: this,
|
|
3448
|
+
videoAreaEl: this.videoArea,
|
|
3449
|
+
playerBodyEls: [this.root.querySelector(".media-layer"), this.chromeEl, this.centerPlayButton],
|
|
3450
|
+
loadSource: (u, b) => this.sourceManager.load(u, b),
|
|
3451
|
+
setPoster: (u) => {
|
|
3452
|
+
this.videoEl.poster = u;
|
|
3453
|
+
},
|
|
3454
|
+
requestFreshAd: (u) => {
|
|
3455
|
+
var b;
|
|
3456
|
+
return (b = this.adsController) == null ? void 0 : b.resetForNewItem(u);
|
|
3457
|
+
},
|
|
3458
|
+
i18n: this.i18n
|
|
3459
|
+
},
|
|
3460
|
+
e.story
|
|
3461
|
+
);
|
|
3462
|
+
}
|
|
3463
|
+
if (e.markers && !this.markProgress) {
|
|
3464
|
+
const { installMarkers: p } = await import("./markers-L69W3kj6.js");
|
|
3465
|
+
this.markProgress = p(
|
|
3466
|
+
{
|
|
3467
|
+
videoEl: this.videoEl,
|
|
3468
|
+
overlayContainerEl: this.videoArea,
|
|
3469
|
+
addSeekBarMarker: (u, b, C) => this.controlBar.seekBar.addMarker(u, b, C),
|
|
3470
|
+
i18n: this.i18n
|
|
3471
|
+
},
|
|
3472
|
+
e.markers
|
|
3473
|
+
);
|
|
3474
|
+
}
|
|
3475
|
+
if ((k = e.segments) != null && k.length && !this.segments) {
|
|
3476
|
+
const { installSegments: p } = await import("./segments-Ds-c1b5e.js");
|
|
3477
|
+
this.segments = p({ videoEl: this.videoEl, seekBar: this.controlBar.seekBar }, e.segments);
|
|
3478
|
+
}
|
|
3479
|
+
if (e.spriteThumbnails && !this.spriteThumbnails) {
|
|
3480
|
+
const { installSpriteThumbnails: p } = await import("./spriteThumbnails-Cr9UmkM9.js");
|
|
3481
|
+
this.spriteThumbnails = p(
|
|
3482
|
+
{
|
|
3483
|
+
videoEl: this.videoEl,
|
|
3484
|
+
seekBar: this.controlBar.seekBar,
|
|
3485
|
+
playerWidth: () => this.videoArea.clientWidth
|
|
3486
|
+
},
|
|
3487
|
+
e.spriteThumbnails
|
|
3488
|
+
);
|
|
3489
|
+
}
|
|
3490
|
+
if (await this.applyTranscript(e), await this.applyHeatmap(e), await this.applyInteractive(e), this.docPipOptions && !this.docPip) {
|
|
3491
|
+
const { installDocumentPip: p } = await import("./docPip-wybMVP1H.js");
|
|
3492
|
+
this.docPip ?? (this.docPip = p({
|
|
3493
|
+
hostEl: this,
|
|
3494
|
+
videoArea: this.videoArea,
|
|
3495
|
+
rootEl: this.root.querySelector(".hp-root"),
|
|
3496
|
+
css: de,
|
|
3497
|
+
i18n: this.i18n,
|
|
3498
|
+
onChange: (u, b) => this.onDocPipChange(u, b),
|
|
3499
|
+
forwardKey: (u) => this.forwardPipKey(u)
|
|
3500
|
+
}));
|
|
3501
|
+
}
|
|
3502
|
+
const f = e.redirectScreen ? JSON.stringify(e.redirectScreen) : "";
|
|
3503
|
+
if (f !== this.redirectKey && (this.redirectKey = f, (g = this.redirectScreen) == null || g.destroy(), this.redirectScreen = null, e.redirectScreen)) {
|
|
3504
|
+
const { installRedirectScreen: p } = await import("./redirectScreen-TIqLdvBY.js");
|
|
3505
|
+
this.redirectScreen = p(
|
|
3506
|
+
{ hostEl: this, videoEl: this.videoEl, overlayContainerEl: this.videoArea, isAdActive: () => this.isAdPlaying(), i18n: this.i18n },
|
|
3507
|
+
e.redirectScreen
|
|
3508
|
+
);
|
|
3509
|
+
}
|
|
3510
|
+
const v = e.accessibility ? JSON.stringify(e.accessibility) : "";
|
|
3511
|
+
if (v !== this.accessibilityKey && (this.accessibilityKey = v, (y = this.accessibility) == null || y.destroy(), this.accessibility = null, e.accessibility)) {
|
|
3512
|
+
const { installAccessibility: p } = await import("./accessibility-DFx4CE0H.js");
|
|
3513
|
+
this.accessibilityKey === v && (this.accessibility = p(
|
|
3514
|
+
{
|
|
3515
|
+
hostEl: this,
|
|
3516
|
+
videoEl: this.videoEl,
|
|
3517
|
+
videoAreaEl: this.videoArea,
|
|
3518
|
+
i18n: this.i18n,
|
|
3519
|
+
registerSubmenu: (u) => this.controlBar.settingsMenu.registerSubmenu(u),
|
|
3520
|
+
unregisterSubmenu: (u) => this.controlBar.settingsMenu.unregisterSubmenu(u),
|
|
3521
|
+
addQuickButton: (u, b, C) => this.controlBar.settingsMenu.addQuickButton(u, b, C),
|
|
3522
|
+
seekStep: () => this.keyboard.seekStep,
|
|
3523
|
+
extraShortcuts: () => {
|
|
3524
|
+
var u;
|
|
3525
|
+
return ((u = this.pluginHost) == null ? void 0 : u.shortcuts()) ?? [];
|
|
3526
|
+
}
|
|
3527
|
+
},
|
|
3528
|
+
e.accessibility === !0 ? {} : e.accessibility
|
|
3529
|
+
));
|
|
3530
|
+
}
|
|
3531
|
+
await this.syncPlugins();
|
|
3532
|
+
const m = e.history ? JSON.stringify(e.history) : "";
|
|
3533
|
+
if (m !== this.historyKey && (this.historyKey = m, (w = this.playbackHistory) == null || w.destroy(), this.playbackHistory = null, e.history)) {
|
|
3534
|
+
const p = e.qrResume ? e.qrResume.paramName ?? "vtime" : null, u = !!p && new URL(location.href).searchParams.has(p), { installHistory: b } = await import("./history-CwqLXiZi.js");
|
|
3535
|
+
this.historyKey === m && (this.playbackHistory = b(
|
|
3536
|
+
{
|
|
3537
|
+
hostEl: this,
|
|
3538
|
+
videoEl: this.videoEl,
|
|
3539
|
+
overlayContainerEl: this.videoArea,
|
|
3540
|
+
i18n: this.i18n,
|
|
3541
|
+
currentSrc: () => this.sourceManager.currentSrc,
|
|
3542
|
+
isAdActive: () => this.isAdPlaying(),
|
|
3543
|
+
mutedRequested: () => !!this._options.muted,
|
|
3544
|
+
linkTimePresent: u
|
|
3545
|
+
},
|
|
3546
|
+
e.history === !0 ? {} : e.history
|
|
3547
|
+
));
|
|
3548
|
+
}
|
|
3549
|
+
if (e.qrResume && !this.qrResume) {
|
|
3550
|
+
const { installQrResume: p } = await import("./qrResume-DXwD3oSA.js");
|
|
3551
|
+
this.qrResume = p({ videoEl: this.videoEl, overlayContainerEl: this.videoArea, i18n: this.i18n }, e.qrResume);
|
|
3552
|
+
}
|
|
3553
|
+
if (this.qrResume) {
|
|
3554
|
+
const p = this.qrResume;
|
|
3555
|
+
this.controlBar.settingsMenu.setQrResumeToggle({
|
|
3556
|
+
label: this.i18n.qrResumeMenuLabel,
|
|
3557
|
+
getValueLabel: () => p.isEnabled() ? this.i18n.qrResumeOn : this.i18n.qrResumeOff,
|
|
3558
|
+
onToggle: () => p.setEnabled(!p.isEnabled())
|
|
3559
|
+
});
|
|
3560
|
+
}
|
|
3561
|
+
if (e.tapGestures && !this.tapGestures) {
|
|
3562
|
+
const { installTapGestures: p } = await import("./tapGestures-DrC42DiI.js");
|
|
3563
|
+
this.tapGestures = p(
|
|
3564
|
+
{
|
|
3565
|
+
areaEl: this.videoArea,
|
|
3566
|
+
seekBy: (u) => {
|
|
3567
|
+
this.controlBar.seekBar.el.style.pointerEvents !== "none" && (qe(this.videoEl, u), this.seekFeedback.show(u));
|
|
3568
|
+
},
|
|
3569
|
+
togglePlay: () => this.videoEl.paused ? void this.videoEl.play().catch(() => {
|
|
3570
|
+
}) : this.videoEl.pause(),
|
|
3571
|
+
toggleFullscreen: () => this.isFullscreenActive() ? this.exitFullscreenCompat() : this.requestFullscreenCompat(),
|
|
3572
|
+
toggleMute: () => {
|
|
3573
|
+
this.videoEl.muted = !this.videoEl.muted;
|
|
3574
|
+
}
|
|
3575
|
+
},
|
|
3576
|
+
[]
|
|
3577
|
+
);
|
|
3578
|
+
}
|
|
3579
|
+
if (this.tapGestures) {
|
|
3580
|
+
const { DEFAULT_TAP_GESTURES: p } = await import("./tapGestures-DrC42DiI.js");
|
|
3581
|
+
this.tapGestures.setGestures(e.tapGestures === !0 ? p : e.tapGestures || []);
|
|
3582
|
+
}
|
|
3583
|
+
if ((S = e.pauseAd) != null && S.adUnitPath && !this.pauseAd) {
|
|
3584
|
+
const { installPauseAd: p } = await import("./pauseAd-BQQe21X4.js");
|
|
3585
|
+
this.pauseAd = p(
|
|
3586
|
+
{ videoEl: this.videoEl, hostEl: this, videoArea: this.videoArea, i18n: this.i18n, isBlocked: () => this.isChromeBlocked },
|
|
3587
|
+
e.pauseAd
|
|
3588
|
+
);
|
|
3589
|
+
}
|
|
3590
|
+
if (e.dubbing && !this.dubbing) {
|
|
3591
|
+
const { installDubbing: p } = await import("./dubbing-kNMPpyHl.js");
|
|
3592
|
+
this.dubbing = p(
|
|
3593
|
+
{
|
|
3594
|
+
videoEl: this.videoEl,
|
|
3595
|
+
loadSource: (u, b) => this.sourceManager.load(u, b),
|
|
3596
|
+
registerSubmenu: (u) => this.controlBar.settingsMenu.registerSubmenu(u),
|
|
3597
|
+
unregisterSubmenu: (u) => this.controlBar.settingsMenu.unregisterSubmenu(u),
|
|
3598
|
+
i18n: this.i18n
|
|
3599
|
+
},
|
|
3600
|
+
e.dubbing
|
|
3601
|
+
);
|
|
3602
|
+
}
|
|
3603
|
+
if (e.liveWallClock && !this.liveWallClock) {
|
|
3604
|
+
const p = e.liveWallClock === !0 ? {} : e.liveWallClock, { installLiveWallClock: u } = await import("./liveWallClock-ChUTtzLD.js");
|
|
3605
|
+
this.liveWallClock = u(
|
|
3606
|
+
{
|
|
3607
|
+
videoEl: this.videoEl,
|
|
3608
|
+
seekBarEl: this.controlBar.seekBar.el,
|
|
3609
|
+
addControlElement: (b) => this.controlBar.addElement(b),
|
|
3610
|
+
i18n: this.i18n,
|
|
3611
|
+
getPlayingDate: () => {
|
|
3612
|
+
var M, L, B;
|
|
3613
|
+
const b = (M = this.sourceManager.hlsInstance) == null ? void 0 : M.playingDate;
|
|
3614
|
+
if (b) return b;
|
|
3615
|
+
const C = (B = (L = this.videoEl).getStartDate) == null ? void 0 : B.call(L), P = (C == null ? void 0 : C.getTime()) ?? NaN;
|
|
3616
|
+
return Number.isFinite(P) && P > 0 ? new Date(P + this.videoEl.currentTime * 1e3) : null;
|
|
3617
|
+
}
|
|
3618
|
+
},
|
|
3619
|
+
p
|
|
3620
|
+
), this.controlBar.seekBar.liveHoverHandled = !0;
|
|
3621
|
+
}
|
|
3622
|
+
if (e.dai && !this.daiController) {
|
|
3623
|
+
const { installDai: p } = await import("./dai-B9Tth1Iv.js");
|
|
3624
|
+
this.daiController = await p(
|
|
3625
|
+
{
|
|
3626
|
+
videoEl: this.videoEl,
|
|
3627
|
+
hostEl: this,
|
|
3628
|
+
adUiEl: this.adLayerEl,
|
|
3629
|
+
loadStreamUrl: (u) => this.sourceManager.load(u),
|
|
3630
|
+
disableSeeking: () => this.disableSeeking(),
|
|
3631
|
+
enableSeeking: () => this.enableSeeking()
|
|
3632
|
+
},
|
|
3633
|
+
e.dai
|
|
3634
|
+
);
|
|
3635
|
+
}
|
|
3636
|
+
(T = e.subtitles) != null && T.length ? this.optionTracks = Pt(this.videoEl, e.subtitles) : (Ue(this.videoEl), this.optionTracks = []), this.rebuildCaptions(((E = (A = e.subtitles) == null ? void 0 : A.find((p) => p.default)) == null ? void 0 : E.label) ?? null);
|
|
3637
|
+
}
|
|
3638
|
+
/** Transkript paneli — ayar değişince yeniden kurulur. */
|
|
3639
|
+
async applyTranscript(e) {
|
|
3640
|
+
var r;
|
|
3641
|
+
const i = e.transcript ? JSON.stringify(e.transcript) : "";
|
|
3642
|
+
if (i === this.transcriptKey || (this.transcriptKey = i, (r = this.transcript) == null || r.destroy(), this.transcript = null, !e.transcript)) return;
|
|
3643
|
+
const { installTranscript: s } = await import("./transcript-LG7E9UYE.js");
|
|
3644
|
+
this.transcriptKey === i && (this.transcript = s(
|
|
3645
|
+
{
|
|
3646
|
+
hostEl: this,
|
|
3647
|
+
videoEl: this.videoEl,
|
|
3648
|
+
overlayEl: this.videoArea,
|
|
3649
|
+
i18n: this.i18n,
|
|
3650
|
+
getTracks: () => this.subtitleTracks.map(({ label: o, track: l }) => ({ label: o, track: l })),
|
|
3651
|
+
activeLabel: () => this.activeCaptionLabel,
|
|
3652
|
+
addButton: (o, l, h) => this.controlBar.addButton(o, l, h)
|
|
3653
|
+
},
|
|
3654
|
+
e.transcript === !0 ? {} : e.transcript
|
|
3655
|
+
));
|
|
3656
|
+
}
|
|
3657
|
+
/** Etkileşimli içerik — öğeler değişince yeniden kurulur (`onAnswer` fonksiyonu anahtara girmez). */
|
|
3658
|
+
async applyInteractive(e) {
|
|
3659
|
+
var o, l, h;
|
|
3660
|
+
const i = e.interactive, s = (o = i == null ? void 0 : i.items) != null && o.length ? JSON.stringify({ ...i, onAnswer: void 0 }) : "";
|
|
3661
|
+
if (s === this.interactiveKey) {
|
|
3662
|
+
(l = this.interactive) == null || l.setOptions(i);
|
|
3663
|
+
return;
|
|
3664
|
+
}
|
|
3665
|
+
if (this.interactiveKey = s, (h = this.interactive) == null || h.destroy(), this.interactive = null, !s || !i) return;
|
|
3666
|
+
const { installInteractive: r } = await import("./interactive-CgltIneu.js");
|
|
3667
|
+
this.interactiveKey === s && (this.interactive = r(
|
|
3668
|
+
{
|
|
3669
|
+
hostEl: this,
|
|
3670
|
+
videoEl: this.videoEl,
|
|
3671
|
+
overlayEl: this.videoArea,
|
|
3672
|
+
i18n: this.i18n,
|
|
3673
|
+
isAdActive: () => this.isAdPlaying(),
|
|
3674
|
+
addSeekBarMarker: (c, f, v) => this.controlBar.seekBar.addMarker(c, f, v)
|
|
3675
|
+
},
|
|
3676
|
+
i
|
|
3677
|
+
));
|
|
3678
|
+
}
|
|
3679
|
+
/** Isı haritası — veri değişince yeniden çizilir. */
|
|
3680
|
+
async applyHeatmap(e) {
|
|
3681
|
+
var l, h;
|
|
3682
|
+
const i = e.heatmap, s = Array.isArray(i) ? { data: i } : i, r = s && ((l = s.data) != null && l.length || s.src) ? JSON.stringify(s) : "";
|
|
3683
|
+
if (r === this.heatmapKey || (this.heatmapKey = r, (h = this.heatmap) == null || h.destroy(), this.heatmap = null, !r || !s)) return;
|
|
3684
|
+
const { installHeatmap: o } = await import("./heatmap-Bb7neaYU.js");
|
|
3685
|
+
this.heatmapKey === r && (this.heatmap = o(
|
|
3686
|
+
{
|
|
3687
|
+
videoEl: this.videoEl,
|
|
3688
|
+
seekBar: this.controlBar.seekBar,
|
|
3689
|
+
log: (c) => this.log.add({ source: "player", ...c })
|
|
3690
|
+
},
|
|
3691
|
+
s
|
|
3692
|
+
));
|
|
3693
|
+
}
|
|
3694
|
+
/** PiP butonu: Document PiP açıksa kapatır, kullanılabiliyorsa açar; işlemediyse false (normal PiP). */
|
|
3695
|
+
toggleDocPip() {
|
|
3696
|
+
const e = this.docPip;
|
|
3697
|
+
return e != null && e.active ? (e.close(), !0) : !e || !this.docPipOptions || this.isAdPlaying() ? !1 : (document.pictureInPictureElement && document.exitPictureInPicture().catch(() => {
|
|
3698
|
+
}), e.open(this.docPipOptions).catch((i) => {
|
|
3699
|
+
var s, r;
|
|
3700
|
+
this.log.add({ source: "player", message: `Document Picture-in-Picture could not open: ${String(i)}` }), (r = (s = this.videoEl).requestPictureInPicture) == null || r.call(s).catch(() => {
|
|
3701
|
+
});
|
|
3702
|
+
}), !0);
|
|
3703
|
+
}
|
|
3704
|
+
/** Document PiP açıldı / kapandı. */
|
|
3705
|
+
onDocPipChange(e, i) {
|
|
3706
|
+
this.toggleAttribute("data-doc-pip", e), this.controlBar.setDocPip(this.docPipOptions !== null, e), i == null || i.document.addEventListener("click", this.controlBar.settingsMenu.onDocumentClick, !0), this.dispatchEvent(new CustomEvent("hp:pip", { detail: { state: e ? "enter" : "exit", mode: "document" } }));
|
|
3707
|
+
}
|
|
3708
|
+
/** PiP penceresindeki kısayol tuşları player'a gider (tam ekran hariç). */
|
|
3709
|
+
forwardPipKey(e) {
|
|
3710
|
+
if (e.key === "f" || e.key === "F") return !1;
|
|
3711
|
+
const i = new KeyboardEvent("keydown", {
|
|
3712
|
+
key: e.key,
|
|
3713
|
+
code: e.code,
|
|
3714
|
+
shiftKey: e.shiftKey,
|
|
3715
|
+
ctrlKey: e.ctrlKey,
|
|
3716
|
+
altKey: e.altKey,
|
|
3717
|
+
metaKey: e.metaKey,
|
|
3718
|
+
bubbles: !0,
|
|
3719
|
+
cancelable: !0,
|
|
3720
|
+
composed: !0
|
|
3721
|
+
});
|
|
3722
|
+
return this.dispatchEvent(i), i.defaultPrevented;
|
|
3723
|
+
}
|
|
3724
|
+
/** Picture-in-Picture'ı aç / kapat — `documentPip` açıksa ve destekleniyorsa Document PiP, değilse normal PiP. */
|
|
3725
|
+
togglePip() {
|
|
3726
|
+
var e, i;
|
|
3727
|
+
this.toggleDocPip() || (document.pictureInPictureElement ? document.exitPictureInPicture().catch(() => {
|
|
3728
|
+
}) : (i = (e = this.videoEl).requestPictureInPicture) == null || i.call(e).catch(() => {
|
|
3729
|
+
}));
|
|
3730
|
+
}
|
|
3731
|
+
/** Transkript panelini aç / kapat (`force` verilmezse tersine çevirir). `options.transcript` gerekir. */
|
|
3732
|
+
toggleTranscript(e) {
|
|
3733
|
+
var i;
|
|
3734
|
+
(i = this.transcript) == null || i.setOpen(e ?? !this.transcript.isOpen);
|
|
3735
|
+
}
|
|
3736
|
+
/** Altyazı menüsünü `options.subtitles` + yayın izlerinden kurar; `activeLabel` varsa onu seçer. */
|
|
3737
|
+
rebuildCaptions(e) {
|
|
3738
|
+
var r;
|
|
3739
|
+
if (this.subtitleTracks = [...this.optionTracks, ...this.streamTracks], !this.subtitleTracks.length) {
|
|
3740
|
+
this.selectCaption = null, this.activeCaptionLabel = null, this.controlBar.setCaptions([], this.i18n.captionsOff), this.captionRenderer.setActiveTrack(null), this.captionTrackActive = !1, this.controlBar.settingsMenu.setCaptionAppearance(null), this.sourceManager.selectTextTrack(null), (r = this.transcript) == null || r.onTracksChanged();
|
|
3741
|
+
return;
|
|
3742
|
+
}
|
|
3743
|
+
const i = (o) => {
|
|
3744
|
+
var h, c;
|
|
3745
|
+
const l = Lt(this.subtitleTracks, o);
|
|
3746
|
+
this.activeCaptionLabel = l ? o : null, this.sourceManager.selectTextTrack(((h = this.streamTracks.find((f) => f.label === o)) == null ? void 0 : h.id) ?? null), this.captionRenderer.setActiveTrack(l), this.captionTrackActive = l !== null, this.controlBar.settingsMenu.setActiveCaption(l ? o : this.i18n.captionsOff), this.controlBar.settingsMenu.setCaptionAppearance(l !== null ? this.buildCaptionAppearance() : null), (c = this.transcript) == null || c.onTracksChanged();
|
|
3747
|
+
};
|
|
3748
|
+
this.selectCaption = i;
|
|
3749
|
+
const s = e && this.subtitleTracks.some((o) => o.label === e) ? e : null;
|
|
3750
|
+
this.controlBar.setCaptions(
|
|
3751
|
+
[
|
|
3752
|
+
{ label: this.i18n.captionsOff, onSelect: () => i(null) },
|
|
3753
|
+
...this.subtitleTracks.map(({ label: o }) => ({ label: o, onSelect: () => i(o) }))
|
|
3754
|
+
],
|
|
3755
|
+
s ?? this.i18n.captionsOff
|
|
3756
|
+
), i(s);
|
|
3757
|
+
}
|
|
3758
|
+
/**
|
|
3759
|
+
* Yayın izinin menü adı: manifestteki ad teknik/boşsa ("stream_5", "und", dil kodunun kendisi) dil kodundan
|
|
3760
|
+
* player diliyle dil adı üretilir ("en" → "İngilizce" / "English").
|
|
3761
|
+
*/
|
|
3762
|
+
streamTrackLabel(e, i) {
|
|
3763
|
+
if (!(!e || e.toLowerCase() === i.toLowerCase() || /^(stream|audio|track|text|sub|subtitle|und)[\s_-]*\d*$/i.test(e)) || !i || i === "und") return e || i;
|
|
3764
|
+
try {
|
|
3765
|
+
const r = new Intl.DisplayNames([this.localeCode], { type: "language" }).of(i);
|
|
3766
|
+
if (r) return r.charAt(0).toLocaleUpperCase(this.localeCode) + r.slice(1);
|
|
3767
|
+
} catch {
|
|
3768
|
+
}
|
|
3769
|
+
return e || i;
|
|
3770
|
+
}
|
|
3771
|
+
/** Aynı adlı iz varsa (ör. options.subtitles'ta da "English") dil/sırayla ayırt edilir. */
|
|
3772
|
+
uniqueLabel(e, i, s) {
|
|
3773
|
+
const r = s.has(e) ? `${e} (${i})` : e;
|
|
3774
|
+
return s.add(r), r;
|
|
3775
|
+
}
|
|
3776
|
+
/** Ayarlar menüsünün "Altyazı" alt menüsüne eklenen Boyut/Renk/Konum satırları — her zaman GÜNCEL `this.i18n`'i okur (dil sonradan değişse bile). */
|
|
3777
|
+
buildCaptionAppearance() {
|
|
3778
|
+
const e = ["small", "normal", "large"], i = (s, r, o, l) => s.map((h, c) => ({
|
|
3779
|
+
value: h,
|
|
3780
|
+
active: r() === h,
|
|
3781
|
+
ariaLabel: `${l} ${c + 1}`,
|
|
3782
|
+
onSelect: () => o(h)
|
|
3783
|
+
}));
|
|
3784
|
+
return {
|
|
3785
|
+
sizeLabel: this.i18n.captionSize,
|
|
3786
|
+
getSizeOptions: () => e.map((s) => ({
|
|
3787
|
+
label: s === "small" ? this.i18n.captionSizeSmall : s === "large" ? this.i18n.captionSizeLarge : this.i18n.captionSizeNormal,
|
|
3788
|
+
active: this.captionRenderer.getFontSize() === s,
|
|
3789
|
+
onSelect: () => this.captionRenderer.setFontSize(s)
|
|
3790
|
+
})),
|
|
3791
|
+
bgColorLabel: this.i18n.captionBgColor,
|
|
3792
|
+
getBgColorOptions: () => i(
|
|
3793
|
+
D.BG_COLOR_PRESETS,
|
|
3794
|
+
() => this.captionRenderer.getBgColor(),
|
|
3795
|
+
(s) => this.captionRenderer.setBgColor(s),
|
|
3796
|
+
this.i18n.captionBgColor
|
|
3797
|
+
),
|
|
3798
|
+
textColorLabel: this.i18n.captionTextColor,
|
|
3799
|
+
getTextColorOptions: () => i(
|
|
3800
|
+
D.TEXT_COLOR_PRESETS,
|
|
3801
|
+
() => this.captionRenderer.getTextColor(),
|
|
3802
|
+
(s) => this.captionRenderer.setTextColor(s),
|
|
3803
|
+
this.i18n.captionTextColor
|
|
3804
|
+
),
|
|
3805
|
+
resetPositionLabel: this.i18n.captionResetPosition,
|
|
3806
|
+
onResetPosition: () => this.captionRenderer.resetPosition()
|
|
3807
|
+
};
|
|
3808
|
+
}
|
|
3809
|
+
getOrCreatePanelContainer() {
|
|
3810
|
+
return this.panelContainer || (this.panelContainer = document.createElement("div"), this.root.appendChild(this.panelContainer)), this.panelContainer;
|
|
3811
|
+
}
|
|
3812
|
+
// ── Kalite kilidi (ödüllü reklam) ─────────────────────────────────────
|
|
3813
|
+
/** Kaynağın yüksekliği: `height` ya da etiketten ("1080p" → 1080); bilinmiyorsa null. */
|
|
3814
|
+
sourceHeight(e) {
|
|
3815
|
+
if (typeof e.height == "number" && e.height > 0) return e.height;
|
|
3816
|
+
const i = /(\d{3,4})\s*p\b/i.exec(e.label);
|
|
3817
|
+
return i ? Number(i[1]) : null;
|
|
3818
|
+
}
|
|
3819
|
+
isSourceLocked(e) {
|
|
3820
|
+
var i;
|
|
3821
|
+
return !!((i = this.qualityGate) != null && i.isLocked(this.sourceHeight(e)));
|
|
3822
|
+
}
|
|
3823
|
+
/** Başlangıç kaynağı: `selected` (ya da ilk); kilitliyse serbest kaynakların en yükseği. */
|
|
3824
|
+
/** `qualityLimit.max` üstü yükseklikler; hepsi üstündeyse en düşüğü kalır. */
|
|
3825
|
+
limitSources(e) {
|
|
3826
|
+
var r;
|
|
3827
|
+
const i = (r = this._options.qualityLimit) == null ? void 0 : r.max;
|
|
3828
|
+
if (!i || e.length < 2) return e;
|
|
3829
|
+
const s = e.filter((o) => (this.sourceHeight(o) ?? 0) <= i);
|
|
3830
|
+
return s.length ? s : [e.reduce((o, l) => (this.sourceHeight(l) ?? 1 / 0) < (this.sourceHeight(o) ?? 1 / 0) ? l : o)];
|
|
3831
|
+
}
|
|
3832
|
+
/** Veri tasarrufu açık ve tarayıcı tasarruf / yavaş bağlantı bildiriyorsa üst sınır (px). */
|
|
3833
|
+
dataSaverHeight() {
|
|
3834
|
+
var r;
|
|
3835
|
+
const e = (r = this._options.qualityLimit) == null ? void 0 : r.dataSaver;
|
|
3836
|
+
if (!e) return null;
|
|
3837
|
+
const i = navigator.connection;
|
|
3838
|
+
return !!i && (i.saveData === !0 || ["slow-2g", "2g", "3g"].includes(i.effectiveType ?? "")) ? typeof e == "number" && e > 0 ? e : 480 : null;
|
|
3839
|
+
}
|
|
3840
|
+
pickInitialSource(e) {
|
|
3841
|
+
const i = this.dataSaverHeight();
|
|
3842
|
+
if (i) {
|
|
3843
|
+
const o = e.filter((l) => !this.isSourceLocked(l) && (this.sourceHeight(l) ?? 1 / 0) <= i);
|
|
3844
|
+
if (o.length) return o.reduce((l, h) => (this.sourceHeight(h) ?? 0) > (this.sourceHeight(l) ?? 0) ? h : l);
|
|
3845
|
+
}
|
|
3846
|
+
const s = e.find((o) => o.selected) ?? e[0];
|
|
3847
|
+
if (!s || !this.isSourceLocked(s)) return s;
|
|
3848
|
+
const r = e.filter((o) => !this.isSourceLocked(o));
|
|
3849
|
+
return r.length ? r.reduce((o, l) => (this.sourceHeight(l) ?? 0) > (this.sourceHeight(o) ?? 0) ? l : o) : s;
|
|
3850
|
+
}
|
|
3851
|
+
renderSourceQualities() {
|
|
3852
|
+
const e = this.currentSources;
|
|
3853
|
+
e.length <= 1 || this.controlBar.setQualities(
|
|
3854
|
+
e.map((i) => {
|
|
3855
|
+
const s = this.isSourceLocked(i);
|
|
3856
|
+
return {
|
|
3857
|
+
label: i.label,
|
|
3858
|
+
locked: s,
|
|
3859
|
+
onSelect: s ? () => {
|
|
3860
|
+
var r;
|
|
3861
|
+
return (r = this.qualityGate) == null ? void 0 : r.requestUnlock();
|
|
3862
|
+
} : () => void this.switchQualitySource(i)
|
|
3863
|
+
};
|
|
3864
|
+
}),
|
|
3865
|
+
this.activeSourceLabel || e[0].label
|
|
3866
|
+
);
|
|
3867
|
+
}
|
|
3868
|
+
/** Kilitli kalite var mı (ödüllü reklam butonu yalnızca o zaman görünür) ve en yükseğinin etiketi. */
|
|
3869
|
+
lockedQualityLabel() {
|
|
3870
|
+
if (!this.qualityGate) return null;
|
|
3871
|
+
const e = [];
|
|
3872
|
+
if (this.lastHlsLevels.length > 1)
|
|
3873
|
+
for (const i of this.lastHlsLevels) this.qualityGate.isLocked(i.height) && e.push(i.height);
|
|
3874
|
+
else
|
|
3875
|
+
for (const i of this.currentSources) {
|
|
3876
|
+
const s = this.sourceHeight(i);
|
|
3877
|
+
this.currentSources.length > 1 && this.qualityGate.isLocked(s) && e.push(s ?? 0);
|
|
3878
|
+
}
|
|
3879
|
+
return e.length ? `${Math.max(...e)}p` : null;
|
|
3880
|
+
}
|
|
3881
|
+
/** Kilit durumu değişti: menüleri yeniden kur, HLS üst sınırını güncelle; `upgrade` ise en iyi kaliteye geç. */
|
|
3882
|
+
refreshQualityGate(e) {
|
|
3883
|
+
var i;
|
|
3884
|
+
if (this.lastHlsLevels.length > 1)
|
|
3885
|
+
this.onHlsLevelsChanged(this.lastHlsLevels, e ? -1 : this.lastHlsActive), e && this.sourceManager.setLevel(-1);
|
|
3886
|
+
else if (this.currentSources.length > 1) {
|
|
3887
|
+
const s = e ? this.currentSources.filter((l) => !this.isSourceLocked(l)).reduce((l, h) => !l || (this.sourceHeight(h) ?? 0) > (this.sourceHeight(l) ?? 0) ? h : l, null) : null, r = this.currentSources.find((l) => l.label === this.activeSourceLabel), o = s ?? (r && this.isSourceLocked(r) ? this.pickInitialSource(this.currentSources) : null);
|
|
3888
|
+
o && o.label !== this.activeSourceLabel ? this.switchQualitySource(o) : this.renderSourceQualities();
|
|
3889
|
+
}
|
|
3890
|
+
(i = this.rewardedUnlock) == null || i.onQualitiesChanged();
|
|
3891
|
+
}
|
|
3892
|
+
async applyRewardedUnlock(e) {
|
|
3893
|
+
const i = e.rewardedUnlock;
|
|
3894
|
+
if (!i) {
|
|
3895
|
+
this.rewardedUnlock && (this.rewardedUnlock.destroy(), this.rewardedUnlock = null, this.qualityGate = null, this.refreshQualityGate(!1));
|
|
3896
|
+
return;
|
|
3897
|
+
}
|
|
3898
|
+
if (this.rewardedUnlock)
|
|
3899
|
+
this.rewardedUnlock.update(i);
|
|
3900
|
+
else {
|
|
3901
|
+
const { installRewardedUnlock: s } = await import("./rewardedUnlock-DUqYwXTr.js");
|
|
3902
|
+
this.rewardedUnlock ?? (this.rewardedUnlock = s(
|
|
3903
|
+
{
|
|
3904
|
+
hostEl: this,
|
|
3905
|
+
videoEl: this.videoEl,
|
|
3906
|
+
overlayEl: this.videoArea,
|
|
3907
|
+
chromeEl: this.chromeEl,
|
|
3908
|
+
i18n: this.i18n,
|
|
3909
|
+
log: (r) => this.log.add({ source: "ads", ...r }),
|
|
3910
|
+
play: () => void this.play().catch(() => {
|
|
3911
|
+
}),
|
|
3912
|
+
exitFullscreen: () => {
|
|
3913
|
+
this.isFullscreenActive() && this.exitFullscreenCompat();
|
|
3914
|
+
},
|
|
3915
|
+
lockedQualityLabel: () => this.lockedQualityLabel(),
|
|
3916
|
+
// Kalite dosyası değil içerik: aynı videonun 240p ↔ 720p geçişi (ya da HLS → MP4 yedeği) kilidi kapatmasın.
|
|
3917
|
+
contentKey: () => this.contentKey(),
|
|
3918
|
+
onLockChange: (r) => this.refreshQualityGate(r)
|
|
3919
|
+
},
|
|
3920
|
+
i
|
|
3921
|
+
)), this.qualityGate = this.rewardedUnlock;
|
|
3922
|
+
}
|
|
3923
|
+
}
|
|
3924
|
+
/**
|
|
3925
|
+
* İçerik kimliği: `sources` çalıyorsa tüm kaynakları (kalite değişimi / yedek kaynak aynı içerik), eklentinin
|
|
3926
|
+
* yüklediği medya (playlist, hikâye, dublaj) çalıyorsa onun adresi.
|
|
3927
|
+
*/
|
|
3928
|
+
contentKey() {
|
|
3929
|
+
const e = this.sourceGroups.flatMap((s) => s.sources.map((r) => r.src)), i = this.sourceManager.currentSrc ?? "";
|
|
3930
|
+
return !i || e.includes(i) ? e.join("|") : i;
|
|
3931
|
+
}
|
|
3932
|
+
async applyCast(e) {
|
|
3933
|
+
var s;
|
|
3934
|
+
const i = e.cast;
|
|
3935
|
+
if (!(i != null && i.chromecast) && !(i != null && i.airplay) && !(i != null && i.remotePlayback)) {
|
|
3936
|
+
(s = this.castController) == null || s.destroy(), this.castController = null;
|
|
3937
|
+
return;
|
|
3938
|
+
}
|
|
3939
|
+
if (this.castController)
|
|
3940
|
+
this.castController.update(i);
|
|
3941
|
+
else {
|
|
3942
|
+
const { installCast: r } = await import("./cast-vHyi7oV_.js");
|
|
3943
|
+
this.castController ?? (this.castController = r(
|
|
3944
|
+
{
|
|
3945
|
+
hostEl: this,
|
|
3946
|
+
videoEl: this.videoEl,
|
|
3947
|
+
overlayEl: this.videoArea,
|
|
3948
|
+
i18n: this.i18n,
|
|
3949
|
+
log: (o) => this.log.add({ source: "player", ...o }),
|
|
3950
|
+
addButton: (o, l, h) => this.controlBar.addButton(o, l, h),
|
|
3951
|
+
getMedia: () => this.castMedia(),
|
|
3952
|
+
isAdPlaying: () => this.isAdPlaying(),
|
|
3953
|
+
isMse: () => this.sourceManager.engine.engine === "hls.js" || this.sourceManager.engine.engine === "dash.js",
|
|
3954
|
+
contentKey: () => this.contentKey(),
|
|
3955
|
+
onRemoteChange: (o) => {
|
|
3956
|
+
var l;
|
|
3957
|
+
this.casting = o, (l = this.adsController) == null || l.setRemote(o), o && this.prerollGate.release(!1);
|
|
3958
|
+
}
|
|
3959
|
+
},
|
|
3960
|
+
i
|
|
3961
|
+
));
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
/** TV'ye gönderilecek içerik: o an çalan kaynak (ya da `cast.source`), başlık / kapak, altyazılar, reklam tag'leri. */
|
|
3965
|
+
castMedia() {
|
|
3966
|
+
var w, S, T, A, E;
|
|
3967
|
+
const e = this._options, i = e.cast ?? {}, s = this.sourceManager.currentSrc;
|
|
3968
|
+
if (!s) return null;
|
|
3969
|
+
const r = (w = this.currentSources.find((p) => p.src === s)) == null ? void 0 : w.type, o = typeof i.source == "function" ? i.source({ src: s, type: r }) : i.source ?? { src: s, type: r }, l = typeof o == "string" ? { src: o, type: void 0 } : o, h = (p) => new URL(p, document.baseURI).href, c = He({ src: l.src, type: l.type }), f = typeof e.audio == "object" ? e.audio : null, v = ((S = i.metadata) == null ? void 0 : S.image) ?? (f == null ? void 0 : f.cover) ?? e.poster, m = typeof e.ads == "object" ? e.ads : null, d = m == null ? void 0 : m.prebid, x = d == null ? void 0 : d.custParams, k = d ? { ...ee(d.custParams), ...ee((T = d.midroll) == null ? void 0 : T.custParams) } : void 0, g = (p, u) => {
|
|
3970
|
+
const b = Array.isArray(p) ? p[0] : p;
|
|
3971
|
+
return b ? ti(X(b), u) : void 0;
|
|
3972
|
+
}, y = i.ads === !1 ? null : typeof i.ads == "object" ? {
|
|
3973
|
+
vmap: i.ads.vmap ? X(i.ads.vmap) : void 0,
|
|
3974
|
+
preroll: g(i.ads.preroll),
|
|
3975
|
+
midroll: g(i.ads.midroll),
|
|
3976
|
+
midrollIntervalSeconds: i.ads.midrollIntervalSeconds,
|
|
3977
|
+
postroll: g(i.ads.postroll)
|
|
3978
|
+
} : m ? {
|
|
3979
|
+
vmap: m.adTagVmap ? X(m.adTagVmap) : void 0,
|
|
3980
|
+
preroll: g(m.adTagPreroll, x),
|
|
3981
|
+
midroll: g(m.adTagMidroll, k),
|
|
3982
|
+
midrollIntervalSeconds: m.midrollIntervalSeconds,
|
|
3983
|
+
postroll: g(m.adTagPostroll)
|
|
3984
|
+
} : null;
|
|
3985
|
+
return {
|
|
3986
|
+
src: h(l.src),
|
|
3987
|
+
contentType: l.type || di[c] || "video/mp4",
|
|
3988
|
+
live: this.videoEl.duration === 1 / 0,
|
|
3989
|
+
title: ((A = i.metadata) == null ? void 0 : A.title) ?? (f == null ? void 0 : f.title),
|
|
3990
|
+
subtitle: ((E = i.metadata) == null ? void 0 : E.subtitle) ?? (f == null ? void 0 : f.artist),
|
|
3991
|
+
image: v ? h(v) : void 0,
|
|
3992
|
+
music: !!e.audio,
|
|
3993
|
+
subtitles: (e.subtitles ?? []).map((p) => ({ src: h(p.src), label: p.label, lang: p.srclang, default: p.default })),
|
|
3994
|
+
ads: y && (y.vmap || y.preroll || y.midroll || y.postroll) ? y : null
|
|
3995
|
+
};
|
|
3996
|
+
}
|
|
3997
|
+
async applyAdTriggers(e) {
|
|
3998
|
+
var s;
|
|
3999
|
+
const i = e.adTriggers;
|
|
4000
|
+
if (!(i != null && i.endpoint) && !(i != null && i.config)) {
|
|
4001
|
+
(s = this.adTriggers) == null || s.destroy(), this.adTriggers = null;
|
|
4002
|
+
return;
|
|
4003
|
+
}
|
|
4004
|
+
if (this.adTriggers)
|
|
4005
|
+
this.adTriggers.update(i);
|
|
4006
|
+
else {
|
|
4007
|
+
const { installAdTriggers: r } = await import("./adTriggers-BIAWe8o4.js");
|
|
4008
|
+
this.adTriggers ?? (this.adTriggers = r(
|
|
4009
|
+
{
|
|
4010
|
+
hostEl: this,
|
|
4011
|
+
videoEl: this.videoEl,
|
|
4012
|
+
overlayEl: this.videoArea,
|
|
4013
|
+
i18n: this.i18n,
|
|
4014
|
+
log: (o) => this.log.add({ source: "ads", ...o }),
|
|
4015
|
+
isBlocked: () => this.isChromeBlocked || this.isAdPlaying() || this.casting,
|
|
4016
|
+
isFullscreen: () => this.isFullscreenActive(),
|
|
4017
|
+
isNativeFullscreen: () => !!this.iosVideo.webkitDisplayingFullscreen,
|
|
4018
|
+
contentKey: () => this.contentKey()
|
|
4019
|
+
},
|
|
4020
|
+
i
|
|
4021
|
+
));
|
|
4022
|
+
}
|
|
4023
|
+
}
|
|
4024
|
+
async applySponsorship(e) {
|
|
4025
|
+
var s;
|
|
4026
|
+
const i = e.sponsorship;
|
|
4027
|
+
if (!(i != null && i.endpoint)) {
|
|
4028
|
+
(s = this.sponsorship) == null || s.destroy(), this.sponsorship = null;
|
|
4029
|
+
return;
|
|
4030
|
+
}
|
|
4031
|
+
if (this.sponsorship)
|
|
4032
|
+
this.sponsorship.update(i);
|
|
4033
|
+
else {
|
|
4034
|
+
const { installSponsorship: r } = await import("./sponsorship-BT21uwN5.js");
|
|
4035
|
+
this.sponsorship ?? (this.sponsorship = r(
|
|
4036
|
+
{
|
|
4037
|
+
hostEl: this,
|
|
4038
|
+
videoEl: this.videoEl,
|
|
4039
|
+
overlayEl: this.videoArea,
|
|
4040
|
+
i18n: this.i18n,
|
|
4041
|
+
log: (o) => this.log.add({ source: "player", ...o })
|
|
4042
|
+
},
|
|
4043
|
+
i
|
|
4044
|
+
));
|
|
4045
|
+
}
|
|
4046
|
+
}
|
|
4047
|
+
/** Kalite değişirken oynatma konumunu ve play/pause durumunu korur. */
|
|
4048
|
+
async switchQualitySource(e) {
|
|
4049
|
+
this.activeSourceLabel = e.label, this.renderSourceQualities();
|
|
4050
|
+
const i = this.videoEl.currentTime, s = !this.videoEl.paused;
|
|
4051
|
+
await this.sourceManager.load(e.src, e.type), this.videoEl.currentTime = i, s && this.videoEl.play().catch(() => {
|
|
4052
|
+
}), this.dispatchEvent(new CustomEvent("hp:qualitychange", { detail: { label: e.label } }));
|
|
4053
|
+
}
|
|
4054
|
+
/** `from`'dan itibaren tarayıcının oynatabileceği ilk grup (oynatamadıkları atlanır); hiçbiri yoksa -1 (from 0'sa 0 — yine de dene). */
|
|
4055
|
+
firstPlayableGroup(e = 0) {
|
|
4056
|
+
var i;
|
|
4057
|
+
for (let s = e; s < this.sourceGroups.length; s++) {
|
|
4058
|
+
const r = this.sourceGroups[s];
|
|
4059
|
+
if (!it(r, this.videoEl)) {
|
|
4060
|
+
if (s > e) {
|
|
4061
|
+
const o = this.sourceGroups[e].format;
|
|
4062
|
+
this.dispatchEvent(new CustomEvent("hp:sourcefallback", { detail: { from: o, to: r.format, code: 4, skipped: !0 } }));
|
|
4063
|
+
}
|
|
4064
|
+
return s;
|
|
4065
|
+
}
|
|
4066
|
+
this.log.add({ source: "player", message: `Source format "${r.format}" is not playable in this browser — skipped`, details: { src: (i = r.sources[0]) == null ? void 0 : i.src } });
|
|
4067
|
+
}
|
|
4068
|
+
return e === 0 ? 0 : -1;
|
|
4069
|
+
}
|
|
4070
|
+
/**
|
|
4071
|
+
* Ölümcül hata: sıradaki biçim grubuna geç (konum ve oynatma durumu korunur).
|
|
4072
|
+
* true = geçiliyor, hata ekranı gösterilmez. Hata ekranının `shouldShow`'undan çağrılır.
|
|
4073
|
+
*/
|
|
4074
|
+
tryNextSourceGroup() {
|
|
4075
|
+
var l;
|
|
4076
|
+
if (this.fallbackPending) return !0;
|
|
4077
|
+
const e = this.sourceGroups[this.activeGroup];
|
|
4078
|
+
if (!e || this.sourceGroups.length < 2 || !e.sources.some((h) => h.src === this.sourceManager.currentSrc)) return !1;
|
|
4079
|
+
const i = ((l = this.videoEl.error) == null ? void 0 : l.code) ?? this.streamErrorCode;
|
|
4080
|
+
if (this.streamErrorCode = void 0, i === 1) return !1;
|
|
4081
|
+
const s = this.firstPlayableGroup(this.activeGroup + 1);
|
|
4082
|
+
if (s === -1) return !1;
|
|
4083
|
+
this.fallbackPending = !0;
|
|
4084
|
+
const r = Number.isFinite(this.videoEl.duration) ? this.videoEl.currentTime : 0, o = !this.videoEl.paused || !!this._options.autoplay;
|
|
4085
|
+
return this.log.add({
|
|
4086
|
+
source: "player",
|
|
4087
|
+
message: `Source "${e.format}" failed — falling back to "${this.sourceGroups[s].format}"`,
|
|
4088
|
+
details: { code: i, src: this.sourceManager.currentSrc ?? void 0 }
|
|
4089
|
+
}), this.dispatchEvent(new CustomEvent("hp:sourcefallback", { detail: { from: e.format, to: this.sourceGroups[s].format, code: i } })), queueMicrotask(() => void this.activateSourceGroup(s, r, o)), !0;
|
|
4090
|
+
}
|
|
4091
|
+
async activateSourceGroup(e, i, s) {
|
|
4092
|
+
var l;
|
|
4093
|
+
const r = this.sourceGroups[e];
|
|
4094
|
+
if (!r) return;
|
|
4095
|
+
this.activeGroup = e, this.currentSources = this.limitSources(r.sources);
|
|
4096
|
+
const o = this.pickInitialSource(this.currentSources);
|
|
4097
|
+
this.errorScreen.dismiss(), this.controlBar.setQualities([], ""), this.hlsQualitiesShown = !1, this.activeSourceLabel = o.label, i > 0 && this.videoEl.addEventListener("loadedmetadata", () => this.videoEl.currentTime = i, { once: !0 });
|
|
4098
|
+
try {
|
|
4099
|
+
await this.sourceManager.load(o.src, o.type);
|
|
4100
|
+
} finally {
|
|
4101
|
+
this.fallbackPending = !1;
|
|
4102
|
+
}
|
|
4103
|
+
this.renderSourceQualities(), (l = this.rewardedUnlock) == null || l.onQualitiesChanged(), s && this.videoEl.play().catch(() => {
|
|
4104
|
+
});
|
|
4105
|
+
}
|
|
4106
|
+
/** Hata ekranındaki "Tekrar dene": birden fazla grup varsa en öncelikli gruptan baştan başla. */
|
|
4107
|
+
async retrySource() {
|
|
4108
|
+
const e = this.sourceGroups.some((s) => s.sources.some((r) => r.src === this.sourceManager.currentSrc));
|
|
4109
|
+
if (this.sourceGroups.length < 2 || !e) return this.sourceManager.reload();
|
|
4110
|
+
const i = Number.isFinite(this.videoEl.duration) ? this.videoEl.currentTime : 0;
|
|
4111
|
+
this.fallbackPending = !0, await this.activateSourceGroup(this.firstPlayableGroup(), i, !0);
|
|
4112
|
+
}
|
|
4113
|
+
// ── Fullscreen (vendor-prefix uyumlu) ───────────────────────────────
|
|
4114
|
+
/** iPhone Safari element tam ekranını desteklemiyor — yalnızca <video>'nun kendi (native kontrollü) tam ekranı. */
|
|
4115
|
+
get iosVideo() {
|
|
4116
|
+
return this.videoEl;
|
|
4117
|
+
}
|
|
4118
|
+
requestFullscreenCompat() {
|
|
4119
|
+
if (this.audioMode) return;
|
|
4120
|
+
const e = this, i = () => {
|
|
4121
|
+
var s, r;
|
|
4122
|
+
return (r = (s = this.iosVideo).webkitEnterFullscreen) == null ? void 0 : r.call(s);
|
|
4123
|
+
};
|
|
4124
|
+
e.requestFullscreen ? e.requestFullscreen().catch(i) : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : i();
|
|
4125
|
+
}
|
|
4126
|
+
exitFullscreenCompat() {
|
|
4127
|
+
var i, s;
|
|
4128
|
+
if (this.iosVideo.webkitDisplayingFullscreen) {
|
|
4129
|
+
(s = (i = this.iosVideo).webkitExitFullscreen) == null || s.call(i);
|
|
4130
|
+
return;
|
|
4131
|
+
}
|
|
4132
|
+
const e = document;
|
|
4133
|
+
document.exitFullscreen ? document.exitFullscreen() : e.webkitExitFullscreen && e.webkitExitFullscreen();
|
|
4134
|
+
}
|
|
4135
|
+
isFullscreenActive() {
|
|
4136
|
+
const e = document;
|
|
4137
|
+
return document.fullscreenElement === this || e.webkitFullscreenElement === this || !!this.iosVideo.webkitDisplayingFullscreen;
|
|
4138
|
+
}
|
|
4139
|
+
/**
|
|
4140
|
+
* iPhone native tam ekranında bizim altyazı katmanımız görünmez — seçili izi 'showing' yapıp iOS'un çizmesine bırakırız.
|
|
4141
|
+
*/
|
|
4142
|
+
showCaptionsNatively() {
|
|
4143
|
+
for (const { track: e } of this.subtitleTracks) e.mode === "hidden" && (e.mode = "showing");
|
|
4144
|
+
}
|
|
4145
|
+
/**
|
|
4146
|
+
* Native tam ekrandan dönüş: iOS menüsünde seçilen iz 'showing' kalır ve kendi katmanımızla çift altyazı çizilir.
|
|
4147
|
+
* Seçimi bizim tarafa aktarıp izi tekrar 'hidden' yaparız (hiçbiri showing değilse kullanıcı kapatmıştır).
|
|
4148
|
+
*/
|
|
4149
|
+
syncCaptionsFromNative() {
|
|
4150
|
+
if (!this.selectCaption) return;
|
|
4151
|
+
const e = this.subtitleTracks.find(({ track: i }) => i.mode === "showing");
|
|
4152
|
+
this.selectCaption((e == null ? void 0 : e.label) ?? null);
|
|
4153
|
+
}
|
|
4154
|
+
get isChromeBlocked() {
|
|
4155
|
+
return this.chromeBlockers.size > 0;
|
|
4156
|
+
}
|
|
4157
|
+
get isChromeFullyHidden() {
|
|
4158
|
+
for (const e of this.chromeBlockers.values()) if (e === "hidden") return !0;
|
|
4159
|
+
return !1;
|
|
4160
|
+
}
|
|
4161
|
+
/**
|
|
4162
|
+
* Dar player'da kontrol çubuğu (alt satır + seek bar) yüksekliğin yarısını kaplıyor ve seek bar ortadaki play
|
|
4163
|
+
* butonunun içinden geçiyordu — butonun ortasına dokunmak videoyu sarıyordu. Buton seek bar'ın üstündeki boş
|
|
4164
|
+
* alanın ortasına alınır, sığmazsa küçülür (en az 40px).
|
|
4165
|
+
*/
|
|
4166
|
+
layoutCenterPlay() {
|
|
4167
|
+
const e = this.videoArea, i = e.getBoundingClientRect(), s = this.controlBar.seekBar.el.getBoundingClientRect(), r = () => {
|
|
4168
|
+
e.removeAttribute("data-center-play-shifted"), e.style.removeProperty("--hp-center-play-size"), e.style.removeProperty("--hp-center-play-shift"), e.style.removeProperty("--hp-center-play-shift-x");
|
|
4169
|
+
};
|
|
4170
|
+
if (!i.height || !s.height || !e.hasAttribute("data-compact")) return r();
|
|
4171
|
+
const o = 64, l = s.top - i.top - 8;
|
|
4172
|
+
if (i.height / 2 + o / 2 <= l) return r();
|
|
4173
|
+
const h = Math.max(40, Math.min(56, l - 12)), c = Math.max(h / 2 + 6, l - h / 2), f = Math.round(c - i.height / 2);
|
|
4174
|
+
let v = 0;
|
|
4175
|
+
const m = this.controlBar.topEl.getBoundingClientRect();
|
|
4176
|
+
if (m.width > 0 && c - h / 2 < m.bottom - i.top) {
|
|
4177
|
+
const d = m.left - i.left - 8 - h / 2;
|
|
4178
|
+
i.width / 2 > d && (v = Math.round(Math.max(h / 2 + 8, d) - i.width / 2));
|
|
4179
|
+
}
|
|
4180
|
+
e.setAttribute("data-center-play-shifted", ""), e.style.setProperty("--hp-center-play-shift-x", `${v}px`), e.style.setProperty("--hp-center-play-size", `${h}px`), e.style.setProperty("--hp-center-play-shift", `${f}px`);
|
|
4181
|
+
}
|
|
4182
|
+
/** Dar player'da dokunmatikte oynat/duraklat yerine kontrolleri göster/gizle (options.tapToPlay). */
|
|
4183
|
+
tapTogglesPlay(e) {
|
|
4184
|
+
return this.tapToPlay !== "auto" ? this.tapToPlay : e === "mouse" ? !0 : !this.videoArea.hasAttribute("data-compact") || this.isFullscreenActive();
|
|
4185
|
+
}
|
|
4186
|
+
/** Videonun boş alanına tek dokunuş/tık: ya `togglePlay` ya da (dar player'da) kontrolleri aç/kapa. */
|
|
4187
|
+
onBackgroundTap(e, i) {
|
|
4188
|
+
if (this.tapTogglesPlay(e)) {
|
|
4189
|
+
i();
|
|
4190
|
+
return;
|
|
4191
|
+
}
|
|
4192
|
+
this.chromeVisible && !this.videoEl.paused ? (this.hideTimer && clearTimeout(this.hideTimer), this.setChromeOpacity("0")) : this.scheduleAutoHide();
|
|
4193
|
+
}
|
|
4194
|
+
showChrome() {
|
|
4195
|
+
this.setChromeOpacity("1");
|
|
4196
|
+
}
|
|
4197
|
+
/** Chrome görünürlüğünün tek giriş noktası — altyazı da haberdar olur (kontroller gizlenince en alta iner). */
|
|
4198
|
+
setChromeOpacity(e) {
|
|
4199
|
+
var i, s;
|
|
4200
|
+
this.chromeEl.style.opacity = e, this.chromeVisible = e === "1", (i = this.videoArea) == null || i.toggleAttribute("data-chrome-hidden", !this.chromeVisible), (s = this.captionRenderer) == null || s.setChromeVisible(this.chromeVisible), this.updateMiniProgress();
|
|
4201
|
+
}
|
|
4202
|
+
/** İnce ilerleme çizgisi: yalnızca kontroller gizliyken; reklam/giriş ekranı (chrome bloklu) sırasında değil. */
|
|
4203
|
+
updateMiniProgress() {
|
|
4204
|
+
var e;
|
|
4205
|
+
(e = this.miniProgress) == null || e.setVisible(!this.chromeVisible && !this.isChromeBlocked);
|
|
4206
|
+
}
|
|
4207
|
+
/**
|
|
4208
|
+
* Plugin (ads/countdown/geo) chrome'u kendi key'iyle gizler; unblockChrome aynı key'le açar.
|
|
4209
|
+
* 'reduced' (ads): yalnızca oynat/duraklat + ses kalır. Merkez buton her modda gizli.
|
|
4210
|
+
*/
|
|
4211
|
+
blockChrome(e, i = "hidden") {
|
|
4212
|
+
this.chromeBlockers.set(e, i), this.updateMiniProgress(), this.hideTimer && clearTimeout(this.hideTimer), this.centerPlayButton.style.opacity = "0", this.centerPlayButton.style.pointerEvents = "none", this.isChromeFullyHidden ? (this.setChromeOpacity("0"), this.chromeEl.style.pointerEvents = "none") : this.setChromeOpacity("1"), this.controlBar.setAdMode(this.chromeBlockers.get("ads") === "reduced");
|
|
4213
|
+
}
|
|
4214
|
+
/** Bloklayan plugin işini bitirince çağırır — başka bir blocker hâlâ aktifse chrome açılmaz. */
|
|
4215
|
+
unblockChrome(e) {
|
|
4216
|
+
if (this.chromeBlockers.delete(e), this.updateMiniProgress(), this.controlBar.setAdMode(this.chromeBlockers.get("ads") === "reduced"), this.isChromeBlocked) {
|
|
4217
|
+
this.isChromeFullyHidden ? (this.setChromeOpacity("0"), this.chromeEl.style.pointerEvents = "none") : (this.setChromeOpacity("1"), this.chromeEl.style.pointerEvents = "");
|
|
4218
|
+
return;
|
|
4219
|
+
}
|
|
4220
|
+
this.chromeEl.style.pointerEvents = "", this.videoEl.paused ? (this.centerPlayButton.style.opacity = "1", this.centerPlayButton.style.pointerEvents = "auto", this.showChrome()) : this.scheduleAutoHide();
|
|
4221
|
+
}
|
|
4222
|
+
/** DAI reklam arası boyunca kullanıcı reklamın İÇİNE seek edemesin diye (sunucu taraflı eklenen reklamlar seekable aralığın parçası). */
|
|
4223
|
+
disableSeeking() {
|
|
4224
|
+
this.controlBar.setSeekingEnabled(!1), this.controlBar.seekBar.el.style.pointerEvents = "none", this.controlBar.seekBar.el.style.opacity = "0.5";
|
|
4225
|
+
}
|
|
4226
|
+
enableSeeking() {
|
|
4227
|
+
this.controlBar.setSeekingEnabled(!0), this.controlBar.seekBar.el.style.pointerEvents = "", this.controlBar.seekBar.el.style.opacity = "";
|
|
4228
|
+
}
|
|
4229
|
+
/** Fare kıpırdadı: imleci göster, hareketsiz kalırsa gizlemek için sayacı yeniden kur (tailwind.css `:host([data-cursor-hidden])`). */
|
|
4230
|
+
scheduleCursorHide() {
|
|
4231
|
+
this.showCursor(), this.cursorHideDelayMs !== null && (this.cursorTimer = setTimeout(() => {
|
|
4232
|
+
this.cursorTimer = null, !(this.videoEl.paused || this.pointerOverControls || this.controlBar.settingsMenu.isOpen) && this.setAttribute("data-cursor-hidden", "");
|
|
4233
|
+
}, this.cursorHideDelayMs));
|
|
4234
|
+
}
|
|
4235
|
+
showCursor() {
|
|
4236
|
+
this.cursorTimer && clearTimeout(this.cursorTimer), this.cursorTimer = null, this.removeAttribute("data-cursor-hidden");
|
|
4237
|
+
}
|
|
4238
|
+
/** options.audio: sahneyi kurar, günceller (konum / boyut / devir canlı değişebilir) ya da kaldırır. */
|
|
4239
|
+
async applyAudioMode(e) {
|
|
4240
|
+
var s;
|
|
4241
|
+
const i = e.audio ? e.audio === !0 ? {} : e.audio : null;
|
|
4242
|
+
if (this.audioMode = !!i, this.toggleAttribute("data-audio", !!i), this.controlBar.setAudioMode(!!i), this.toggleAttribute("data-audio-compact", (i == null ? void 0 : i.layout) === "compact"), !i) {
|
|
4243
|
+
this.controlBar.setAudioBar(null), (s = this.audioStage) == null || s.destroy(), this.audioStage = null;
|
|
4244
|
+
return;
|
|
4245
|
+
}
|
|
4246
|
+
if (this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = null, this.isChromeBlocked || this.showChrome(), this.audioStage)
|
|
4247
|
+
this.audioStage.update(i);
|
|
4248
|
+
else {
|
|
4249
|
+
const { installAudioStage: r } = await import("./audio-LkYgd5Wq.js");
|
|
4250
|
+
if (!this.audioMode) return;
|
|
4251
|
+
this.audioStage ?? (this.audioStage = r(
|
|
4252
|
+
{
|
|
4253
|
+
videoEl: this.videoEl,
|
|
4254
|
+
layerEl: this.root.querySelector(".media-layer"),
|
|
4255
|
+
poster: () => this._options.poster ?? this.getAttribute("poster") ?? void 0,
|
|
4256
|
+
togglePlay: () => this.videoEl.paused ? void this.play().catch(() => {
|
|
4257
|
+
}) : this.videoEl.pause(),
|
|
4258
|
+
play: () => void this.play().catch(() => {
|
|
4259
|
+
}),
|
|
4260
|
+
i18n: this.i18n,
|
|
4261
|
+
setBarMeta: (o) => this.controlBar.setAudioBar(o)
|
|
4262
|
+
},
|
|
4263
|
+
i
|
|
4264
|
+
));
|
|
4265
|
+
}
|
|
4266
|
+
}
|
|
4267
|
+
/** Ads plugin'ini bir kez kurar; erken (paralel) başlatılan kurulum varsa onu bekler. */
|
|
4268
|
+
installAdsOnce(e) {
|
|
4269
|
+
if (!e.ads || this.adsController) return Promise.resolve();
|
|
4270
|
+
if (!this.adsInstall) {
|
|
4271
|
+
const i = e.ads === !0 ? {} : e.ads;
|
|
4272
|
+
this.adsInstall = (async () => {
|
|
4273
|
+
const { installAds: s } = await import("./ads-DlpHPpR9.js");
|
|
4274
|
+
this.adsController = await s(
|
|
4275
|
+
{
|
|
4276
|
+
videoEl: this.videoEl,
|
|
4277
|
+
hostEl: this,
|
|
4278
|
+
adLayerEl: this.adLayerEl,
|
|
4279
|
+
hideChrome: () => this.blockChrome("ads", "reduced"),
|
|
4280
|
+
showChrome: () => this.unblockChrome("ads"),
|
|
4281
|
+
// IMA'nın KENDİ UI'ı üzerinden (ör. reklam video'suna
|
|
4282
|
+
// tıklama) duraklatılır/devam ettirilirse toolbar'ımızın
|
|
4283
|
+
// ikonu da senkron kalsın diye.
|
|
4284
|
+
onAdPlayStateChange: () => this.controlBar.refreshAdPlayState(),
|
|
4285
|
+
locale: this.localeCode,
|
|
4286
|
+
prerollGate: this.prerollGate,
|
|
4287
|
+
log: (r) => this.log.add({ source: "ads", ...r }),
|
|
4288
|
+
onAdProgress: (r) => this.controlBar.setAdInfo(r),
|
|
4289
|
+
// Sürekli oynatma (vconp): playlist / story bir sonraki içeriği kendiliğinden başlatıyorsa.
|
|
4290
|
+
isContinuousPlayback: () => {
|
|
4291
|
+
const r = this._options, o = (l) => !!l && l.autoplayNext !== !1;
|
|
4292
|
+
return o(r.playlist) || o(r.story);
|
|
4293
|
+
},
|
|
4294
|
+
audioPoster: (() => {
|
|
4295
|
+
if (!e.audio) return;
|
|
4296
|
+
const r = e.audio === !0 ? {} : e.audio;
|
|
4297
|
+
return r.adPoster ? new URL(r.adPoster, document.baseURI).href : void 0;
|
|
4298
|
+
})(),
|
|
4299
|
+
transformTag: (r, o) => this.adTagTransform(r, o),
|
|
4300
|
+
surface: {
|
|
4301
|
+
videoEl: this.videoEl,
|
|
4302
|
+
containerEl: this.videoArea,
|
|
4303
|
+
enterFullscreen: () => this.requestFullscreenCompat(),
|
|
4304
|
+
labels: () => this.i18n
|
|
4305
|
+
}
|
|
4306
|
+
},
|
|
4307
|
+
i
|
|
4308
|
+
);
|
|
4309
|
+
})().catch((s) => {
|
|
4310
|
+
this.prerollGate.release(!0), this.adsInstall = null, this.dispatchEvent(new CustomEvent("hp:aderror", { detail: { message: String(s) } }));
|
|
4311
|
+
});
|
|
4312
|
+
}
|
|
4313
|
+
return this.adsInstall;
|
|
4314
|
+
}
|
|
4315
|
+
/** Preroll beklemesi başladı / bitti: halka döner, toolbar görünür kalır, oynat butonu "duraklat" görünür. */
|
|
4316
|
+
onPrerollWaitChange(e) {
|
|
4317
|
+
if (this.controlBar.setPendingPlay(e), this.controlBar.setLoading("preroll", e), this.isChromeBlocked) return;
|
|
4318
|
+
const i = !e && this.videoEl.paused;
|
|
4319
|
+
this.centerPlayButton.style.opacity = i ? "1" : "0", this.centerPlayButton.style.pointerEvents = i ? "auto" : "none";
|
|
4320
|
+
}
|
|
4321
|
+
/** Preroll beklenirken basılan oynat/duraklat (buton, Space/K) beklemeyi iptal eder. */
|
|
4322
|
+
cancelPrerollWait() {
|
|
4323
|
+
return this.prerollGate.isWaiting ? (this.prerollGate.cancelIntent(), !0) : !1;
|
|
4324
|
+
}
|
|
4325
|
+
/** Yükleme halkası açılınca kontroller görünür kalır ve gizlenmez; kapanınca normal otomatik gizleme sürer. */
|
|
4326
|
+
onLoadingChange(e) {
|
|
4327
|
+
this.loadingActive = e, e ? (this.hideTimer && clearTimeout(this.hideTimer), this.hideTimer = null, this.isChromeFullyHidden || this.showChrome()) : !this.videoEl.paused && !this.isChromeBlocked && this.scheduleAutoHide();
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
/** Paket sürümü (ör. "1.0.4"). */
|
|
4331
|
+
a(Xe, "version", V);
|
|
4332
|
+
const vi = 1;
|
|
4333
|
+
typeof window < "u" && !customElements.get("hope-player") && customElements.define("hope-player", Xe);
|
|
4334
|
+
export {
|
|
4335
|
+
V as H,
|
|
4336
|
+
lt as L,
|
|
4337
|
+
vi as P,
|
|
4338
|
+
ee as a,
|
|
4339
|
+
Xe as b,
|
|
4340
|
+
z as c,
|
|
4341
|
+
bi as d,
|
|
4342
|
+
R as f,
|
|
4343
|
+
X as g,
|
|
4344
|
+
ie as i,
|
|
4345
|
+
ti as m,
|
|
4346
|
+
Zt as r,
|
|
4347
|
+
F as s,
|
|
4348
|
+
fi as t,
|
|
4349
|
+
_ as v
|
|
4350
|
+
};
|
|
4351
|
+
//# sourceMappingURL=player-D2_HRzot.js.map
|