@hopeplayer/core 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/HopePlayerElement.d.ts.map +1 -1
  2. package/dist/chunks/{index-n-1IIClr.js → index-BTBAxNjr.js} +2 -2
  3. package/dist/chunks/{index-n-1IIClr.js.map → index-BTBAxNjr.js.map} +1 -1
  4. package/dist/chunks/{index-BgJJr55r.js → index-BeJNpAyx.js} +121 -106
  5. package/dist/chunks/index-BeJNpAyx.js.map +1 -0
  6. package/dist/chunks/{index-9NzklChR.js → index-C2c71cGP.js} +2 -2
  7. package/dist/chunks/{index-9NzklChR.js.map → index-C2c71cGP.js.map} +1 -1
  8. package/dist/chunks/{index-048h1-5X.js → index-DcVUXkXo.js} +2 -2
  9. package/dist/chunks/{index-048h1-5X.js.map → index-DcVUXkXo.js.map} +1 -1
  10. package/dist/chunks/{index-CP1Y6U0c.js → index-DtqNHU7Y.js} +2 -2
  11. package/dist/chunks/{index-CP1Y6U0c.js.map → index-DtqNHU7Y.js.map} +1 -1
  12. package/dist/chunks/{index-BO0tjMR6.js → index-Dy0Th0is.js} +2 -2
  13. package/dist/chunks/{index-BO0tjMR6.js.map → index-Dy0Th0is.js.map} +1 -1
  14. package/dist/chunks/{index-01P9jpUY.js → index-Dz0E1YPE.js} +336 -302
  15. package/dist/chunks/index-Dz0E1YPE.js.map +1 -0
  16. package/dist/controls/ControlBar.d.ts +13 -0
  17. package/dist/controls/ControlBar.d.ts.map +1 -1
  18. package/dist/controls/SettingsMenu.d.ts +1 -0
  19. package/dist/controls/SettingsMenu.d.ts.map +1 -1
  20. package/dist/hope-player.js +1 -1
  21. package/dist/plugins/audio/AudioStage.d.ts +9 -0
  22. package/dist/plugins/audio/AudioStage.d.ts.map +1 -1
  23. package/dist/types/index.d.ts +5 -0
  24. package/dist/types/index.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/dist/chunks/index-01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,cAAc;IAoC5B,yFAAyF;IACzF,OAAO,CAAC,cAAc;IAqDtB,8GAA8G;IAC9G,OAAO,CAAC,mBAAmB;IAU3B,wFAAwF;IACxF,OAAO,CAAC,iBAAiB;IAMzB,+GAA+G;IAC/G,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAW/B;CACL"}
@@ -1,7 +1,7 @@
1
1
  var E = Object.defineProperty;
