@mattebox/player 0.11.0 → 0.12.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/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 +90 -6
- package/dist/element.d.ts.map +1 -1
- package/dist/element.js +212 -30
- 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.map +1 -1
- package/dist/elements/marker-button.js +7 -6
- 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 +2 -0
- package/dist/elements/seek-bar.d.ts.map +1 -1
- package/dist/elements/seek-bar.js +10 -7
- 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/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 +227 -37
- 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 +8 -7
- 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 +12 -11
- 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 +40 -1
- 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 +8 -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 @@
|
|
|
1
|
+
{"version":3,"file":"pt.js","names":[],"sources":["../../src/locales/pt.ts"],"sourcesContent":["/**\n * European Portuguese words of the player, for `MatteboxPlayerElement.addLocale('pt', …)`.\n * Machine-drafted, not yet reviewed by a native speaker.\n */\nimport type { PlayerMessages } from '../messages.js';\n\nexport default {\n play: 'Reproduzir',\n pause: 'Pausar',\n replay: 'Reproduzir de novo',\n mute: 'Silenciar',\n unmute: 'Ativar o som',\n volume: 'Volume',\n seek: 'Posição',\n seekOf: '{current} de {duration}',\n behindLive: '{time} atrás do direto',\n blocked: 'Indisponível',\n goLive: 'Ir para o direto',\n atLiveEdge: 'Em direto',\n live: 'DIRETO',\n rewind: 'Retroceder rápido',\n fastForward: 'Avançar rápido',\n skipBack: 'Recuar {seconds} segundos',\n skipForward: 'Avançar {seconds} segundos',\n enterFullscreen: 'Ecrã inteiro',\n exitFullscreen: 'Sair de ecrã inteiro',\n enterPip: 'Imagem na imagem',\n exitPip: 'Sair de imagem na imagem',\n airplay: 'AirPlay',\n stopAirplay: 'Parar AirPlay',\n loading: 'A carregar',\n playbackFailed: 'A reprodução falhou',\n retry: 'Tentar de novo',\n menuBack: 'Voltar de {page}',\n speed: 'Velocidade',\n speedNormal: 'Normal',\n chapters: 'Capítulos',\n quality: 'Qualidade',\n qualityAuto: 'Automática',\n audio: 'Áudio',\n original: 'Original',\n audioDescription: 'AD',\n mono: 'Mono',\n stereo: 'Estéreo',\n track: 'Faixa',\n subtitles: 'Legendas',\n subtitlesOff: 'Desligadas',\n sdh: 'SDH',\n closedCaptions: 'CC',\n subtitleSettings: 'Definições',\n subtitleSize: 'Tamanho',\n sizeSmall: 'Pequeno',\n sizeMedium: 'Médio',\n sizeLarge: 'Grande',\n sizeExtraLarge: 'Muito grande',\n subtitleBackground: 'Fundo',\n backgroundNone: 'Nenhum',\n backgroundDark: 'Escuro',\n backgroundSolid: 'Sólido',\n video: 'Vídeo',\n videoMain: 'Principal',\n videoAlternative: 'Alternativa',\n videoSign: 'Língua gestual',\n videoCaptions: 'Legendas para surdos',\n videoSubtitles: 'Legendado',\n videoCommentary: 'Comentário',\n skip: 'Pular',\n skipIntro: 'Pular abertura',\n skipCredits: 'Pular créditos',\n drmProtected: 'Protegido por {system}, {keys}',\n drmNoKey: 'ainda sem chave',\n drmKey: '{count} chave: {statuses}',\n drmKeys: '{count} chaves: {statuses}',\n saidPlaying: 'A reproduzir',\n saidPaused: 'Em pausa',\n saidAudio: 'Áudio: {track}',\n saidSubtitles: 'Legendas: {track}',\n saidSubtitlesOff: 'Legendas desativadas',\n} satisfies PlayerMessages;\n"],"mappings":";AAMA,IAAA,aAAe;CACb,MAAM;CACN,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,QAAQ;CACR,aAAa;CACb,UAAU;CACV,aAAa;CACb,iBAAiB;CACjB,gBAAgB;CAChB,UAAU;CACV,SAAS;CACT,SAAS;CACT,aAAa;CACb,SAAS;CACT,gBAAgB;CAChB,OAAO;CACP,UAAU;CACV,OAAO;CACP,aAAa;CACb,UAAU;CACV,SAAS;CACT,aAAa;CACb,OAAO;CACP,UAAU;CACV,kBAAkB;CAClB,MAAM;CACN,QAAQ;CACR,OAAO;CACP,WAAW;CACX,cAAc;CACd,KAAK;CACL,gBAAgB;CAChB,kBAAkB;CAClB,cAAc;CACd,WAAW;CACX,YAAY;CACZ,WAAW;CACX,gBAAgB;CAChB,oBAAoB;CACpB,gBAAgB;CAChB,gBAAgB;CAChB,iBAAiB;CACjB,OAAO;CACP,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,eAAe;CACf,gBAAgB;CAChB,iBAAiB;CACjB,MAAM;CACN,WAAW;CACX,aAAa;CACb,cAAc;CACd,UAAU;CACV,QAAQ;CACR,SAAS;CACT,aAAa;CACb,YAAY;CACZ,WAAW;CACX,eAAe;CACf,kBAAkB;AACpB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
play: string;
|
|
3
|
+
pause: string;
|
|
4
|
+
replay: string;
|
|
5
|
+
mute: string;
|
|
6
|
+
unmute: string;
|
|
7
|
+
volume: string;
|
|
8
|
+
seek: string;
|
|
9
|
+
seekOf: string;
|
|
10
|
+
behindLive: string;
|
|
11
|
+
blocked: string;
|
|
12
|
+
goLive: string;
|
|
13
|
+
atLiveEdge: string;
|
|
14
|
+
live: string;
|
|
15
|
+
rewind: string;
|
|
16
|
+
fastForward: string;
|
|
17
|
+
skipBack: string;
|
|
18
|
+
skipForward: string;
|
|
19
|
+
enterFullscreen: string;
|
|
20
|
+
exitFullscreen: string;
|
|
21
|
+
enterPip: string;
|
|
22
|
+
exitPip: string;
|
|
23
|
+
airplay: string;
|
|
24
|
+
stopAirplay: string;
|
|
25
|
+
loading: string;
|
|
26
|
+
playbackFailed: string;
|
|
27
|
+
retry: string;
|
|
28
|
+
menuBack: string;
|
|
29
|
+
speed: string;
|
|
30
|
+
speedNormal: string;
|
|
31
|
+
chapters: string;
|
|
32
|
+
quality: string;
|
|
33
|
+
qualityAuto: string;
|
|
34
|
+
audio: string;
|
|
35
|
+
original: string;
|
|
36
|
+
audioDescription: string;
|
|
37
|
+
mono: string;
|
|
38
|
+
stereo: string;
|
|
39
|
+
track: string;
|
|
40
|
+
subtitles: string;
|
|
41
|
+
subtitlesOff: string;
|
|
42
|
+
sdh: string;
|
|
43
|
+
closedCaptions: string;
|
|
44
|
+
subtitleSettings: string;
|
|
45
|
+
subtitleSize: string;
|
|
46
|
+
sizeSmall: string;
|
|
47
|
+
sizeMedium: string;
|
|
48
|
+
sizeLarge: string;
|
|
49
|
+
sizeExtraLarge: string;
|
|
50
|
+
subtitleBackground: string;
|
|
51
|
+
backgroundNone: string;
|
|
52
|
+
backgroundDark: string;
|
|
53
|
+
backgroundSolid: string;
|
|
54
|
+
video: string;
|
|
55
|
+
videoMain: string;
|
|
56
|
+
videoAlternative: string;
|
|
57
|
+
videoSign: string;
|
|
58
|
+
videoCaptions: string;
|
|
59
|
+
videoSubtitles: string;
|
|
60
|
+
videoCommentary: string;
|
|
61
|
+
skip: string;
|
|
62
|
+
skipIntro: string;
|
|
63
|
+
skipCredits: string;
|
|
64
|
+
drmProtected: string;
|
|
65
|
+
drmNoKey: string;
|
|
66
|
+
drmKey: string;
|
|
67
|
+
drmKeys: string;
|
|
68
|
+
saidPlaying: string;
|
|
69
|
+
saidPaused: string;
|
|
70
|
+
saidAudio: string;
|
|
71
|
+
saidSubtitles: string;
|
|
72
|
+
saidSubtitlesOff: string;
|
|
73
|
+
};
|
|
74
|
+
export default _default;
|
|
75
|
+
//# sourceMappingURL=zh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../src/locales/zh.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAwE2B"}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 };
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=zh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh.js","names":[],"sources":["../../src/locales/zh.ts"],"sourcesContent":["/**\n * Simplified Chinese words of the player, for `MatteboxPlayerElement.addLocale('zh', …)`.\n * Machine-drafted, not yet reviewed by a native speaker.\n */\nimport type { PlayerMessages } from '../messages.js';\n\nexport default {\n play: '播放',\n pause: '暂停',\n replay: '重新播放',\n mute: '静音',\n unmute: '取消静音',\n volume: '音量',\n seek: '进度',\n seekOf: '{current} / {duration}',\n behindLive: '落后直播 {time}',\n blocked: '不可用',\n goLive: '跳到直播',\n atLiveEdge: '正在直播',\n live: '直播',\n rewind: '快退',\n fastForward: '快进',\n skipBack: '后退 {seconds} 秒',\n skipForward: '前进 {seconds} 秒',\n enterFullscreen: '全屏',\n exitFullscreen: '退出全屏',\n enterPip: '画中画',\n exitPip: '退出画中画',\n airplay: 'AirPlay',\n stopAirplay: '停止 AirPlay',\n loading: '加载中',\n playbackFailed: '播放失败',\n retry: '重试',\n menuBack: '从{page}返回',\n speed: '播放速度',\n speedNormal: '正常',\n chapters: '章节',\n quality: '画质',\n qualityAuto: '自动',\n audio: '音轨',\n original: '原声',\n audioDescription: 'AD',\n mono: '单声道',\n stereo: '立体声',\n track: '字幕轨',\n subtitles: '字幕',\n subtitlesOff: '关闭',\n sdh: 'SDH',\n closedCaptions: 'CC',\n subtitleSettings: '设置',\n subtitleSize: '字号',\n sizeSmall: '小',\n sizeMedium: '中',\n sizeLarge: '大',\n sizeExtraLarge: '特大',\n subtitleBackground: '背景',\n backgroundNone: '无',\n backgroundDark: '深色',\n backgroundSolid: '实色',\n video: '视频',\n videoMain: '主画面',\n videoAlternative: '其他版本',\n videoSign: '手语',\n videoCaptions: '听障字幕',\n videoSubtitles: '带字幕',\n videoCommentary: '解说',\n skip: '跳过',\n skipIntro: '跳过片头',\n skipCredits: '跳过片尾',\n drmProtected: '由 {system} 保护,{keys}',\n drmNoKey: '尚无密钥',\n drmKey: '{count} 个密钥:{statuses}',\n drmKeys: '{count} 个密钥:{statuses}',\n saidPlaying: '正在播放',\n saidPaused: '已暂停',\n saidAudio: '音频:{track}',\n saidSubtitles: '字幕:{track}',\n saidSubtitlesOff: '字幕已关闭',\n} satisfies PlayerMessages;\n"],"mappings":";AAMA,IAAA,aAAe;CACb,MAAM;CACN,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,QAAQ;CACR,aAAa;CACb,UAAU;CACV,aAAa;CACb,iBAAiB;CACjB,gBAAgB;CAChB,UAAU;CACV,SAAS;CACT,SAAS;CACT,aAAa;CACb,SAAS;CACT,gBAAgB;CAChB,OAAO;CACP,UAAU;CACV,OAAO;CACP,aAAa;CACb,UAAU;CACV,SAAS;CACT,aAAa;CACb,OAAO;CACP,UAAU;CACV,kBAAkB;CAClB,MAAM;CACN,QAAQ;CACR,OAAO;CACP,WAAW;CACX,cAAc;CACd,KAAK;CACL,gBAAgB;CAChB,kBAAkB;CAClB,cAAc;CACd,WAAW;CACX,YAAY;CACZ,WAAW;CACX,gBAAgB;CAChB,oBAAoB;CACpB,gBAAgB;CAChB,gBAAgB;CAChB,iBAAiB;CACjB,OAAO;CACP,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,eAAe;CACf,gBAAgB;CAChB,iBAAiB;CACjB,MAAM;CACN,WAAW;CACX,aAAa;CACb,cAAc;CACd,UAAU;CACV,QAAQ;CACR,SAAS;CACT,aAAa;CACb,YAAY;CACZ,WAAW;CACX,eAAe;CACf,kBAAkB;AACpB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The languages a page registered, shared by every player on it. A
|
|
3
|
+
* language is a list of word sets, merged in order, so a page's own words
|
|
4
|
+
* go over the shipped ones. A set can be a loader, which runs the first
|
|
5
|
+
* time a player needs the language: a page registers every language it
|
|
6
|
+
* offers and downloads only the one it shows.
|
|
7
|
+
*/
|
|
8
|
+
import type { Words } from './messages.js';
|
|
9
|
+
/** A set of words, or a function that loads one, such as `() => import('…/locales/de.js')`. */
|
|
10
|
+
export type LocaleSource = Words | (() => Promise<Words | {
|
|
11
|
+
readonly default: Words;
|
|
12
|
+
}>);
|
|
13
|
+
export declare function addLocale(language: string, sources: readonly LocaleSource[]): void;
|
|
14
|
+
/** Calls `fn` on every registration, until the returned function runs. */
|
|
15
|
+
export declare function onLocales(fn: () => void): () => void;
|
|
16
|
+
/**
|
|
17
|
+
* The registered key for a language tag: the tag, else its language
|
|
18
|
+
* alone, so `de-CH` falls back to `de` (BCP 47 lookup, RFC 4647 §3.4).
|
|
19
|
+
* Null when neither is registered, and English then comes from the
|
|
20
|
+
* controls themselves.
|
|
21
|
+
*/
|
|
22
|
+
export declare function registered(tag: string): string | null;
|
|
23
|
+
/** The merged words of `key` now, or null while a loader of it has not run. */
|
|
24
|
+
export declare function wordsNow(key: string): Words | null;
|
|
25
|
+
/** Runs the loaders of `key` once, keeps what they load, and answers the merged words. */
|
|
26
|
+
export declare function load(key: string): Promise<Words>;
|
|
27
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../src/locales.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,+FAA+F;AAC/F,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,CAAC,MAAM,OAAO,CAAC,KAAK,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC,CAAC;AAMxF,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI,CAIlF;AAED,0EAA0E;AAC1E,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAKpD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKrD;AAED,+EAA+E;AAC/E,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAIlD;AAED,0FAA0F;AAC1F,wBAAsB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAYtD"}
|
package/dist/locales.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// src/locales.ts
|
|
2
|
+
/** By lowercase language tag. A loaded set takes its loader's place. */
|
|
3
|
+
const registry = /* @__PURE__ */ new Map();
|
|
4
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
5
|
+
function addLocale(language, sources) {
|
|
6
|
+
const key = language.toLowerCase();
|
|
7
|
+
registry.set(key, [...registry.get(key) ?? [], ...sources]);
|
|
8
|
+
for (const listener of listeners) listener();
|
|
9
|
+
}
|
|
10
|
+
/** Calls `fn` on every registration, until the returned function runs. */
|
|
11
|
+
function onLocales(fn) {
|
|
12
|
+
listeners.add(fn);
|
|
13
|
+
return () => {
|
|
14
|
+
listeners.delete(fn);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The registered key for a language tag: the tag, else its language
|
|
19
|
+
* alone, so `de-CH` falls back to `de` (BCP 47 lookup, RFC 4647 §3.4).
|
|
20
|
+
* Null when neither is registered, and English then comes from the
|
|
21
|
+
* controls themselves.
|
|
22
|
+
*/
|
|
23
|
+
function registered(tag) {
|
|
24
|
+
const key = tag.toLowerCase();
|
|
25
|
+
if (registry.has(key)) return key;
|
|
26
|
+
const base = key.split("-")[0];
|
|
27
|
+
return registry.has(base) ? base : null;
|
|
28
|
+
}
|
|
29
|
+
/** The merged words of `key` now, or null while a loader of it has not run. */
|
|
30
|
+
function wordsNow(key) {
|
|
31
|
+
const sources = registry.get(key) ?? [];
|
|
32
|
+
if (sources.some((source) => typeof source === "function")) return null;
|
|
33
|
+
return Object.assign({}, ...sources);
|
|
34
|
+
}
|
|
35
|
+
/** Runs the loaders of `key` once, keeps what they load, and answers the merged words. */
|
|
36
|
+
async function load(key) {
|
|
37
|
+
const sources = registry.get(key) ?? [];
|
|
38
|
+
const loaded = await Promise.all(sources.map(async (source) => {
|
|
39
|
+
if (typeof source !== "function") return source;
|
|
40
|
+
const module = await source();
|
|
41
|
+
return "default" in module ? module.default : module;
|
|
42
|
+
}));
|
|
43
|
+
registry.set(key, [...loaded, ...(registry.get(key) ?? []).slice(sources.length)]);
|
|
44
|
+
return wordsNow(key) ?? Object.assign({}, ...loaded);
|
|
45
|
+
}
|
|
46
|
+
export { addLocale, load, onLocales, registered, wordsNow };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.js","names":[],"sources":["../src/locales.ts"],"sourcesContent":["/**\n * The languages a page registered, shared by every player on it. A\n * language is a list of word sets, merged in order, so a page's own words\n * go over the shipped ones. A set can be a loader, which runs the first\n * time a player needs the language: a page registers every language it\n * offers and downloads only the one it shows.\n */\nimport type { Words } from './messages.js';\n\n/** A set of words, or a function that loads one, such as `() => import('…/locales/de.js')`. */\nexport type LocaleSource = Words | (() => Promise<Words | { readonly default: Words }>);\n\n/** By lowercase language tag. A loaded set takes its loader's place. */\nconst registry = new Map<string, LocaleSource[]>();\nconst listeners = new Set<() => void>();\n\nexport function addLocale(language: string, sources: readonly LocaleSource[]): void {\n const key = language.toLowerCase();\n registry.set(key, [...(registry.get(key) ?? []), ...sources]);\n for (const listener of listeners) listener();\n}\n\n/** Calls `fn` on every registration, until the returned function runs. */\nexport function onLocales(fn: () => void): () => void {\n listeners.add(fn);\n return () => {\n listeners.delete(fn);\n };\n}\n\n/**\n * The registered key for a language tag: the tag, else its language\n * alone, so `de-CH` falls back to `de` (BCP 47 lookup, RFC 4647 §3.4).\n * Null when neither is registered, and English then comes from the\n * controls themselves.\n */\nexport function registered(tag: string): string | null {\n const key = tag.toLowerCase();\n if (registry.has(key)) return key;\n const base = key.split('-')[0] as string;\n return registry.has(base) ? base : null;\n}\n\n/** The merged words of `key` now, or null while a loader of it has not run. */\nexport function wordsNow(key: string): Words | null {\n const sources = registry.get(key) ?? [];\n if (sources.some((source) => typeof source === 'function')) return null;\n return Object.assign({}, ...(sources as Words[]));\n}\n\n/** Runs the loaders of `key` once, keeps what they load, and answers the merged words. */\nexport async function load(key: string): Promise<Words> {\n const sources = registry.get(key) ?? [];\n const loaded = await Promise.all(\n sources.map(async (source) => {\n if (typeof source !== 'function') return source;\n const module = await source();\n return 'default' in module ? (module.default as Words) : (module as Words);\n }),\n );\n // A registration while the loaders ran goes after them, as it was made.\n registry.set(key, [...loaded, ...(registry.get(key) ?? []).slice(sources.length)]);\n return wordsNow(key) ?? Object.assign({}, ...loaded);\n}\n"],"mappings":";;AAaA,MAAM,2BAAW,IAAI,IAA4B;AACjD,MAAM,4BAAY,IAAI,IAAgB;AAEtC,SAAgB,UAAU,UAAkB,SAAwC;CAClF,MAAM,MAAM,SAAS,YAAY;CACjC,SAAS,IAAI,KAAK,CAAC,GAAI,SAAS,IAAI,GAAG,KAAK,CAAC,GAAI,GAAG,OAAO,CAAC;CAC5D,KAAK,MAAM,YAAY,WAAW,SAAS;AAC7C;;AAGA,SAAgB,UAAU,IAA4B;CACpD,UAAU,IAAI,EAAE;CAChB,aAAa;EACX,UAAU,OAAO,EAAE;CACrB;AACF;;;;;;;AAQA,SAAgB,WAAW,KAA4B;CACrD,MAAM,MAAM,IAAI,YAAY;CAC5B,IAAI,SAAS,IAAI,GAAG,GAAG,OAAO;CAC9B,MAAM,OAAO,IAAI,MAAM,GAAG,CAAC,CAAC;CAC5B,OAAO,SAAS,IAAI,IAAI,IAAI,OAAO;AACrC;;AAGA,SAAgB,SAAS,KAA2B;CAClD,MAAM,UAAU,SAAS,IAAI,GAAG,KAAK,CAAC;CACtC,IAAI,QAAQ,MAAM,WAAW,OAAO,WAAW,UAAU,GAAG,OAAO;CACnE,OAAO,OAAO,OAAO,CAAC,GAAG,GAAI,OAAmB;AAClD;;AAGA,eAAsB,KAAK,KAA6B;CACtD,MAAM,UAAU,SAAS,IAAI,GAAG,KAAK,CAAC;CACtC,MAAM,SAAS,MAAM,QAAQ,IAC3B,QAAQ,IAAI,OAAO,WAAW;EAC5B,IAAI,OAAO,WAAW,YAAY,OAAO;EACzC,MAAM,SAAS,MAAM,OAAO;EAC5B,OAAO,aAAa,SAAU,OAAO,UAAqB;CAC5D,CAAC,CACH;CAEA,SAAS,IAAI,KAAK,CAAC,GAAG,QAAQ,IAAI,SAAS,IAAI,GAAG,KAAK,CAAC,EAAA,CAAG,MAAM,QAAQ,MAAM,CAAC,CAAC;CACjF,OAAO,SAAS,GAAG,KAAK,OAAO,OAAO,CAAC,GAAG,GAAG,MAAM;AACrD"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words of the player, by id. A language is a set of them, which a
|
|
3
|
+
* page registers with `MatteboxPlayerElement.addLocale`. Each id lists its
|
|
4
|
+
* English text, which the controls carry themselves. A `{name}` in a text
|
|
5
|
+
* is filled in at use. Type only: nothing here reaches a bundle.
|
|
6
|
+
*/
|
|
7
|
+
export interface PlayerMessages {
|
|
8
|
+
/** "Play": the play button and the start button. */
|
|
9
|
+
readonly play: string;
|
|
10
|
+
/** "Pause". */
|
|
11
|
+
readonly pause: string;
|
|
12
|
+
/** "Replay", once the media has ended. */
|
|
13
|
+
readonly replay: string;
|
|
14
|
+
/** "Mute". */
|
|
15
|
+
readonly mute: string;
|
|
16
|
+
/** "Unmute". */
|
|
17
|
+
readonly unmute: string;
|
|
18
|
+
/** "Volume": the volume slider. */
|
|
19
|
+
readonly volume: string;
|
|
20
|
+
/** "Seek": the seek bar. */
|
|
21
|
+
readonly seek: string;
|
|
22
|
+
/** "{current} of {duration}": what the seek bar says at a time. */
|
|
23
|
+
readonly seekOf: string;
|
|
24
|
+
/** "{time} behind live". */
|
|
25
|
+
readonly behindLive: string;
|
|
26
|
+
/** "Not available": a blocked part of the seek bar. */
|
|
27
|
+
readonly blocked: string;
|
|
28
|
+
/** "Go to the live edge": the live button. */
|
|
29
|
+
readonly goLive: string;
|
|
30
|
+
/** "At the live edge". */
|
|
31
|
+
readonly atLiveEdge: string;
|
|
32
|
+
/** "LIVE": the live button's text. */
|
|
33
|
+
readonly live: string;
|
|
34
|
+
/** "Rewind": the backward scan button. */
|
|
35
|
+
readonly rewind: string;
|
|
36
|
+
/** "Fast forward". */
|
|
37
|
+
readonly fastForward: string;
|
|
38
|
+
/** "Back {seconds} seconds": the backward skip button. */
|
|
39
|
+
readonly skipBack: string;
|
|
40
|
+
/** "Forward {seconds} seconds". */
|
|
41
|
+
readonly skipForward: string;
|
|
42
|
+
/** "Enter fullscreen". */
|
|
43
|
+
readonly enterFullscreen: string;
|
|
44
|
+
/** "Exit fullscreen". */
|
|
45
|
+
readonly exitFullscreen: string;
|
|
46
|
+
/** "Picture in picture". */
|
|
47
|
+
readonly enterPip: string;
|
|
48
|
+
/** "Leave picture in picture". */
|
|
49
|
+
readonly exitPip: string;
|
|
50
|
+
/** "AirPlay". */
|
|
51
|
+
readonly airplay: string;
|
|
52
|
+
/** "Stop AirPlay". */
|
|
53
|
+
readonly stopAirplay: string;
|
|
54
|
+
/** "Loading": the spinner, and the live region after a wait. */
|
|
55
|
+
readonly loading: string;
|
|
56
|
+
/** "Playback failed": the error screen's title, and the live region. */
|
|
57
|
+
readonly playbackFailed: string;
|
|
58
|
+
/** "Retry". */
|
|
59
|
+
readonly retry: string;
|
|
60
|
+
/** "Back from {page}": the way back from a menu's page. */
|
|
61
|
+
readonly menuBack: string;
|
|
62
|
+
/** "Playback speed": the speed menu. */
|
|
63
|
+
readonly speed: string;
|
|
64
|
+
/** "Normal": the rate 1. */
|
|
65
|
+
readonly speedNormal: string;
|
|
66
|
+
/** "Chapters". */
|
|
67
|
+
readonly chapters: string;
|
|
68
|
+
/** "Quality". */
|
|
69
|
+
readonly quality: string;
|
|
70
|
+
/** "Auto": the quality the engine picks. */
|
|
71
|
+
readonly qualityAuto: string;
|
|
72
|
+
/** "Audio". */
|
|
73
|
+
readonly audio: string;
|
|
74
|
+
/** "Original": the badge of the original soundtrack. */
|
|
75
|
+
readonly original: string;
|
|
76
|
+
/** "AD": the badge of an audio description. */
|
|
77
|
+
readonly audioDescription: string;
|
|
78
|
+
/** "Mono". */
|
|
79
|
+
readonly mono: string;
|
|
80
|
+
/** "Stereo". */
|
|
81
|
+
readonly stereo: string;
|
|
82
|
+
/** "Track": "Track 2" names a track with no name or language. */
|
|
83
|
+
readonly track: string;
|
|
84
|
+
/** "Subtitles": the subtitles menu. */
|
|
85
|
+
readonly subtitles: string;
|
|
86
|
+
/** "Off": subtitles off. */
|
|
87
|
+
readonly subtitlesOff: string;
|
|
88
|
+
/** "SDH": the badge of subtitles for the deaf and hard of hearing. */
|
|
89
|
+
readonly sdh: string;
|
|
90
|
+
/** "CC": the badge of closed captions. */
|
|
91
|
+
readonly closedCaptions: string;
|
|
92
|
+
/** "Settings": the subtitle look. */
|
|
93
|
+
readonly subtitleSettings: string;
|
|
94
|
+
/** "Size". */
|
|
95
|
+
readonly subtitleSize: string;
|
|
96
|
+
/** "Small". */
|
|
97
|
+
readonly sizeSmall: string;
|
|
98
|
+
/** "Medium". */
|
|
99
|
+
readonly sizeMedium: string;
|
|
100
|
+
/** "Large". */
|
|
101
|
+
readonly sizeLarge: string;
|
|
102
|
+
/** "Extra large". */
|
|
103
|
+
readonly sizeExtraLarge: string;
|
|
104
|
+
/** "Background". */
|
|
105
|
+
readonly subtitleBackground: string;
|
|
106
|
+
/** "None": no background. */
|
|
107
|
+
readonly backgroundNone: string;
|
|
108
|
+
/** "Dark". */
|
|
109
|
+
readonly backgroundDark: string;
|
|
110
|
+
/** "Solid". */
|
|
111
|
+
readonly backgroundSolid: string;
|
|
112
|
+
/** "Video": the video menu. */
|
|
113
|
+
readonly video: string;
|
|
114
|
+
/** "Main": the main picture. */
|
|
115
|
+
readonly videoMain: string;
|
|
116
|
+
/** "Alternative": another version of the picture. */
|
|
117
|
+
readonly videoAlternative: string;
|
|
118
|
+
/** "Sign language". */
|
|
119
|
+
readonly videoSign: string;
|
|
120
|
+
/** "Captions": a version with captions in the picture. */
|
|
121
|
+
readonly videoCaptions: string;
|
|
122
|
+
/** "Subtitles": a version with subtitles in the picture. */
|
|
123
|
+
readonly videoSubtitles: string;
|
|
124
|
+
/** "Commentary". */
|
|
125
|
+
readonly videoCommentary: string;
|
|
126
|
+
/** "Skip": the marker button. */
|
|
127
|
+
readonly skip: string;
|
|
128
|
+
/** "Skip intro". */
|
|
129
|
+
readonly skipIntro: string;
|
|
130
|
+
/** "Skip credits". */
|
|
131
|
+
readonly skipCredits: string;
|
|
132
|
+
/** "Protected by {system}, {keys}": the DRM badge. */
|
|
133
|
+
readonly drmProtected: string;
|
|
134
|
+
/** "no key yet". */
|
|
135
|
+
readonly drmNoKey: string;
|
|
136
|
+
/** "{count} key: {statuses}". */
|
|
137
|
+
readonly drmKey: string;
|
|
138
|
+
/** "{count} keys: {statuses}". */
|
|
139
|
+
readonly drmKeys: string;
|
|
140
|
+
/** "Playing": the live region. */
|
|
141
|
+
readonly saidPlaying: string;
|
|
142
|
+
/** "Paused". */
|
|
143
|
+
readonly saidPaused: string;
|
|
144
|
+
/** "Audio: {track}". */
|
|
145
|
+
readonly saidAudio: string;
|
|
146
|
+
/** "Subtitles: {track}". */
|
|
147
|
+
readonly saidSubtitles: string;
|
|
148
|
+
/** "Subtitles off". */
|
|
149
|
+
readonly saidSubtitlesOff: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Every id a page can give words for. The player's ids are here; a
|
|
153
|
+
* package with words of its own adds its ids through declaration merging:
|
|
154
|
+
*
|
|
155
|
+
* ```ts
|
|
156
|
+
* declare module '@mattebox/player' {
|
|
157
|
+
* interface Messages extends PlaylistMessages {}
|
|
158
|
+
* }
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
export interface Messages extends PlayerMessages {
|
|
162
|
+
}
|
|
163
|
+
/** Some words of a language: a shipped one, or the page's own over it. */
|
|
164
|
+
export type Words = {
|
|
165
|
+
readonly [Id in keyof Messages]?: string;
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"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"}
|
package/dist/namespaces.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// src/namespaces.ts
|
|
2
2
|
/** The optional namespaces on an engine, each present exactly when its stage was composed. */
|
|
3
3
|
function namespaces(engine) {
|
|
4
4
|
return engine;
|
|
5
5
|
}
|
|
6
|
-
//#endregion
|
|
7
6
|
export { namespaces };
|
|
8
7
|
|
|
9
8
|
//# sourceMappingURL=namespaces.js.map
|
package/dist/presets.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/presets.ts
|
|
2
2
|
/** eme-core's teardown calls `element.setMediaKeys(null)` unguarded, so a build without EME throws out of `detach`. */
|
|
3
3
|
const DRM_STAGES = [
|
|
4
4
|
"eme-core",
|
|
@@ -35,7 +35,6 @@ async function resolvePreset(name) {
|
|
|
35
35
|
function drmGuard() {
|
|
36
36
|
return "setMediaKeys" in HTMLMediaElement.prototype ? {} : { without: DRM_STAGES };
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { drmGuard, resolvePreset };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=presets.js.map
|
package/dist/style.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
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 };
|
|
4
3
|
|
|
5
4
|
//# sourceMappingURL=style.js.map
|
package/dist/surface.d.ts
CHANGED
|
@@ -9,7 +9,10 @@ import type { PlayerError } from '@mattebox/player-core';
|
|
|
9
9
|
export interface ErrorSurface {
|
|
10
10
|
readonly root: HTMLElement;
|
|
11
11
|
show(error: PlayerError): void;
|
|
12
|
+
/** Shows a block's words, with no retry: a retry cannot lift a block. */
|
|
13
|
+
inform(title: string, message: string): void;
|
|
12
14
|
clear(): void;
|
|
13
15
|
}
|
|
14
|
-
|
|
16
|
+
/** `word` names the retry, in the player's language at the time of the error. */
|
|
17
|
+
export declare function errorSurface(retry: () => void, word: () => string): ErrorSurface;
|
|
15
18
|
//# sourceMappingURL=surface.d.ts.map
|
package/dist/surface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../src/surface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,KAAK,IAAI,IAAI,CAAC;CACf;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../src/surface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,yEAAyE;IACzE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,KAAK,IAAI,IAAI,CAAC;CACf;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,IAAI,EAAE,IAAI,EAAE,MAAM,MAAM,GAAG,YAAY,CA6BhF"}
|
package/dist/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,7 +30,6 @@ function errorSurface(retry) {
|
|
|
21
30
|
}
|
|
22
31
|
};
|
|
23
32
|
}
|
|
24
|
-
//#endregion
|
|
25
33
|
export { errorSurface };
|
|
26
34
|
|
|
27
35
|
//# sourceMappingURL=surface.js.map
|
package/dist/surface.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.js","names":[],"sources":["../src/surface.ts"],"sourcesContent":["/**\n * The error surface under native controls: a row under the video with the\n * category, the code and a retry. It outlives a session, because the core\n * reports \"no handler claimed this source\" when there is no session to\n * hang it on. It stays hidden until a fatal error arrives, and under\n * custom controls the error screen element carries the error instead.\n */\nimport type { PlayerError } from '@mattebox/player-core';\nimport { el } from './dom.js';\n\nexport interface ErrorSurface {\n readonly root: HTMLElement;\n show(error: PlayerError): void;\n clear(): void;\n}\n\nexport function errorSurface(retry: () => void): ErrorSurface {\n const root = el('div', 'error');\n const category = el('span', 'value error-category');\n const code = el('span', 'value error-code');\n const button = el('button', 'button error-retry'
|
|
1
|
+
{"version":3,"file":"surface.js","names":[],"sources":["../src/surface.ts"],"sourcesContent":["/**\n * The error surface under native controls: a row under the video with the\n * category, the code and a retry. It outlives a session, because the core\n * reports \"no handler claimed this source\" when there is no session to\n * hang it on. It stays hidden until a fatal error arrives, and under\n * custom controls the error screen element carries the error instead.\n */\nimport type { PlayerError } from '@mattebox/player-core';\nimport { el } from './dom.js';\n\nexport interface ErrorSurface {\n readonly root: HTMLElement;\n show(error: PlayerError): void;\n /** Shows a block's words, with no retry: a retry cannot lift a block. */\n inform(title: string, message: string): void;\n clear(): void;\n}\n\n/** `word` names the retry, in the player's language at the time of the error. */\nexport function errorSurface(retry: () => void, word: () => string): ErrorSurface {\n const root = el('div', 'error');\n const category = el('span', 'value error-category');\n const code = el('span', 'value error-code');\n const button = el('button', 'button error-retry');\n button.type = 'button';\n button.addEventListener('click', retry);\n root.append(category, code, button);\n root.hidden = true;\n\n return {\n root,\n show(error: PlayerError): void {\n category.textContent = error.category;\n code.textContent = error.code;\n button.textContent = word();\n button.hidden = false;\n root.hidden = false;\n },\n inform(title: string, message: string): void {\n category.textContent = title;\n code.textContent = message;\n button.hidden = true;\n root.hidden = false;\n },\n clear(): void {\n root.hidden = true;\n },\n };\n}\n"],"mappings":";;;AAmBA,SAAgB,aAAa,OAAmB,MAAkC;CAChF,MAAM,OAAO,GAAG,OAAO,OAAO;CAC9B,MAAM,WAAW,GAAG,QAAQ,sBAAsB;CAClD,MAAM,OAAO,GAAG,QAAQ,kBAAkB;CAC1C,MAAM,SAAS,GAAG,UAAU,oBAAoB;CAChD,OAAO,OAAO;CACd,OAAO,iBAAiB,SAAS,KAAK;CACtC,KAAK,OAAO,UAAU,MAAM,MAAM;CAClC,KAAK,SAAS;CAEd,OAAO;EACL;EACA,KAAK,OAA0B;GAC7B,SAAS,cAAc,MAAM;GAC7B,KAAK,cAAc,MAAM;GACzB,OAAO,cAAc,KAAK;GAC1B,OAAO,SAAS;GAChB,KAAK,SAAS;EAChB;EACA,OAAO,OAAe,SAAuB;GAC3C,SAAS,cAAc;GACvB,KAAK,cAAc;GACnB,OAAO,SAAS;GAChB,KAAK,SAAS;EAChB;EACA,QAAc;GACZ,KAAK,SAAS;EAChB;CACF;AACF"}
|
package/dist/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,7 +29,6 @@ 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 };
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=tags.js.map
|
package/dist/text.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Words a page gives the player, such as why a programme is blocked: one
|
|
3
|
+
* string, or the same words by language tag, which the player reads in
|
|
4
|
+
* its own language and reads again on `localechange`.
|
|
5
|
+
*/
|
|
6
|
+
import type { Text } from '@mattebox/player-core';
|
|
7
|
+
export type { Text };
|
|
8
|
+
/**
|
|
9
|
+
* The words of `text` for `locale`: the tag, then its language alone, so
|
|
10
|
+
* `de-CH` falls back to `de` (BCP 47 lookup, RFC 4647 §3.4), then English,
|
|
11
|
+
* then the first entry. Tags compare without case.
|
|
12
|
+
*/
|
|
13
|
+
export declare function textIn(text: Text, locale: string): string;
|
|
14
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAElD,YAAY,EAAE,IAAI,EAAE,CAAC;AAErB;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAYzD"}
|
package/dist/text.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
if (typeof text === "string") return text;
|
|
9
|
+
const tags = /* @__PURE__ */ new Map();
|
|
10
|
+
for (const tag of Object.keys(text)) tags.set(tag.toLowerCase(), text[tag]);
|
|
11
|
+
const key = locale.toLowerCase();
|
|
12
|
+
return tags.get(key) ?? tags.get(key.split("-")[0]) ?? tags.get("en") ?? tags.values().next().value ?? "";
|
|
13
|
+
}
|
|
14
|
+
export { textIn };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=text.js.map
|
package/dist/text.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","names":[],"sources":["../src/text.ts"],"sourcesContent":["/**\n * Words a page gives the player, such as why a programme is blocked: one\n * string, or the same words by language tag, which the player reads in\n * its own language and reads again on `localechange`.\n */\n\nimport type { Text } from '@mattebox/player-core';\n\nexport type { Text };\n\n/**\n * The words of `text` for `locale`: the tag, then its language alone, so\n * `de-CH` falls back to `de` (BCP 47 lookup, RFC 4647 §3.4), then English,\n * then the first entry. Tags compare without case.\n */\nexport function textIn(text: Text, locale: string): string {\n if (typeof text === 'string') return text;\n const tags = new Map<string, string>();\n for (const tag of Object.keys(text)) tags.set(tag.toLowerCase(), text[tag] as string);\n const key = locale.toLowerCase();\n return (\n tags.get(key) ??\n tags.get(key.split('-')[0] as string) ??\n tags.get('en') ??\n tags.values().next().value ??\n ''\n );\n}\n"],"mappings":";;;;;;AAeA,SAAgB,OAAO,MAAY,QAAwB;CACzD,IAAI,OAAO,SAAS,UAAU,OAAO;CACrC,MAAM,uBAAO,IAAI,IAAoB;CACrC,KAAK,MAAM,OAAO,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,YAAY,GAAG,KAAK,IAAc;CACpF,MAAM,MAAM,OAAO,YAAY;CAC/B,OACE,KAAK,IAAI,GAAG,KACZ,KAAK,IAAI,IAAI,MAAM,GAAG,CAAC,CAAC,EAAY,KACpC,KAAK,IAAI,IAAI,KACb,KAAK,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,SACrB;AAEJ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The trackers of one player: what the page added, started at each
|
|
3
|
+
* programme and stopped at its end. The page decides which trackers run,
|
|
4
|
+
* and when it adds or removes them; the player only starts and stops them.
|
|
5
|
+
* The lifecycle is pillarbox-apple's `PlayerItemTracker`, enable at the
|
|
6
|
+
* start of an item and disable at its end, without its tracking switch:
|
|
7
|
+
* consent is the page's to decide.
|
|
8
|
+
*/
|
|
9
|
+
import type { Programme } from '@mattebox/player-core';
|
|
10
|
+
import type { PlayerHost, Tracker, Trackers } from './host.js';
|
|
11
|
+
export type { Tracker, Trackers };
|
|
12
|
+
/** What the element drives: the programme that starts, or null at its end. */
|
|
13
|
+
export interface TrackerRunner extends Trackers {
|
|
14
|
+
begin(programme: Programme | null): void;
|
|
15
|
+
}
|
|
16
|
+
/** The trackers of `host`. `changed` runs after each start, stop, addition and removal. */
|
|
17
|
+
export declare function createTrackers(host: PlayerHost, changed: () => void): TrackerRunner;
|
|
18
|
+
//# sourceMappingURL=trackers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackers.d.ts","sourceRoot":"","sources":["../src/trackers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE/D,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAElC,8EAA8E;AAC9E,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,KAAK,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;CAC1C;AAaD,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,aAAa,CA8BnF"}
|