@mattebox/player-diagnostics 0.4.0 → 0.5.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/cdn/mattebox-player-diagnostics.min.js +1 -124
- package/dist/charts.d.ts.map +1 -1
- package/dist/charts.js +356 -392
- package/dist/charts.js.map +1 -1
- package/dist/dom.d.ts +8 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/dom.js +15 -0
- package/dist/dom.js.map +1 -0
- package/dist/element.d.ts.map +1 -1
- package/dist/element.js +619 -659
- package/dist/element.js.map +1 -1
- package/dist/es2015/charts.js +2 -1
- package/dist/es2015/dom.js +13 -0
- package/dist/es2015/element.js +3 -2
- package/dist/es2015/style.js +1 -133
- package/dist/format.js +26 -31
- package/dist/format.js.map +1 -1
- package/dist/host.js +28 -30
- package/dist/host.js.map +1 -1
- package/dist/icon.js +43 -39
- package/dist/icon.js.map +1 -1
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/dist/report.js +129 -119
- package/dist/report.js.map +1 -1
- package/dist/sampler.js +187 -199
- package/dist/sampler.js.map +1 -1
- package/dist/style.d.ts +1 -9
- package/dist/style.d.ts.map +1 -1
- package/dist/style.js +4 -132
- package/dist/style.js.map +1 -1
- package/dist/support.js +304 -215
- package/dist/support.js.map +1 -1
- package/dist/trace.js +80 -81
- package/dist/trace.js.map +1 -1
- package/package.json +5 -5
package/dist/element.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACnD,OAA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AAG,CAAC,CAAC;IACnB,CAAC;CACF;AAED,SAAS,cAAc,CAAC,KAAuB;IAC7C,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9D,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9B,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;KAC3B,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
1
|
+
{"version":3,"file":"element.js","names":[],"sources":["../src/element.ts"],"sourcesContent":["/**\n * <mbx-diagnostics>: what the session is doing, for an integrator's eyes.\n * In the bar it is a button that opens a panel over the picture; anywhere\n * else inside the player, the panel itself, open, in flow. Four pages:\n * the playback facts, the charts, the engine's state, and what the browser\n * supports. A button copies the report, and `report()` hands it to a page,\n * which also gets it as a `report` event on every fatal error, so a page\n * sends it where its errors go.\n *\n * The sampler runs while the element is attached, panel open or not, so\n * the counts cover the session, and keeps the session's trace, slimmed,\n * from the engine's `trace` events, or off its ring where it emits none. The pages redraw twice a second while\n * shown, the charts four times. The browser is probed once, the first\n * time its page is shown: the key-system probes are not free, and Firefox\n * asks the viewer about a DRM module it has not enabled.\n *\n * A native session has no engine, and the engine's rules say a native\n * session has no diagnostics beyond the video's own: the playback page and\n * the buffer, stall and frame charts read the video, the rest says so.\n *\n * No class fields: the ES2015 build would lower them into helpers, and the\n * player's emit check bans helpers. State is declared, then assigned.\n */\nimport type { Mattebox } from 'mattebox';\nimport type { Charts, ChartTab, Palette } from './charts.js';\nimport { CHART_TABS, createCharts } from './charts.js';\nimport { setChildren } from './dom.js';\nimport { bitrate, clock, fixed, ranges, rendition, share } from './format.js';\nimport type { PlayerError, PlayerHost } from './host.js';\nimport { findPlayer, whenPlayer } from './host.js';\nimport { icon } from './icon.js';\nimport type { DiagnosticsReport } from './report.js';\nimport { buildReport } from './report.js';\nimport type { Sampler } from './sampler.js';\nimport { createSampler } from './sampler.js';\nimport { STYLE } from './style.js';\nimport type { Cell, Support } from './support.js';\nimport { probeSupport } from './support.js';\n\nconst POLL_MS = 500;\nconst DRAW_MS = 250;\nconst WINDOW = 120;\nconst WINDOWS = [30, 60, 120, 300, 600];\nconst PANEL_WIDTH = 560;\n/** Air between the panel's top and the picture's, and around it. */\nconst AIR = 8;\n\nconst TABS = ['playback', 'charts', 'engine', 'browser'] as const;\ntype Tab = (typeof TABS)[number];\nconst TAB_NAMES: Readonly<Record<Tab, string>> = {\n playback: 'Playback',\n charts: 'Charts',\n engine: 'Engine',\n browser: 'Browser',\n};\n\nconst READY_STATES = ['nothing', 'metadata', 'current data', 'future data', 'enough data'];\nconst NETWORK_STATES = ['empty', 'idle', 'loading', 'no source'];\n\ntype Pair = readonly [string, string];\n\ninterface Section {\n readonly title: string | null;\n readonly rows: readonly Pair[];\n /** A line instead of rows, for a section with nothing to list. */\n readonly note?: string | undefined;\n}\n\n/** The optional namespaces the pages read, cast once, the way the player does it. */\ninterface Namespaces {\n readonly live?: { readonly latency: number | null; readonly atEdge: boolean };\n readonly drm?: {\n readonly keySystem: string | null;\n readonly sessions: ReadonlyArray<{ readonly keyId: string; readonly status: string }>;\n };\n}\n\nfunction el<K extends keyof HTMLElementTagNameMap>(\n tag: K,\n part: string,\n text?: string,\n): HTMLElementTagNameMap[K] {\n const node = document.createElement(tag);\n node.setAttribute('part', part);\n if (text !== undefined) node.textContent = text;\n return node;\n}\n\nfunction button(part: string, text?: string): HTMLButtonElement {\n const node = el('button', part, text);\n node.type = 'button';\n return node;\n}\n\n/** A cell's text and its part: a tick, a cross, a dash, or the text itself. */\nfunction cell(value: Cell): [string, string] {\n switch (value) {\n case 'yes':\n return ['✓', 'cell ok'];\n case 'no':\n return ['✕', 'cell bad'];\n case 'na':\n return ['–', 'cell na'];\n case 'maybe':\n return ['maybe', 'cell maybe'];\n default:\n return [value, 'cell'];\n }\n}\n\nexport class MbxDiagnostics extends HTMLElement {\n static get observedAttributes(): readonly string[] {\n return ['label', 'label-copy', 'label-copied', 'window'];\n }\n\n declare private player: PlayerHost | null;\n declare private cancel: (() => void) | null;\n declare private offs: Array<() => void>;\n declare private readonly sampler: Sampler;\n declare private readonly charts: Charts;\n declare private timer: ReturnType<typeof setInterval> | undefined;\n declare private drawer: ReturnType<typeof setInterval> | undefined;\n declare private copied: ReturnType<typeof setTimeout> | undefined;\n declare private tab: Tab;\n declare private chartTab: ChartTab;\n declare private support: Support | null;\n declare private probing: boolean;\n\n declare private readonly toggle: HTMLButtonElement;\n declare private readonly panel: HTMLElement;\n declare private readonly body: HTMLElement;\n declare private readonly tabs: Record<Tab, HTMLButtonElement>;\n declare private readonly pages: Record<Tab, HTMLElement>;\n declare private readonly copy: HTMLButtonElement;\n declare private readonly canvas: HTMLCanvasElement;\n declare private readonly chartTabs: Record<ChartTab, HTMLButtonElement>;\n declare private readonly windowSelect: HTMLSelectElement;\n declare private readonly outside: (event: PointerEvent) => void;\n declare private readonly refit: () => void;\n\n constructor() {\n super();\n this.player = null;\n this.cancel = null;\n this.offs = [];\n this.sampler = createSampler();\n this.timer = undefined;\n this.drawer = undefined;\n this.copied = undefined;\n this.tab = 'playback';\n this.chartTab = 'buffer';\n this.support = null;\n this.probing = false;\n\n const root = this.attachShadow({ mode: 'open' });\n const style = document.createElement('style');\n style.textContent = STYLE;\n\n this.toggle = button('button');\n this.toggle.setAttribute('aria-haspopup', 'dialog');\n this.toggle.setAttribute('aria-expanded', 'false');\n const slot = document.createElement('slot');\n slot.name = 'icon';\n slot.append(icon());\n this.toggle.append(slot);\n this.toggle.addEventListener('click', () => {\n if (this.panel.hidden) this.show();\n else this.hide();\n });\n\n this.panel = el('div', 'panel');\n this.panel.setAttribute('role', 'dialog');\n this.panel.hidden = true;\n this.panel.addEventListener('keydown', (event) => {\n if (event.key !== 'Escape' || this.hasAttribute('inline')) return;\n event.preventDefault();\n this.hide();\n this.toggle.focus();\n });\n\n const head = el('div', 'head');\n head.setAttribute('role', 'tablist');\n this.tabs = {} as Record<Tab, HTMLButtonElement>;\n this.pages = {} as Record<Tab, HTMLElement>;\n this.body = el('div', 'body');\n for (const tab of TABS) {\n const node = button(`tab tab-${tab}`, TAB_NAMES[tab]);\n node.setAttribute('role', 'tab');\n node.addEventListener('click', () => {\n this.select(tab);\n });\n this.tabs[tab] = node;\n head.append(node);\n const page = el('div', `page page-${tab}`);\n page.setAttribute('role', 'tabpanel');\n page.hidden = true;\n this.pages[tab] = page;\n this.body.append(page);\n }\n this.copy = button('copy');\n this.copy.addEventListener('click', () => {\n void this.copyReport();\n });\n const close = button('close', '✕');\n close.setAttribute('aria-label', 'Close');\n close.addEventListener('click', () => {\n this.hide();\n this.toggle.focus();\n });\n head.append(this.copy, close);\n\n // The charts page: its own tabs, the window, the canvas, the legend and the readout.\n const chartTabs = el('div', 'chart-tabs');\n chartTabs.setAttribute('role', 'tablist');\n this.chartTabs = {} as Record<ChartTab, HTMLButtonElement>;\n for (const tab of CHART_TABS) {\n const node = button(`chart-tab chart-tab-${tab}`, tab);\n node.setAttribute('role', 'tab');\n node.addEventListener('click', () => {\n this.chartTab = tab;\n this.markChartTab();\n this.draw();\n });\n this.chartTabs[tab] = node;\n chartTabs.append(node);\n }\n this.windowSelect = el('select', 'window');\n this.windowSelect.setAttribute('aria-label', 'Window');\n for (const seconds of WINDOWS) {\n const option = document.createElement('option');\n option.value = String(seconds);\n option.textContent = seconds < 60 ? `${seconds} s` : `${seconds / 60} min`;\n this.windowSelect.append(option);\n }\n this.windowSelect.addEventListener('change', () => {\n this.draw();\n });\n chartTabs.append(this.windowSelect);\n this.canvas = el('canvas', 'chart');\n const legend = el('div', 'legend');\n const readout = el('p', 'readout');\n this.pages.charts.append(chartTabs, this.canvas, legend, readout);\n this.charts = createCharts(this.canvas, legend, readout);\n\n this.outside = (event: PointerEvent): void => {\n if (!event.composedPath().includes(this)) this.hide();\n };\n this.refit = (): void => {\n this.fit();\n };\n\n this.panel.append(head, this.body);\n root.append(style, this.toggle, this.panel);\n this.markTab();\n this.markChartTab();\n this.renderLabels();\n }\n\n connectedCallback(): void {\n // In the bar, a button and a popup; anywhere else, the panel in flow.\n this.toggleAttribute('inline', this.parentElement?.localName !== 'mbx-control-bar');\n const found = findPlayer(this);\n if (found === null) return;\n this.cancel?.();\n this.cancel = whenPlayer(found, (player) => {\n if (!this.isConnected) return;\n this.attach(player);\n });\n }\n\n disconnectedCallback(): void {\n this.cancel?.();\n this.cancel = null;\n this.detach();\n }\n\n attributeChangedCallback(): void {\n this.renderLabels();\n }\n\n private attach(player: PlayerHost): void {\n this.player = player;\n this.sampler.attach(player.video, player.engine);\n const on = (target: EventTarget, name: string, fn: (event: Event) => void): void => {\n target.addEventListener(name, fn);\n this.offs.push(() => {\n target.removeEventListener(name, fn);\n });\n };\n on(player, 'sourcechange', () => {\n this.sampler.attach(player.video, player.engine);\n this.poll();\n });\n on(player, 'error', (event) => {\n const error = (event as CustomEvent<PlayerError>).detail;\n if (error.fatal) {\n this.dispatchEvent(\n new CustomEvent('report', { detail: this.report(), bubbles: true, composed: true }),\n );\n }\n });\n this.timer = setInterval(() => {\n this.poll();\n }, POLL_MS);\n this.poll();\n if (this.hasAttribute('inline')) this.show();\n }\n\n private detach(): void {\n for (const off of this.offs) off();\n this.offs = [];\n clearInterval(this.timer);\n this.timer = undefined;\n this.sampler.release();\n this.hide();\n this.player = null;\n }\n\n /** The report, as of now. */\n report(): DiagnosticsReport {\n const player = this.player;\n if (player === null) throw new Error('mbx-diagnostics is not inside a player');\n return buildReport({\n player,\n samples: this.sampler.samples,\n marks: this.sampler.marks,\n counters: this.sampler.counters,\n history: this.sampler.history,\n support: this.support,\n });\n }\n\n private poll(): void {\n const player = this.player;\n if (player === null) return;\n this.sampler.poll(player.video, player.engine);\n if (!this.panel.hidden) this.paint();\n }\n\n private show(): void {\n if (!this.panel.hidden) return;\n this.panel.hidden = false;\n if (!this.hasAttribute('inline')) {\n this.setAttribute('open', '');\n this.toggle.setAttribute('aria-expanded', 'true');\n document.addEventListener('pointerdown', this.outside, true);\n window.addEventListener('resize', this.refit);\n this.fit();\n }\n this.paint();\n this.drawer = setInterval(() => {\n this.draw();\n }, DRAW_MS);\n if (!this.hasAttribute('inline')) this.tabs[this.tab].focus();\n }\n\n private hide(): void {\n clearInterval(this.drawer);\n this.drawer = undefined;\n if (this.panel.hidden) return;\n this.panel.hidden = true;\n this.removeAttribute('open');\n this.toggle.setAttribute('aria-expanded', 'false');\n document.removeEventListener('pointerdown', this.outside, true);\n window.removeEventListener('resize', this.refit);\n }\n\n /** The panel never leaves the picture: fitted to the room above the button, within the player's width. */\n private fit(): void {\n const player = this.player;\n if (player === null) return;\n const box = player.getBoundingClientRect();\n const host = this.getBoundingClientRect();\n const top = player.video.getBoundingClientRect().top;\n const room = host.top - top - AIR;\n this.panel.style.maxHeight = `${Math.max(120, Math.floor(room))}px`;\n const width = Math.min(PANEL_WIDTH, Math.max(200, box.width - AIR * 2));\n this.panel.style.width = `${width}px`;\n const left = Math.max(box.left + AIR, Math.min(host.right - width, box.right - AIR - width));\n this.panel.style.right = 'auto';\n this.panel.style.left = `${left - host.left}px`;\n }\n\n private select(tab: Tab): void {\n this.tab = tab;\n this.markTab();\n this.tabs[tab].focus();\n this.paint();\n this.draw();\n }\n\n private markTab(): void {\n for (const tab of TABS) {\n this.tabs[tab].setAttribute('aria-selected', String(tab === this.tab));\n this.tabs[tab].tabIndex = tab === this.tab ? 0 : -1;\n this.pages[tab].hidden = tab !== this.tab;\n }\n }\n\n private markChartTab(): void {\n for (const tab of CHART_TABS) {\n this.chartTabs[tab].setAttribute('aria-selected', String(tab === this.chartTab));\n }\n }\n\n private renderLabels(): void {\n this.toggle.setAttribute('aria-label', this.getAttribute('label') ?? 'Diagnostics');\n this.panel.setAttribute('aria-label', this.getAttribute('label') ?? 'Diagnostics');\n if (this.copied === undefined) {\n this.copy.textContent = this.getAttribute('label-copy') ?? 'Copy report';\n }\n const raw = Number(this.getAttribute('window'));\n const seconds = Number.isFinite(raw) && raw > 0 ? raw : WINDOW;\n if (!WINDOWS.includes(seconds)) {\n const option = document.createElement('option');\n option.value = String(seconds);\n option.textContent = `${seconds} s`;\n this.windowSelect.append(option);\n }\n this.windowSelect.value = String(seconds);\n }\n\n private async copyReport(): Promise<void> {\n const text = JSON.stringify(this.report(), null, 2);\n try {\n await navigator.clipboard.writeText(text);\n } catch {\n return;\n }\n this.copy.textContent = this.getAttribute('label-copied') ?? 'Copied';\n clearTimeout(this.copied);\n this.copied = setTimeout(() => {\n this.copied = undefined;\n this.renderLabels();\n }, 1500);\n }\n\n /** The colours the charts draw with, off the element's tokens. */\n private palette(): Palette {\n const computed = getComputedStyle(this);\n const token = (name: string, fallback: string): string =>\n computed.getPropertyValue(name).trim() || fallback;\n return {\n ink: token('--mbx-text', '#f2f3f5'),\n muted: token('--mbx-muted', '#9aa0a6'),\n accent: token('--mbx-accent', '#5b8cff'),\n warn: token('--mbx-chart-3', '#d9a83f'),\n series: [1, 2, 3, 4, 5].map((i) => token(`--mbx-chart-${i}`, '#888')),\n };\n }\n\n private draw(): void {\n const player = this.player;\n if (player === null || this.panel.hidden || this.tab !== 'charts') return;\n this.charts.draw({\n tab: this.chartTab,\n window: Number(this.windowSelect.value) || WINDOW,\n samples: this.sampler.samples,\n marks: this.sampler.marks,\n counters: this.sampler.counters,\n video: player.video,\n engine: player.engine,\n palette: this.palette(),\n });\n }\n\n /** The page shown, from the facts of the moment. */\n private paint(): void {\n const player = this.player;\n if (player === null || this.panel.hidden) return;\n switch (this.tab) {\n case 'playback':\n this.sections(this.pages.playback, this.playbackSections(player));\n break;\n case 'engine':\n this.sections(this.pages.engine, this.engineSections(player.engine));\n break;\n case 'browser':\n this.browser();\n break;\n default:\n break;\n }\n }\n\n private playbackSections(player: PlayerHost): Section[] {\n const video = player.video;\n const engine = player.engine;\n const quality = video.getVideoPlaybackQuality?.();\n const counters = this.sampler.counters;\n const last = this.sampler.samples[this.sampler.samples.length - 1];\n const state = video.paused ? (video.ended ? 'ended' : 'paused') : 'playing';\n const source: Pair[] = [\n ['source', player.getAttribute('src') ?? '–'],\n ['type', player.getAttribute('type') ?? '–'],\n ['handler', player.player?.session?.handler ?? '–'],\n ];\n if (engine !== null) source.push(['phase', engine.stats.snapshot().lifecycle.phase]);\n if (player.error !== null) {\n source.push(['error', `${player.error.category}: ${player.error.code}`]);\n } else if (video.error !== null) {\n source.push(['media error', `${video.error.code} ${video.error.message}`]);\n }\n const playback: Pair[] = [\n ['time', `${clock(video.currentTime)} of ${clock(video.duration)}`],\n [\n 'state',\n `${state}, ${READY_STATES[video.readyState] ?? video.readyState}, network ${NETWORK_STATES[video.networkState] ?? video.networkState}`,\n ],\n ['rate', `${video.playbackRate}×`],\n ['picture', video.videoWidth > 0 ? `${video.videoWidth}×${video.videoHeight}` : '–'],\n [\n 'frames',\n quality === undefined\n ? '–'\n : `${quality.totalVideoFrames} decoded, ${quality.droppedVideoFrames} dropped (${share(quality.droppedVideoFrames, quality.totalVideoFrames)})`,\n ],\n ['buffered', `${fixed(last?.ahead ?? 0)}s ahead: ${ranges(playbackRanges(video))}`],\n ['stalls', `${counters.stalls}, ${counters.stalledSeconds.toFixed(1)}s in total`],\n ];\n if (engine !== null) {\n const snapshot = engine.stats.snapshot();\n playback.push(\n [\n 'throughput',\n `slow ${bitrate(snapshot.stats.throughputEwma)}, fast ${bitrate(snapshot.stats.throughputFastEwma)}`,\n ],\n ['playing', rendition(engine.quality.playing)],\n ['switches', String(counters.switches)],\n );\n }\n return [\n { title: 'Source', rows: source },\n { title: 'Playback', rows: playback },\n ];\n }\n\n private engineSections(engine: Mattebox | null): Section[] {\n if (engine === null) {\n return [\n {\n title: null,\n rows: [],\n note: 'A native session: the browser plays this, and there is no engine to ask.',\n },\n ];\n }\n const state = engine.stats.snapshot();\n const optional = engine as Namespaces;\n const live = state.live;\n const rows: Pair[] = [\n ['capabilities', [...engine.capabilities()].join(', ') || 'none'],\n ['phase', state.lifecycle.phase],\n ['buffer goal', `${state.scheduling.bufferGoal}s`],\n [\n 'throughput',\n `slow ${bitrate(state.stats.throughputEwma)}, fast ${bitrate(state.stats.throughputFastEwma)}`,\n ],\n [\n 'in flight',\n [...state.scheduling.inflight.values()].map((r) => `${r.trackId} #${r.seq}`).join(', ') ||\n 'none',\n ],\n [\n 'live',\n live === null\n ? 'VOD'\n : `window ${clock(live.span.start)} to ${clock(live.span.end)}, edge ${clock(live.edge)}${\n optional.live?.latency === null || optional.live?.latency === undefined\n ? ''\n : `, ${optional.live.latency.toFixed(1)}s behind`\n }`,\n ],\n ['trace', `${engine.stats.trace().length} entries`],\n ];\n const error = engine.error;\n if (error !== null) rows.push(['last error', `${error.category}: ${error.code}`]);\n\n const buffers: Pair[] = [...state.buffers.entries()].map(([id, buffer]) => [\n id.replace('sb:', ''),\n `${buffer.codecs}: ${ranges(buffer.ranges)}${buffer.pendingAppends > 0 ? `, ${buffer.pendingAppends} pending` : ''}`,\n ]);\n\n const tracks: Pair[] = engine.tracks.available.map((track) => {\n const active = engine.tracks.active(track.contentType)?.id === track.id;\n const name = [track.lang, track.role].filter((v) => v !== undefined).join(' · ');\n return [\n `${track.contentType}${active ? ' ●' : ''}`,\n `${track.id}${name === '' ? '' : ` (${name})`}, ${track.renditions.length} renditions`,\n ];\n });\n\n const playing = engine.quality.playing?.id ?? null;\n const active = engine.quality.active?.id ?? null;\n const allowed = new Set(engine.quality.allowed.map((r) => r.id));\n const renditions: Pair[] = engine.quality.renditions.map((r) => {\n const flags = [\n r.id === playing ? 'playing' : '',\n r.id === active && active !== playing ? 'next' : '',\n r.id === engine.quality.pinned ? 'pinned' : '',\n allowed.has(r.id) ? '' : 'capped',\n ].filter((f) => f !== '');\n const size = r.width !== undefined && r.height !== undefined ? `${r.width}×${r.height}` : '';\n const text = [\n size,\n bitrate(r.bitrate),\n r.frameRate === undefined ? '' : `${r.frameRate} fps`,\n r.codecs ?? '',\n ]\n .filter((v) => v !== '')\n .join(', ');\n return [r.id, `${text}${flags.length > 0 ? ` [${flags.join(', ')}]` : ''}`];\n });\n\n const drm: Pair[] =\n optional.drm === undefined\n ? []\n : [\n ['key system', optional.drm.keySystem ?? 'none yet'],\n [\n 'keys',\n optional.drm.sessions.length === 0\n ? 'none yet'\n : optional.drm.sessions.map((s) => `${s.keyId}: ${s.status}`).join(', '),\n ],\n ];\n\n return [\n { title: 'Engine', rows },\n {\n title: 'Source buffers',\n rows: buffers,\n note: buffers.length === 0 ? 'none yet' : undefined,\n },\n { title: 'Tracks', rows: tracks, note: tracks.length === 0 ? 'none yet' : undefined },\n {\n title: 'Renditions',\n rows: renditions,\n note: renditions.length === 0 ? 'none yet' : undefined,\n },\n ...(optional.drm === undefined ? [] : [{ title: 'DRM', rows: drm }]),\n ];\n }\n\n /**\n * Draws sections into a page, reusing what is there: a heading and a\n * list per section, a row per pair, texts replaced only where they\n * changed, so a page open for an hour neither flickers nor grows.\n */\n private sections(page: HTMLElement, sections: readonly Section[]): void {\n const wanted = sections.flatMap((section) => {\n const nodes: Array<['heading' | 'note' | 'rows', string | readonly Pair[]]> = [];\n if (section.title !== null) nodes.push(['heading', section.title]);\n if (section.note !== undefined && section.rows.length === 0)\n nodes.push(['note', section.note]);\n else nodes.push(['rows', section.rows]);\n return nodes;\n });\n while (page.childElementCount > wanted.length) page.lastElementChild?.remove();\n wanted.forEach(([kind, content], i) => {\n let node = page.children[i] as HTMLElement | undefined;\n const tag = kind === 'heading' ? 'h3' : kind === 'note' ? 'p' : 'dl';\n if (node === undefined || node.localName !== tag) {\n const fresh = el(tag, kind);\n if (node === undefined) page.append(fresh);\n else node.replaceWith(fresh);\n node = fresh;\n }\n if (typeof content === 'string') {\n if (node.textContent !== content) node.textContent = content;\n return;\n }\n // Rows: a key and a value each, as children of the list in pairs.\n while (node.childElementCount > content.length * 2) node.lastElementChild?.remove();\n content.forEach(([key, value], j) => {\n let dt = node.children[j * 2] as HTMLElement | undefined;\n let dd = node.children[j * 2 + 1] as HTMLElement | undefined;\n if (dt === undefined || dd === undefined) {\n dt = el('dt', 'key');\n dd = el('dd', 'value');\n node.append(dt, dd);\n }\n if (dt.textContent !== key) dt.textContent = key;\n if (dd.textContent !== value) dd.textContent = value;\n });\n });\n }\n\n /** The browser page: probed once, the first time it is shown, then a set of tables. */\n private browser(): void {\n const page = this.pages.browser;\n if (this.support !== null || this.probing) return;\n this.probing = true;\n setChildren(page, el('p', 'note', 'Probing the browser…'));\n void probeSupport().then((support) => {\n this.support = support;\n this.probing = false;\n this.tables(page, support);\n });\n }\n\n private tables(page: HTMLElement, support: Support): void {\n setChildren(page);\n page.append(el('h3', 'heading', 'Platform'), el('p', 'note', support.userAgent));\n const platform = el('table', 'table');\n for (const row of support.platform) {\n const tr = document.createElement('tr');\n const [text, part] = cell(row.value);\n tr.append(el('th', 'cell label', row.label), el('td', part, text));\n platform.append(tr);\n }\n page.append(platform);\n\n page.append(el('h3', 'heading', 'Codecs'));\n const codecs = el('table', 'table');\n const head = document.createElement('tr');\n for (const name of ['Codec', 'MSE fMP4', 'MSE WebM', '<video>', 'Smooth', 'Efficient']) {\n head.append(el('th', 'cell label', name));\n }\n codecs.append(head);\n for (const row of support.codecs) {\n const tr = document.createElement('tr');\n const label = el('th', 'cell label', row.label);\n label.title = row.codec;\n tr.append(label);\n for (const value of [row.mse, row.webm, row.element, row.smooth, row.efficient]) {\n const [text, part] = cell(value);\n tr.append(el('td', part, text));\n }\n codecs.append(tr);\n }\n page.append(codecs);\n\n page.append(el('h3', 'heading', 'DRM'));\n const drm = el('table', 'table');\n const drmHead = document.createElement('tr');\n for (const name of [\n 'System',\n 'Available',\n 'Level',\n 'Schemes',\n 'Persistent',\n 'Identifier',\n 'HDCP',\n ]) {\n drmHead.append(el('th', 'cell label', name));\n }\n drm.append(drmHead);\n for (const row of support.drm) {\n const tr = document.createElement('tr');\n const label = el('th', 'cell label', row.label);\n if (row.keySystem !== null) label.title = row.keySystem;\n tr.append(label);\n const values: Cell[] = [\n row.keySystem === null ? 'no' : 'yes',\n row.level,\n row.schemes,\n row.persistent,\n row.identifier,\n row.hdcp,\n ];\n for (const value of values) {\n const [text, part] = cell(value);\n tr.append(el('td', part, text));\n }\n drm.append(tr);\n }\n page.append(drm);\n }\n}\n\nfunction playbackRanges(video: HTMLVideoElement): Array<{ start: number; end: number }> {\n return Array.from({ length: video.buffered.length }, (_, i) => ({\n start: video.buffered.start(i),\n end: video.buffered.end(i),\n }));\n}\n"],"mappings":";;;;;;;;;;AAuCA,MAAM,UAAU;AAChB,MAAM,UAAU;AAChB,MAAM,SAAS;AACf,MAAM,UAAU;CAAC;CAAI;CAAI;CAAK;CAAK;AAAG;AACtC,MAAM,cAAc;;AAEpB,MAAM,MAAM;AAEZ,MAAM,OAAO;CAAC;CAAY;CAAU;CAAU;AAAS;AAEvD,MAAM,YAA2C;CAC/C,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,SAAS;AACX;AAEA,MAAM,eAAe;CAAC;CAAW;CAAY;CAAgB;CAAe;AAAa;AACzF,MAAM,iBAAiB;CAAC;CAAS;CAAQ;CAAW;AAAW;AAoB/D,SAAS,GACP,KACA,MACA,MAC0B;CAC1B,MAAM,OAAO,SAAS,cAAc,GAAG;CACvC,KAAK,aAAa,QAAQ,IAAI;CAC9B,IAAI,SAAS,KAAA,GAAW,KAAK,cAAc;CAC3C,OAAO;AACT;AAEA,SAAS,OAAO,MAAc,MAAkC;CAC9D,MAAM,OAAO,GAAG,UAAU,MAAM,IAAI;CACpC,KAAK,OAAO;CACZ,OAAO;AACT;;AAGA,SAAS,KAAK,OAA+B;CAC3C,QAAQ,OAAR;EACE,KAAK,OACH,OAAO,CAAC,KAAK,SAAS;EACxB,KAAK,MACH,OAAO,CAAC,KAAK,UAAU;EACzB,KAAK,MACH,OAAO,CAAC,KAAK,SAAS;EACxB,KAAK,SACH,OAAO,CAAC,SAAS,YAAY;EAC/B,SACE,OAAO,CAAC,OAAO,MAAM;CACzB;A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WAAW,KAAK,CAAC;EACtC,MAAM,MAAM,GAAG,SAAS,OAAO;EAC/B,MAAM,UAAU,SAAS,cAAc,IAAI;EAC3C,KAAK,MAAM,QAAQ;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;EACF,GACE,QAAQ,OAAO,GAAG,MAAM,cAAc,IAAI,CAAC;EAE7C,IAAI,OAAO,OAAO;EAClB,KAAK,MAAM,OAAO,QAAQ,KAAK;GAC7B,MAAM,KAAK,SAAS,cAAc,IAAI;GACtC,MAAM,QAAQ,GAAG,MAAM,cAAc,IAAI,KAAK;GAC9C,IAAI,IAAI,cAAc,MAAM,MAAM,QAAQ,IAAI;GAC9C,GAAG,OAAO,KAAK;GACf,MAAM,SAAiB;IACrB,IAAI,cAAc,OAAO,OAAO;IAChC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;GACN;GACA,KAAK,MAAM,SAAS,QAAQ;IAC1B,MAAM,CAAC,MAAM,QAAQ,KAAK,KAAK;IAC/B,GAAG,OAAO,GAAG,MAAM,MAAM,IAAI,CAAC;GAChC;GACA,IAAI,OAAO,EAAE;EACf;EACA,KAAK,OAAO,GAAG;CACjB;AACF;AAEA,SAAS,eAAe,OAAgE;CACtF,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,SAAS,OAAO,IAAI,GAAG,OAAO;EAC9D,OAAO,MAAM,SAAS,MAAM,CAAC;EAC7B,KAAK,MAAM,SAAS,IAAI,CAAC;CAC3B,EAAE;AACJ"}
|
package/dist/es2015/charts.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setChildren } from "./dom.js";
|
|
1
2
|
import { bitrate, clock } from "./format.js";
|
|
2
3
|
//#region src/charts.ts
|
|
3
4
|
const CHART_TABS = [
|
|
@@ -136,7 +137,7 @@ function createCharts(canvas, legend, readout) {
|
|
|
136
137
|
f.ctx.fillText(glyph, px, f.top);
|
|
137
138
|
}
|
|
138
139
|
function setLegend(items) {
|
|
139
|
-
legend
|
|
140
|
+
setChildren(legend);
|
|
140
141
|
for (const [text, color] of items) {
|
|
141
142
|
const item = document.createElement("span");
|
|
142
143
|
item.setAttribute("part", "legend-item");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/dom.ts
|
|
2
|
+
/**
|
|
3
|
+
* Replaces the children of `node`: the ones it has go, then `children` come.
|
|
4
|
+
* `replaceChildren` does this in one call, from Chromium 86 (AGENTS.md,
|
|
5
|
+
* rule 9). A copy of the player's own: the player's internals are not this
|
|
6
|
+
* package's to import.
|
|
7
|
+
*/
|
|
8
|
+
function setChildren(node, ...children) {
|
|
9
|
+
while (node.firstChild !== null) node.firstChild.remove();
|
|
10
|
+
node.append(...children);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { setChildren };
|
package/dist/es2015/element.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setChildren } from "./dom.js";
|
|
1
2
|
import { bitrate, clock, fixed, ranges, rendition, share } from "./format.js";
|
|
2
3
|
import { CHART_TABS, createCharts } from "./charts.js";
|
|
3
4
|
import { findPlayer, whenPlayer } from "./host.js";
|
|
@@ -558,7 +559,7 @@ var MbxDiagnostics = class extends HTMLElement {
|
|
|
558
559
|
const page = this.pages.browser;
|
|
559
560
|
if (this.support !== null || this.probing) return;
|
|
560
561
|
this.probing = true;
|
|
561
|
-
page
|
|
562
|
+
setChildren(page, el("p", "note", "Probing the browser…"));
|
|
562
563
|
probeSupport().then((support) => {
|
|
563
564
|
this.support = support;
|
|
564
565
|
this.probing = false;
|
|
@@ -566,7 +567,7 @@ var MbxDiagnostics = class extends HTMLElement {
|
|
|
566
567
|
});
|
|
567
568
|
}
|
|
568
569
|
tables(page, support) {
|
|
569
|
-
page
|
|
570
|
+
setChildren(page);
|
|
570
571
|
page.append(el("h3", "heading", "Platform"), el("p", "note", support.userAgent));
|
|
571
572
|
const platform = el("table", "table");
|
|
572
573
|
for (const row of support.platform) {
|
package/dist/es2015/style.js
CHANGED
|
@@ -1,135 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* The element's stylesheet. The button is drawn the way the player's own
|
|
4
|
-
* buttons are, in a copy: the player's styles are internal, and a control
|
|
5
|
-
* of the page's own carries its own sheet. Tokens come through the
|
|
6
|
-
* `--mbx-*` custom properties the player sets, which inherit through light
|
|
7
|
-
* DOM; the chart colours have defaults here and a page overrides them the
|
|
8
|
-
* same way. Nothing carries `!important`, so a page's `::part()` rule wins.
|
|
9
|
-
*/
|
|
10
|
-
const STYLE = `
|
|
11
|
-
:host {
|
|
12
|
-
display: inline-flex;
|
|
13
|
-
position: relative;
|
|
14
|
-
--mbx-chart-1: #5aa9e0;
|
|
15
|
-
--mbx-chart-2: #6fbf8f;
|
|
16
|
-
--mbx-chart-3: #d9a83f;
|
|
17
|
-
--mbx-chart-4: #e05a6e;
|
|
18
|
-
--mbx-chart-5: #a98fe0;
|
|
19
|
-
}
|
|
20
|
-
:host([hidden]) { display: none; }
|
|
21
|
-
:host([inline]) { display: block; }
|
|
22
|
-
[part~="button"] {
|
|
23
|
-
display: inline-flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
flex: none;
|
|
27
|
-
width: 40px;
|
|
28
|
-
height: 40px;
|
|
29
|
-
padding: 0;
|
|
30
|
-
font: inherit;
|
|
31
|
-
color: inherit;
|
|
32
|
-
background: transparent;
|
|
33
|
-
border: 0;
|
|
34
|
-
border-radius: var(--mbx-radius);
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
opacity: 0.9;
|
|
37
|
-
}
|
|
38
|
-
[part~="button"]:hover { opacity: 1; }
|
|
39
|
-
[part~="button"]:focus-visible { outline: 2px solid var(--mbx-accent); outline-offset: -2px; }
|
|
40
|
-
[part~="icon"], ::slotted(*) { width: 1.75em; height: 1.75em; fill: currentColor; }
|
|
41
|
-
:host([inline]) [part~="button"] { display: none; }
|
|
42
|
-
[part~="panel"] {
|
|
43
|
-
position: absolute;
|
|
44
|
-
right: 0;
|
|
45
|
-
bottom: 100%;
|
|
46
|
-
box-sizing: border-box;
|
|
47
|
-
width: 560px;
|
|
48
|
-
margin-bottom: 8px;
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
color: var(--mbx-text, #f2f3f5);
|
|
53
|
-
background: rgba(16, 17, 20, 0.95);
|
|
54
|
-
border-radius: var(--mbx-radius, 4px);
|
|
55
|
-
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
|
|
56
|
-
font: 400 12px/1.5 var(--mbx-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
57
|
-
text-align: left;
|
|
58
|
-
white-space: normal;
|
|
59
|
-
}
|
|
60
|
-
[part~="panel"][hidden] { display: none; }
|
|
61
|
-
:host([inline]) [part~="panel"] {
|
|
62
|
-
position: static;
|
|
63
|
-
width: auto;
|
|
64
|
-
max-height: none;
|
|
65
|
-
margin: 0;
|
|
66
|
-
box-shadow: none;
|
|
67
|
-
border-radius: 0;
|
|
68
|
-
}
|
|
69
|
-
[part~="head"] {
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
gap: 4px;
|
|
73
|
-
padding: 6px 8px;
|
|
74
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.12);
|
|
75
|
-
}
|
|
76
|
-
[part~="tab"], [part~="chart-tab"] {
|
|
77
|
-
font: inherit;
|
|
78
|
-
color: var(--mbx-muted, #9aa0a6);
|
|
79
|
-
background: transparent;
|
|
80
|
-
border: 0;
|
|
81
|
-
border-radius: var(--mbx-radius, 4px);
|
|
82
|
-
padding: 3px 8px;
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
}
|
|
85
|
-
[part~="tab"][aria-selected="true"], [part~="chart-tab"][aria-selected="true"] {
|
|
86
|
-
color: var(--mbx-text, #f2f3f5);
|
|
87
|
-
background: rgba(255, 255, 255, 0.12);
|
|
88
|
-
}
|
|
89
|
-
[part~="copy"], [part~="close"], [part~="window"] {
|
|
90
|
-
font: inherit;
|
|
91
|
-
color: inherit;
|
|
92
|
-
background: transparent;
|
|
93
|
-
border: 1px solid rgba(255, 255, 255, 0.25);
|
|
94
|
-
border-radius: var(--mbx-radius, 4px);
|
|
95
|
-
padding: 2px 8px;
|
|
96
|
-
cursor: pointer;
|
|
97
|
-
}
|
|
98
|
-
[part~="copy"] { margin-left: auto; }
|
|
99
|
-
[part~="window"] { margin-left: auto; }
|
|
100
|
-
[part~="window"] option { color: #000; }
|
|
101
|
-
[part~="tab"]:focus-visible, [part~="chart-tab"]:focus-visible, [part~="copy"]:focus-visible,
|
|
102
|
-
[part~="close"]:focus-visible, [part~="window"]:focus-visible {
|
|
103
|
-
outline: 2px solid var(--mbx-accent, #5b8cff);
|
|
104
|
-
outline-offset: -2px;
|
|
105
|
-
}
|
|
106
|
-
[part~="body"] { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 8px; }
|
|
107
|
-
[part~="page"][hidden] { display: none; }
|
|
108
|
-
[part~="rows"] { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; }
|
|
109
|
-
[part~="key"] { color: var(--mbx-muted, #9aa0a6); white-space: nowrap; }
|
|
110
|
-
[part~="value"] { margin: 0; overflow-wrap: anywhere; }
|
|
111
|
-
[part~="heading"] {
|
|
112
|
-
margin: 10px 0 4px;
|
|
113
|
-
font-size: 11px;
|
|
114
|
-
font-weight: 600;
|
|
115
|
-
letter-spacing: 0.06em;
|
|
116
|
-
text-transform: uppercase;
|
|
117
|
-
color: var(--mbx-muted, #9aa0a6);
|
|
118
|
-
}
|
|
119
|
-
[part~="heading"]:first-child { margin-top: 0; }
|
|
120
|
-
[part~="note"] { margin: 0; color: var(--mbx-muted, #9aa0a6); }
|
|
121
|
-
[part~="chart-tabs"] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 6px; }
|
|
122
|
-
[part~="chart"] { display: block; width: 100%; height: 160px; }
|
|
123
|
-
[part~="legend"] { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; color: var(--mbx-muted, #9aa0a6); }
|
|
124
|
-
[part~="swatch"] { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 2px; vertical-align: middle; }
|
|
125
|
-
[part~="readout"] { margin-top: 4px; }
|
|
126
|
-
[part~="table"] { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
|
|
127
|
-
[part~="cell"] { padding: 2px 6px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.08); white-space: nowrap; font-weight: 400; }
|
|
128
|
-
[part~="label"] { color: var(--mbx-muted, #9aa0a6); }
|
|
129
|
-
[part~="ok"] { color: var(--mbx-chart-2); }
|
|
130
|
-
[part~="bad"] { color: var(--mbx-chart-4); }
|
|
131
|
-
[part~="na"] { color: var(--mbx-muted, #9aa0a6); }
|
|
132
|
-
[part~="ok"], [part~="bad"], [part~="na"], [part~="maybe"] { font-weight: 600; }
|
|
133
|
-
`;
|
|
1
|
+
const STYLE = ":host{--mbx-chart-1:#5aa9e0;--mbx-chart-2:#6fbf8f;--mbx-chart-3:#d9a83f;--mbx-chart-4:#e05a6e;--mbx-chart-5:#a98fe0;display:inline-flex;position:relative}:host([hidden]){display:none}:host([inline]){display:block}[part~=button]{width:40px;height:40px;font:inherit;color:inherit;border-radius:var(--mbx-radius);cursor:pointer;opacity:.9;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part~=button]:hover{opacity:1}[part~=button]:focus{outline:2px solid var(--mbx-accent);outline-offset:-2px}[part~=button]:focus:not(:focus-visible){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}:host([inline]) [part~=button]{display:none}[part~=panel]{box-sizing:border-box;width:560px;color:var(--mbx-text,#f2f3f5);border-radius:var(--mbx-radius,4px);font:400 12px / 1.5 var(--mbx-mono,ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);text-align:left;white-space:normal;background:#101114f2;flex-direction:column;margin-bottom:8px;display:flex;position:absolute;bottom:100%;right:0;overflow:hidden;box-shadow:0 4px 16px #00000080}[part~=panel][hidden]{display:none}:host([inline]) [part~=panel]{width:auto;max-height:none;box-shadow:none;border-radius:0;margin:0;position:static}[part~=head]{border-bottom:1px solid #ffffff1f;align-items:center;padding:6px;display:flex}[part~=tab],[part~=chart-tab]{font:inherit;color:var(--mbx-muted,#9aa0a6);border-radius:var(--mbx-radius,4px);cursor:pointer;background:0 0;border:0;padding:3px 8px}[part~=tab][aria-selected=true],[part~=chart-tab][aria-selected=true]{color:var(--mbx-text,#f2f3f5);background:#ffffff1f}[part~=copy],[part~=close],[part~=window]{font:inherit;color:inherit;border-radius:var(--mbx-radius,4px);cursor:pointer;background:0 0;border:1px solid #ffffff40;padding:2px 8px}[part~=head]>*{margin:0 2px}[part~=head]>[part~=copy],[part~=chart-tabs]>[part~=window]{margin-left:auto}[part~=window] option{color:#000}[part~=tab]:focus,[part~=chart-tab]:focus,[part~=copy]:focus,[part~=close]:focus,[part~=window]:focus{outline:2px solid var(--mbx-accent,#5b8cff);outline-offset:-2px}[part~=tab]:focus:not(:focus-visible){outline:none}[part~=chart-tab]:focus:not(:focus-visible){outline:none}[part~=copy]:focus:not(:focus-visible){outline:none}[part~=close]:focus:not(:focus-visible){outline:none}[part~=window]:focus:not(:focus-visible){outline:none}[part~=body]{overscroll-behavior:contain;min-height:0;padding:8px;overflow:auto}[part~=page][hidden]{display:none}[part~=rows]{grid-template-columns:max-content 1fr;gap:2px 12px;margin:0;display:grid}[part~=key]{color:var(--mbx-muted,#9aa0a6);white-space:nowrap}[part~=value]{overflow-wrap:anywhere;margin:0}[part~=heading]{letter-spacing:.06em;text-transform:uppercase;color:var(--mbx-muted,#9aa0a6);margin:10px 0 4px;font-size:11px;font-weight:600}[part~=heading]:first-child{margin-top:0}[part~=note]{color:var(--mbx-muted,#9aa0a6);margin:0}[part~=chart-tabs]{flex-wrap:wrap;align-items:center;margin:-2px -2px 4px;display:flex}[part~=chart-tabs]>*{margin:2px}[part~=chart]{width:100%;height:160px;display:block}[part~=legend]{color:var(--mbx-muted,#9aa0a6);flex-wrap:wrap;margin:3px -6px -1px;display:flex}[part~=legend]>*{margin:1px 6px}[part~=swatch]{vertical-align:middle;border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}[part~=readout]{margin-top:4px}[part~=table]{border-collapse:collapse;width:100%;margin-bottom:4px}[part~=cell]{text-align:left;white-space:nowrap;border-bottom:1px solid #ffffff14;padding:2px 6px;font-weight:400}[part~=label]{color:var(--mbx-muted,#9aa0a6)}[part~=ok]{color:var(--mbx-chart-2)}[part~=bad]{color:var(--mbx-chart-4)}[part~=na]{color:var(--mbx-muted,#9aa0a6)}[part~=ok],[part~=bad],[part~=na],[part~=maybe]{font-weight:600}";
|
|
134
2
|
//#endregion
|
|
135
3
|
export { STYLE };
|
package/dist/format.js
CHANGED
|
@@ -1,45 +1,40 @@
|
|
|
1
|
+
//#region src/format.ts
|
|
1
2
|
/** The numbers as the panel and the charts print them. Pure. */
|
|
2
3
|
/** Bits per second as "3.2 Mbps", "640 kbps" or "0 bps". */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (bps >= 1_000)
|
|
9
|
-
return `${Math.round(bps / 1_000)} kbps`;
|
|
10
|
-
return `${Math.round(bps)} bps`;
|
|
4
|
+
function bitrate(bps) {
|
|
5
|
+
if (!Number.isFinite(bps) || bps <= 0) return "0 bps";
|
|
6
|
+
if (bps >= 1e6) return `${(bps / 1e6).toFixed(bps >= 1e7 ? 0 : 1)} Mbps`;
|
|
7
|
+
if (bps >= 1e3) return `${Math.round(bps / 1e3)} kbps`;
|
|
8
|
+
return `${Math.round(bps)} bps`;
|
|
11
9
|
}
|
|
12
10
|
/** Seconds as "m:ss", or "h:mm:ss" from an hour up. Anything not finite reads as "–". */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return hours > 0 ? `${hours}:${pad(minutes)}:${pad(rest)}` : `${minutes}:${pad(rest)}`;
|
|
11
|
+
function clock(seconds) {
|
|
12
|
+
if (!Number.isFinite(seconds)) return "–";
|
|
13
|
+
const total = Math.max(0, Math.floor(seconds));
|
|
14
|
+
const hours = Math.floor(total / 3600);
|
|
15
|
+
const minutes = Math.floor(total % 3600 / 60);
|
|
16
|
+
const rest = total % 60;
|
|
17
|
+
const pad = (n) => n < 10 ? `0${n}` : `${n}`;
|
|
18
|
+
return hours > 0 ? `${hours}:${pad(minutes)}:${pad(rest)}` : `${minutes}:${pad(rest)}`;
|
|
22
19
|
}
|
|
23
20
|
/** A number with `digits` decimals, and "–" when it is not one. */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
? '–'
|
|
27
|
-
: value.toFixed(digits);
|
|
21
|
+
function fixed(value, digits = 1) {
|
|
22
|
+
return value === null || value === void 0 || !Number.isFinite(value) ? "–" : value.toFixed(digits);
|
|
28
23
|
}
|
|
29
24
|
/** A share as "1.23%", zero when there is no whole. */
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
function share(part, whole) {
|
|
26
|
+
return whole > 0 ? `${(part / whole * 100).toFixed(2)}%` : "0%";
|
|
32
27
|
}
|
|
33
28
|
/** Time ranges as "0.0–12.3, 40.0–52.1". */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
? 'none'
|
|
37
|
-
: list.map((range) => `${range.start.toFixed(1)}–${range.end.toFixed(1)}`).join(', ');
|
|
29
|
+
function ranges(list) {
|
|
30
|
+
return list.length === 0 ? "none" : list.map((range) => `${range.start.toFixed(1)}–${range.end.toFixed(1)}`).join(", ");
|
|
38
31
|
}
|
|
39
32
|
/** A rendition's name: its height, else its bitrate. */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return r.height !== undefined ? `${r.height}p, ${bitrate(r.bitrate)}` : bitrate(r.bitrate);
|
|
33
|
+
function rendition(r) {
|
|
34
|
+
if (r === null) return "–";
|
|
35
|
+
return r.height !== void 0 ? `${r.height}p, ${bitrate(r.bitrate)}` : bitrate(r.bitrate);
|
|
44
36
|
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { bitrate, clock, fixed, ranges, rendition, share };
|
|
39
|
+
|
|
45
40
|
//# sourceMappingURL=format.js.map
|
package/dist/format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","
|
|
1
|
+
{"version":3,"file":"format.js","names":[],"sources":["../src/format.ts"],"sourcesContent":["/** The numbers as the panel and the charts print them. Pure. */\n\n/** Bits per second as \"3.2 Mbps\", \"640 kbps\" or \"0 bps\". */\nexport function bitrate(bps: number): string {\n if (!Number.isFinite(bps) || bps <= 0) return '0 bps';\n if (bps >= 1_000_000) return `${(bps / 1_000_000).toFixed(bps >= 10_000_000 ? 0 : 1)} Mbps`;\n if (bps >= 1_000) return `${Math.round(bps / 1_000)} kbps`;\n return `${Math.round(bps)} bps`;\n}\n\n/** Seconds as \"m:ss\", or \"h:mm:ss\" from an hour up. Anything not finite reads as \"–\". */\nexport function clock(seconds: number): string {\n if (!Number.isFinite(seconds)) return '–';\n const total = Math.max(0, Math.floor(seconds));\n const hours = Math.floor(total / 3600);\n const minutes = Math.floor((total % 3600) / 60);\n const rest = total % 60;\n const pad = (n: number): string => (n < 10 ? `0${n}` : `${n}`);\n return hours > 0 ? `${hours}:${pad(minutes)}:${pad(rest)}` : `${minutes}:${pad(rest)}`;\n}\n\n/** A number with `digits` decimals, and \"–\" when it is not one. */\nexport function fixed(value: number | null | undefined, digits = 1): string {\n return value === null || value === undefined || !Number.isFinite(value)\n ? '–'\n : value.toFixed(digits);\n}\n\n/** A share as \"1.23%\", zero when there is no whole. */\nexport function share(part: number, whole: number): string {\n return whole > 0 ? `${((part / whole) * 100).toFixed(2)}%` : '0%';\n}\n\n/** Time ranges as \"0.0–12.3, 40.0–52.1\". */\nexport function ranges(\n list: ReadonlyArray<{ readonly start: number; readonly end: number }>,\n): string {\n return list.length === 0\n ? 'none'\n : list.map((range) => `${range.start.toFixed(1)}–${range.end.toFixed(1)}`).join(', ');\n}\n\n/** A rendition's name: its height, else its bitrate. */\nexport function rendition(\n r: { readonly height?: number; readonly bitrate: number } | null,\n): string {\n if (r === null) return '–';\n return r.height !== undefined ? `${r.height}p, ${bitrate(r.bitrate)}` : bitrate(r.bitrate);\n}\n"],"mappings":";;;AAGA,SAAgB,QAAQ,KAAqB;CAC3C,IAAI,CAAC,OAAO,SAAS,GAAG,KAAK,OAAO,GAAG,OAAO;CAC9C,IAAI,OAAO,KAAW,OAAO,IAAI,MAAM,IAAA,CAAW,QAAQ,OAAO,MAAa,IAAI,CAAC,EAAE;CACrF,IAAI,OAAO,KAAO,OAAO,GAAG,KAAK,MAAM,MAAM,GAAK,EAAE;CACpD,OAAO,GAAG,KAAK,MAAM,GAAG,EAAE;AAC5B;;AAGA,SAAgB,MAAM,SAAyB;CAC7C,IAAI,CAAC,OAAO,SAAS,OAAO,GAAG,OAAO;CACtC,MAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM,OAAO,CAAC;CAC7C,MAAM,QAAQ,KAAK,MAAM,QAAQ,IAAI;CACrC,MAAM,UAAU,KAAK,MAAO,QAAQ,OAAQ,EAAE;CAC9C,MAAM,OAAO,QAAQ;CACrB,MAAM,OAAO,MAAuB,IAAI,KAAK,IAAI,MAAM,GAAG;CAC1D,OAAO,QAAQ,IAAI,GAAG,MAAM,GAAG,IAAI,OAAO,EAAE,GAAG,IAAI,IAAI,MAAM,GAAG,QAAQ,GAAG,IAAI,IAAI;AACrF;;AAGA,SAAgB,MAAM,OAAkC,SAAS,GAAW;CAC1E,OAAO,UAAU,QAAQ,UAAU,KAAA,KAAa,CAAC,OAAO,SAAS,KAAK,IAClE,MACA,MAAM,QAAQ,MAAM;AAC1B;;AAGA,SAAgB,MAAM,MAAc,OAAuB;CACzD,OAAO,QAAQ,IAAI,IAAK,OAAO,QAAS,IAAA,CAAK,QAAQ,CAAC,EAAE,KAAK;AAC/D;;AAGA,SAAgB,OACd,MACQ;CACR,OAAO,KAAK,WAAW,IACnB,SACA,KAAK,KAAK,UAAU,GAAG,MAAM,MAAM,QAAQ,CAAC,EAAE,GAAG,MAAM,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI;AACxF;;AAGA,SAAgB,UACd,GACQ;CACR,IAAI,MAAM,MAAM,OAAO;CACvB,OAAO,EAAE,WAAW,KAAA,IAAY,GAAG,EAAE,OAAO,KAAK,QAAQ,EAAE,OAAO,MAAM,QAAQ,EAAE,OAAO;AAC3F"}
|
package/dist/host.js
CHANGED
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/host.ts
|
|
2
|
+
const PLAYER = "mattebox-player";
|
|
2
3
|
/** The parent, or the host of the shadow root `node` sits in, or null at the document. */
|
|
3
4
|
function above(node) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return node instanceof ShadowRoot ? node.host : null;
|
|
5
|
+
const parent = node.parentNode;
|
|
6
|
+
if (parent !== null) return parent;
|
|
7
|
+
return node instanceof ShadowRoot ? node.host : null;
|
|
8
8
|
}
|
|
9
9
|
/** The nearest player above `node`, or null outside one. It may not be upgraded yet. */
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return null;
|
|
10
|
+
function findPlayer(node) {
|
|
11
|
+
let current = node;
|
|
12
|
+
while (current !== null) {
|
|
13
|
+
if (current instanceof HTMLElement && current.localName === "mattebox-player") return current;
|
|
14
|
+
current = above(current);
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
18
17
|
}
|
|
19
18
|
/** Runs `fn` with the player once it is defined and upgraded, unless cancelled before. */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
void customElements.whenDefined(PLAYER).then(ready);
|
|
34
|
-
return () => {
|
|
35
|
-
waiting = false;
|
|
36
|
-
};
|
|
19
|
+
function whenPlayer(found, fn) {
|
|
20
|
+
let waiting = true;
|
|
21
|
+
const ready = () => {
|
|
22
|
+
if (!waiting) return;
|
|
23
|
+
waiting = false;
|
|
24
|
+
customElements.upgrade(found);
|
|
25
|
+
if ("video" in found) fn(found);
|
|
26
|
+
};
|
|
27
|
+
if ("video" in found) ready();
|
|
28
|
+
else customElements.whenDefined(PLAYER).then(ready);
|
|
29
|
+
return () => {
|
|
30
|
+
waiting = false;
|
|
31
|
+
};
|
|
37
32
|
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { PLAYER, findPlayer, whenPlayer };
|
|
35
|
+
|
|
38
36
|
//# sourceMappingURL=host.js.map
|
package/dist/host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.js","
|
|
1
|
+
{"version":3,"file":"host.js","names":[],"sources":["../src/host.ts"],"sourcesContent":["/**\n * The contract of a control of the page's own, as guide chapter 03 of the\n * player states it: the nearest <mattebox-player> above, through shadow\n * hosts, awaited until defined and upgraded, then read for `video`,\n * `engine`, `player` and `error`, with `sourcechange` and `error` heard on\n * it. This package implements the contract from outside, on purpose: the\n * player exports no base class, and a control that needs more than this\n * surface has found a gap in the player's API.\n */\nimport type { PlayerHost } from '@mattebox/player';\n\nexport type { PlayerHost };\n\n/** The core's error shape, as the player exposes it: taken from the host, so the core is not a dependency. */\nexport type PlayerError = NonNullable<PlayerHost['error']>;\n\nexport const PLAYER = 'mattebox-player';\n\n/** The parent, or the host of the shadow root `node` sits in, or null at the document. */\nfunction above(node: Node): Node | null {\n const parent = node.parentNode;\n if (parent !== null) return parent;\n return node instanceof ShadowRoot ? node.host : null;\n}\n\n/** The nearest player above `node`, or null outside one. It may not be upgraded yet. */\nexport function findPlayer(node: Node): HTMLElement | null {\n let current: Node | null = node;\n while (current !== null) {\n if (current instanceof HTMLElement && current.localName === PLAYER) return current;\n current = above(current);\n }\n return null;\n}\n\n/** Runs `fn` with the player once it is defined and upgraded, unless cancelled before. */\nexport function whenPlayer(found: HTMLElement, fn: (player: PlayerHost) => void): () => void {\n let waiting = true;\n const ready = (): void => {\n if (!waiting) return;\n waiting = false;\n customElements.upgrade(found);\n if ('video' in found) fn(found as PlayerHost);\n };\n if ('video' in found) ready();\n else void customElements.whenDefined(PLAYER).then(ready);\n return () => {\n waiting = false;\n };\n}\n"],"mappings":";AAgBA,MAAa,SAAS;;AAGtB,SAAS,MAAM,MAAyB;CACtC,MAAM,SAAS,KAAK;CACpB,IAAI,WAAW,MAAM,OAAO;CAC5B,OAAO,gBAAgB,aAAa,KAAK,OAAO;AAClD;;AAGA,SAAgB,WAAW,MAAgC;CACzD,IAAI,UAAuB;CAC3B,OAAO,YAAY,MAAM;EACvB,IAAI,mBAAmB,eAAe,QAAQ,cAAA,mBAAsB,OAAO;EAC3E,UAAU,MAAM,OAAO;CACzB;CACA,OAAO;AACT;;AAGA,SAAgB,WAAW,OAAoB,IAA8C;CAC3F,IAAI,UAAU;CACd,MAAM,cAAoB;EACxB,IAAI,CAAC,SAAS;EACd,UAAU;EACV,eAAe,QAAQ,KAAK;EAC5B,IAAI,WAAW,OAAO,GAAG,KAAmB;CAC9C;CACA,IAAI,WAAW,OAAO,MAAM;MACvB,eAAoB,YAAY,MAAM,CAAC,CAAC,KAAK,KAAK;CACvD,aAAa;EACX,UAAU;CACZ;AACF"}
|