2
2
  var y = (a, t, e) => t in a ? E(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
3
  var l = (a, t, e) => y(a, typeof t != "symbol" ? t + "" : t, e);
4
- import { f as x } from "./index-01P9jpUY.js";
4
+ import { f as x } from "./index-Dz0E1YPE.js";
5
5
  const w = 8, f = /%(0(\d+))?d/;
6
6
  class M {
7
7
  constructor(t, e) {
@@ -222,4 +222,4 @@ export {
222
222
  M as SpriteThumbnails,
223
223
  I as installSpriteThumbnails
224
224
  };
225
- //# sourceMappingURL=index-n-1IIClr.js.map
225
+ //# sourceMappingURL=index-BTBAxNjr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-n-1IIClr.js","sources":["../../src/plugins/sprite-thumbnails/SpriteThumbnails.ts","../../src/plugins/sprite-thumbnails/index.ts"],"sourcesContent":["import type { SpriteThumbnailsOptions } from '../../types';\nimport { formatTime } from '../../utils/format-time';\n\nexport interface SpriteThumbnailsPlayerContext {\n videoEl: HTMLVideoElement;\n /** Önizlemenin bağlandığı seek bar — zaman eşlemesi (chapter boşlukları dahil) onun `ratioAtClientX`'inden. */\n seekBar: {\n readonly el: HTMLElement;\n ratioAtClientX(clientX: number): number;\n suppressHoverTime(key: string, suppressed: boolean): void;\n };\n /** Responsive ölçekleme için referans genişlik — genelde player/video alanının genişliği. */\n playerWidth(): number;\n}\n\n/** Bir önizleme karesi: hangi görselin hangi dikdörtgeni. */\ninterface Frame {\n url: string;\n x: number;\n y: number;\n w: number;\n h: number;\n}\n\ninterface Sheet {\n img: HTMLImageElement;\n ready: boolean;\n failed: boolean;\n promise: Promise<void>;\n}\n\nexport interface VttCue {\n start: number;\n end: number;\n url: string;\n /** `#xywh` yoksa null → görselin tamamı. */\n rect: { x: number; y: number; w: number; h: number } | null;\n}\n\n/** Aynı anda bellekte (decode edilmiş) tutulan en fazla sheet — uzun videolarda bellek sınırsız büyümesin. */\nconst MAX_CACHED_SHEETS = 8;\n/** Sheet numarası şablonu: `%d` ya da sıfır dolgulu `%03d`. */\nconst SHEET_TEMPLATE = /%(0(\\d+))?d/;\n\n/**\n * Seek bar hover önizlemesi. Kaynak: tek görsel, çok parçalı (%d / %03d şablonu ya da sheets) veya WebVTT (#xywh).\n * sheetDuration verilmezse ilk sheet'in ızgarasından hesaplanır. Kurulumda hiçbir şey indirilmez; yalnızca imlecin\n * altındaki sheet + komşuları yüklenir, decode bitmeden gösterilmez, LRU cache.\n */\nexport class SpriteThumbnails {\n private readonly tooltip: HTMLElement;\n private readonly imageEl: HTMLElement;\n private readonly timeEl: HTMLElement;\n private readonly sheets = new Map<string, Sheet>();\n private vttCues: VttCue[] | null = null;\n private vttLoading: Promise<void> | null = null;\n /** Çok parçalı modda otomatik hesaplanan sheet süresi (ilk sheet yüklenince). */\n private derivedSheetDuration: number | null = null;\n private warmed = false;\n private hovering = false;\n private lastClientX = 0;\n private rafId: number | null = null;\n private destroyed = false;\n\n constructor(\n private readonly ctx: SpriteThumbnailsPlayerContext,\n private readonly options: SpriteThumbnailsOptions\n ) {\n this.tooltip = document.createElement('div');\n this.tooltip.setAttribute('part', 'sprite-tooltip');\n this.tooltip.className = 'hp-sprite-tooltip';\n this.imageEl = document.createElement('div');\n this.imageEl.className = 'hp-sprite-image';\n this.timeEl = document.createElement('div');\n this.timeEl.className = 'hp-sprite-time';\n this.tooltip.append(this.imageEl, this.timeEl);\n ctx.seekBar.el.appendChild(this.tooltip);\n // Önizlemenin altında zaman zaten yazıyor — varsayılan hover zamanı ikinci kez göstermesin.\n ctx.seekBar.suppressHoverTime('sprite', true);\n\n ctx.seekBar.el.addEventListener('pointerenter', this.onPointerEnter);\n ctx.seekBar.el.addEventListener('pointermove', this.onPointerMove);\n ctx.seekBar.el.addEventListener('pointerleave', this.onPointerLeave);\n ctx.videoEl.addEventListener('play', this.warm);\n }\n\n destroy(): void {\n this.destroyed = true;\n if (this.rafId !== null) cancelAnimationFrame(this.rafId);\n this.ctx.seekBar.el.removeEventListener('pointerenter', this.onPointerEnter);\n this.ctx.seekBar.el.removeEventListener('pointermove', this.onPointerMove);\n this.ctx.seekBar.el.removeEventListener('pointerleave', this.onPointerLeave);\n this.ctx.videoEl.removeEventListener('play', this.warm);\n this.tooltip.remove();\n this.ctx.seekBar.suppressHoverTime('sprite', false);\n for (const sheet of this.sheets.values()) sheet.img.src = '';\n this.sheets.clear();\n }\n\n // ── olaylar ──\n\n private readonly onPointerEnter = (e: PointerEvent): void => {\n this.hovering = true;\n this.lastClientX = e.clientX;\n this.warm();\n this.scheduleRender();\n };\n\n private readonly onPointerMove = (e: PointerEvent): void => {\n this.hovering = true;\n this.lastClientX = e.clientX;\n this.scheduleRender();\n };\n\n private readonly onPointerLeave = (): void => {\n this.hovering = false;\n this.tooltip.removeAttribute('data-visible');\n };\n\n /** İlk ihtiyaç anında (hover / oynatma) kaynağı hazırla — kurulumda hiçbir şey indirilmiyor. */\n private readonly warm = (): void => {\n if (this.warmed || this.destroyed) return;\n this.warmed = true;\n if (this.options.vtt) {\n void this.loadVtt();\n return;\n }\n const duration = this.ctx.videoEl.duration;\n const t = Number.isFinite(duration) ? this.ctx.videoEl.currentTime : 0;\n // Şablonlu/çok parçalı modda sheet süresi henüz bilinmiyorsa ilk sheet'ten öğrenilecek.\n void this.ensureSheet(this.sheetUrl(this.isMultiSheet() && this.sheetDuration() === null ? 0 : this.sheetIndexAt(t)));\n };\n\n private scheduleRender(): void {\n if (this.rafId !== null) return;\n this.rafId = requestAnimationFrame(() => {\n this.rafId = null;\n this.render();\n });\n }\n\n // ── çizim ──\n\n private render(): void {\n if (!this.hovering || this.destroyed) return;\n const duration = this.ctx.videoEl.duration;\n if (!Number.isFinite(duration) || duration <= 0) return;\n\n const seconds = this.ctx.seekBar.ratioAtClientX(this.lastClientX) * duration;\n this.timeEl.textContent = formatTime(seconds);\n\n const frame = this.isNetworkEligible() ? this.frameAt(seconds, duration) : null;\n const scale = this.scale();\n if (frame) {\n const sheet = this.sheets.get(frame.url)!;\n const { naturalWidth, naturalHeight } = sheet.img;\n this.imageEl.style.display = '';\n this.imageEl.style.width = `${frame.w * scale}px`;\n this.imageEl.style.height = `${frame.h * scale}px`;\n this.imageEl.style.backgroundImage = `url(\"${frame.url}\")`;\n this.imageEl.style.backgroundSize = `${naturalWidth * scale}px ${naturalHeight * scale}px`;\n this.imageEl.style.backgroundPosition = `${-frame.x * scale}px ${-frame.y * scale}px`;\n } else if (!this.imageEl.style.backgroundImage) {\n // Henüz hiçbir kare yüklenmedi — yalnızca zaman (yükleme bitince yeniden çizilir).\n this.imageEl.style.display = 'none';\n }\n\n // Kenarlarda taşmasın: imleci ortala ama seek bar sınırlarında kal.\n this.tooltip.setAttribute('data-visible', '');\n const barRect = this.ctx.seekBar.el.getBoundingClientRect();\n const tipWidth = this.tooltip.offsetWidth;\n const x = Math.min(Math.max(this.lastClientX - barRect.left - tipWidth / 2, 0), Math.max(barRect.width - tipWidth, 0));\n this.tooltip.style.transform = `translateX(${x}px)`;\n }\n\n private scale(): number {\n const responsive = this.options.responsive;\n const playerWidth = this.ctx.playerWidth();\n return responsive && playerWidth && playerWidth < responsive ? playerWidth / responsive : 1;\n }\n\n private isNetworkEligible(): boolean {\n const nav = navigator as Navigator & { connection?: { downlink?: number } };\n const downlink = nav.connection?.downlink;\n const anyReady = Array.from(this.sheets.values()).some((s) => s.ready);\n return downlink === undefined || downlink >= (this.options.downlink ?? 2) || anyReady;\n }\n\n // ── kare çözümleme ──\n\n /** Saniyedeki kareyi döner; gereken sheet hazır değilse yüklemeyi başlatıp null döner (yüklenince render tekrar çağrılır). */\n private frameAt(seconds: number, duration: number): Frame | null {\n return this.options.vtt ? this.vttFrameAt(seconds) : this.gridFrameAt(seconds, duration);\n }\n\n private isMultiSheet(): boolean {\n return !!this.options.sheets?.length || SHEET_TEMPLATE.test(this.options.url ?? '');\n }\n\n /** Tek sheet → Infinity (tüm video); çok parçalı → verilen ya da ilk sheet'ten hesaplanan süre; henüz bilinmiyorsa null. */\n private sheetDuration(): number | null {\n if (!this.isMultiSheet()) return Infinity;\n return this.options.sheetDuration ?? this.derivedSheetDuration;\n }\n\n private sheetIndexAt(seconds: number): number {\n const d = this.sheetDuration();\n if (d === null || d === Infinity) return 0;\n // floor (ceil DEĞİL): tam sınırda (ör. 60. sn) bir SONRAKİ sheet'in ilk karesi.\n let index = Math.floor(Math.max(0, seconds) / d);\n if (this.options.sheets?.length) index = Math.min(index, this.options.sheets.length - 1);\n return index;\n }\n\n /** 0 tabanlı sheet index'inden URL. */\n private sheetUrl(index: number): string {\n if (this.options.sheets?.length) return this.options.sheets[Math.min(index, this.options.sheets.length - 1)]!;\n const url = this.options.url ?? '';\n const number = index + (this.options.firstSheetIndex ?? 1);\n return url.replace(SHEET_TEMPLATE, (_m, _p, width?: string) => String(number).padStart(width ? Number(width) : 0, '0'));\n }\n\n private gridFrameAt(seconds: number, duration: number): Frame | null {\n const { width, height } = this.options;\n if (!width || !height) return null;\n const interval = this.options.interval || 1;\n\n const sheetDuration = this.sheetDuration();\n if (sheetDuration === null) {\n // Çok parçalı ama süre bilinmiyor — ilk sheet yüklenince hesaplanacak.\n void this.ensureSheet(this.sheetUrl(0));\n return null;\n }\n\n const lastIndex = sheetDuration === Infinity ? 0 : this.sheetIndexAt(Math.max(0, duration - 0.001));\n const index = Math.min(this.sheetIndexAt(seconds), lastIndex);\n const url = this.sheetUrl(index);\n this.preloadAround(index, lastIndex);\n\n const sheet = this.sheets.get(url);\n if (!sheet?.ready) {\n void this.ensureSheet(url);\n return null;\n }\n this.touch(url);\n\n // Her sheet'in KENDİ boyutu (son sheet daha kısa olabilir).\n const columns = Math.max(1, Math.floor(sheet.img.naturalWidth / width));\n const rows = Math.max(1, Math.floor(sheet.img.naturalHeight / height));\n const local = sheetDuration === Infinity ? seconds : seconds - index * sheetDuration;\n const frameIndex = Math.min(Math.max(0, Math.floor(local / interval)), columns * rows - 1);\n return { url, x: (frameIndex % columns) * width, y: Math.floor(frameIndex / columns) * height, w: width, h: height };\n }\n\n private preloadAround(index: number, lastIndex: number): void {\n const n = this.options.preloadSheets ?? 1;\n for (let d = 1; d <= n; d++) {\n if (index + d <= lastIndex) void this.ensureSheet(this.sheetUrl(index + d));\n if (index - d >= 0) void this.ensureSheet(this.sheetUrl(index - d));\n }\n }\n\n private vttFrameAt(seconds: number): Frame | null {\n if (!this.vttCues) {\n void this.loadVtt();\n return null;\n }\n const cues = this.vttCues;\n if (!cues.length) return null;\n // İkili arama — saatlerce süren videolarda binlerce cue olabilir.\n let lo = 0;\n let hi = cues.length - 1;\n while (lo < hi) {\n const mid = (lo + hi + 1) >> 1;\n if (cues[mid]!.start <= seconds) lo = mid;\n else hi = mid - 1;\n }\n const cue = cues[lo]!;\n const neighbours = [cues[lo + 1], cues[lo - 1]].filter((c): c is VttCue => !!c && c.url !== cue.url);\n neighbours.forEach((c) => void this.ensureSheet(c.url));\n\n const sheet = this.sheets.get(cue.url);\n if (!sheet?.ready) {\n void this.ensureSheet(cue.url);\n return null;\n }\n this.touch(cue.url);\n const rect = cue.rect ?? { x: 0, y: 0, w: sheet.img.naturalWidth, h: sheet.img.naturalHeight };\n return { url: cue.url, ...rect };\n }\n\n // ── yükleme / cache ──\n\n private ensureSheet(url: string): Promise<void> {\n if (!url) return Promise.resolve();\n const existing = this.sheets.get(url);\n if (existing) return existing.promise;\n\n const img = new Image();\n img.decoding = 'async';\n const sheet: Sheet = { img, ready: false, failed: false, promise: Promise.resolve() };\n sheet.promise = new Promise<void>((resolve) => {\n img.onload = () => {\n // decode() bitmeden gösterme — yeni sheet'e geçerken boş/yanlış kare titremesi olmasın.\n const done = () => {\n if (this.destroyed) return resolve();\n sheet.ready = true;\n this.learnSheetDuration(img);\n if (this.hovering) this.scheduleRender();\n resolve();\n };\n img.decode ? img.decode().then(done, done) : done();\n };\n img.onerror = () => {\n sheet.failed = true;\n resolve();\n };\n });\n img.src = url;\n this.sheets.set(url, sheet);\n this.evict();\n return sheet.promise;\n }\n\n /** Çok parçalı modda `sheetDuration` verilmediyse ilk yüklenen sheet'in ızgara kapasitesinden hesapla. */\n private learnSheetDuration(img: HTMLImageElement): void {\n if (this.derivedSheetDuration !== null || this.options.vtt || !this.isMultiSheet() || this.options.sheetDuration) return;\n const { width, height } = this.options;\n if (!width || !height) return;\n const capacity = Math.max(1, Math.floor(img.naturalWidth / width)) * Math.max(1, Math.floor(img.naturalHeight / height));\n this.derivedSheetDuration = capacity * (this.options.interval || 1);\n }\n\n /** LRU: kullanılan sheet'i sona taşı. */\n private touch(url: string): void {\n const sheet = this.sheets.get(url);\n if (!sheet) return;\n this.sheets.delete(url);\n this.sheets.set(url, sheet);\n }\n\n private evict(): void {\n while (this.sheets.size > MAX_CACHED_SHEETS) {\n const oldest = this.sheets.keys().next().value as string;\n const sheet = this.sheets.get(oldest)!;\n sheet.img.onload = null;\n sheet.img.onerror = null;\n this.sheets.delete(oldest);\n }\n }\n\n private loadVtt(): Promise<void> {\n if (this.vttLoading) return this.vttLoading;\n const vttUrl = this.options.vtt!;\n this.vttLoading = fetch(vttUrl)\n .then((r) => {\n if (!r.ok) throw new Error(`HTTP ${r.status}`);\n return r.text();\n })\n .then((text) => {\n if (this.destroyed) return;\n this.vttCues = parseThumbnailVtt(text, new URL(vttUrl, document.baseURI).href);\n if (this.vttCues.length) void this.ensureSheet(this.vttCues[0]!.url);\n if (this.hovering) this.scheduleRender();\n })\n .catch((err) => {\n console.warn('[HopePlayer sprite-thumbnails] VTT yüklenemedi:', err);\n this.vttCues = [];\n });\n return this.vttLoading;\n }\n}\n\n/** \"01:02:03.500\" / \"02:03.500\" → saniye. */\nfunction parseVttTime(value: string): number {\n const parts = value.trim().split(':').map(Number);\n return parts.reduce((acc, n) => acc * 60 + n, 0);\n}\n\n/** WebVTT thumbnail dosyası → sıralı cue listesi. Görsel yolları VTT dosyasına göre çözümlenir. */\nexport function parseThumbnailVtt(text: string, baseUrl: string): VttCue[] {\n const cues: VttCue[] = [];\n const blocks = text.replace(/\\r/g, '').split(/\\n\\n+/);\n for (const block of blocks) {\n const lines = block.split('\\n').filter(Boolean);\n const timingIndex = lines.findIndex((l) => l.includes('-->'));\n if (timingIndex === -1) continue;\n const [startStr, endStr] = lines[timingIndex]!.split('-->');\n const target = lines[timingIndex + 1]?.trim();\n if (!startStr || !endStr || !target) continue;\n\n const [path, hash] = target.split('#');\n const match = hash?.match(/xywh=(\\d+),(\\d+),(\\d+),(\\d+)/);\n cues.push({\n start: parseVttTime(startStr),\n end: parseVttTime(endStr.trim().split(/\\s+/)[0]!),\n url: new URL(path!, baseUrl).href,\n rect: match ? { x: +match[1]!, y: +match[2]!, w: +match[3]!, h: +match[4]! } : null,\n });\n }\n return cues.sort((a, b) => a.start - b.start);\n}\n","import { SpriteThumbnails, type SpriteThumbnailsPlayerContext } from './SpriteThumbnails';\nimport type { SpriteThumbnailsOptions } from '../../types';\n\nexport function installSpriteThumbnails(ctx: SpriteThumbnailsPlayerContext, options: SpriteThumbnailsOptions): SpriteThumbnails {\n return new SpriteThumbnails(ctx, options);\n}\n\nexport { SpriteThumbnails };\nexport type { SpriteThumbnailsPlayerContext };\n"],"names":["MAX_CACHED_SHEETS","SHEET_TEMPLATE","SpriteThumbnails","ctx","options","__publicField","e","duration","t","sheet","seconds","formatTime","frame","scale","naturalWidth","naturalHeight","barRect","tipWidth","x","responsive","playerWidth","downlink","_a","anyReady","s","d","index","url","number","_m","_p","width","height","interval","sheetDuration","lastIndex","columns","rows","local","frameIndex","n","cues","lo","hi","mid","cue","c","rect","existing","img","resolve","done","capacity","oldest","vttUrl","r","text","parseThumbnailVtt","err","parseVttTime","value","acc","baseUrl","blocks","block","lines","timingIndex","l","startStr","endStr","target","path","hash","match","a","b","installSpriteThumbnails"],"mappings":";;;;AAwCA,MAAMA,IAAoB,GAEpBC,IAAiB;AAOhB,MAAMC,EAAiB;AAAA,EAe1B,YACqBC,GACAC,GACnB;AAjBe,IAAAC,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA,oCAAa,IAAA;AACtB,IAAAA,EAAA,iBAA2B;AAC3B,IAAAA,EAAA,oBAAmC;AAEnC;AAAA,IAAAA,EAAA,8BAAsC;AACtC,IAAAA,EAAA,gBAAS;AACT,IAAAA,EAAA,kBAAW;AACX,IAAAA,EAAA,qBAAc;AACd,IAAAA,EAAA,eAAuB;AACvB,IAAAA,EAAA,mBAAY;AAuCH;AAAA,IAAAA,EAAA,wBAAiB,CAACC,MAA0B;AACzD,WAAK,WAAW,IAChB,KAAK,cAAcA,EAAE,SACrB,KAAK,KAAA,GACL,KAAK,eAAA;AAAA,IACT;AAEiB,IAAAD,EAAA,uBAAgB,CAACC,MAA0B;AACxD,WAAK,WAAW,IAChB,KAAK,cAAcA,EAAE,SACrB,KAAK,eAAA;AAAA,IACT;AAEiB,IAAAD,EAAA,wBAAiB,MAAY;AAC1C,WAAK,WAAW,IAChB,KAAK,QAAQ,gBAAgB,cAAc;AAAA,IAC/C;AAGiB;AAAA,IAAAA,EAAA,cAAO,MAAY;AAChC,UAAI,KAAK,UAAU,KAAK,UAAW;AAEnC,UADA,KAAK,SAAS,IACV,KAAK,QAAQ,KAAK;AAClB,QAAK,KAAK,QAAA;AACV;AAAA,MACJ;AACA,YAAME,IAAW,KAAK,IAAI,QAAQ,UAC5BC,IAAI,OAAO,SAASD,CAAQ,IAAI,KAAK,IAAI,QAAQ,cAAc;AAErE,MAAK,KAAK,YAAY,KAAK,SAAS,KAAK,kBAAkB,KAAK,cAAA,MAAoB,OAAO,IAAI,KAAK,aAAaC,CAAC,CAAC,CAAC;AAAA,IACxH;AAlE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AAE,QAAQC,EAAE,KAAK;AAChD;AC9YO,SAASC,EAAwBzE,GAAoCC,GAAoD;AAC5H,SAAO,IAAIF,EAAiBC,GAAKC,CAAO;AAC5C;"}
1
+ {"version":3,"file":"index-BTBAxNjr.js","sources":["../../src/plugins/sprite-thumbnails/SpriteThumbnails.ts","../../src/plugins/sprite-thumbnails/index.ts"],"sourcesContent":["import type { SpriteThumbnailsOptions } from '../../types';\nimport { formatTime } from '../../utils/format-time';\n\nexport interface SpriteThumbnailsPlayerContext {\n videoEl: HTMLVideoElement;\n /** Önizlemenin bağlandığı seek bar — zaman eşlemesi (chapter boşlukları dahil) onun `ratioAtClientX`'inden. */\n seekBar: {\n readonly el: HTMLElement;\n ratioAtClientX(clientX: number): number;\n suppressHoverTime(key: string, suppressed: boolean): void;\n };\n /** Responsive ölçekleme için referans genişlik — genelde player/video alanının genişliği. */\n playerWidth(): number;\n}\n\n/** Bir önizleme karesi: hangi görselin hangi dikdörtgeni. */\ninterface Frame {\n url: string;\n x: number;\n y: number;\n w: number;\n h: number;\n}\n\ninterface Sheet {\n img: HTMLImageElement;\n ready: boolean;\n failed: boolean;\n promise: Promise<void>;\n}\n\nexport interface VttCue {\n start: number;\n end: number;\n url: string;\n /** `#xywh` yoksa null → görselin tamamı. */\n rect: { x: number; y: number; w: number; h: number } | null;\n}\n\n/** Aynı anda bellekte (decode edilmiş) tutulan en fazla sheet — uzun videolarda bellek sınırsız büyümesin. */\nconst MAX_CACHED_SHEETS = 8;\n/** Sheet numarası şablonu: `%d` ya da sıfır dolgulu `%03d`. */\nconst SHEET_TEMPLATE = /%(0(\\d+))?d/;\n\n/**\n * Seek bar hover önizlemesi. Kaynak: tek görsel, çok parçalı (%d / %03d şablonu ya da sheets) veya WebVTT (#xywh).\n * sheetDuration verilmezse ilk sheet'in ızgarasından hesaplanır. Kurulumda hiçbir şey indirilmez; yalnızca imlecin\n * altındaki sheet + komşuları yüklenir, decode bitmeden gösterilmez, LRU cache.\n */\nexport class SpriteThumbnails {\n private readonly tooltip: HTMLElement;\n private readonly imageEl: HTMLElement;\n private readonly timeEl: HTMLElement;\n private readonly sheets = new Map<string, Sheet>();\n private vttCues: VttCue[] | null = null;\n private vttLoading: Promise<void> | null = null;\n /** Çok parçalı modda otomatik hesaplanan sheet süresi (ilk sheet yüklenince). */\n private derivedSheetDuration: number | null = null;\n private warmed = false;\n private hovering = false;\n private lastClientX = 0;\n private rafId: number | null = null;\n private destroyed = false;\n\n constructor(\n private readonly ctx: SpriteThumbnailsPlayerContext,\n private readonly options: SpriteThumbnailsOptions\n ) {\n this.tooltip = document.createElement('div');\n this.tooltip.setAttribute('part', 'sprite-tooltip');\n this.tooltip.className = 'hp-sprite-tooltip';\n this.imageEl = document.createElement('div');\n this.imageEl.className = 'hp-sprite-image';\n this.timeEl = document.createElement('div');\n this.timeEl.className = 'hp-sprite-time';\n this.tooltip.append(this.imageEl, this.timeEl);\n ctx.seekBar.el.appendChild(this.tooltip);\n // Önizlemenin altında zaman zaten yazıyor — varsayılan hover zamanı ikinci kez göstermesin.\n ctx.seekBar.suppressHoverTime('sprite', true);\n\n ctx.seekBar.el.addEventListener('pointerenter', this.onPointerEnter);\n ctx.seekBar.el.addEventListener('pointermove', this.onPointerMove);\n ctx.seekBar.el.addEventListener('pointerleave', this.onPointerLeave);\n ctx.videoEl.addEventListener('play', this.warm);\n }\n\n destroy(): void {\n this.destroyed = true;\n if (this.rafId !== null) cancelAnimationFrame(this.rafId);\n this.ctx.seekBar.el.removeEventListener('pointerenter', this.onPointerEnter);\n this.ctx.seekBar.el.removeEventListener('pointermove', this.onPointerMove);\n this.ctx.seekBar.el.removeEventListener('pointerleave', this.onPointerLeave);\n this.ctx.videoEl.removeEventListener('play', this.warm);\n this.tooltip.remove();\n this.ctx.seekBar.suppressHoverTime('sprite', false);\n for (const sheet of this.sheets.values()) sheet.img.src = '';\n this.sheets.clear();\n }\n\n // ── olaylar ──\n\n private readonly onPointerEnter = (e: PointerEvent): void => {\n this.hovering = true;\n this.lastClientX = e.clientX;\n this.warm();\n this.scheduleRender();\n };\n\n private readonly onPointerMove = (e: PointerEvent): void => {\n this.hovering = true;\n this.lastClientX = e.clientX;\n this.scheduleRender();\n };\n\n private readonly onPointerLeave = (): void => {\n this.hovering = false;\n this.tooltip.removeAttribute('data-visible');\n };\n\n /** İlk ihtiyaç anında (hover / oynatma) kaynağı hazırla — kurulumda hiçbir şey indirilmiyor. */\n private readonly warm = (): void => {\n if (this.warmed || this.destroyed) return;\n this.warmed = true;\n if (this.options.vtt) {\n void this.loadVtt();\n return;\n }\n const duration = this.ctx.videoEl.duration;\n const t = Number.isFinite(duration) ? this.ctx.videoEl.currentTime : 0;\n // Şablonlu/çok parçalı modda sheet süresi henüz bilinmiyorsa ilk sheet'ten öğrenilecek.\n void this.ensureSheet(this.sheetUrl(this.isMultiSheet() && this.sheetDuration() === null ? 0 : this.sheetIndexAt(t)));\n };\n\n private scheduleRender(): void {\n if (this.rafId !== null) return;\n this.rafId = requestAnimationFrame(() => {\n this.rafId = null;\n this.render();\n });\n }\n\n // ── çizim ──\n\n private render(): void {\n if (!this.hovering || this.destroyed) return;\n const duration = this.ctx.videoEl.duration;\n if (!Number.isFinite(duration) || duration <= 0) return;\n\n const seconds = this.ctx.seekBar.ratioAtClientX(this.lastClientX) * duration;\n this.timeEl.textContent = formatTime(seconds);\n\n const frame = this.isNetworkEligible() ? this.frameAt(seconds, duration) : null;\n const scale = this.scale();\n if (frame) {\n const sheet = this.sheets.get(frame.url)!;\n const { naturalWidth, naturalHeight } = sheet.img;\n this.imageEl.style.display = '';\n this.imageEl.style.width = `${frame.w * scale}px`;\n this.imageEl.style.height = `${frame.h * scale}px`;\n this.imageEl.style.backgroundImage = `url(\"${frame.url}\")`;\n this.imageEl.style.backgroundSize = `${naturalWidth * scale}px ${naturalHeight * scale}px`;\n this.imageEl.style.backgroundPosition = `${-frame.x * scale}px ${-frame.y * scale}px`;\n } else if (!this.imageEl.style.backgroundImage) {\n // Henüz hiçbir kare yüklenmedi — yalnızca zaman (yükleme bitince yeniden çizilir).\n this.imageEl.style.display = 'none';\n }\n\n // Kenarlarda taşmasın: imleci ortala ama seek bar sınırlarında kal.\n this.tooltip.setAttribute('data-visible', '');\n const barRect = this.ctx.seekBar.el.getBoundingClientRect();\n const tipWidth = this.tooltip.offsetWidth;\n const x = Math.min(Math.max(this.lastClientX - barRect.left - tipWidth / 2, 0), Math.max(barRect.width - tipWidth, 0));\n this.tooltip.style.transform = `translateX(${x}px)`;\n }\n\n private scale(): number {\n const responsive = this.options.responsive;\n const playerWidth = this.ctx.playerWidth();\n return responsive && playerWidth && playerWidth < responsive ? playerWidth / responsive : 1;\n }\n\n private isNetworkEligible(): boolean {\n const nav = navigator as Navigator & { connection?: { downlink?: number } };\n const downlink = nav.connection?.downlink;\n const anyReady = Array.from(this.sheets.values()).some((s) => s.ready);\n return downlink === undefined || downlink >= (this.options.downlink ?? 2) || anyReady;\n }\n\n // ── kare çözümleme ──\n\n /** Saniyedeki kareyi döner; gereken sheet hazır değilse yüklemeyi başlatıp null döner (yüklenince render tekrar çağrılır). */\n private frameAt(seconds: number, duration: number): Frame | null {\n return this.options.vtt ? this.vttFrameAt(seconds) : this.gridFrameAt(seconds, duration);\n }\n\n private isMultiSheet(): boolean {\n return !!this.options.sheets?.length || SHEET_TEMPLATE.test(this.options.url ?? '');\n }\n\n /** Tek sheet → Infinity (tüm video); çok parçalı → verilen ya da ilk sheet'ten hesaplanan süre; henüz bilinmiyorsa null. */\n private sheetDuration(): number | null {\n if (!this.isMultiSheet()) return Infinity;\n return this.options.sheetDuration ?? this.derivedSheetDuration;\n }\n\n private sheetIndexAt(seconds: number): number {\n const d = this.sheetDuration();\n if (d === null || d === Infinity) return 0;\n // floor (ceil DEĞİL): tam sınırda (ör. 60. sn) bir SONRAKİ sheet'in ilk karesi.\n let index = Math.floor(Math.max(0, seconds) / d);\n if (this.options.sheets?.length) index = Math.min(index, this.options.sheets.length - 1);\n return index;\n }\n\n /** 0 tabanlı sheet index'inden URL. */\n private sheetUrl(index: number): string {\n if (this.options.sheets?.length) return this.options.sheets[Math.min(index, this.options.sheets.length - 1)]!;\n const url = this.options.url ?? '';\n const number = index + (this.options.firstSheetIndex ?? 1);\n return url.replace(SHEET_TEMPLATE, (_m, _p, width?: string) => String(number).padStart(width ? Number(width) : 0, '0'));\n }\n\n private gridFrameAt(seconds: number, duration: number): Frame | null {\n const { width, height } = this.options;\n if (!width || !height) return null;\n const interval = this.options.interval || 1;\n\n const sheetDuration = this.sheetDuration();\n if (sheetDuration === null) {\n // Çok parçalı ama süre bilinmiyor — ilk sheet yüklenince hesaplanacak.\n void this.ensureSheet(this.sheetUrl(0));\n return null;\n }\n\n const lastIndex = sheetDuration === Infinity ? 0 : this.sheetIndexAt(Math.max(0, duration - 0.001));\n const index = Math.min(this.sheetIndexAt(seconds), lastIndex);\n const url = this.sheetUrl(index);\n this.preloadAround(index, lastIndex);\n\n const sheet = this.sheets.get(url);\n if (!sheet?.ready) {\n void this.ensureSheet(url);\n return null;\n }\n this.touch(url);\n\n // Her sheet'in KENDİ boyutu (son sheet daha kısa olabilir).\n const columns = Math.max(1, Math.floor(sheet.img.naturalWidth / width));\n const rows = Math.max(1, Math.floor(sheet.img.naturalHeight / height));\n const local = sheetDuration === Infinity ? seconds : seconds - index * sheetDuration;\n const frameIndex = Math.min(Math.max(0, Math.floor(local / interval)), columns * rows - 1);\n return { url, x: (frameIndex % columns) * width, y: Math.floor(frameIndex / columns) * height, w: width, h: height };\n }\n\n private preloadAround(index: number, lastIndex: number): void {\n const n = this.options.preloadSheets ?? 1;\n for (let d = 1; d <= n; d++) {\n if (index + d <= lastIndex) void this.ensureSheet(this.sheetUrl(index + d));\n if (index - d >= 0) void this.ensureSheet(this.sheetUrl(index - d));\n }\n }\n\n private vttFrameAt(seconds: number): Frame | null {\n if (!this.vttCues) {\n void this.loadVtt();\n return null;\n }\n const cues = this.vttCues;\n if (!cues.length) return null;\n // İkili arama — saatlerce süren videolarda binlerce cue olabilir.\n let lo = 0;\n let hi = cues.length - 1;\n while (lo < hi) {\n const mid = (lo + hi + 1) >> 1;\n if (cues[mid]!.start <= seconds) lo = mid;\n else hi = mid - 1;\n }\n const cue = cues[lo]!;\n const neighbours = [cues[lo + 1], cues[lo - 1]].filter((c): c is VttCue => !!c && c.url !== cue.url);\n neighbours.forEach((c) => void this.ensureSheet(c.url));\n\n const sheet = this.sheets.get(cue.url);\n if (!sheet?.ready) {\n void this.ensureSheet(cue.url);\n return null;\n }\n this.touch(cue.url);\n const rect = cue.rect ?? { x: 0, y: 0, w: sheet.img.naturalWidth, h: sheet.img.naturalHeight };\n return { url: cue.url, ...rect };\n }\n\n // ── yükleme / cache ──\n\n private ensureSheet(url: string): Promise<void> {\n if (!url) return Promise.resolve();\n const existing = this.sheets.get(url);\n if (existing) return existing.promise;\n\n const img = new Image();\n img.decoding = 'async';\n const sheet: Sheet = { img, ready: false, failed: false, promise: Promise.resolve() };\n sheet.promise = new Promise<void>((resolve) => {\n img.onload = () => {\n // decode() bitmeden gösterme — yeni sheet'e geçerken boş/yanlış kare titremesi olmasın.\n const done = () => {\n if (this.destroyed) return resolve();\n sheet.ready = true;\n this.learnSheetDuration(img);\n if (this.hovering) this.scheduleRender();\n resolve();\n };\n img.decode ? img.decode().then(done, done) : done();\n };\n img.onerror = () => {\n sheet.failed = true;\n resolve();\n };\n });\n img.src = url;\n this.sheets.set(url, sheet);\n this.evict();\n return sheet.promise;\n }\n\n /** Çok parçalı modda `sheetDuration` verilmediyse ilk yüklenen sheet'in ızgara kapasitesinden hesapla. */\n private learnSheetDuration(img: HTMLImageElement): void {\n if (this.derivedSheetDuration !== null || this.options.vtt || !this.isMultiSheet() || this.options.sheetDuration) return;\n const { width, height } = this.options;\n if (!width || !height) return;\n const capacity = Math.max(1, Math.floor(img.naturalWidth / width)) * Math.max(1, Math.floor(img.naturalHeight / height));\n this.derivedSheetDuration = capacity * (this.options.interval || 1);\n }\n\n /** LRU: kullanılan sheet'i sona taşı. */\n private touch(url: string): void {\n const sheet = this.sheets.get(url);\n if (!sheet) return;\n this.sheets.delete(url);\n this.sheets.set(url, sheet);\n }\n\n private evict(): void {\n while (this.sheets.size > MAX_CACHED_SHEETS) {\n const oldest = this.sheets.keys().next().value as string;\n const sheet = this.sheets.get(oldest)!;\n sheet.img.onload = null;\n sheet.img.onerror = null;\n this.sheets.delete(oldest);\n }\n }\n\n private loadVtt(): Promise<void> {\n if (this.vttLoading) return this.vttLoading;\n const vttUrl = this.options.vtt!;\n this.vttLoading = fetch(vttUrl)\n .then((r) => {\n if (!r.ok) throw new Error(`HTTP ${r.status}`);\n return r.text();\n })\n .then((text) => {\n if (this.destroyed) return;\n this.vttCues = parseThumbnailVtt(text, new URL(vttUrl, document.baseURI).href);\n if (this.vttCues.length) void this.ensureSheet(this.vttCues[0]!.url);\n if (this.hovering) this.scheduleRender();\n })\n .catch((err) => {\n console.warn('[HopePlayer sprite-thumbnails] VTT yüklenemedi:', err);\n this.vttCues = [];\n });\n return this.vttLoading;\n }\n}\n\n/** \"01:02:03.500\" / \"02:03.500\" → saniye. */\nfunction parseVttTime(value: string): number {\n const parts = value.trim().split(':').map(Number);\n return parts.reduce((acc, n) => acc * 60 + n, 0);\n}\n\n/** WebVTT thumbnail dosyası → sıralı cue listesi. Görsel yolları VTT dosyasına göre çözümlenir. */\nexport function parseThumbnailVtt(text: string, baseUrl: string): VttCue[] {\n const cues: VttCue[] = [];\n const blocks = text.replace(/\\r/g, '').split(/\\n\\n+/);\n for (const block of blocks) {\n const lines = block.split('\\n').filter(Boolean);\n const timingIndex = lines.findIndex((l) => l.includes('-->'));\n if (timingIndex === -1) continue;\n const [startStr, endStr] = lines[timingIndex]!.split('-->');\n const target = lines[timingIndex + 1]?.trim();\n if (!startStr || !endStr || !target) continue;\n\n const [path, hash] = target.split('#');\n const match = hash?.match(/xywh=(\\d+),(\\d+),(\\d+),(\\d+)/);\n cues.push({\n start: parseVttTime(startStr),\n end: parseVttTime(endStr.trim().split(/\\s+/)[0]!),\n url: new URL(path!, baseUrl).href,\n rect: match ? { x: +match[1]!, y: +match[2]!, w: +match[3]!, h: +match[4]! } : null,\n });\n }\n return cues.sort((a, b) => a.start - b.start);\n}\n","import { SpriteThumbnails, type SpriteThumbnailsPlayerContext } from './SpriteThumbnails';\nimport type { SpriteThumbnailsOptions } from '../../types';\n\nexport function installSpriteThumbnails(ctx: SpriteThumbnailsPlayerContext, options: SpriteThumbnailsOptions): SpriteThumbnails {\n return new SpriteThumbnails(ctx, options);\n}\n\nexport { SpriteThumbnails };\nexport type { SpriteThumbnailsPlayerContext };\n"],"names":["MAX_CACHED_SHEETS","SHEET_TEMPLATE","SpriteThumbnails","ctx","options","__publicField","e","duration","t","sheet","seconds","formatTime","frame","scale","naturalWidth","naturalHeight","barRect","tipWidth","x","responsive","playerWidth","downlink","_a","anyReady","s","d","index","url","number","_m","_p","width","height","interval","sheetDuration","lastIndex","columns","rows","local","frameIndex","n","cues","lo","hi","mid","cue","c","rect","existing","img","resolve","done","capacity","oldest","vttUrl","r","text","parseThumbnailVtt","err","parseVttTime","value","acc","baseUrl","blocks","block","lines","timingIndex","l","startStr","endStr","target","path","hash","match","a","b","installSpriteThumbnails"],"mappings":";;;;AAwCA,MAAMA,IAAoB,GAEpBC,IAAiB;AAOhB,MAAMC,EAAiB;AAAA,EAe1B,YACqBC,GACAC,GACnB;AAjBe,IAAAC,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA,oCAAa,IAAA;AACtB,IAAAA,EAAA,iBAA2B;AAC3B,IAAAA,EAAA,oBAAmC;AAEnC;AAAA,IAAAA,EAAA,8BAAsC;AACtC,IAAAA,EAAA,gBAAS;AACT,IAAAA,EAAA,kBAAW;AACX,IAAAA,EAAA,qBAAc;AACd,IAAAA,EAAA,eAAuB;AACvB,IAAAA,EAAA,mBAAY;AAuCH;AAAA,IAAAA,EAAA,wBAAiB,CAACC,MAA0B;AACzD,WAAK,WAAW,IAChB,K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IAAIJ,EAAMC,CAAW,EAAG,MAAM,KAAK,GACpDI,KAAShD,IAAA2C,EAAMC,IAAc,CAAC,MAArB,gBAAA5C,EAAwB;AACvC,QAAI,CAAC8C,KAAY,CAACC,KAAU,CAACC,EAAQ;AAErC,UAAM,CAACC,GAAMC,CAAI,IAAIF,EAAO,MAAM,GAAG,GAC/BG,IAAQD,KAAA,gBAAAA,EAAM,MAAM;AAC1B,IAAA/B,EAAK,KAAK;AAAA,MACN,OAAOkB,EAAaS,CAAQ;AAAA,MAC5B,KAAKT,EAAaU,EAAO,KAAA,EAAO,MAAM,KAAK,EAAE,CAAC,CAAE;AAAA,MAChD,KAAK,IAAI,IAAIE,GAAOT,CAAO,EAAE;AAAA,MAC7B,MAAMW,IAAQ,EAAE,GAAG,CAACA,EAAM,CAAC,GAAI,GAAG,CAACA,EAAM,CAAC,GAAI,GAAG,CAACA,EAAM,CAAC,GAAI,GAAG,CAACA,EAAM,CAAC,MAAO;AAAA,IAAA,CAClF;AAAA,EACL;AACA,SAAOhC,EAAK,KAAK,CAACiC,GAAGC,MAAMD,EAAE,QAAQC,EAAE,KAAK;AAChD;AC9YO,SAASC,EAAwBzE,GAAoCC,GAAoD;AAC5H,SAAO,IAAIF,EAAiBC,GAAKC,CAAO;AAC5C;"}
@@ -1,20 +1,20 @@
1
- var f = Object.defineProperty;
2
- var y = (n, t, e) => t in n ? f(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var s = (n, t, e) => y(n, typeof t != "symbol" ? t + "" : t, e);
4
- const m = "http://www.w3.org/2000/svg";
5
- let S = 0;
1
+ var y = Object.defineProperty;
2
+ var S = (n, t, e) => t in n ? y(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var i = (n, t, e) => S(n, typeof t != "symbol" ? t + "" : t, e);
4
+ const g = "http://www.w3.org/2000/svg";
5
+ let b = 0;
6
6
  function E() {
7
7
  let n = "";
8
8
  for (let t = 40; t <= 95; t += 1.25) {
9
- const i = Math.abs(t - 58) < 0.7 || Math.abs(t - 74) < 0.7 ? 0 : 0.035 + t * 7 % 5 * 8e-3;
10
- n += `<circle cx="100" cy="100" r="${t}" fill="none" stroke="rgba(255,255,255,${i.toFixed(3)})" stroke-width="0.45"/>`;
9
+ const s = Math.abs(t - 58) < 0.7 || Math.abs(t - 74) < 0.7 ? 0 : 0.035 + t * 7 % 5 * 8e-3;
10
+ n += `<circle cx="100" cy="100" r="${t}" fill="none" stroke="rgba(255,255,255,${s.toFixed(3)})" stroke-width="0.45"/>`;
11
11
  }
12
12
  return n;
13
13
  }
14
- function b() {
15
- const n = `hp-vinyl-${++S}`, t = document.createElement("div");
14
+ function x() {
15
+ const n = `hp-vinyl-${++b}`, t = document.createElement("div");
16
16
  t.innerHTML = `
17
- <svg xmlns="${m}" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
17
+ <svg xmlns="${g}" viewBox="0 0 200 200" aria-hidden="true" focusable="false">
18
18
  <defs>
19
19
  <radialGradient id="${n}-disc" cx="50%" cy="50%" r="50%">
20
20
  <stop offset="0" stop-color="#1c1c1f"/>
@@ -38,32 +38,32 @@ function b() {
38
38
  <circle cx="100" cy="100" r="3.6" fill="#0b0b0c"/>
39
39
  <circle cx="100" cy="100" r="3.6" fill="none" stroke="rgba(255,255,255,0.35)" stroke-width="0.6"/>
40
40
  </svg>`;
41
- const e = t.firstElementChild, i = e.querySelector(".hp-vinyl-cover"), r = e.querySelector(".hp-vinyl-text");
41
+ const e = t.firstElementChild, s = e.querySelector(".hp-vinyl-cover"), r = e.querySelector(".hp-vinyl-text");
42
42
  return {
43
43
  el: e,
44
- setLabel(a, l) {
45
- a ? (i.setAttribute("href", a), i.style.display = "") : (i.removeAttribute("href"), i.style.display = "none"), r.textContent = a ? "" : l.slice(0, 22);
44
+ setLabel(a, o) {
45
+ a ? (s.setAttribute("href", a), s.style.display = "") : (s.removeAttribute("href"), s.style.display = "none"), r.textContent = a ? "" : o.slice(0, 22);
46
46
  }
47
47
  };
48
48
  }
49
- function x() {
49
+ function k() {
50
50
  const n = document.createElement("div");
51
51
  return n.innerHTML = `
52
- <svg xmlns="${m}" viewBox="0 0 100 200" aria-hidden="true" focusable="false">
52
+ <svg xmlns="${g}" viewBox="0 0 100 200" aria-hidden="true" focusable="false">
53
53
  <circle cx="70" cy="22" r="15" fill="#2b2b30" stroke="rgba(255,255,255,0.18)" stroke-width="1"/>
54
54
  <circle cx="70" cy="22" r="7" fill="#9a9aa2"/>
55
55
  <path d="M70 22 L66 120 L40 162" fill="none" stroke="#c9c9cf" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
56
56
  <rect x="26" y="156" width="20" height="28" rx="3" transform="rotate(32 36 170)" fill="#3a3a40" stroke="rgba(255,255,255,0.25)" stroke-width="1"/>
57
57
  </svg>`, n.firstElementChild;
58
58
  }
59
- const v = 0.78, g = 100 / 3, u = 4, k = 250, p = 10;
60
- function w(n) {
59
+ const c = 0.78, f = 100 / 3, w = 230, p = 4, A = 250, m = 10;
60
+ function v(n) {
61
61
  if (n === !1) return null;
62
- const t = n === !0 || n === void 0 ? {} : n, e = typeof t.size == "number" && Number.isFinite(t.size) ? Math.min(1, Math.max(0.3, t.size)) : v, i = typeof t.rpm == "number" && t.rpm > 0 ? t.rpm : g;
62
+ const t = n === !0 || n === void 0 ? {} : n, e = typeof t.size == "number" && Number.isFinite(t.size) ? Math.min(1, Math.max(0.3, t.size)) : c, s = typeof t.rpm == "number" && t.rpm > 0 ? t.rpm : f;
63
63
  return {
64
64
  position: t.position === "center" || t.position === "left" ? t.position : "right",
65
65
  size: e,
66
- rpm: i,
66
+ rpm: s,
67
67
  scratch: t.scratch !== !1,
68
68
  scratchSound: t.scratchSound === !0,
69
69
  tonearm: t.tonearm !== !1
@@ -72,93 +72,95 @@ function w(n) {
72
72
  function P(n) {
73
73
  return ((n + 180) % 360 + 360) % 360 - 180;
74
74
  }
75
- const d = class d {
75
+ const h = class h {
76
76
  constructor(t) {
77
- s(this, "el");
78
- s(this, "backdropImg");
79
- s(this, "sleeve");
80
- s(this, "sleeveImg");
81
- s(this, "vinylEl");
82
- s(this, "discEl");
83
- s(this, "armHolder");
84
- s(this, "titleEl");
85
- s(this, "artistEl");
86
- s(this, "disc");
87
- s(this, "options", {});
88
- s(this, "vinyl", null);
89
- s(this, "frame", 0);
90
- s(this, "lastAriaSecond", -1);
91
- s(this, "lastPositionState", 0);
77
+ i(this, "el");
78
+ i(this, "backdropImg");
79
+ i(this, "sleeve");
80
+ i(this, "sleeveImg");
81
+ i(this, "vinylEl");
82
+ i(this, "discEl");
83
+ i(this, "armHolder");
84
+ i(this, "titleEl");
85
+ i(this, "artistEl");
86
+ i(this, "areaEl");
87
+ i(this, "resizeObserver");
88
+ i(this, "disc");
89
+ i(this, "options", {});
90
+ i(this, "vinyl", null);
91
+ i(this, "frame", 0);
92
+ i(this, "lastAriaSecond", -1);
93
+ i(this, "lastPositionState", 0);
92
94
  // Scratch durumu
93
- s(this, "dragging", !1);
94
- s(this, "dragPointer", -1);
95
- s(this, "center", { x: 0, y: 0 });
96
- s(this, "lastPointerAngle", 0);
97
- s(this, "accum", 0);
98
- s(this, "dragStartTime", 0);
99
- s(this, "dragStartAngle", 0);
100
- s(this, "moved", !1);
101
- s(this, "wasPlaying", !1);
102
- s(this, "downAt", 0);
103
- s(this, "seekFrame", 0);
104
- s(this, "pendingSeek", null);
95
+ i(this, "dragging", !1);
96
+ i(this, "dragPointer", -1);
97
+ i(this, "center", { x: 0, y: 0 });
98
+ i(this, "lastPointerAngle", 0);
99
+ i(this, "accum", 0);
100
+ i(this, "dragStartTime", 0);
101
+ i(this, "dragStartAngle", 0);
102
+ i(this, "moved", !1);
103
+ i(this, "wasPlaying", !1);
104
+ i(this, "downAt", 0);
105
+ i(this, "seekFrame", 0);
106
+ i(this, "pendingSeek", null);
105
107
  /** vinyl.scratchSound — ayrı parça olarak yalnızca açıksa yüklenir. */
106
- s(this, "sound", null);
107
- s(this, "soundImport", null);
108
- s(this, "prepareTimer", null);
109
- s(this, "render", () => {
108
+ i(this, "sound", null);
109
+ i(this, "soundImport", null);
110
+ i(this, "prepareTimer", null);
111
+ i(this, "render", () => {
110
112
  !this.vinyl || this.dragging || (this.discEl.style.transform = `rotate(${this.angleForTime(this.ctx.videoEl.currentTime || 0)}deg)`);
111
113
  });
112
- s(this, "loop", () => {
114
+ i(this, "loop", () => {
113
115
  this.render(), this.frame = requestAnimationFrame(this.loop);
114
116
  });
115
- s(this, "onPlay", () => {
117
+ i(this, "onPlay", () => {
116
118
  this.el.setAttribute("data-playing", ""), this.schedulePrepareSound(), cancelAnimationFrame(this.frame), this.vinyl && (this.frame = requestAnimationFrame(this.loop)), this.options.mediaSession !== !1 && "mediaSession" in navigator && (this.applyMediaSession(), navigator.mediaSession.playbackState = "playing");
117
119
  });
118
- s(this, "onPause", () => {
120
+ i(this, "onPause", () => {
119
121
  this.dragging || this.el.removeAttribute("data-playing"), cancelAnimationFrame(this.frame), this.render(), this.ownsMediaSession() && (navigator.mediaSession.playbackState = "paused");
120
122
  });
121
- s(this, "onTimeUpdate", () => {
123
+ i(this, "onTimeUpdate", () => {
122
124
  const t = this.ctx.videoEl;
123
125
  t.paused && this.render();
124
126
  const e = Math.floor(t.currentTime || 0);
125
127
  e !== this.lastAriaSecond && (this.lastAriaSecond = e, this.vinylEl.setAttribute("aria-valuenow", String(e))), performance.now() - this.lastPositionState > 1e3 && this.updatePositionState();
126
128
  });
127
- s(this, "onDurationChange", () => {
129
+ i(this, "onDurationChange", () => {
128
130
  const t = this.ctx.videoEl.duration, e = Number.isFinite(t) && t > 0;
129
131
  e ? this.vinylEl.setAttribute("aria-valuemax", String(Math.floor(t))) : this.vinylEl.removeAttribute("aria-valuemax"), this.vinylEl.toggleAttribute("data-live", !e && t === 1 / 0), this.updatePositionState();
130
132
  });
131
- s(this, "onPointerDown", (t) => {
132
- var i;
133
+ i(this, "onPointerDown", (t) => {
134
+ var s;
133
135
  if (!this.vinyl || this.dragging || t.pointerType === "mouse" && t.button !== 0) return;
134
136
  t.stopPropagation(), t.preventDefault();
135
137
  const e = this.vinylEl.getBoundingClientRect();
136
- this.center = { x: e.left + e.width / 2, y: e.top + e.height / 2 }, this.dragging = !0, this.dragPointer = t.pointerId, this.lastPointerAngle = this.pointerAngle(t), this.accum = 0, this.moved = !1, this.dragStartTime = this.ctx.videoEl.currentTime || 0, this.dragStartAngle = this.angleForTime(this.dragStartTime), this.wasPlaying = !this.ctx.videoEl.paused, this.downAt = performance.now(), this.wasPlaying && this.canScratch() && this.ctx.videoEl.pause(), this.vinyl.scratchSound && this.canScratch() && ((i = this.sound) != null && i.ready ? this.sound.start(this.dragStartTime) : this.loadSound().then((r) => r == null ? void 0 : r.prepare()));
138
+ this.center = { x: e.left + e.width / 2, y: e.top + e.height / 2 }, this.dragging = !0, this.dragPointer = t.pointerId, this.lastPointerAngle = this.pointerAngle(t), this.accum = 0, this.moved = !1, this.dragStartTime = this.ctx.videoEl.currentTime || 0, this.dragStartAngle = this.angleForTime(this.dragStartTime), this.wasPlaying = !this.ctx.videoEl.paused, this.downAt = performance.now(), this.wasPlaying && this.canScratch() && this.ctx.videoEl.pause(), this.vinyl.scratchSound && this.canScratch() && ((s = this.sound) != null && s.ready ? this.sound.start(this.dragStartTime) : this.loadSound().then((r) => r == null ? void 0 : r.prepare()));
137
139
  try {
138
140
  this.vinylEl.setPointerCapture(t.pointerId);
139
141
  } catch {
140
142
  }
141
143
  });
142
- s(this, "onPointerMove", (t) => {
143
- var h;
144
+ i(this, "onPointerMove", (t) => {
145
+ var d;
144
146
  if (!this.dragging || t.pointerId !== this.dragPointer) return;
145
147
  t.stopPropagation();
146
- const e = this.pointerAngle(t), i = P(e - this.lastPointerAngle);
148
+ const e = this.pointerAngle(t), s = P(e - this.lastPointerAngle);
147
149
  if (this.lastPointerAngle = e, !this.canScratch()) {
148
- this.accum += i, Math.abs(this.accum) > u && (this.moved = !0);
150
+ this.accum += s, Math.abs(this.accum) > p && (this.moved = !0);
149
151
  return;
150
152
  }
151
- const r = this.secondsPerTurn, a = this.ctx.videoEl.duration, l = -this.dragStartTime / r * 360, o = (a - this.dragStartTime) / r * 360;
152
- this.accum = Math.min(o, Math.max(l, this.accum + i)), !this.moved && Math.abs(this.accum) > u && (this.moved = !0, this.el.setAttribute("data-scratching", "")), this.moved && (this.discEl.style.transform = `rotate(${this.dragStartAngle + this.accum}deg)`, this.pendingSeek = this.dragStartTime + this.accum / 360 * r, (h = this.sound) == null || h.setTarget(this.pendingSeek), this.seekFrame || (this.seekFrame = requestAnimationFrame(this.flushSeek)));
153
+ const r = this.secondsPerTurn, a = this.ctx.videoEl.duration, o = -this.dragStartTime / r * 360, l = (a - this.dragStartTime) / r * 360;
154
+ this.accum = Math.min(l, Math.max(o, this.accum + s)), !this.moved && Math.abs(this.accum) > p && (this.moved = !0, this.el.setAttribute("data-scratching", "")), this.moved && (this.discEl.style.transform = `rotate(${this.dragStartAngle + this.accum}deg)`, this.pendingSeek = this.dragStartTime + this.accum / 360 * r, (d = this.sound) == null || d.setTarget(this.pendingSeek), this.seekFrame || (this.seekFrame = requestAnimationFrame(this.flushSeek)));
153
155
  });
154
- s(this, "flushSeek", () => {
156
+ i(this, "flushSeek", () => {
155
157
  this.seekFrame = 0, this.pendingSeek !== null && (this.ctx.videoEl.currentTime = this.pendingSeek, this.pendingSeek = null);
156
158
  });
157
- s(this, "onPointerUp", (t) => {
159
+ i(this, "onPointerUp", (t) => {
158
160
  var e;
159
161
  if (!(!this.dragging || t.pointerId !== this.dragPointer)) {
160
162
  if (t.stopPropagation(), this.dragging = !1, this.dragPointer = -1, this.el.removeAttribute("data-scratching"), (e = this.sound) == null || e.stop(), this.seekFrame && (cancelAnimationFrame(this.seekFrame), this.flushSeek()), !this.moved && this.canScratch() && this.wasPlaying) {
161
- performance.now() - this.downAt >= k || t.type !== "pointerup" ? this.ctx.play() : (this.el.removeAttribute("data-playing"), this.render());
163
+ performance.now() - this.downAt >= A || t.type !== "pointerup" ? this.ctx.play() : (this.el.removeAttribute("data-playing"), this.render());
162
164
  return;
163
165
  }
164
166
  if (!this.moved) {
@@ -168,7 +170,7 @@ const d = class d {
168
170
  this.wasPlaying ? this.ctx.play() : this.render();
169
171
  }
170
172
  });
171
- s(this, "updatePositionState", () => {
173
+ i(this, "updatePositionState", () => {
172
174
  if (!this.ownsMediaSession()) return;
173
175
  this.lastPositionState = performance.now();
174
176
  const t = this.ctx.videoEl, e = t.duration;
@@ -182,6 +184,7 @@ const d = class d {
182
184
  } catch {
183
185
  }
184
186
  });
187
+ var r, a;
185
188
  this.ctx = t;
186
189
  const e = document.createElement("div");
187
190
  e.className = "hp-audio", e.setAttribute("part", "audio-stage"), e.innerHTML = `
@@ -196,29 +199,40 @@ const d = class d {
196
199
  <div class="hp-tonearm-holder"><div class="hp-tonearm"></div></div>
197
200
  </div>
198
201
  </div>
199
- </div>`, this.el = e, this.backdropImg = e.querySelector(".hp-audio-backdrop img"), this.sleeve = e.querySelector(".hp-audio-sleeve"), this.sleeveImg = this.sleeve.querySelector("img"), this.vinylEl = e.querySelector(".hp-vinyl"), this.discEl = e.querySelector(".hp-vinyl-disc"), this.armHolder = e.querySelector(".hp-tonearm-holder"), this.titleEl = e.querySelector(".hp-audio-title"), this.artistEl = e.querySelector(".hp-audio-artist"), this.disc = b(), this.discEl.appendChild(this.disc.el), e.querySelector(".hp-tonearm").appendChild(x());
200
- for (const r of [this.backdropImg, this.sleeveImg])
201
- r.addEventListener("error", () => r.removeAttribute("src"));
202
- const i = t.videoEl;
203
- i.addEventListener("play", this.onPlay), i.addEventListener("pause", this.onPause), i.addEventListener("ended", this.onPause), i.addEventListener("seeked", this.render), i.addEventListener("timeupdate", this.onTimeUpdate), i.addEventListener("durationchange", this.onDurationChange), i.addEventListener("ratechange", this.updatePositionState), i.addEventListener("emptied", this.render), this.vinylEl.addEventListener("pointerdown", this.onPointerDown), this.vinylEl.addEventListener("pointermove", this.onPointerMove), this.vinylEl.addEventListener("pointerup", this.onPointerUp), this.vinylEl.addEventListener("pointercancel", this.onPointerUp), this.vinylEl.addEventListener("lostpointercapture", this.onPointerUp);
204
- for (const r of ["click", "mousedown", "mouseup", "touchstart", "touchend", "dblclick"])
205
- this.vinylEl.addEventListener(r, (a) => a.stopPropagation());
206
- t.layerEl.insertBefore(e, t.videoEl.nextSibling), this.refreshLabels();
202
+ </div>`, this.el = e, this.backdropImg = e.querySelector(".hp-audio-backdrop img"), this.sleeve = e.querySelector(".hp-audio-sleeve"), this.sleeveImg = this.sleeve.querySelector("img"), this.vinylEl = e.querySelector(".hp-vinyl"), this.discEl = e.querySelector(".hp-vinyl-disc"), this.armHolder = e.querySelector(".hp-tonearm-holder"), this.titleEl = e.querySelector(".hp-audio-title"), this.artistEl = e.querySelector(".hp-audio-artist"), this.disc = x(), this.discEl.appendChild(this.disc.el), e.querySelector(".hp-tonearm").appendChild(k());
203
+ for (const o of [this.backdropImg, this.sleeveImg])
204
+ o.addEventListener("error", () => o.removeAttribute("src"));
205
+ const s = t.videoEl;
206
+ s.addEventListener("play", this.onPlay), s.addEventListener("pause", this.onPause), s.addEventListener("ended", this.onPause), s.addEventListener("seeked", this.render), s.addEventListener("timeupdate", this.onTimeUpdate), s.addEventListener("durationchange", this.onDurationChange), s.addEventListener("ratechange", this.updatePositionState), s.addEventListener("emptied", this.render), this.vinylEl.addEventListener("pointerdown", this.onPointerDown), this.vinylEl.addEventListener("pointermove", this.onPointerMove), this.vinylEl.addEventListener("pointerup", this.onPointerUp), this.vinylEl.addEventListener("pointercancel", this.onPointerUp), this.vinylEl.addEventListener("lostpointercapture", this.onPointerUp);
207
+ for (const o of ["click", "mousedown", "mouseup", "touchstart", "touchend", "dblclick"])
208
+ this.vinylEl.addEventListener(o, (l) => l.stopPropagation());
209
+ t.layerEl.insertBefore(e, t.videoEl.nextSibling), this.areaEl = e.querySelector(".hp-audio-area"), this.resizeObserver = typeof ResizeObserver < "u" ? new ResizeObserver(() => this.layout()) : null, (r = this.resizeObserver) == null || r.observe(e), (a = this.resizeObserver) == null || a.observe(this.areaEl), this.refreshLabels();
207
210
  }
208
211
  update(t) {
209
- this.options = t, this.vinyl = w(t.vinyl);
210
- const e = t.cover || this.ctx.poster() || "";
211
- for (const r of [this.backdropImg, this.sleeveImg])
212
- e ? r.src = e : r.removeAttribute("src");
213
- this.el.toggleAttribute("data-cover", !!e), this.titleEl.textContent = t.title ?? "", this.artistEl.textContent = [t.artist, t.album].filter(Boolean).join(" · "), this.el.toggleAttribute("data-meta", !!(t.title || t.artist || t.album));
214
- const i = this.vinyl;
215
- this.el.setAttribute("data-position", i ? i.position : "none"), this.el.style.setProperty("--hp-vinyl-size", String((i == null ? void 0 : i.size) ?? v)), this.vinylEl.hidden = !i, this.sleeve.hidden = !!i && i.position === "center", this.disc.setLabel(e || null, t.title || "HopeCore"), this.armHolder.hidden = !(i != null && i.tonearm), this.vinylEl.toggleAttribute("data-scratch", !!(i != null && i.scratch)), this.vinylEl.tabIndex = i ? 0 : -1, i != null && i.scratchSound ? this.ctx.videoEl.paused || this.schedulePrepareSound() : this.disableSound(), this.applyMediaSession(), this.onDurationChange(), this.render(), this.ctx.videoEl.paused || this.onPlay();
212
+ this.options = t;
213
+ const e = t.layout === "compact";
214
+ this.el.setAttribute("data-layout", e ? "compact" : "full"), this.ctx.setBarMeta(
215
+ e ? { title: t.title ?? "", subtitle: [t.artist, t.album].filter(Boolean).join(" · ") } : null
216
+ ), this.vinyl = e ? null : v(t.vinyl);
217
+ const s = t.cover || this.ctx.poster() || "";
218
+ for (const a of [this.backdropImg, this.sleeveImg])
219
+ s ? a.src = s : a.removeAttribute("src");
220
+ this.el.toggleAttribute("data-cover", !!s), this.titleEl.textContent = t.title ?? "", this.artistEl.textContent = [t.artist, t.album].filter(Boolean).join(" · "), this.el.toggleAttribute("data-meta", !!(t.title || t.artist || t.album));
221
+ const r = this.vinyl;
222
+ this.el.setAttribute("data-position", r ? r.position : "none"), this.el.style.setProperty("--hp-vinyl-size", String((r == null ? void 0 : r.size) ?? c)), this.vinylEl.hidden = !r, this.sleeve.hidden = !!r && r.position === "center", this.disc.setLabel(s || null, t.title || "HopeCore"), this.armHolder.hidden = !(r != null && r.tonearm), this.vinylEl.toggleAttribute("data-scratch", !!(r != null && r.scratch)), this.vinylEl.tabIndex = r ? 0 : -1, r != null && r.scratchSound ? this.ctx.videoEl.paused || this.schedulePrepareSound() : this.disableSound(), this.applyMediaSession(), this.onDurationChange(), this.layout(), this.render(), this.ctx.videoEl.paused || this.onPlay();
223
+ }
224
+ /** Kapak / plak yüksekliği: alan yüksekliğinin `size` katı, genişliğe sığacak kadar (kılıf + yarım plak ≈ 1,46 H). */
225
+ layout() {
226
+ var o, l;
227
+ if (!this.el.isConnected) return;
228
+ const t = this.areaEl.clientWidth, e = this.areaEl.clientHeight, s = ((o = this.vinyl) == null ? void 0 : o.size) ?? ((l = v(this.options.vinyl)) == null ? void 0 : l.size) ?? c, r = !!this.vinyl && this.vinyl.position !== "center", a = Math.max(0, Math.min(s * e, (r ? 0.62 : 0.9) * t));
229
+ this.el.style.setProperty("--hp-deck-h", `${Math.round(a * 10) / 10}px`), a > 0 && !this.el.hasAttribute("data-laid-out") && requestAnimationFrame(() => requestAnimationFrame(() => this.el.setAttribute("data-laid-out", ""))), this.el.toggleAttribute("data-short", this.el.clientHeight > 0 && this.el.clientHeight < w);
216
230
  }
217
231
  // ── Scratch sesi ────────────────────────────────────────────────────
218
232
  loadSound() {
219
233
  return this.sound ? Promise.resolve(this.sound) : (this.soundImport ?? (this.soundImport = import("./ScratchSound-0XKHUcJK.js").then(({ ScratchSound: t }) => {
220
234
  var e;
221
- return !((e = this.vinyl) != null && e.scratchSound) || !t.isSupported() ? (this.el.setAttribute("data-scratch-sound", "unsupported"), null) : (this.sound ?? (this.sound = new t(this.ctx.videoEl)), this.sound.onStateChange = (i) => this.el.setAttribute("data-scratch-sound", i), this.sound);
235
+ return !((e = this.vinyl) != null && e.scratchSound) || !t.isSupported() ? (this.el.setAttribute("data-scratch-sound", "unsupported"), null) : (this.sound ?? (this.sound = new t(this.ctx.videoEl)), this.sound.onStateChange = (s) => this.el.setAttribute("data-scratch-sound", s), this.sound);
222
236
  }).catch(() => null).finally(() => {
223
237
  this.soundImport = null;
224
238
  })), this.soundImport);
@@ -228,8 +242,8 @@ const d = class d {
228
242
  var t, e;
229
243
  !((t = this.vinyl) != null && t.scratchSound) || this.prepareTimer || (e = this.sound) != null && e.ready || (this.prepareTimer = setTimeout(() => {
230
244
  this.prepareTimer = null;
231
- const i = () => void this.loadSound().then((r) => r == null ? void 0 : r.prepare());
232
- "requestIdleCallback" in window ? window.requestIdleCallback(i, { timeout: 2e3 }) : i();
245
+ const s = () => void this.loadSound().then((r) => r == null ? void 0 : r.prepare());
246
+ "requestIdleCallback" in window ? window.requestIdleCallback(s, { timeout: 2e3 }) : s();
233
247
  }, 300));
234
248
  }
235
249
  disableSound() {
@@ -242,7 +256,7 @@ const d = class d {
242
256
  // ── Dönüş ────────────────────────────────────────────────────────────
243
257
  get secondsPerTurn() {
244
258
  var t;
245
- return 60 / (((t = this.vinyl) == null ? void 0 : t.rpm) ?? g);
259
+ return 60 / (((t = this.vinyl) == null ? void 0 : t.rpm) ?? f);
246
260
  }
247
261
  angleForTime(t) {
248
262
  return t / this.secondsPerTurn * 360 % 360;
@@ -258,32 +272,32 @@ const d = class d {
258
272
  }
259
273
  // ── Media Session ───────────────────────────────────────────────────
260
274
  ownsMediaSession() {
261
- return this.options.mediaSession !== !1 && "mediaSession" in navigator && d.sessionOwner === this;
275
+ return this.options.mediaSession !== !1 && "mediaSession" in navigator && h.sessionOwner === this;
262
276
  }
263
277
  applyMediaSession() {
264
278
  if (this.options.mediaSession === !1 || !("mediaSession" in navigator) || typeof MediaMetadata > "u") return;
265
- const t = d.sessionOwner;
279
+ const t = h.sessionOwner;
266
280
  if (t && t !== this && !t.ctx.videoEl.paused && this.ctx.videoEl.paused) return;
267
- d.sessionOwner = this;
268
- const e = this.options, i = e.cover || this.ctx.poster(), r = navigator.mediaSession;
281
+ h.sessionOwner = this;
282
+ const e = this.options, s = e.cover || this.ctx.poster(), r = navigator.mediaSession;
269
283
  r.metadata = new MediaMetadata({
270
284
  title: e.title ?? "",
271
285
  artist: e.artist ?? "",
272
286
  album: e.album ?? "",
273
- artwork: i ? [{ src: new URL(i, document.baseURI).href }] : []
287
+ artwork: s ? [{ src: new URL(s, document.baseURI).href }] : []
274
288
  });
275
- const a = this.ctx.videoEl, l = (o, h) => {
289
+ const a = this.ctx.videoEl, o = (l, d) => {
276
290
  try {
277
- r.setActionHandler(o, h);
291
+ r.setActionHandler(l, d);
278
292
  } catch {
279
293
  }
280
294
  };
281
- l("play", () => this.ctx.play()), l("pause", () => a.pause()), l("seekbackward", (o) => a.currentTime = Math.max(0, a.currentTime - (o.seekOffset ?? p))), l("seekforward", (o) => a.currentTime = Math.min(a.duration || 1 / 0, a.currentTime + (o.seekOffset ?? p))), l("seekto", (o) => {
282
- typeof o.seekTime == "number" && (a.currentTime = o.seekTime);
295
+ o("play", () => this.ctx.play()), o("pause", () => a.pause()), o("seekbackward", (l) => a.currentTime = Math.max(0, a.currentTime - (l.seekOffset ?? m))), o("seekforward", (l) => a.currentTime = Math.min(a.duration || 1 / 0, a.currentTime + (l.seekOffset ?? m))), o("seekto", (l) => {
296
+ typeof l.seekTime == "number" && (a.currentTime = l.seekTime);
283
297
  }), this.updatePositionState();
284
298
  }
285
299
  releaseMediaSession() {
286
- if (d.sessionOwner !== this || (d.sessionOwner = null, !("mediaSession" in navigator))) return;
300
+ if (h.sessionOwner !== this || (h.sessionOwner = null, !("mediaSession" in navigator))) return;
287
301
  const t = navigator.mediaSession;
288
302
  t.metadata = null;
289
303
  for (const e of ["play", "pause", "seekbackward", "seekforward", "seekto"])
@@ -293,19 +307,20 @@ const d = class d {
293
307
  }
294
308
  }
295
309
  destroy() {
310
+ var e;
296
311
  cancelAnimationFrame(this.frame), cancelAnimationFrame(this.seekFrame);
297
312
  const t = this.ctx.videoEl;
298
- t.removeEventListener("play", this.onPlay), t.removeEventListener("pause", this.onPause), t.removeEventListener("ended", this.onPause), t.removeEventListener("seeked", this.render), t.removeEventListener("timeupdate", this.onTimeUpdate), t.removeEventListener("durationchange", this.onDurationChange), t.removeEventListener("ratechange", this.updatePositionState), t.removeEventListener("emptied", this.render), this.releaseMediaSession(), this.disableSound(), this.el.remove();
313
+ t.removeEventListener("play", this.onPlay), t.removeEventListener("pause", this.onPause), t.removeEventListener("ended", this.onPause), t.removeEventListener("seeked", this.render), t.removeEventListener("timeupdate", this.onTimeUpdate), t.removeEventListener("durationchange", this.onDurationChange), t.removeEventListener("ratechange", this.updatePositionState), t.removeEventListener("emptied", this.render), this.releaseMediaSession(), this.disableSound(), (e = this.resizeObserver) == null || e.disconnect(), this.ctx.setBarMeta(null), this.el.remove();
299
314
  }
300
315
  };
301
- s(d, "sessionOwner", null);
302
- let c = d;
303
- function T(n, t) {
304
- const e = new c(n);
316
+ i(h, "sessionOwner", null);
317
+ let u = h;
318
+ function M(n, t) {
319
+ const e = new u(n);
305
320
  return e.update(t), e;
306
321
  }
307
322
  export {
308
- c as AudioStage,
309
- T as installAudioStage
323
+ u as AudioStage,
324
+ M as installAudioStage
310
325
  };
311
- //# sourceMappingURL=index-BgJJr55r.js.map
326
+ //# sourceMappingURL=index-BeJNpAyx.js.map