@mattebox/player 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/mattebox-player.min.js +3 -3
- package/dist/controls/chapters.d.ts +2 -8
- package/dist/controls/chapters.d.ts.map +1 -1
- package/dist/controls/chapters.js +1 -1
- package/dist/controls/chapters.js.map +1 -1
- package/dist/controls/cues.d.ts.map +1 -1
- package/dist/controls/cues.js +2 -2
- package/dist/controls/cues.js.map +1 -1
- package/dist/controls/icons.d.ts +1 -1
- package/dist/controls/icons.d.ts.map +1 -1
- package/dist/controls/icons.js +2 -0
- package/dist/controls/icons.js.map +1 -1
- package/dist/controls/native-tracks.js +1 -1
- package/dist/controls/native-tracks.js.map +1 -1
- package/dist/element-entry.d.ts +1 -0
- package/dist/element-entry.d.ts.map +1 -1
- package/dist/element-entry.js.map +1 -1
- package/dist/element.d.ts +68 -5
- package/dist/element.d.ts.map +1 -1
- package/dist/element.js +242 -42
- package/dist/element.js.map +1 -1
- package/dist/elements/airplay-button.js +1 -1
- package/dist/elements/airplay-button.js.map +1 -1
- package/dist/elements/audio-menu.d.ts.map +1 -1
- package/dist/elements/audio-menu.js +4 -3
- package/dist/elements/audio-menu.js.map +1 -1
- package/dist/elements/casting.d.ts +15 -0
- package/dist/elements/casting.d.ts.map +1 -0
- package/dist/elements/casting.js +55 -0
- package/dist/elements/casting.js.map +1 -0
- package/dist/elements/chapters-menu.js +5 -5
- package/dist/elements/chapters-menu.js.map +1 -1
- package/dist/elements/component.d.ts +13 -0
- package/dist/elements/component.d.ts.map +1 -1
- package/dist/elements/component.js +21 -3
- package/dist/elements/component.js.map +1 -1
- package/dist/elements/control-bar.d.ts +16 -2
- package/dist/elements/control-bar.d.ts.map +1 -1
- package/dist/elements/control-bar.js +29 -7
- package/dist/elements/control-bar.js.map +1 -1
- package/dist/elements/current-time.js +2 -2
- package/dist/elements/current-time.js.map +1 -1
- package/dist/elements/drm-badge.js +2 -2
- package/dist/elements/drm-badge.js.map +1 -1
- package/dist/elements/duration.js +3 -3
- package/dist/elements/duration.js.map +1 -1
- package/dist/elements/error-screen.js +2 -2
- package/dist/elements/error-screen.js.map +1 -1
- package/dist/elements/fullscreen-button.d.ts.map +1 -1
- package/dist/elements/fullscreen-button.js +3 -2
- package/dist/elements/fullscreen-button.js.map +1 -1
- package/dist/elements/live-button.js +3 -3
- package/dist/elements/live-button.js.map +1 -1
- package/dist/elements/marker-button.js +3 -3
- package/dist/elements/marker-button.js.map +1 -1
- package/dist/elements/menu-element.js +3 -3
- package/dist/elements/menu-element.js.map +1 -1
- package/dist/elements/mute-button.js +3 -3
- package/dist/elements/mute-button.js.map +1 -1
- package/dist/elements/pip-button.d.ts.map +1 -1
- package/dist/elements/pip-button.js +6 -2
- package/dist/elements/pip-button.js.map +1 -1
- package/dist/elements/play-button.js +3 -3
- package/dist/elements/play-button.js.map +1 -1
- package/dist/elements/quality-menu.d.ts.map +1 -1
- package/dist/elements/quality-menu.js +5 -4
- package/dist/elements/quality-menu.js.map +1 -1
- package/dist/elements/remaining-time.js +2 -2
- package/dist/elements/remaining-time.js.map +1 -1
- package/dist/elements/scan-button.d.ts.map +1 -1
- package/dist/elements/scan-button.js +4 -3
- package/dist/elements/scan-button.js.map +1 -1
- package/dist/elements/seek-bar.d.ts.map +1 -1
- package/dist/elements/seek-bar.js +20 -16
- package/dist/elements/seek-bar.js.map +1 -1
- package/dist/elements/shared.js +4 -4
- package/dist/elements/shared.js.map +1 -1
- package/dist/elements/skip-button.js +2 -2
- package/dist/elements/skip-button.js.map +1 -1
- package/dist/elements/spacer.js.map +1 -1
- package/dist/elements/speed-menu.d.ts.map +1 -1
- package/dist/elements/speed-menu.js +4 -3
- package/dist/elements/speed-menu.js.map +1 -1
- package/dist/elements/spinner.js +1 -1
- package/dist/elements/spinner.js.map +1 -1
- package/dist/elements/start-button.js +3 -3
- package/dist/elements/start-button.js.map +1 -1
- package/dist/elements/subtitles-menu.d.ts.map +1 -1
- package/dist/elements/subtitles-menu.js +34 -10
- package/dist/elements/subtitles-menu.js.map +1 -1
- package/dist/elements/time-element.js +1 -1
- package/dist/elements/time-element.js.map +1 -1
- package/dist/elements/title.js +1 -1
- package/dist/elements/title.js.map +1 -1
- package/dist/elements/video-menu.d.ts.map +1 -1
- package/dist/elements/video-menu.js +5 -4
- package/dist/elements/video-menu.js.map +1 -1
- package/dist/elements/volume-slider.js +4 -4
- package/dist/elements/volume-slider.js.map +1 -1
- package/dist/elements/volume.js.map +1 -1
- package/dist/entries/airplay-button.js +1 -1
- package/dist/entries/audio-menu.js +1 -1
- package/dist/entries/casting.d.ts +5 -0
- package/dist/entries/casting.d.ts.map +1 -0
- package/dist/entries/casting.js +8 -0
- package/dist/entries/casting.js.map +1 -0
- package/dist/entries/chapters-menu.js +1 -1
- package/dist/entries/control-bar.js +1 -1
- package/dist/entries/current-time.js +1 -1
- package/dist/entries/drm-badge.js +1 -1
- package/dist/entries/duration.js +1 -1
- package/dist/entries/error-screen.js +1 -1
- package/dist/entries/fullscreen-button.js +1 -1
- package/dist/entries/live-button.js +1 -1
- package/dist/entries/marker-button.js +1 -1
- package/dist/entries/mute-button.js +1 -1
- package/dist/entries/pip-button.js +1 -1
- package/dist/entries/play-button.js +1 -1
- package/dist/entries/quality-menu.js +1 -1
- package/dist/entries/remaining-time.js +1 -1
- package/dist/entries/scan-button.js +1 -1
- package/dist/entries/seek-bar.js +1 -1
- package/dist/entries/skip-button.js +1 -1
- package/dist/entries/spacer.js +1 -1
- package/dist/entries/speed-menu.js +1 -1
- package/dist/entries/spinner.js +1 -1
- package/dist/entries/start-button.js +1 -1
- package/dist/entries/subtitles-menu.js +1 -1
- package/dist/entries/title.js +1 -1
- package/dist/entries/video-menu.js +1 -1
- package/dist/entries/volume-slider.js +1 -1
- package/dist/entries/volume.js +1 -1
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.155.0 → _@oxc-project_runtime@0.158.0}/helpers/esm/asyncToGenerator.js +1 -1
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.155.0 → _@oxc-project_runtime@0.158.0}/helpers/esm/defineProperty.js +1 -1
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.155.0 → _@oxc-project_runtime@0.158.0}/helpers/esm/objectSpread2.js +1 -1
- package/dist/es2015/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/toPrimitive.js +13 -0
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.155.0 → _@oxc-project_runtime@0.158.0}/helpers/esm/toPropertyKey.js +1 -1
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.155.0 → _@oxc-project_runtime@0.158.0}/helpers/esm/typeof.js +1 -1
- package/dist/es2015/controls/chapters.js +2 -2
- package/dist/es2015/controls/cues.js +2 -2
- package/dist/es2015/controls/icons.js +2 -0
- package/dist/es2015/controls/menu.js +1 -1
- package/dist/es2015/controls/native-tracks.js +1 -1
- package/dist/es2015/element.js +262 -55
- package/dist/es2015/elements/airplay-button.js +1 -1
- package/dist/es2015/elements/audio-menu.js +4 -3
- package/dist/es2015/elements/casting.js +55 -0
- package/dist/es2015/elements/chapters-menu.js +5 -5
- package/dist/es2015/elements/component.js +26 -7
- package/dist/es2015/elements/control-bar.js +29 -7
- package/dist/es2015/elements/current-time.js +2 -2
- package/dist/es2015/elements/drm-badge.js +2 -2
- package/dist/es2015/elements/duration.js +3 -3
- package/dist/es2015/elements/error-screen.js +2 -2
- package/dist/es2015/elements/fullscreen-button.js +3 -2
- package/dist/es2015/elements/live-button.js +3 -3
- package/dist/es2015/elements/marker-button.js +3 -3
- package/dist/es2015/elements/menu-element.js +4 -4
- package/dist/es2015/elements/mute-button.js +3 -3
- package/dist/es2015/elements/pip-button.js +6 -2
- package/dist/es2015/elements/play-button.js +3 -3
- package/dist/es2015/elements/quality-menu.js +5 -4
- package/dist/es2015/elements/remaining-time.js +2 -2
- package/dist/es2015/elements/scan-button.js +4 -3
- package/dist/es2015/elements/seek-bar.js +20 -16
- package/dist/es2015/elements/shared.js +4 -4
- package/dist/es2015/elements/skip-button.js +2 -2
- package/dist/es2015/elements/speed-menu.js +4 -3
- package/dist/es2015/elements/spinner.js +1 -1
- package/dist/es2015/elements/start-button.js +3 -3
- package/dist/es2015/elements/subtitles-menu.js +34 -10
- package/dist/es2015/elements/time-element.js +1 -1
- package/dist/es2015/elements/title.js +1 -1
- package/dist/es2015/elements/video-menu.js +5 -4
- package/dist/es2015/elements/volume-slider.js +4 -4
- package/dist/es2015/entries/airplay-button.js +1 -1
- package/dist/es2015/entries/audio-menu.js +1 -1
- package/dist/es2015/entries/casting.js +6 -0
- package/dist/es2015/entries/chapters-menu.js +1 -1
- package/dist/es2015/entries/control-bar.js +1 -1
- package/dist/es2015/entries/current-time.js +1 -1
- package/dist/es2015/entries/drm-badge.js +1 -1
- package/dist/es2015/entries/duration.js +1 -1
- package/dist/es2015/entries/error-screen.js +1 -1
- package/dist/es2015/entries/fullscreen-button.js +1 -1
- package/dist/es2015/entries/live-button.js +1 -1
- package/dist/es2015/entries/marker-button.js +1 -1
- package/dist/es2015/entries/mute-button.js +1 -1
- package/dist/es2015/entries/pip-button.js +1 -1
- package/dist/es2015/entries/play-button.js +1 -1
- package/dist/es2015/entries/quality-menu.js +1 -1
- package/dist/es2015/entries/remaining-time.js +1 -1
- package/dist/es2015/entries/scan-button.js +1 -1
- package/dist/es2015/entries/seek-bar.js +1 -1
- package/dist/es2015/entries/skip-button.js +1 -1
- package/dist/es2015/entries/spacer.js +1 -1
- package/dist/es2015/entries/speed-menu.js +1 -1
- package/dist/es2015/entries/spinner.js +1 -1
- package/dist/es2015/entries/start-button.js +1 -1
- package/dist/es2015/entries/subtitles-menu.js +1 -1
- package/dist/es2015/entries/title.js +1 -1
- package/dist/es2015/entries/video-menu.js +1 -1
- package/dist/es2015/entries/volume-slider.js +1 -1
- package/dist/es2015/entries/volume.js +1 -1
- package/dist/es2015/host.js +9 -1
- package/dist/es2015/index.js +5 -3
- package/dist/es2015/locales/ar.js +4 -1
- package/dist/es2015/locales/ca.js +4 -1
- package/dist/es2015/locales/de.js +4 -1
- package/dist/es2015/locales/es.js +4 -1
- package/dist/es2015/locales/fr.js +4 -1
- package/dist/es2015/locales/hi.js +4 -1
- package/dist/es2015/locales/it.js +4 -1
- package/dist/es2015/locales/ja.js +4 -1
- package/dist/es2015/locales/ko.js +4 -1
- package/dist/es2015/locales/pt.js +4 -1
- package/dist/es2015/locales/zh.js +4 -1
- package/dist/es2015/locales.js +1 -1
- package/dist/es2015/media.js +136 -0
- package/dist/es2015/presets.js +3 -2
- package/dist/es2015/style.js +1 -1
- package/dist/es2015/tags.js +2 -1
- package/dist/es2015/video-sources.js +1 -1
- package/dist/host.d.ts +32 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +9 -1
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/locales/ar.d.ts +3 -0
- package/dist/locales/ar.d.ts.map +1 -1
- package/dist/locales/ar.js +4 -1
- package/dist/locales/ar.js.map +1 -1
- package/dist/locales/ca.d.ts +3 -0
- package/dist/locales/ca.d.ts.map +1 -1
- package/dist/locales/ca.js +4 -1
- package/dist/locales/ca.js.map +1 -1
- package/dist/locales/de.d.ts +3 -0
- package/dist/locales/de.d.ts.map +1 -1
- package/dist/locales/de.js +4 -1
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/es.d.ts +3 -0
- package/dist/locales/es.d.ts.map +1 -1
- package/dist/locales/es.js +4 -1
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.d.ts +3 -0
- package/dist/locales/fr.d.ts.map +1 -1
- package/dist/locales/fr.js +4 -1
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/hi.d.ts +3 -0
- package/dist/locales/hi.d.ts.map +1 -1
- package/dist/locales/hi.js +4 -1
- package/dist/locales/hi.js.map +1 -1
- package/dist/locales/it.d.ts +3 -0
- package/dist/locales/it.d.ts.map +1 -1
- package/dist/locales/it.js +4 -1
- package/dist/locales/it.js.map +1 -1
- package/dist/locales/ja.d.ts +3 -0
- package/dist/locales/ja.d.ts.map +1 -1
- package/dist/locales/ja.js +4 -1
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.d.ts +3 -0
- package/dist/locales/ko.d.ts.map +1 -1
- package/dist/locales/ko.js +4 -1
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/pt.d.ts +3 -0
- package/dist/locales/pt.d.ts.map +1 -1
- package/dist/locales/pt.js +4 -1
- package/dist/locales/pt.js.map +1 -1
- package/dist/locales/zh.d.ts +3 -0
- package/dist/locales/zh.d.ts.map +1 -1
- package/dist/locales/zh.js +4 -1
- package/dist/locales/zh.js.map +1 -1
- package/dist/media.d.ts +22 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +136 -0
- package/dist/media.js.map +1 -0
- package/dist/messages.d.ts +6 -0
- package/dist/messages.d.ts.map +1 -1
- package/dist/presets.js +2 -1
- package/dist/presets.js.map +1 -1
- package/dist/remote.d.ts +80 -0
- package/dist/remote.d.ts.map +1 -0
- package/dist/style.js +1 -1
- package/dist/style.js.map +1 -1
- package/dist/tags.d.ts +1 -0
- package/dist/tags.d.ts.map +1 -1
- package/dist/tags.js +2 -1
- package/dist/tags.js.map +1 -1
- package/package.json +3 -3
- package/dist/es2015/_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/toPrimitive.js +0 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SPEED_MENU } from "../tags.js";
|
|
2
1
|
import "../element-entry.js";
|
|
3
2
|
import { MbxSpeedMenu } from "../elements/speed-menu.js";
|
|
3
|
+
import { SPEED_MENU } from "../tags.js";
|
|
4
4
|
// src/entries/speed-menu.ts
|
|
5
5
|
if (customElements.get("mbx-speed-menu") === void 0) customElements.define(SPEED_MENU, MbxSpeedMenu);
|
|
6
6
|
export { MbxSpeedMenu };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SPINNER } from "../tags.js";
|
|
2
1
|
import "../element-entry.js";
|
|
3
2
|
import { MbxSpinner } from "../elements/spinner.js";
|
|
3
|
+
import { SPINNER } from "../tags.js";
|
|
4
4
|
// src/entries/spinner.ts
|
|
5
5
|
if (customElements.get("mbx-spinner") === void 0) customElements.define(SPINNER, MbxSpinner);
|
|
6
6
|
export { MbxSpinner };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { START_BUTTON } from "../tags.js";
|
|
2
1
|
import "../element-entry.js";
|
|
3
2
|
import { MbxStartButton } from "../elements/start-button.js";
|
|
3
|
+
import { START_BUTTON } from "../tags.js";
|
|
4
4
|
// src/entries/start-button.ts
|
|
5
5
|
if (customElements.get("mbx-start-button") === void 0) customElements.define(START_BUTTON, MbxStartButton);
|
|
6
6
|
export { MbxStartButton };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SUBTITLES_MENU } from "../tags.js";
|
|
2
1
|
import "../element-entry.js";
|
|
3
2
|
import { MbxSubtitlesMenu } from "../elements/subtitles-menu.js";
|
|
3
|
+
import { SUBTITLES_MENU } from "../tags.js";
|
|
4
4
|
// src/entries/subtitles-menu.ts
|
|
5
5
|
if (customElements.get("mbx-subtitles-menu") === void 0) customElements.define(SUBTITLES_MENU, MbxSubtitlesMenu);
|
|
6
6
|
export { MbxSubtitlesMenu };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TITLE } from "../tags.js";
|
|
2
1
|
import "../element-entry.js";
|
|
3
2
|
import { MbxTitle } from "../elements/title.js";
|
|
3
|
+
import { TITLE } from "../tags.js";
|
|
4
4
|
// src/entries/title.ts
|
|
5
5
|
if (customElements.get("mbx-title") === void 0) customElements.define(TITLE, MbxTitle);
|
|
6
6
|
export { MbxTitle };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { VIDEO_MENU } from "../tags.js";
|
|
2
1
|
import "../element-entry.js";
|
|
3
2
|
import { MbxVideoMenu } from "../elements/video-menu.js";
|
|
3
|
+
import { VIDEO_MENU } from "../tags.js";
|
|
4
4
|
// src/entries/video-menu.ts
|
|
5
5
|
if (customElements.get("mbx-video-menu") === void 0) customElements.define(VIDEO_MENU, MbxVideoMenu);
|
|
6
6
|
export { MbxVideoMenu };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { VOLUME_SLIDER } from "../tags.js";
|
|
2
1
|
import "../element-entry.js";
|
|
3
2
|
import { MbxVolumeSlider } from "../elements/volume-slider.js";
|
|
3
|
+
import { VOLUME_SLIDER } from "../tags.js";
|
|
4
4
|
// src/entries/volume-slider.ts
|
|
5
5
|
if (customElements.get("mbx-volume-slider") === void 0) customElements.define(VOLUME_SLIDER, MbxVolumeSlider);
|
|
6
6
|
export { MbxVolumeSlider };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { VOLUME } from "../tags.js";
|
|
2
1
|
import "../element-entry.js";
|
|
3
2
|
import "./mute-button.js";
|
|
4
3
|
import "./volume-slider.js";
|
|
5
4
|
import { MbxVolume } from "../elements/volume.js";
|
|
5
|
+
import { VOLUME } from "../tags.js";
|
|
6
6
|
// src/entries/volume.ts
|
|
7
7
|
if (customElements.get("mbx-volume") === void 0) customElements.define(VOLUME, MbxVolume);
|
|
8
8
|
export { MbxVolume };
|
package/dist/es2015/host.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import "./tags.js";
|
|
2
2
|
// src/host.ts
|
|
3
|
+
/**
|
|
4
|
+
* The player's `<video>` node, for an API that takes the element itself,
|
|
5
|
+
* such as an observer, or to tell a click on it. `player.media` is not a
|
|
6
|
+
* node. Null before the player is in the page.
|
|
7
|
+
*/
|
|
8
|
+
function videoOf(player) {
|
|
9
|
+
return player.querySelector(":scope > video");
|
|
10
|
+
}
|
|
3
11
|
/** The parent, or the host of the shadow root `node` sits in, or null at the document. */
|
|
4
12
|
function above(node) {
|
|
5
13
|
const parent = node.parentNode;
|
|
@@ -19,4 +27,4 @@ function findPlayer(node) {
|
|
|
19
27
|
}
|
|
20
28
|
return null;
|
|
21
29
|
}
|
|
22
|
-
export { findPlayer };
|
|
30
|
+
export { findPlayer, videoOf };
|
package/dist/es2015/index.js
CHANGED
|
@@ -4,6 +4,8 @@ import { MbxAirplayButton } from "./elements/airplay-button.js";
|
|
|
4
4
|
import "./entries/airplay-button.js";
|
|
5
5
|
import { MbxAudioMenu } from "./elements/audio-menu.js";
|
|
6
6
|
import "./entries/audio-menu.js";
|
|
7
|
+
import { MbxCasting } from "./elements/casting.js";
|
|
8
|
+
import "./entries/casting.js";
|
|
7
9
|
import { MbxChaptersMenu } from "./elements/chapters-menu.js";
|
|
8
10
|
import "./entries/chapters-menu.js";
|
|
9
11
|
import { MbxControlBar } from "./elements/control-bar.js";
|
|
@@ -53,8 +55,8 @@ import "./entries/title.js";
|
|
|
53
55
|
import { MbxVideoMenu } from "./elements/video-menu.js";
|
|
54
56
|
import "./entries/video-menu.js";
|
|
55
57
|
import { MbxVolumeSlider } from "./elements/volume-slider.js";
|
|
56
|
-
import "./entries/volume-slider.js";
|
|
57
|
-
import { MbxVolume } from "./elements/volume.js";
|
|
58
58
|
import "./entries/volume.js";
|
|
59
|
+
import { MbxVolume } from "./elements/volume.js";
|
|
60
|
+
import "./entries/volume-slider.js";
|
|
59
61
|
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 };
|
|
62
|
+
export { MatteboxPlayerElement, MbxAirplayButton, MbxAudioMenu, MbxCasting, 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 };
|
|
@@ -40,6 +40,8 @@ var ar_default = {
|
|
|
40
40
|
track: "المسار",
|
|
41
41
|
subtitles: "الترجمة",
|
|
42
42
|
subtitlesOff: "إيقاف",
|
|
43
|
+
liveCaptions: "ترجمة مباشرة",
|
|
44
|
+
liveCaptionsGenerated: "مُنشأة تلقائيًا من الكلام",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "الإعدادات",
|
|
@@ -70,6 +72,7 @@ var ar_default = {
|
|
|
70
72
|
saidPaused: "متوقف مؤقتًا",
|
|
71
73
|
saidAudio: "الصوت: {track}",
|
|
72
74
|
saidSubtitles: "الترجمة: {track}",
|
|
73
|
-
saidSubtitlesOff: "الترجمة متوقفة"
|
|
75
|
+
saidSubtitlesOff: "الترجمة متوقفة",
|
|
76
|
+
castingTo: "الإرسال إلى {device}"
|
|
74
77
|
};
|
|
75
78
|
export { ar_default as default };
|
|
@@ -40,6 +40,8 @@ var ca_default = {
|
|
|
40
40
|
track: "Pista",
|
|
41
41
|
subtitles: "Subtítols",
|
|
42
42
|
subtitlesOff: "Cap",
|
|
43
|
+
liveCaptions: "Subtítols en directe",
|
|
44
|
+
liveCaptionsGenerated: "Generats automàticament a partir de la veu",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "Opcions",
|
|
@@ -70,6 +72,7 @@ var ca_default = {
|
|
|
70
72
|
saidPaused: "En pausa",
|
|
71
73
|
saidAudio: "Àudio: {track}",
|
|
72
74
|
saidSubtitles: "Subtítols: {track}",
|
|
73
|
-
saidSubtitlesOff: "Subtítols desactivats"
|
|
75
|
+
saidSubtitlesOff: "Subtítols desactivats",
|
|
76
|
+
castingTo: "Enviant a {device}"
|
|
74
77
|
};
|
|
75
78
|
export { ca_default as default };
|
|
@@ -40,6 +40,8 @@ var de_default = {
|
|
|
40
40
|
track: "Spur",
|
|
41
41
|
subtitles: "Untertitel",
|
|
42
42
|
subtitlesOff: "Aus",
|
|
43
|
+
liveCaptions: "Live-Untertitel",
|
|
44
|
+
liveCaptionsGenerated: "Automatisch aus der Sprache erzeugt",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "Einstellungen",
|
|
@@ -70,6 +72,7 @@ var de_default = {
|
|
|
70
72
|
saidPaused: "Angehalten",
|
|
71
73
|
saidAudio: "Audio: {track}",
|
|
72
74
|
saidSubtitles: "Untertitel: {track}",
|
|
73
|
-
saidSubtitlesOff: "Untertitel aus"
|
|
75
|
+
saidSubtitlesOff: "Untertitel aus",
|
|
76
|
+
castingTo: "Wiedergabe auf {device}"
|
|
74
77
|
};
|
|
75
78
|
export { de_default as default };
|
|
@@ -40,6 +40,8 @@ var es_default = {
|
|
|
40
40
|
track: "Pista",
|
|
41
41
|
subtitles: "Subtítulos",
|
|
42
42
|
subtitlesOff: "Desactivados",
|
|
43
|
+
liveCaptions: "Subtítulos en directo",
|
|
44
|
+
liveCaptionsGenerated: "Generados automáticamente a partir del habla",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "Ajustes",
|
|
@@ -70,6 +72,7 @@ var es_default = {
|
|
|
70
72
|
saidPaused: "En pausa",
|
|
71
73
|
saidAudio: "Audio: {track}",
|
|
72
74
|
saidSubtitles: "Subtítulos: {track}",
|
|
73
|
-
saidSubtitlesOff: "Subtítulos desactivados"
|
|
75
|
+
saidSubtitlesOff: "Subtítulos desactivados",
|
|
76
|
+
castingTo: "Enviando a {device}"
|
|
74
77
|
};
|
|
75
78
|
export { es_default as default };
|
|
@@ -40,6 +40,8 @@ var fr_default = {
|
|
|
40
40
|
track: "Piste",
|
|
41
41
|
subtitles: "Sous-titres",
|
|
42
42
|
subtitlesOff: "Désactivés",
|
|
43
|
+
liveCaptions: "Sous-titres en direct",
|
|
44
|
+
liveCaptionsGenerated: "Générés automatiquement à partir de la parole",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "Réglages",
|
|
@@ -70,6 +72,7 @@ var fr_default = {
|
|
|
70
72
|
saidPaused: "En pause",
|
|
71
73
|
saidAudio: "Audio : {track}",
|
|
72
74
|
saidSubtitles: "Sous-titres : {track}",
|
|
73
|
-
saidSubtitlesOff: "Sous-titres désactivés"
|
|
75
|
+
saidSubtitlesOff: "Sous-titres désactivés",
|
|
76
|
+
castingTo: "Diffusion sur {device}"
|
|
74
77
|
};
|
|
75
78
|
export { fr_default as default };
|
|
@@ -40,6 +40,8 @@ var hi_default = {
|
|
|
40
40
|
track: "ट्रैक",
|
|
41
41
|
subtitles: "उपशीर्षक",
|
|
42
42
|
subtitlesOff: "बंद",
|
|
43
|
+
liveCaptions: "लाइव कैप्शन",
|
|
44
|
+
liveCaptionsGenerated: "बोली से अपने आप बनाए गए",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "सेटिंग",
|
|
@@ -70,6 +72,7 @@ var hi_default = {
|
|
|
70
72
|
saidPaused: "रुका हुआ",
|
|
71
73
|
saidAudio: "ऑडियो: {track}",
|
|
72
74
|
saidSubtitles: "उपशीर्षक: {track}",
|
|
73
|
-
saidSubtitlesOff: "उपशीर्षक बंद"
|
|
75
|
+
saidSubtitlesOff: "उपशीर्षक बंद",
|
|
76
|
+
castingTo: "{device} पर कास्ट हो रहा है"
|
|
74
77
|
};
|
|
75
78
|
export { hi_default as default };
|
|
@@ -40,6 +40,8 @@ var it_default = {
|
|
|
40
40
|
track: "Traccia",
|
|
41
41
|
subtitles: "Sottotitoli",
|
|
42
42
|
subtitlesOff: "Disattivati",
|
|
43
|
+
liveCaptions: "Sottotitoli in diretta",
|
|
44
|
+
liveCaptionsGenerated: "Generati automaticamente dal parlato",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "Impostazioni",
|
|
@@ -70,6 +72,7 @@ var it_default = {
|
|
|
70
72
|
saidPaused: "In pausa",
|
|
71
73
|
saidAudio: "Audio: {track}",
|
|
72
74
|
saidSubtitles: "Sottotitoli: {track}",
|
|
73
|
-
saidSubtitlesOff: "Sottotitoli disattivati"
|
|
75
|
+
saidSubtitlesOff: "Sottotitoli disattivati",
|
|
76
|
+
castingTo: "Trasmissione su {device}"
|
|
74
77
|
};
|
|
75
78
|
export { it_default as default };
|
|
@@ -40,6 +40,8 @@ var ja_default = {
|
|
|
40
40
|
track: "トラック",
|
|
41
41
|
subtitles: "字幕",
|
|
42
42
|
subtitlesOff: "オフ",
|
|
43
|
+
liveCaptions: "ライブ字幕",
|
|
44
|
+
liveCaptionsGenerated: "音声から自動生成",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "設定",
|
|
@@ -70,6 +72,7 @@ var ja_default = {
|
|
|
70
72
|
saidPaused: "一時停止",
|
|
71
73
|
saidAudio: "音声: {track}",
|
|
72
74
|
saidSubtitles: "字幕: {track}",
|
|
73
|
-
saidSubtitlesOff: "字幕オフ"
|
|
75
|
+
saidSubtitlesOff: "字幕オフ",
|
|
76
|
+
castingTo: "{device} にキャスト中"
|
|
74
77
|
};
|
|
75
78
|
export { ja_default as default };
|
|
@@ -40,6 +40,8 @@ var ko_default = {
|
|
|
40
40
|
track: "트랙",
|
|
41
41
|
subtitles: "자막",
|
|
42
42
|
subtitlesOff: "끄기",
|
|
43
|
+
liveCaptions: "실시간 자막",
|
|
44
|
+
liveCaptionsGenerated: "음성에서 자동 생성됨",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "설정",
|
|
@@ -70,6 +72,7 @@ var ko_default = {
|
|
|
70
72
|
saidPaused: "일시정지됨",
|
|
71
73
|
saidAudio: "오디오: {track}",
|
|
72
74
|
saidSubtitles: "자막: {track}",
|
|
73
|
-
saidSubtitlesOff: "자막 끔"
|
|
75
|
+
saidSubtitlesOff: "자막 끔",
|
|
76
|
+
castingTo: "{device}에 전송 중"
|
|
74
77
|
};
|
|
75
78
|
export { ko_default as default };
|
|
@@ -40,6 +40,8 @@ var pt_default = {
|
|
|
40
40
|
track: "Faixa",
|
|
41
41
|
subtitles: "Legendas",
|
|
42
42
|
subtitlesOff: "Desligadas",
|
|
43
|
+
liveCaptions: "Legendas em direto",
|
|
44
|
+
liveCaptionsGenerated: "Geradas automaticamente a partir da fala",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "Definições",
|
|
@@ -70,6 +72,7 @@ var pt_default = {
|
|
|
70
72
|
saidPaused: "Em pausa",
|
|
71
73
|
saidAudio: "Áudio: {track}",
|
|
72
74
|
saidSubtitles: "Legendas: {track}",
|
|
73
|
-
saidSubtitlesOff: "Legendas desativadas"
|
|
75
|
+
saidSubtitlesOff: "Legendas desativadas",
|
|
76
|
+
castingTo: "A transmitir para {device}"
|
|
74
77
|
};
|
|
75
78
|
export { pt_default as default };
|
|
@@ -40,6 +40,8 @@ var zh_default = {
|
|
|
40
40
|
track: "字幕轨",
|
|
41
41
|
subtitles: "字幕",
|
|
42
42
|
subtitlesOff: "关闭",
|
|
43
|
+
liveCaptions: "实时字幕",
|
|
44
|
+
liveCaptionsGenerated: "根据语音自动生成",
|
|
43
45
|
sdh: "SDH",
|
|
44
46
|
closedCaptions: "CC",
|
|
45
47
|
subtitleSettings: "设置",
|
|
@@ -70,6 +72,7 @@ var zh_default = {
|
|
|
70
72
|
saidPaused: "已暂停",
|
|
71
73
|
saidAudio: "音频:{track}",
|
|
72
74
|
saidSubtitles: "字幕:{track}",
|
|
73
|
-
saidSubtitlesOff: "字幕已关闭"
|
|
75
|
+
saidSubtitlesOff: "字幕已关闭",
|
|
76
|
+
castingTo: "正在投放到 {device}"
|
|
74
77
|
};
|
|
75
78
|
export { zh_default as default };
|
package/dist/es2015/locales.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/asyncToGenerator.js";
|
|
2
2
|
// src/locales.ts
|
|
3
3
|
/** By lowercase language tag. A loaded set takes its loader's place. */
|
|
4
4
|
const registry = /* @__PURE__ */ new Map();
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// src/media.ts
|
|
2
|
+
/** The events a device reports in the video's place. */
|
|
3
|
+
const PLAYBACK = /* @__PURE__ */ new Set([
|
|
4
|
+
"play",
|
|
5
|
+
"pause",
|
|
6
|
+
"playing",
|
|
7
|
+
"waiting",
|
|
8
|
+
"timeupdate",
|
|
9
|
+
"seeking",
|
|
10
|
+
"seeked",
|
|
11
|
+
"durationchange",
|
|
12
|
+
"ended",
|
|
13
|
+
"volumechange",
|
|
14
|
+
"ratechange"
|
|
15
|
+
]);
|
|
16
|
+
/** Called after a move, so a control draws the new state without knowing of the device. */
|
|
17
|
+
const REDRAW = [
|
|
18
|
+
"durationchange",
|
|
19
|
+
"timeupdate",
|
|
20
|
+
"volumechange"
|
|
21
|
+
];
|
|
22
|
+
function captureOf(options) {
|
|
23
|
+
return typeof options === "boolean" ? options : (options === null || options === void 0 ? void 0 : options.capture) === true;
|
|
24
|
+
}
|
|
25
|
+
function call(listener, target, event) {
|
|
26
|
+
if (typeof listener === "function") listener.call(target, event);
|
|
27
|
+
else listener.handleEvent(event);
|
|
28
|
+
}
|
|
29
|
+
/** Whether `name` is a method of the video: a function its prototype chain holds as a value. */
|
|
30
|
+
function isMethod(video, name) {
|
|
31
|
+
let holder = Object.getPrototypeOf(video);
|
|
32
|
+
while (holder !== null) {
|
|
33
|
+
const found = Object.getOwnPropertyDescriptor(holder, name);
|
|
34
|
+
if (found !== void 0) return typeof found.value === "function";
|
|
35
|
+
holder = Object.getPrototypeOf(holder);
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
function createMedia(video) {
|
|
40
|
+
let remote = null;
|
|
41
|
+
const heard = [];
|
|
42
|
+
/**
|
|
43
|
+
* The video's methods, bound to it: a DOM method refuses any other
|
|
44
|
+
* receiver. False for a name that is no method, asked once per name.
|
|
45
|
+
*/
|
|
46
|
+
const bound = /* @__PURE__ */ new Map();
|
|
47
|
+
/** Whether the device answers `name`. What every event target has stays the video's. */
|
|
48
|
+
const remotely = (name) => remote !== null && typeof name === "string" && name in remote && !(name in EventTarget.prototype);
|
|
49
|
+
const targetOf = (type) => remote !== null && PLAYBACK.has(type) ? remote : video;
|
|
50
|
+
const at = (type, listener, capture) => heard.findIndex((entry) => entry.type === type && entry.listener === listener && entry.capture === capture);
|
|
51
|
+
function add(type, listener, options) {
|
|
52
|
+
if (listener === null || listener === void 0) return;
|
|
53
|
+
const capture = captureOf(options);
|
|
54
|
+
if (at(type, listener, capture) !== -1) return;
|
|
55
|
+
let given = listener;
|
|
56
|
+
if (typeof options === "object" && options.once === true) given = (event) => {
|
|
57
|
+
var _event$currentTarget;
|
|
58
|
+
const index = at(type, listener, capture);
|
|
59
|
+
if (index !== -1) heard.splice(index, 1);
|
|
60
|
+
call(listener, (_event$currentTarget = event.currentTarget) !== null && _event$currentTarget !== void 0 ? _event$currentTarget : video, event);
|
|
61
|
+
};
|
|
62
|
+
heard.push({
|
|
63
|
+
type,
|
|
64
|
+
listener,
|
|
65
|
+
capture,
|
|
66
|
+
options,
|
|
67
|
+
given
|
|
68
|
+
});
|
|
69
|
+
targetOf(type).addEventListener(type, given, options);
|
|
70
|
+
}
|
|
71
|
+
function remove(type, listener, options) {
|
|
72
|
+
if (listener === null || listener === void 0) return;
|
|
73
|
+
const index = at(type, listener, captureOf(options));
|
|
74
|
+
if (index === -1) return;
|
|
75
|
+
const [entry] = heard.splice(index, 1);
|
|
76
|
+
targetOf(type).removeEventListener(type, entry.given, options);
|
|
77
|
+
}
|
|
78
|
+
/** Moves the playback listeners from one target to the other, then has them draw its state. */
|
|
79
|
+
function move(from, to, paused) {
|
|
80
|
+
const moved = heard.filter((entry) => PLAYBACK.has(entry.type));
|
|
81
|
+
for (const entry of moved) {
|
|
82
|
+
from.removeEventListener(entry.type, entry.given, entry.options);
|
|
83
|
+
to.addEventListener(entry.type, entry.given, entry.options);
|
|
84
|
+
}
|
|
85
|
+
const types = [...REDRAW, paused ? "pause" : "play"];
|
|
86
|
+
for (const type of types) for (const entry of moved) if (entry.type === type && heard.includes(entry)) call(entry.given, to, new Event(type));
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
media: new Proxy(video, {
|
|
90
|
+
get(target, name) {
|
|
91
|
+
if (name === "addEventListener") return add;
|
|
92
|
+
if (name === "removeEventListener") return remove;
|
|
93
|
+
if (remotely(name)) {
|
|
94
|
+
const value = remote[name];
|
|
95
|
+
return typeof value === "function" ? value.bind(remote) : value;
|
|
96
|
+
}
|
|
97
|
+
const value = Reflect.get(target, name, target);
|
|
98
|
+
if (typeof value !== "function") return value;
|
|
99
|
+
let held = bound.get(name);
|
|
100
|
+
if (held === void 0) {
|
|
101
|
+
held = isMethod(target, name) && {
|
|
102
|
+
of: null,
|
|
103
|
+
fn: null
|
|
104
|
+
};
|
|
105
|
+
bound.set(name, held);
|
|
106
|
+
}
|
|
107
|
+
if (held === false || Object.getOwnPropertyDescriptor(target, name) !== void 0) return value;
|
|
108
|
+
if (held.of !== value) {
|
|
109
|
+
held.of = value;
|
|
110
|
+
held.fn = value.bind(target);
|
|
111
|
+
}
|
|
112
|
+
return held.fn;
|
|
113
|
+
},
|
|
114
|
+
set(target, name, value) {
|
|
115
|
+
if (remotely(name)) {
|
|
116
|
+
remote[name] = value;
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
return Reflect.set(target, name, value, target);
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
attach(next) {
|
|
123
|
+
var _remote;
|
|
124
|
+
const from = (_remote = remote) !== null && _remote !== void 0 ? _remote : video;
|
|
125
|
+
remote = next;
|
|
126
|
+
move(from, next, next.paused);
|
|
127
|
+
},
|
|
128
|
+
detach() {
|
|
129
|
+
if (remote === null) return;
|
|
130
|
+
const from = remote;
|
|
131
|
+
remote = null;
|
|
132
|
+
move(from, video, video.paused);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
export { createMedia };
|
package/dist/es2015/presets.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/asyncToGenerator.js";
|
|
2
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",
|
|
6
6
|
"eme-cenc",
|
|
7
|
-
"eme-fairplay"
|
|
7
|
+
"eme-fairplay",
|
|
8
|
+
"eme-wiseplay"
|
|
8
9
|
];
|
|
9
10
|
/** The engine's preset matrix: a protocol line, a `-ts` tier, a `-drm` tier, plus `full` and `kernel`. */
|
|
10
11
|
const PRESETS = {
|
package/dist/es2015/style.js
CHANGED
|
@@ -1,2 +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([
|
|
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([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([focus-ring]){--mbx-focus-ring:solid;--mbx-focus-tooltip:1}:host([tooltips=off]){--mbx-tooltip:none}:host([layout=wide]){font-size:20px}";
|
|
2
2
|
export { STYLE };
|
package/dist/es2015/tags.js
CHANGED
|
@@ -16,6 +16,7 @@ const MARKER_BUTTON = "mbx-marker-button";
|
|
|
16
16
|
const ERROR_SCREEN = "mbx-error-screen";
|
|
17
17
|
const SPINNER = "mbx-spinner";
|
|
18
18
|
const TITLE = "mbx-title";
|
|
19
|
+
const CASTING = "mbx-casting";
|
|
19
20
|
const CURRENT_TIME = "mbx-current-time";
|
|
20
21
|
const DURATION = "mbx-duration";
|
|
21
22
|
const REMAINING_TIME = "mbx-remaining-time";
|
|
@@ -29,4 +30,4 @@ const SUBTITLES_MENU = "mbx-subtitles-menu";
|
|
|
29
30
|
const DRM_BADGE = "mbx-drm-badge";
|
|
30
31
|
const VOLUME = "mbx-volume";
|
|
31
32
|
const CHAPTERS_MENU = "mbx-chapters-menu";
|
|
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 };
|
|
33
|
+
export { AIRPLAY_BUTTON, AUDIO_MENU, CASTING, 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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "./_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "./_virtual/_@oxc-project_runtime@0.158.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. */
|
package/dist/host.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type { Mattebox, Stage } from 'mattebox';
|
|
|
13
13
|
import type { BreakMarks } from './controls/breaks.js';
|
|
14
14
|
import type { Markers } from './controls/markers.js';
|
|
15
15
|
import type { Messages } from './messages.js';
|
|
16
|
+
import type { CastOptions, CastTarget, Remote } from './remote.js';
|
|
16
17
|
export type { Block };
|
|
17
18
|
export interface Tracker {
|
|
18
19
|
/** What the diagnostics panel calls it. */
|
|
@@ -35,8 +36,17 @@ export interface Trackers {
|
|
|
35
36
|
/** The trackers, in the order they were added. */
|
|
36
37
|
readonly list: readonly Tracker[];
|
|
37
38
|
}
|
|
39
|
+
/** A chapter of the programme, in seconds. */
|
|
40
|
+
export interface Chapter {
|
|
41
|
+
readonly start: number;
|
|
42
|
+
readonly end: number;
|
|
43
|
+
readonly title: string;
|
|
44
|
+
/** The URL of the chapter's picture. Only the engine's chapters carry one. */
|
|
45
|
+
readonly image?: string;
|
|
46
|
+
}
|
|
38
47
|
export interface PlayerHost extends HTMLElement {
|
|
39
|
-
|
|
48
|
+
/** What plays: the video, or the device that plays in its place. Not a DOM node. */
|
|
49
|
+
readonly media: HTMLVideoElement;
|
|
40
50
|
readonly engine: Mattebox | null;
|
|
41
51
|
readonly player: Player | null;
|
|
42
52
|
/** The fatal error of the current load, or null: a control attached after the event still sees it. */
|
|
@@ -45,6 +55,8 @@ export interface PlayerHost extends HTMLElement {
|
|
|
45
55
|
readonly blocked: Block | null;
|
|
46
56
|
/** The ranges the page named: credits to skip, parts that must not play. */
|
|
47
57
|
readonly markers: Markers;
|
|
58
|
+
/** The programme's chapters, in order: the engine's, else the video's chapters track. */
|
|
59
|
+
readonly chapters: readonly Chapter[];
|
|
48
60
|
/** Where the programme's ad breaks are, for the seek bar, by owner. */
|
|
49
61
|
readonly breaks: BreakMarks;
|
|
50
62
|
/** What the current load resolved to, with what a connector said of the programme; null without one. */
|
|
@@ -71,6 +83,10 @@ export interface PlayerHost extends HTMLElement {
|
|
|
71
83
|
}): Promise<void>;
|
|
72
84
|
/** `interrupt` plays in the programme's place. */
|
|
73
85
|
readonly interrupted: boolean;
|
|
86
|
+
/** The device that plays in the video's place, or null. The `casting` attribute carries its kind. */
|
|
87
|
+
readonly casting: CastTarget | null;
|
|
88
|
+
/** Hands playback to a device, for a cast package. Returns the function that ends the cast. */
|
|
89
|
+
cast(remote: Remote, options?: CastOptions): () => void;
|
|
74
90
|
/** The language tag the words come from, or empty for English. */
|
|
75
91
|
readonly locale: string;
|
|
76
92
|
/**
|
|
@@ -92,12 +108,26 @@ export interface PlayerAddon {
|
|
|
92
108
|
stages?(): readonly Stage[];
|
|
93
109
|
/**
|
|
94
110
|
* 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.
|
|
111
|
+
* HLS is not preferred, since it reports nothing the add-on reads. An
|
|
112
|
+
* element inside the player asks the same with a `needsEngine` property
|
|
113
|
+
* that is true. `native-hls="on"` on the player prefers it again.
|
|
96
114
|
*/
|
|
97
115
|
readonly engine?: boolean;
|
|
98
116
|
/** Runs when a player connects, and the function it returns when it leaves the page. */
|
|
99
117
|
attach?(player: PlayerHost): (() => void) | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* What the add-on sends with a load to a device that plays in the
|
|
120
|
+
* video's place, as plain JSON: it goes under the add-on's `name`. The
|
|
121
|
+
* page of the device reads it. Undefined sends nothing.
|
|
122
|
+
*/
|
|
123
|
+
remoteData?(player: PlayerHost): unknown;
|
|
100
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* The player's `<video>` node, for an API that takes the element itself,
|
|
127
|
+
* such as an observer, or to tell a click on it. `player.media` is not a
|
|
128
|
+
* node. Null before the player is in the page.
|
|
129
|
+
*/
|
|
130
|
+
export declare function videoOf(player: HTMLElement): HTMLVideoElement | null;
|
|
101
131
|
/**
|
|
102
132
|
* The nearest player above `node`, through shadow hosts, or null outside
|
|
103
133
|
* one. The element found may not be upgraded yet; the caller waits for the
|
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,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;
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAA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,GAAG,IAAI,CAOzD"}
|
package/dist/host.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import "./tags.js";
|
|
2
2
|
// src/host.ts
|
|
3
|
+
/**
|
|
4
|
+
* The player's `<video>` node, for an API that takes the element itself,
|
|
5
|
+
* such as an observer, or to tell a click on it. `player.media` is not a
|
|
6
|
+
* node. Null before the player is in the page.
|
|
7
|
+
*/
|
|
8
|
+
function videoOf(player) {
|
|
9
|
+
return player.querySelector(":scope > video");
|
|
10
|
+
}
|
|
3
11
|
/** The parent, or the host of the shadow root `node` sits in, or null at the document. */
|
|
4
12
|
function above(node) {
|
|
5
13
|
const parent = node.parentNode;
|
|
@@ -19,6 +27,6 @@ function findPlayer(node) {
|
|
|
19
27
|
}
|
|
20
28
|
return null;
|
|
21
29
|
}
|
|
22
|
-
export { findPlayer };
|
|
30
|
+
export { findPlayer, videoOf };
|
|
23
31
|
|
|
24
32
|
//# sourceMappingURL=host.js.map
|