@mattebox/player 0.11.0 → 0.13.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/announcer.d.ts +6 -3
- package/dist/announcer.d.ts.map +1 -1
- package/dist/announcer.js +17 -14
- package/dist/announcer.js.map +1 -1
- package/dist/cdn/mattebox-player.min.js +3 -3
- package/dist/controls/airplay.js +1 -2
- package/dist/controls/breaks.d.ts +24 -0
- package/dist/controls/breaks.d.ts.map +1 -0
- package/dist/controls/breaks.js +20 -0
- package/dist/controls/breaks.js.map +1 -0
- package/dist/controls/chapters.js +1 -2
- package/dist/controls/cues.js +1 -2
- package/dist/controls/fullscreen.js +1 -2
- package/dist/controls/icons.js +1 -2
- package/dist/controls/markers.d.ts +2 -15
- package/dist/controls/markers.d.ts.map +1 -1
- package/dist/controls/markers.js +1 -2
- package/dist/controls/markers.js.map +1 -1
- package/dist/controls/menu.js +1 -2
- package/dist/controls/native-tracks.js +1 -2
- package/dist/controls/pip.js +1 -2
- package/dist/controls/quality-names.js +1 -2
- package/dist/controls/ranges.js +1 -2
- package/dist/controls/session.js +1 -2
- package/dist/controls/slider.js +1 -2
- package/dist/controls/time.js +1 -2
- package/dist/controls/track-names.d.ts +3 -2
- package/dist/controls/track-names.d.ts.map +1 -1
- package/dist/controls/track-names.js +5 -5
- package/dist/controls/track-names.js.map +1 -1
- package/dist/dom.js +1 -2
- package/dist/element-entry.d.ts +4 -1
- package/dist/element-entry.d.ts.map +1 -1
- package/dist/element-entry.js +1 -2
- package/dist/element-entry.js.map +1 -1
- package/dist/element.d.ts +135 -6
- package/dist/element.d.ts.map +1 -1
- package/dist/element.js +300 -35
- package/dist/element.js.map +1 -1
- package/dist/elements/airplay-button.js +2 -3
- package/dist/elements/airplay-button.js.map +1 -1
- package/dist/elements/audio-menu.d.ts +3 -2
- package/dist/elements/audio-menu.d.ts.map +1 -1
- package/dist/elements/audio-menu.js +18 -12
- package/dist/elements/audio-menu.js.map +1 -1
- package/dist/elements/chapters-menu.d.ts +2 -1
- package/dist/elements/chapters-menu.d.ts.map +1 -1
- package/dist/elements/chapters-menu.js +2 -3
- package/dist/elements/chapters-menu.js.map +1 -1
- package/dist/elements/component.d.ts +9 -0
- package/dist/elements/component.d.ts.map +1 -1
- package/dist/elements/component.js +16 -2
- package/dist/elements/component.js.map +1 -1
- package/dist/elements/control-bar.js +1 -2
- package/dist/elements/current-time.js +1 -2
- package/dist/elements/drm-badge.js +4 -5
- package/dist/elements/drm-badge.js.map +1 -1
- package/dist/elements/duration.js +1 -2
- package/dist/elements/error-screen.d.ts +9 -0
- package/dist/elements/error-screen.d.ts.map +1 -1
- package/dist/elements/error-screen.js +54 -12
- package/dist/elements/error-screen.js.map +1 -1
- package/dist/elements/fullscreen-button.js +2 -3
- package/dist/elements/fullscreen-button.js.map +1 -1
- package/dist/elements/live-button.js +3 -4
- package/dist/elements/live-button.js.map +1 -1
- package/dist/elements/marker-button.d.ts +1 -0
- package/dist/elements/marker-button.d.ts.map +1 -1
- package/dist/elements/marker-button.js +18 -13
- package/dist/elements/marker-button.js.map +1 -1
- package/dist/elements/menu-element.d.ts +3 -2
- package/dist/elements/menu-element.d.ts.map +1 -1
- package/dist/elements/menu-element.js +3 -4
- package/dist/elements/menu-element.js.map +1 -1
- package/dist/elements/mute-button.js +2 -3
- package/dist/elements/mute-button.js.map +1 -1
- package/dist/elements/pip-button.js +2 -3
- package/dist/elements/pip-button.js.map +1 -1
- package/dist/elements/play-button.js +2 -3
- package/dist/elements/play-button.js.map +1 -1
- package/dist/elements/quality-menu.d.ts +2 -1
- package/dist/elements/quality-menu.d.ts.map +1 -1
- package/dist/elements/quality-menu.js +3 -4
- package/dist/elements/quality-menu.js.map +1 -1
- package/dist/elements/remaining-time.js +1 -2
- package/dist/elements/scan-button.d.ts.map +1 -1
- package/dist/elements/scan-button.js +2 -3
- package/dist/elements/scan-button.js.map +1 -1
- package/dist/elements/seek-bar.d.ts +6 -0
- package/dist/elements/seek-bar.d.ts.map +1 -1
- package/dist/elements/seek-bar.js +29 -10
- package/dist/elements/seek-bar.js.map +1 -1
- package/dist/elements/shared.js +1 -2
- package/dist/elements/skip-button.d.ts.map +1 -1
- package/dist/elements/skip-button.js +2 -3
- package/dist/elements/skip-button.js.map +1 -1
- package/dist/elements/spacer.js +1 -2
- package/dist/elements/speed-menu.d.ts +2 -1
- package/dist/elements/speed-menu.d.ts.map +1 -1
- package/dist/elements/speed-menu.js +3 -4
- package/dist/elements/speed-menu.js.map +1 -1
- package/dist/elements/spinner.d.ts +1 -1
- package/dist/elements/spinner.js +2 -4
- package/dist/elements/spinner.js.map +1 -1
- package/dist/elements/start-button.d.ts.map +1 -1
- package/dist/elements/start-button.js +2 -4
- package/dist/elements/start-button.js.map +1 -1
- package/dist/elements/subtitles-menu.d.ts +2 -1
- package/dist/elements/subtitles-menu.d.ts.map +1 -1
- package/dist/elements/subtitles-menu.js +51 -22
- package/dist/elements/subtitles-menu.js.map +1 -1
- package/dist/elements/time-element.js +1 -2
- package/dist/elements/title.d.ts.map +1 -1
- package/dist/elements/title.js +11 -5
- package/dist/elements/title.js.map +1 -1
- package/dist/elements/video-menu.d.ts +2 -1
- package/dist/elements/video-menu.d.ts.map +1 -1
- package/dist/elements/video-menu.js +12 -12
- package/dist/elements/video-menu.js.map +1 -1
- package/dist/elements/volume-slider.js +2 -3
- package/dist/elements/volume-slider.js.map +1 -1
- package/dist/elements/volume.js +1 -2
- package/dist/entries/airplay-button.js +1 -2
- package/dist/entries/audio-menu.js +1 -2
- package/dist/entries/chapters-menu.js +1 -2
- package/dist/entries/control-bar.js +1 -2
- package/dist/entries/current-time.js +1 -2
- package/dist/entries/drm-badge.js +1 -2
- package/dist/entries/duration.js +1 -2
- package/dist/entries/error-screen.js +1 -2
- package/dist/entries/fullscreen-button.js +1 -2
- package/dist/entries/live-button.js +1 -2
- package/dist/entries/marker-button.js +1 -2
- package/dist/entries/mute-button.js +1 -2
- package/dist/entries/pip-button.js +1 -2
- package/dist/entries/play-button.js +1 -2
- package/dist/entries/quality-menu.js +1 -2
- package/dist/entries/remaining-time.js +1 -2
- package/dist/entries/scan-button.js +1 -2
- package/dist/entries/seek-bar.js +1 -2
- package/dist/entries/skip-button.js +1 -2
- package/dist/entries/spacer.js +1 -2
- package/dist/entries/speed-menu.js +1 -2
- package/dist/entries/spinner.js +1 -2
- package/dist/entries/start-button.js +1 -2
- package/dist/entries/subtitles-menu.js +1 -2
- package/dist/entries/title.js +1 -2
- package/dist/entries/video-menu.js +1 -2
- package/dist/entries/volume-slider.js +1 -2
- package/dist/entries/volume.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/asyncToGenerator.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/defineProperty.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/objectSpread2.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPrimitive.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPropertyKey.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/typeof.js +1 -2
- package/dist/es2015/announcer.js +18 -15
- package/dist/es2015/controls/airplay.js +1 -2
- package/dist/es2015/controls/breaks.js +18 -0
- package/dist/es2015/controls/chapters.js +2 -3
- package/dist/es2015/controls/cues.js +1 -2
- package/dist/es2015/controls/fullscreen.js +1 -2
- package/dist/es2015/controls/icons.js +1 -2
- package/dist/es2015/controls/markers.js +1 -2
- package/dist/es2015/controls/menu.js +2 -3
- package/dist/es2015/controls/native-tracks.js +1 -2
- package/dist/es2015/controls/pip.js +1 -2
- package/dist/es2015/controls/quality-names.js +1 -2
- package/dist/es2015/controls/ranges.js +1 -2
- package/dist/es2015/controls/session.js +1 -2
- package/dist/es2015/controls/slider.js +1 -2
- package/dist/es2015/controls/time.js +1 -2
- package/dist/es2015/controls/track-names.js +5 -5
- package/dist/es2015/dom.js +1 -2
- package/dist/es2015/element-entry.js +1 -2
- package/dist/es2015/element.js +378 -94
- package/dist/es2015/elements/airplay-button.js +2 -4
- package/dist/es2015/elements/audio-menu.js +18 -16
- package/dist/es2015/elements/chapters-menu.js +2 -3
- package/dist/es2015/elements/component.js +18 -2
- package/dist/es2015/elements/control-bar.js +1 -2
- package/dist/es2015/elements/current-time.js +1 -2
- package/dist/es2015/elements/drm-badge.js +5 -7
- package/dist/es2015/elements/duration.js +1 -2
- package/dist/es2015/elements/error-screen.js +56 -13
- package/dist/es2015/elements/fullscreen-button.js +2 -4
- package/dist/es2015/elements/live-button.js +3 -5
- package/dist/es2015/elements/marker-button.js +19 -14
- package/dist/es2015/elements/menu-element.js +3 -8
- package/dist/es2015/elements/mute-button.js +3 -4
- package/dist/es2015/elements/pip-button.js +2 -4
- package/dist/es2015/elements/play-button.js +2 -4
- package/dist/es2015/elements/quality-menu.js +4 -5
- package/dist/es2015/elements/remaining-time.js +1 -2
- package/dist/es2015/elements/scan-button.js +3 -4
- package/dist/es2015/elements/seek-bar.js +36 -17
- package/dist/es2015/elements/shared.js +1 -2
- package/dist/es2015/elements/skip-button.js +2 -4
- package/dist/es2015/elements/spacer.js +1 -2
- package/dist/es2015/elements/speed-menu.js +4 -5
- package/dist/es2015/elements/spinner.js +2 -5
- package/dist/es2015/elements/start-button.js +3 -5
- package/dist/es2015/elements/subtitles-menu.js +53 -31
- package/dist/es2015/elements/time-element.js +1 -2
- package/dist/es2015/elements/title.js +12 -6
- package/dist/es2015/elements/video-menu.js +12 -12
- package/dist/es2015/elements/volume-slider.js +3 -4
- package/dist/es2015/elements/volume.js +1 -2
- package/dist/es2015/entries/airplay-button.js +1 -2
- package/dist/es2015/entries/audio-menu.js +1 -2
- package/dist/es2015/entries/chapters-menu.js +1 -2
- package/dist/es2015/entries/control-bar.js +1 -2
- package/dist/es2015/entries/current-time.js +1 -2
- package/dist/es2015/entries/drm-badge.js +1 -2
- package/dist/es2015/entries/duration.js +1 -2
- package/dist/es2015/entries/error-screen.js +1 -2
- package/dist/es2015/entries/fullscreen-button.js +1 -2
- package/dist/es2015/entries/live-button.js +1 -2
- package/dist/es2015/entries/marker-button.js +1 -2
- package/dist/es2015/entries/mute-button.js +1 -2
- package/dist/es2015/entries/pip-button.js +1 -2
- package/dist/es2015/entries/play-button.js +1 -2
- package/dist/es2015/entries/quality-menu.js +1 -2
- package/dist/es2015/entries/remaining-time.js +1 -2
- package/dist/es2015/entries/scan-button.js +1 -2
- package/dist/es2015/entries/seek-bar.js +1 -2
- package/dist/es2015/entries/skip-button.js +1 -2
- package/dist/es2015/entries/spacer.js +1 -2
- package/dist/es2015/entries/speed-menu.js +1 -2
- package/dist/es2015/entries/spinner.js +1 -2
- package/dist/es2015/entries/start-button.js +1 -2
- package/dist/es2015/entries/subtitles-menu.js +1 -2
- package/dist/es2015/entries/title.js +1 -2
- package/dist/es2015/entries/video-menu.js +1 -2
- package/dist/es2015/entries/volume-slider.js +1 -2
- package/dist/es2015/entries/volume.js +1 -2
- package/dist/es2015/host.js +1 -2
- package/dist/es2015/ids.js +33 -0
- package/dist/es2015/index.js +2 -1
- package/dist/es2015/labels.js +1 -2
- package/dist/es2015/locales/ar.js +75 -0
- package/dist/es2015/locales/ca.js +75 -0
- package/dist/es2015/locales/de.js +75 -0
- package/dist/es2015/locales/es.js +75 -0
- package/dist/es2015/locales/fr.js +75 -0
- package/dist/es2015/locales/hi.js +75 -0
- package/dist/es2015/locales/it.js +75 -0
- package/dist/es2015/locales/ja.js +75 -0
- package/dist/es2015/locales/ko.js +75 -0
- package/dist/es2015/locales/pt.js +75 -0
- package/dist/es2015/locales/zh.js +75 -0
- package/dist/es2015/locales.js +61 -0
- package/dist/es2015/namespaces.js +1 -2
- package/dist/es2015/presets.js +2 -3
- package/dist/es2015/style.js +1 -2
- package/dist/es2015/surface.js +12 -4
- package/dist/es2015/tags.js +1 -2
- package/dist/es2015/text.js +15 -0
- package/dist/es2015/trackers.js +43 -0
- package/dist/es2015/video-sources.js +2 -3
- package/dist/host.d.ts +71 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +1 -2
- package/dist/host.js.map +1 -1
- package/dist/ids.d.ts +19 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +34 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/labels.js +1 -2
- package/dist/locales/ar.d.ts +75 -0
- package/dist/locales/ar.d.ts.map +1 -0
- package/dist/locales/ar.js +77 -0
- package/dist/locales/ar.js.map +1 -0
- package/dist/locales/ca.d.ts +75 -0
- package/dist/locales/ca.d.ts.map +1 -0
- package/dist/locales/ca.js +77 -0
- package/dist/locales/ca.js.map +1 -0
- package/dist/locales/de.d.ts +75 -0
- package/dist/locales/de.d.ts.map +1 -0
- package/dist/locales/de.js +77 -0
- package/dist/locales/de.js.map +1 -0
- package/dist/locales/es.d.ts +75 -0
- package/dist/locales/es.d.ts.map +1 -0
- package/dist/locales/es.js +77 -0
- package/dist/locales/es.js.map +1 -0
- package/dist/locales/fr.d.ts +75 -0
- package/dist/locales/fr.d.ts.map +1 -0
- package/dist/locales/fr.js +77 -0
- package/dist/locales/fr.js.map +1 -0
- package/dist/locales/hi.d.ts +75 -0
- package/dist/locales/hi.d.ts.map +1 -0
- package/dist/locales/hi.js +77 -0
- package/dist/locales/hi.js.map +1 -0
- package/dist/locales/it.d.ts +75 -0
- package/dist/locales/it.d.ts.map +1 -0
- package/dist/locales/it.js +77 -0
- package/dist/locales/it.js.map +1 -0
- package/dist/locales/ja.d.ts +75 -0
- package/dist/locales/ja.d.ts.map +1 -0
- package/dist/locales/ja.js +77 -0
- package/dist/locales/ja.js.map +1 -0
- package/dist/locales/ko.d.ts +75 -0
- package/dist/locales/ko.d.ts.map +1 -0
- package/dist/locales/ko.js +77 -0
- package/dist/locales/ko.js.map +1 -0
- package/dist/locales/pt.d.ts +75 -0
- package/dist/locales/pt.d.ts.map +1 -0
- package/dist/locales/pt.js +77 -0
- package/dist/locales/pt.js.map +1 -0
- package/dist/locales/zh.d.ts +75 -0
- package/dist/locales/zh.d.ts.map +1 -0
- package/dist/locales/zh.js +77 -0
- package/dist/locales/zh.js.map +1 -0
- package/dist/locales.d.ts +27 -0
- package/dist/locales.d.ts.map +1 -0
- package/dist/locales.js +48 -0
- package/dist/locales.js.map +1 -0
- package/dist/messages.d.ts +167 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/namespaces.js +1 -2
- package/dist/presets.js +1 -2
- package/dist/style.js +1 -2
- package/dist/surface.d.ts +4 -1
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +12 -4
- package/dist/surface.js.map +1 -1
- package/dist/tags.js +1 -2
- package/dist/text.d.ts +14 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +16 -0
- package/dist/text.js.map +1 -0
- package/dist/trackers.d.ts +18 -0
- package/dist/trackers.d.ts.map +1 -0
- package/dist/trackers.js +45 -0
- package/dist/trackers.js.map +1 -0
- package/dist/video-sources.js +1 -2
- package/package.json +11 -3
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// src/locales/zh.ts
|
|
2
|
+
var zh_default = {
|
|
3
|
+
play: "播放",
|
|
4
|
+
pause: "暂停",
|
|
5
|
+
replay: "重新播放",
|
|
6
|
+
mute: "静音",
|
|
7
|
+
unmute: "取消静音",
|
|
8
|
+
volume: "音量",
|
|
9
|
+
seek: "进度",
|
|
10
|
+
seekOf: "{current} / {duration}",
|
|
11
|
+
behindLive: "落后直播 {time}",
|
|
12
|
+
blocked: "不可用",
|
|
13
|
+
goLive: "跳到直播",
|
|
14
|
+
atLiveEdge: "正在直播",
|
|
15
|
+
live: "直播",
|
|
16
|
+
rewind: "快退",
|
|
17
|
+
fastForward: "快进",
|
|
18
|
+
skipBack: "后退 {seconds} 秒",
|
|
19
|
+
skipForward: "前进 {seconds} 秒",
|
|
20
|
+
enterFullscreen: "全屏",
|
|
21
|
+
exitFullscreen: "退出全屏",
|
|
22
|
+
enterPip: "画中画",
|
|
23
|
+
exitPip: "退出画中画",
|
|
24
|
+
airplay: "AirPlay",
|
|
25
|
+
stopAirplay: "停止 AirPlay",
|
|
26
|
+
loading: "加载中",
|
|
27
|
+
playbackFailed: "播放失败",
|
|
28
|
+
retry: "重试",
|
|
29
|
+
menuBack: "从{page}返回",
|
|
30
|
+
speed: "播放速度",
|
|
31
|
+
speedNormal: "正常",
|
|
32
|
+
chapters: "章节",
|
|
33
|
+
quality: "画质",
|
|
34
|
+
qualityAuto: "自动",
|
|
35
|
+
audio: "音轨",
|
|
36
|
+
original: "原声",
|
|
37
|
+
audioDescription: "AD",
|
|
38
|
+
mono: "单声道",
|
|
39
|
+
stereo: "立体声",
|
|
40
|
+
track: "字幕轨",
|
|
41
|
+
subtitles: "字幕",
|
|
42
|
+
subtitlesOff: "关闭",
|
|
43
|
+
sdh: "SDH",
|
|
44
|
+
closedCaptions: "CC",
|
|
45
|
+
subtitleSettings: "设置",
|
|
46
|
+
subtitleSize: "字号",
|
|
47
|
+
sizeSmall: "小",
|
|
48
|
+
sizeMedium: "中",
|
|
49
|
+
sizeLarge: "大",
|
|
50
|
+
sizeExtraLarge: "特大",
|
|
51
|
+
subtitleBackground: "背景",
|
|
52
|
+
backgroundNone: "无",
|
|
53
|
+
backgroundDark: "深色",
|
|
54
|
+
backgroundSolid: "实色",
|
|
55
|
+
video: "视频",
|
|
56
|
+
videoMain: "主画面",
|
|
57
|
+
videoAlternative: "其他版本",
|
|
58
|
+
videoSign: "手语",
|
|
59
|
+
videoCaptions: "听障字幕",
|
|
60
|
+
videoSubtitles: "带字幕",
|
|
61
|
+
videoCommentary: "解说",
|
|
62
|
+
skip: "跳过",
|
|
63
|
+
skipIntro: "跳过片头",
|
|
64
|
+
skipCredits: "跳过片尾",
|
|
65
|
+
drmProtected: "由 {system} 保护,{keys}",
|
|
66
|
+
drmNoKey: "尚无密钥",
|
|
67
|
+
drmKey: "{count} 个密钥:{statuses}",
|
|
68
|
+
drmKeys: "{count} 个密钥:{statuses}",
|
|
69
|
+
saidPlaying: "正在播放",
|
|
70
|
+
saidPaused: "已暂停",
|
|
71
|
+
saidAudio: "音频:{track}",
|
|
72
|
+
saidSubtitles: "字幕:{track}",
|
|
73
|
+
saidSubtitlesOff: "字幕已关闭"
|
|
74
|
+
};
|
|
75
|
+
export { zh_default as default };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/asyncToGenerator.js";
|
|
2
|
+
// src/locales.ts
|
|
3
|
+
/** By lowercase language tag. A loaded set takes its loader's place. */
|
|
4
|
+
const registry = /* @__PURE__ */ new Map();
|
|
5
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
6
|
+
function addLocale(language, sources) {
|
|
7
|
+
var _registry$get;
|
|
8
|
+
const key = language.toLowerCase();
|
|
9
|
+
registry.set(key, [...(_registry$get = registry.get(key)) !== null && _registry$get !== void 0 ? _registry$get : [], ...sources]);
|
|
10
|
+
for (const listener of listeners) listener();
|
|
11
|
+
}
|
|
12
|
+
/** Calls `fn` on every registration, until the returned function runs. */
|
|
13
|
+
function onLocales(fn) {
|
|
14
|
+
listeners.add(fn);
|
|
15
|
+
return () => {
|
|
16
|
+
listeners.delete(fn);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The registered key for a language tag: the tag, else its language
|
|
21
|
+
* alone, so `de-CH` falls back to `de` (BCP 47 lookup, RFC 4647 §3.4).
|
|
22
|
+
* Null when neither is registered, and English then comes from the
|
|
23
|
+
* controls themselves.
|
|
24
|
+
*/
|
|
25
|
+
function registered(tag) {
|
|
26
|
+
const key = tag.toLowerCase();
|
|
27
|
+
if (registry.has(key)) return key;
|
|
28
|
+
const base = key.split("-")[0];
|
|
29
|
+
return registry.has(base) ? base : null;
|
|
30
|
+
}
|
|
31
|
+
/** The merged words of `key` now, or null while a loader of it has not run. */
|
|
32
|
+
function wordsNow(key) {
|
|
33
|
+
var _registry$get2;
|
|
34
|
+
const sources = (_registry$get2 = registry.get(key)) !== null && _registry$get2 !== void 0 ? _registry$get2 : [];
|
|
35
|
+
if (sources.some((source) => typeof source === "function")) return null;
|
|
36
|
+
return Object.assign({}, ...sources);
|
|
37
|
+
}
|
|
38
|
+
/** Runs the loaders of `key` once, keeps what they load, and answers the merged words. */
|
|
39
|
+
function load(_x2) {
|
|
40
|
+
return _load.apply(this, arguments);
|
|
41
|
+
}
|
|
42
|
+
function _load() {
|
|
43
|
+
_load = _asyncToGenerator(function* (key) {
|
|
44
|
+
var _registry$get3, _registry$get4, _wordsNow;
|
|
45
|
+
const sources = (_registry$get3 = registry.get(key)) !== null && _registry$get3 !== void 0 ? _registry$get3 : [];
|
|
46
|
+
const loaded = yield Promise.all(sources.map(function() {
|
|
47
|
+
var _ref = _asyncToGenerator(function* (source) {
|
|
48
|
+
if (typeof source !== "function") return source;
|
|
49
|
+
const module = yield source();
|
|
50
|
+
return "default" in module ? module.default : module;
|
|
51
|
+
});
|
|
52
|
+
return function(_x) {
|
|
53
|
+
return _ref.apply(this, arguments);
|
|
54
|
+
};
|
|
55
|
+
}()));
|
|
56
|
+
registry.set(key, [...loaded, ...((_registry$get4 = registry.get(key)) !== null && _registry$get4 !== void 0 ? _registry$get4 : []).slice(sources.length)]);
|
|
57
|
+
return (_wordsNow = wordsNow(key)) !== null && _wordsNow !== void 0 ? _wordsNow : Object.assign({}, ...loaded);
|
|
58
|
+
});
|
|
59
|
+
return _load.apply(this, arguments);
|
|
60
|
+
}
|
|
61
|
+
export { addLocale, load, onLocales, registered, wordsNow };
|
package/dist/es2015/presets.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
|
|
1
|
+
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/asyncToGenerator.js";
|
|
2
|
+
// src/presets.ts
|
|
3
3
|
/** eme-core's teardown calls `element.setMediaKeys(null)` unguarded, so a build without EME throws out of `detach`. */
|
|
4
4
|
const DRM_STAGES = [
|
|
5
5
|
"eme-core",
|
|
@@ -42,5 +42,4 @@ function _resolvePreset() {
|
|
|
42
42
|
function drmGuard() {
|
|
43
43
|
return "setMediaKeys" in HTMLMediaElement.prototype ? {} : { without: DRM_STAGES };
|
|
44
44
|
}
|
|
45
|
-
//#endregion
|
|
46
45
|
export { drmGuard, resolvePreset };
|
package/dist/es2015/style.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
const STYLE = ":host{--mbx-surface:#1c1c20;--mbx-text:#f3ede4;--mbx-muted:#aaa49a;--mbx-accent:#e0543c;--mbx-error:#ffb4ab;--mbx-live:#ff4d4d;--mbx-radius:.25em;--mbx-gap:.625em;--mbx-pad:.5em;--mbx-font:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;background:#000;outline:none;font-size:16px;display:block;position:relative}:host([hidden]){display:none}[part~=stage]{flex-direction:column;justify-content:center;height:100%;display:flex;position:relative}::slotted(video){object-fit:contain;width:100%;min-height:0;max-height:100%;display:block}::slotted(source){display:none}@supports (aspect-ratio:1){::slotted(video){aspect-ratio:auto 16/9}}:host([casting]) ::slotted(mbx-control-bar),:host([casting]) ::slotted(mbx-start-button),:host([ended]) ::slotted(mbx-marker-button),:host([controls=none]) ::slotted(:not(video)){display:none}:host(:focus) [part~=stage]{outline:2px solid var(--mbx-accent);outline-offset:-2px}:host(:focus:not(:focus-visible)) [part~=stage]{outline:none}[part~=error]{padding:calc(var(--mbx-pad) - var(--mbx-gap) / 2);background:var(--mbx-surface);color:var(--mbx-error);font:400 .8125em / 1.4 var(--mbx-font);flex-wrap:wrap;align-items:center;display:flex}:host(:fullscreen) ::slotted(video){flex:1}:host(:fullscreen) [part~=error]{position:absolute;bottom:0;left:0;right:0}:host(:-webkit-full-screen) ::slotted(video){flex:1}:host(:-webkit-full-screen) [part~=error]{position:absolute;bottom:0;left:0;right:0}[part~=error]>*{margin:calc(var(--mbx-gap) / 2)}[part~=value]{color:var(--mbx-accent)}[part~=announcer]{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}[part~=button]{font:inherit;color:inherit;border-radius:var(--mbx-radius);background:0 0;border:1px solid;padding:.125em .375em}[hidden]{display:none}:host([tooltips=off]){--mbx-tooltip:none}:host([layout=wide]){font-size:20px}";
|
|
2
|
-
//#endregion
|
|
1
|
+
const STYLE = ":host{--mbx-surface:#1c1c20;--mbx-text:#f3ede4;--mbx-muted:#aaa49a;--mbx-accent:#e0543c;--mbx-error:#ffb4ab;--mbx-live:#ff4d4d;--mbx-radius:.25em;--mbx-gap:.625em;--mbx-pad:.5em;--mbx-font:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;background:#000;outline:none;font-size:16px;display:block;position:relative}:host([hidden]){display:none}[part~=stage]{flex-direction:column;justify-content:center;height:100%;display:flex;position:relative}::slotted(video){object-fit:contain;width:100%;min-height:0;max-height:100%;display:block}::slotted(source){display:none}@supports (aspect-ratio:1){::slotted(video){aspect-ratio:auto 16/9}}:host([casting]) ::slotted(mbx-control-bar),:host([casting]) ::slotted(mbx-start-button),:host([ended]) ::slotted(mbx-marker-button),:host([error]:not([diagnostics])) ::slotted(:not(video):not(mbx-error-screen):not(mbx-diagnostics)),:host([blocked]:not([diagnostics])) ::slotted(:not(video):not(mbx-error-screen):not(mbx-diagnostics)),:host([controls=none]) ::slotted(:not(video)){display:none}:host(:focus) [part~=stage]{outline:2px solid var(--mbx-accent);outline-offset:-2px}:host(:focus:not(:focus-visible)) [part~=stage]{outline:none}[part~=error]{padding:calc(var(--mbx-pad) - var(--mbx-gap) / 2);background:var(--mbx-surface);color:var(--mbx-error);font:400 .8125em / 1.4 var(--mbx-font);flex-wrap:wrap;align-items:center;display:flex}:host(:fullscreen) ::slotted(video){flex:1}:host(:fullscreen) [part~=error]{position:absolute;bottom:0;left:0;right:0}:host(:-webkit-full-screen) ::slotted(video){flex:1}:host(:-webkit-full-screen) [part~=error]{position:absolute;bottom:0;left:0;right:0}[part~=error]>*{margin:calc(var(--mbx-gap) / 2)}[part~=value]{color:var(--mbx-accent)}[part~=announcer]{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}[part~=button]{font:inherit;color:inherit;border-radius:var(--mbx-radius);background:0 0;border:1px solid;padding:.125em .375em}[hidden]{display:none}:host([tooltips=off]){--mbx-tooltip:none}:host([layout=wide]){font-size:20px}";
|
|
3
2
|
export { STYLE };
|
package/dist/es2015/surface.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { el } from "./dom.js";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
// src/surface.ts
|
|
3
|
+
/** `word` names the retry, in the player's language at the time of the error. */
|
|
4
|
+
function errorSurface(retry, word) {
|
|
4
5
|
const root = el("div", "error");
|
|
5
6
|
const category = el("span", "value error-category");
|
|
6
7
|
const code = el("span", "value error-code");
|
|
7
|
-
const button = el("button", "button error-retry"
|
|
8
|
+
const button = el("button", "button error-retry");
|
|
8
9
|
button.type = "button";
|
|
9
10
|
button.addEventListener("click", retry);
|
|
10
11
|
root.append(category, code, button);
|
|
@@ -14,6 +15,14 @@ function errorSurface(retry) {
|
|
|
14
15
|
show(error) {
|
|
15
16
|
category.textContent = error.category;
|
|
16
17
|
code.textContent = error.code;
|
|
18
|
+
button.textContent = word();
|
|
19
|
+
button.hidden = false;
|
|
20
|
+
root.hidden = false;
|
|
21
|
+
},
|
|
22
|
+
inform(title, message) {
|
|
23
|
+
category.textContent = title;
|
|
24
|
+
code.textContent = message;
|
|
25
|
+
button.hidden = true;
|
|
17
26
|
root.hidden = false;
|
|
18
27
|
},
|
|
19
28
|
clear() {
|
|
@@ -21,5 +30,4 @@ function errorSurface(retry) {
|
|
|
21
30
|
}
|
|
22
31
|
};
|
|
23
32
|
}
|
|
24
|
-
//#endregion
|
|
25
33
|
export { errorSurface };
|
package/dist/es2015/tags.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/tags.ts
|
|
2
2
|
/** The tag names, in one place, so the composition and the lookup agree with the registration. */
|
|
3
3
|
const PLAYER = "mattebox-player";
|
|
4
4
|
const CONTROL_BAR = "mbx-control-bar";
|
|
@@ -29,5 +29,4 @@ const SUBTITLES_MENU = "mbx-subtitles-menu";
|
|
|
29
29
|
const DRM_BADGE = "mbx-drm-badge";
|
|
30
30
|
const VOLUME = "mbx-volume";
|
|
31
31
|
const CHAPTERS_MENU = "mbx-chapters-menu";
|
|
32
|
-
//#endregion
|
|
33
32
|
export { AIRPLAY_BUTTON, AUDIO_MENU, CHAPTERS_MENU, CONTROL_BAR, CURRENT_TIME, DRM_BADGE, DURATION, ERROR_SCREEN, FULLSCREEN_BUTTON, LIVE_BUTTON, MARKER_BUTTON, MUTE_BUTTON, PIP_BUTTON, PLAYER, PLAY_BUTTON, QUALITY_MENU, REMAINING_TIME, SCAN_BUTTON, SEEK_BAR, SKIP_BUTTON, SPACER, SPEED_MENU, SPINNER, START_BUTTON, SUBTITLES_MENU, TITLE, VIDEO_MENU, VOLUME, VOLUME_SLIDER };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/text.ts
|
|
2
|
+
/**
|
|
3
|
+
* The words of `text` for `locale`: the tag, then its language alone, so
|
|
4
|
+
* `de-CH` falls back to `de` (BCP 47 lookup, RFC 4647 §3.4), then English,
|
|
5
|
+
* then the first entry. Tags compare without case.
|
|
6
|
+
*/
|
|
7
|
+
function textIn(text, locale) {
|
|
8
|
+
var _ref, _ref2, _ref3, _tags$get;
|
|
9
|
+
if (typeof text === "string") return text;
|
|
10
|
+
const tags = /* @__PURE__ */ new Map();
|
|
11
|
+
for (const tag of Object.keys(text)) tags.set(tag.toLowerCase(), text[tag]);
|
|
12
|
+
const key = locale.toLowerCase();
|
|
13
|
+
return (_ref = (_ref2 = (_ref3 = (_tags$get = tags.get(key)) !== null && _tags$get !== void 0 ? _tags$get : tags.get(key.split("-")[0])) !== null && _ref3 !== void 0 ? _ref3 : tags.get("en")) !== null && _ref2 !== void 0 ? _ref2 : tags.values().next().value) !== null && _ref !== void 0 ? _ref : "";
|
|
14
|
+
}
|
|
15
|
+
export { textIn };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// src/trackers.ts
|
|
2
|
+
/** Runs `fn`, and throws its error on a task of its own: one tracker's bug stops neither playback nor the others. */
|
|
3
|
+
function guard(fn) {
|
|
4
|
+
try {
|
|
5
|
+
fn();
|
|
6
|
+
} catch (error) {
|
|
7
|
+
setTimeout(() => {
|
|
8
|
+
throw error;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** The trackers of `host`. `changed` runs after each start, stop, addition and removal. */
|
|
13
|
+
function createTrackers(host, changed) {
|
|
14
|
+
const set = /* @__PURE__ */ new Set();
|
|
15
|
+
let current = null;
|
|
16
|
+
return {
|
|
17
|
+
add(tracker) {
|
|
18
|
+
if (set.has(tracker)) return;
|
|
19
|
+
set.add(tracker);
|
|
20
|
+
const programme = current;
|
|
21
|
+
if (programme !== null) guard(() => tracker.start(programme, host));
|
|
22
|
+
changed();
|
|
23
|
+
},
|
|
24
|
+
delete(tracker) {
|
|
25
|
+
if (!set.delete(tracker)) return false;
|
|
26
|
+
if (current !== null) guard(() => tracker.stop());
|
|
27
|
+
changed();
|
|
28
|
+
return true;
|
|
29
|
+
},
|
|
30
|
+
has: (tracker) => set.has(tracker),
|
|
31
|
+
get list() {
|
|
32
|
+
return [...set];
|
|
33
|
+
},
|
|
34
|
+
begin(programme) {
|
|
35
|
+
if (current === null && programme === null) return;
|
|
36
|
+
if (current !== null) for (const tracker of set) guard(() => tracker.stop());
|
|
37
|
+
current = programme;
|
|
38
|
+
if (programme !== null) for (const tracker of set) guard(() => tracker.start(programme, host));
|
|
39
|
+
changed();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export { createTrackers };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _objectSpread2 from "./_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "./_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { isAudioDescription, isSdh } from "mattebox";
|
|
3
|
-
|
|
3
|
+
// src/video-sources.ts
|
|
4
4
|
/** The child element that declares a version in markup, as `<track>` declares text. */
|
|
5
5
|
const VIDEO_TRACK = "mbx-video-track";
|
|
6
6
|
/** The versions the `<mbx-video-track>` children of `element` declare, in their order. */
|
|
@@ -124,5 +124,4 @@ function onNextFrame(media, at, release) {
|
|
|
124
124
|
};
|
|
125
125
|
for (const type of events) media.addEventListener(type, done);
|
|
126
126
|
}
|
|
127
|
-
//#endregion
|
|
128
127
|
export { VIDEO_TRACK, chosen, holdFrame, markupVideoTracks, onNextFrame, restore, resume, versionSource };
|
package/dist/host.d.ts
CHANGED
|
@@ -8,17 +8,51 @@
|
|
|
8
8
|
* This is the whole surface a control gets. A control that needs more
|
|
9
9
|
* has found a gap in the player's public API, and the gap is the bug.
|
|
10
10
|
*/
|
|
11
|
-
import type { Player, PlayerError, Source, SourceVideoTrack } from '@mattebox/player-core';
|
|
12
|
-
import type { Mattebox } from 'mattebox';
|
|
11
|
+
import type { Block, Player, PlayerError, Programme, ProgrammeSource, Source, SourceVideoTrack } from '@mattebox/player-core';
|
|
12
|
+
import type { Mattebox, Stage } from 'mattebox';
|
|
13
|
+
import type { BreakMarks } from './controls/breaks.js';
|
|
13
14
|
import type { Markers } from './controls/markers.js';
|
|
15
|
+
import type { Messages } from './messages.js';
|
|
16
|
+
export type { Block };
|
|
17
|
+
export interface Tracker {
|
|
18
|
+
/** What the diagnostics panel calls it. */
|
|
19
|
+
readonly name: string;
|
|
20
|
+
/** The id of the tracker's current session, which the diagnostics panel shows for support. */
|
|
21
|
+
readonly session?: string | undefined;
|
|
22
|
+
/** The id of the device the tracker reports, which the diagnostics panel shows too. */
|
|
23
|
+
readonly device?: string | undefined;
|
|
24
|
+
/** At the start of each programme, or at once when added during one. */
|
|
25
|
+
start(programme: Programme, player: PlayerHost): void;
|
|
26
|
+
/** At the end of the programme, at unload, or when removed during one. */
|
|
27
|
+
stop(): void;
|
|
28
|
+
}
|
|
29
|
+
export interface Trackers {
|
|
30
|
+
/** Adds a tracker; during a programme, it starts at once. */
|
|
31
|
+
add(tracker: Tracker): void;
|
|
32
|
+
/** Removes a tracker; during a programme, it stops at once. False when it was not there. */
|
|
33
|
+
delete(tracker: Tracker): boolean;
|
|
34
|
+
has(tracker: Tracker): boolean;
|
|
35
|
+
/** The trackers, in the order they were added. */
|
|
36
|
+
readonly list: readonly Tracker[];
|
|
37
|
+
}
|
|
14
38
|
export interface PlayerHost extends HTMLElement {
|
|
15
39
|
readonly video: HTMLVideoElement;
|
|
16
40
|
readonly engine: Mattebox | null;
|
|
17
41
|
readonly player: Player | null;
|
|
18
42
|
/** The fatal error of the current load, or null: a control attached after the event still sees it. */
|
|
19
43
|
readonly error: PlayerError | null;
|
|
44
|
+
/** What `block()` set, or null: a control attached after `blockchange` still sees it. */
|
|
45
|
+
readonly blocked: Block | null;
|
|
20
46
|
/** The ranges the page named: credits to skip, parts that must not play. */
|
|
21
47
|
readonly markers: Markers;
|
|
48
|
+
/** Where the programme's ad breaks are, for the seek bar, by owner. */
|
|
49
|
+
readonly breaks: BreakMarks;
|
|
50
|
+
/** What the current load resolved to, with what a connector said of the programme; null without one. */
|
|
51
|
+
readonly programme: Programme | null;
|
|
52
|
+
/** The sources to load when there is no `src` attribute; setting it loads them. */
|
|
53
|
+
sources: readonly ProgrammeSource[] | null;
|
|
54
|
+
/** The page's trackers, started at each programme. */
|
|
55
|
+
readonly trackers: Trackers;
|
|
22
56
|
/** Loads the sources again, in the order a load reads them. */
|
|
23
57
|
retry(): void;
|
|
24
58
|
/** The other versions of the picture the source names at their own URLs. */
|
|
@@ -28,6 +62,41 @@ export interface PlayerHost extends HTMLElement {
|
|
|
28
62
|
selectVideoSource(track: SourceVideoTrack | null): void;
|
|
29
63
|
/** Loads another source of the same programme in place, holding the frame and the controls. */
|
|
30
64
|
switchSource(source: Source): void;
|
|
65
|
+
/** Plays a source in the programme's place, such as an ad; no `sourcechange` fires. */
|
|
66
|
+
interrupt(source: Source): Promise<void>;
|
|
67
|
+
/** Plays the programme again where `interrupt` left it. */
|
|
68
|
+
resume(options?: {
|
|
69
|
+
readonly at?: number | null;
|
|
70
|
+
readonly playing?: boolean;
|
|
71
|
+
}): Promise<void>;
|
|
72
|
+
/** `interrupt` plays in the programme's place. */
|
|
73
|
+
readonly interrupted: boolean;
|
|
74
|
+
/** The language tag the words come from, or empty for English. */
|
|
75
|
+
readonly locale: string;
|
|
76
|
+
/**
|
|
77
|
+
* The word of `id` in the player's language, or undefined, where the
|
|
78
|
+
* control's own English applies. The player fires `localechange` when
|
|
79
|
+
* the words change.
|
|
80
|
+
*/
|
|
81
|
+
message(id: keyof Messages): string | undefined;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* A package that adds to every player: the engine stages it needs, which
|
|
85
|
+
* join whatever stack the player builds, and what it does on each player.
|
|
86
|
+
* `@mattebox/player-ads` is one: it adds the `interstitials` stage and
|
|
87
|
+
* draws the ad controls.
|
|
88
|
+
*/
|
|
89
|
+
export interface PlayerAddon {
|
|
90
|
+
readonly name: string;
|
|
91
|
+
/** Fresh stages for each engine. A stage the stack has already, by name, is not added twice. */
|
|
92
|
+
stages?(): readonly Stage[];
|
|
93
|
+
/**
|
|
94
|
+
* The add-on needs the engine: where MediaSource plays HLS, Safari's own
|
|
95
|
+
* HLS is not preferred, since it reports nothing the add-on reads.
|
|
96
|
+
*/
|
|
97
|
+
readonly engine?: boolean;
|
|
98
|
+
/** Runs when a player connects, and the function it returns when it leaves the page. */
|
|
99
|
+
attach?(player: PlayerHost): (() => void) | undefined;
|
|
31
100
|
}
|
|
32
101
|
/**
|
|
33
102
|
* The nearest player above `node`, through shadow hosts, or null outside
|
package/dist/host.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EACV,KAAK,EACL,MAAM,EACN,WAAW,EACX,SAAS,EACT,eAAe,EACf,MAAM,EACN,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,YAAY,EAAE,KAAK,EAAE,CAAC;AAEtB,MAAM,WAAW,OAAO;IACtB,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,uFAAuF;IACvF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,wEAAwE;IACxE,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IACtD,0EAA0E;IAC1E,IAA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AI,CAAC;IACxD,+FAA+F;IAC/F,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,uFAAuF;IACvF,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,2DAA2D;IAC3D,MAAM,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7F,kDAAkD;IAClD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,kEAAkE;IAClE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;CACjD;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gGAAgG;IAChG,MAAM,CAAC,IAAI,SAAS,KAAK,EAAE,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,wFAAwF;IACxF,MAAM,CAAC,CAAC,MAAM,EAAE,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACvD;AASD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,GAAG,IAAI,CAOzD"}
|
package/dist/host.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./tags.js";
|
|
2
|
-
|
|
2
|
+
// src/host.ts
|
|
3
3
|
/** The parent, or the host of the shadow root `node` sits in, or null at the document. */
|
|
4
4
|
function above(node) {
|
|
5
5
|
const parent = node.parentNode;
|
|
@@ -19,7 +19,6 @@ function findPlayer(node) {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
|
-
//#endregion
|
|
23
22
|
export { findPlayer };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=host.js.map
|
package/dist/host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.js","names":[],"sources":["../src/host.ts"],"sourcesContent":["/**\n * What a control sees of the player it sits in: the video, the engine, the\n * core, and the element itself for its events and attributes. Declared\n * here and not imported from the element, because the element registers\n * the controls and a control that imported the element would close a cycle.\n * `MatteboxPlayerElement` implements it.\n *\n * This is the whole surface a control gets. A control that needs more\n * has found a gap in the player's public API, and the gap is the bug.\n */\nimport type {
|
|
1
|
+
{"version":3,"file":"host.js","names":[],"sources":["../src/host.ts"],"sourcesContent":["/**\n * What a control sees of the player it sits in: the video, the engine, the\n * core, and the element itself for its events and attributes. Declared\n * here and not imported from the element, because the element registers\n * the controls and a control that imported the element would close a cycle.\n * `MatteboxPlayerElement` implements it.\n *\n * This is the whole surface a control gets. A control that needs more\n * has found a gap in the player's public API, and the gap is the bug.\n */\nimport type {\n Block,\n Player,\n PlayerError,\n Programme,\n ProgrammeSource,\n Source,\n SourceVideoTrack,\n} from '@mattebox/player-core';\nimport type { Mattebox, Stage } from 'mattebox';\nimport type { BreakMarks } from './controls/breaks.js';\nimport type { Markers } from './controls/markers.js';\nimport type { Messages } from './messages.js';\nimport { PLAYER } from './tags.js';\n\nexport type { Block };\n\nexport interface Tracker {\n /** What the diagnostics panel calls it. */\n readonly name: string;\n /** The id of the tracker's current session, which the diagnostics panel shows for support. */\n readonly session?: string | undefined;\n /** The id of the device the tracker reports, which the diagnostics panel shows too. */\n readonly device?: string | undefined;\n /** At the start of each programme, or at once when added during one. */\n start(programme: Programme, player: PlayerHost): void;\n /** At the end of the programme, at unload, or when removed during one. */\n stop(): void;\n}\n\nexport interface Trackers {\n /** Adds a tracker; during a programme, it starts at once. */\n add(tracker: Tracker): void;\n /** Removes a tracker; during a programme, it stops at once. False when it was not there. */\n delete(tracker: Tracker): boolean;\n has(tracker: Tracker): boolean;\n /** The trackers, in the order they were added. */\n readonly list: readonly Tracker[];\n}\n\nexport interface PlayerHost extends HTMLElement {\n readonly video: HTMLVideoElement;\n readonly engine: Mattebox | null;\n readonly player: Player | null;\n /** The fatal error of the current load, or null: a control attached after the event still sees it. */\n readonly error: PlayerError | null;\n /** What `block()` set, or null: a control attached after `blockchange` still sees it. */\n readonly blocked: Block | null;\n /** The ranges the page named: credits to skip, parts that must not play. */\n readonly markers: Markers;\n /** Where the programme's ad breaks are, for the seek bar, by owner. */\n readonly breaks: BreakMarks;\n /** What the current load resolved to, with what a connector said of the programme; null without one. */\n readonly programme: Programme | null;\n /** The sources to load when there is no `src` attribute; setting it loads them. */\n sources: readonly ProgrammeSource[] | null;\n /** The page's trackers, started at each programme. */\n readonly trackers: Trackers;\n /** Loads the sources again, in the order a load reads them. */\n retry(): void;\n /** The other versions of the picture the source names at their own URLs. */\n readonly videoSources: readonly SourceVideoTrack[];\n /** The version of `videoSources` that plays, or null for the source itself. */\n readonly videoSource: SourceVideoTrack | null;\n selectVideoSource(track: SourceVideoTrack | null): void;\n /** Loads another source of the same programme in place, holding the frame and the controls. */\n switchSource(source: Source): void;\n /** Plays a source in the programme's place, such as an ad; no `sourcechange` fires. */\n interrupt(source: Source): Promise<void>;\n /** Plays the programme again where `interrupt` left it. */\n resume(options?: { readonly at?: number | null; readonly playing?: boolean }): Promise<void>;\n /** `interrupt` plays in the programme's place. */\n readonly interrupted: boolean;\n /** The language tag the words come from, or empty for English. */\n readonly locale: string;\n /**\n * The word of `id` in the player's language, or undefined, where the\n * control's own English applies. The player fires `localechange` when\n * the words change.\n */\n message(id: keyof Messages): string | undefined;\n}\n\n/**\n * A package that adds to every player: the engine stages it needs, which\n * join whatever stack the player builds, and what it does on each player.\n * `@mattebox/player-ads` is one: it adds the `interstitials` stage and\n * draws the ad controls.\n */\nexport interface PlayerAddon {\n readonly name: string;\n /** Fresh stages for each engine. A stage the stack has already, by name, is not added twice. */\n stages?(): readonly Stage[];\n /**\n * The add-on needs the engine: where MediaSource plays HLS, Safari's own\n * HLS is not preferred, since it reports nothing the add-on reads.\n */\n readonly engine?: boolean;\n /** Runs when a player connects, and the function it returns when it leaves the page. */\n attach?(player: PlayerHost): (() => void) | undefined;\n}\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/**\n * The nearest player above `node`, through shadow hosts, or null outside\n * one. The element found may not be upgraded yet; the caller waits for the\n * definition before reading it.\n */\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"],"mappings":";;;AAiHA,SAAS,MAAM,MAAyB;CACtC,MAAM,SAAS,KAAK;CACpB,IAAI,WAAW,MAAM,OAAO;CAC5B,OAAO,gBAAgB,aAAa,KAAK,OAAO;AAClD;;;;;;AAOA,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"}
|
package/dist/ids.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ids for trackers: a new one for each session, and one per device that
|
|
3
|
+
* stays across visits. Built on `crypto.getRandomValues`, since
|
|
4
|
+
* `crypto.randomUUID` is newer than the TVs the player runs on.
|
|
5
|
+
*/
|
|
6
|
+
/** A random UUID, version 4 (RFC 9562 §5.4). */
|
|
7
|
+
export declare function sessionId(): string;
|
|
8
|
+
export interface DeviceIdOptions {
|
|
9
|
+
/** The storage key the id lives under. */
|
|
10
|
+
readonly key: string;
|
|
11
|
+
/** localStorage by default. */
|
|
12
|
+
readonly storage?: Pick<Storage, 'getItem' | 'setItem'>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The id stored under `key`, or a new one stored there. A browser that
|
|
16
|
+
* blocks storage gets a new id at each call.
|
|
17
|
+
*/
|
|
18
|
+
export declare function deviceId(options: DeviceIdOptions): string;
|
|
19
|
+
//# sourceMappingURL=ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gDAAgD;AAChD,wBAAgB,SAAS,IAAI,MAAM,CAOlC;AAED,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;CACzD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAgBzD"}
|
package/dist/ids.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/ids.ts
|
|
2
|
+
/**
|
|
3
|
+
* Ids for trackers: a new one for each session, and one per device that
|
|
4
|
+
* stays across visits. Built on `crypto.getRandomValues`, since
|
|
5
|
+
* `crypto.randomUUID` is newer than the TVs the player runs on.
|
|
6
|
+
*/
|
|
7
|
+
/** A random UUID, version 4 (RFC 9562 §5.4). */
|
|
8
|
+
function sessionId() {
|
|
9
|
+
const bytes = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
10
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
11
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
12
|
+
const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
13
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The id stored under `key`, or a new one stored there. A browser that
|
|
17
|
+
* blocks storage gets a new id at each call.
|
|
18
|
+
*/
|
|
19
|
+
function deviceId(options) {
|
|
20
|
+
let storage = null;
|
|
21
|
+
try {
|
|
22
|
+
storage = options.storage ?? window.localStorage;
|
|
23
|
+
const known = storage.getItem(options.key);
|
|
24
|
+
if (known !== null && known !== "") return known;
|
|
25
|
+
} catch {}
|
|
26
|
+
const id = sessionId();
|
|
27
|
+
try {
|
|
28
|
+
storage?.setItem(options.key, id);
|
|
29
|
+
} catch {}
|
|
30
|
+
return id;
|
|
31
|
+
}
|
|
32
|
+
export { deviceId, sessionId };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=ids.js.map
|
package/dist/ids.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","names":[],"sources":["../src/ids.ts"],"sourcesContent":["/**\n * Ids for trackers: a new one for each session, and one per device that\n * stays across visits. Built on `crypto.getRandomValues`, since\n * `crypto.randomUUID` is newer than the TVs the player runs on.\n */\n\n/** A random UUID, version 4 (RFC 9562 §5.4). */\nexport function sessionId(): string {\n const bytes = crypto.getRandomValues(new Uint8Array(16));\n // The version in the high nibble of byte 6, the variant in the two high bits of byte 8.\n bytes[6] = ((bytes[6] as number) & 0x0f) | 0x40;\n bytes[8] = ((bytes[8] as number) & 0x3f) | 0x80;\n const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join('');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n\nexport interface DeviceIdOptions {\n /** The storage key the id lives under. */\n readonly key: string;\n /** localStorage by default. */\n readonly storage?: Pick<Storage, 'getItem' | 'setItem'>;\n}\n\n/**\n * The id stored under `key`, or a new one stored there. A browser that\n * blocks storage gets a new id at each call.\n */\nexport function deviceId(options: DeviceIdOptions): string {\n let storage: Pick<Storage, 'getItem' | 'setItem'> | null = null;\n try {\n storage = options.storage ?? window.localStorage;\n const known = storage.getItem(options.key);\n if (known !== null && known !== '') return known;\n } catch {\n // Blocked: the id below lives for this call only.\n }\n const id = sessionId();\n try {\n storage?.setItem(options.key, id);\n } catch {\n // Full or blocked, as above.\n }\n return id;\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,YAAoB;CAClC,MAAM,QAAQ,OAAO,gCAAgB,IAAI,WAAW,EAAE,CAAC;CAEvD,MAAM,KAAO,MAAM,KAAgB,KAAQ;CAC3C,MAAM,KAAO,MAAM,KAAgB,KAAQ;CAC3C,MAAM,MAAM,MAAM,KAAK,QAAQ,SAAS,KAAK,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE;CACnF,OAAO,GAAG,IAAI,MAAM,GAAG,CAAC,EAAE,GAAG,IAAI,MAAM,GAAG,EAAE,EAAE,GAAG,IAAI,MAAM,IAAI,EAAE,EAAE,GAAG,IAAI,MAAM,IAAI,EAAE,EAAE,GAAG,IAAI,MAAM,EAAE;AACzG;;;;;AAaA,SAAgB,SAAS,SAAkC;CACzD,IAAI,UAAuD;CAC3D,IAAI;EACF,UAAU,QAAQ,WAAW,OAAO;EACpC,MAAM,QAAQ,QAAQ,QAAQ,QAAQ,GAAG;EACzC,IAAI,UAAU,QAAQ,UAAU,IAAI,OAAO;CAC7C,QAAQ,CAER;CACA,MAAM,KAAK,UAAU;CACrB,IAAI;EACF,SAAS,QAAQ,QAAQ,KAAK,EAAE;CAClC,QAAQ,CAER;CACA,OAAO;AACT"}
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ import type { MbxTitle } from './entries/title.js';
|
|
|
33
33
|
import type { MbxVideoMenu } from './entries/video-menu.js';
|
|
34
34
|
import type { MbxVolume } from './entries/volume.js';
|
|
35
35
|
import type { MbxVolumeSlider } from './entries/volume-slider.js';
|
|
36
|
+
export type { Connector, ConnectorSource, Programme, ProgrammeMetadata, ProgrammeSource, Resolution, Source, SourceDrm, } from '@mattebox/player-core';
|
|
37
|
+
export type { BreakMark, BreakMarks } from './controls/breaks.js';
|
|
36
38
|
export type { Marker, Markers } from './controls/markers.js';
|
|
37
39
|
export type { MatteboxPlayerOptions } from './element-entry.js';
|
|
38
40
|
export { MatteboxPlayerElement } from './element-entry.js';
|
|
@@ -64,7 +66,13 @@ export { MbxTitle } from './entries/title.js';
|
|
|
64
66
|
export { MbxVideoMenu } from './entries/video-menu.js';
|
|
65
67
|
export { MbxVolume } from './entries/volume.js';
|
|
66
68
|
export { MbxVolumeSlider } from './entries/volume-slider.js';
|
|
67
|
-
export type { PlayerHost } from './host.js';
|
|
69
|
+
export type { Block, PlayerAddon, PlayerHost } from './host.js';
|
|
70
|
+
export type { DeviceIdOptions } from './ids.js';
|
|
71
|
+
export { deviceId, sessionId } from './ids.js';
|
|
72
|
+
export type { LocaleSource } from './locales.js';
|
|
73
|
+
export type { Messages, PlayerMessages, Words } from './messages.js';
|
|
74
|
+
export type { Text } from './text.js';
|
|
75
|
+
export type { Tracker, Trackers } from './trackers.js';
|
|
68
76
|
declare global {
|
|
69
77
|
interface HTMLElementTagNameMap {
|
|
70
78
|
'mattebox-player': MatteboxPlayerElement;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EA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E,YAAY,CAAC;QAC/B,uBAAuB,EAAE,mBAAmB,CAAC;QAC7C,kBAAkB,EAAE,cAAc,CAAC;QACnC,mBAAmB,EAAE,eAAe,CAAC;QACrC,kBAAkB,EAAE,cAAc,CAAC;QACnC,aAAa,EAAE,UAAU,CAAC;QAC1B,WAAW,EAAE,QAAQ,CAAC;QACtB,kBAAkB,EAAE,cAAc,CAAC;QACnC,cAAc,EAAE,WAAW,CAAC;QAC5B,oBAAoB,EAAE,gBAAgB,CAAC;QACvC,cAAc,EAAE,UAAU,CAAC;QAC3B,iBAAiB,EAAE,aAAa,CAAC;QACjC,gBAAgB,EAAE,YAAY,CAAC;QAC/B,kBAAkB,EAAE,cAAc,CAAC;QACnC,oBAAoB,EAAE,gBAAgB,CAAC;QACvC,gBAAgB,EAAE,YAAY,CAAC;QAC/B,gBAAgB,EAAE,YAAY,CAAC;QAC/B,oBAAoB,EAAE,gBAAgB,CAAC;QACvC,eAAe,EAAE,WAAW,CAAC;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
|
package/dist/index.js
CHANGED
|
@@ -56,4 +56,5 @@ import { MbxVolumeSlider } from "./elements/volume-slider.js";
|
|
|
56
56
|
import "./entries/volume-slider.js";
|
|
57
57
|
import { MbxVolume } from "./elements/volume.js";
|
|
58
58
|
import "./entries/volume.js";
|
|
59
|
-
|
|
59
|
+
import { deviceId, sessionId } from "./ids.js";
|
|
60
|
+
export { MatteboxPlayerElement, MbxAirplayButton, MbxAudioMenu, MbxChaptersMenu, MbxControlBar, MbxCurrentTime, MbxDrmBadge, MbxDuration, MbxErrorScreen, MbxFullscreenButton, MbxLiveButton, MbxMarkerButton, MbxMuteButton, MbxPipButton, MbxPlayButton, MbxQualityMenu, MbxRemainingTime, MbxScanButton, MbxSeekBar, MbxSkipButton, MbxSpacer, MbxSpeedMenu, MbxSpinner, MbxStartButton, MbxSubtitlesMenu, MbxTitle, MbxVideoMenu, MbxVolume, MbxVolumeSlider, deviceId, sessionId };
|
package/dist/labels.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/labels.ts
|
|
2
2
|
/**
|
|
3
3
|
* Label templates: `{name}` in an attribute's text is replaced from the
|
|
4
4
|
* values the element has, and a name it does not have stays as written.
|
|
@@ -10,7 +10,6 @@ function fill(template, values) {
|
|
|
10
10
|
return value === void 0 ? match : String(value);
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { fill };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=labels.js.map
|