@mattebox/player 0.3.0 → 0.4.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/README.md +4 -1
- package/dist/cdn/mattebox-player.min.js +17 -17
- package/dist/compose.d.ts.map +1 -1
- package/dist/compose.js +2 -2
- package/dist/compose.js.map +1 -1
- package/dist/controls/airplay.d.ts +28 -0
- package/dist/controls/airplay.d.ts.map +1 -0
- package/dist/controls/airplay.js +46 -0
- package/dist/controls/airplay.js.map +1 -0
- package/dist/controls/icons.d.ts +1 -1
- package/dist/controls/icons.d.ts.map +1 -1
- package/dist/controls/icons.js +3 -0
- package/dist/controls/icons.js.map +1 -1
- package/dist/controls/slider.d.ts.map +1 -1
- package/dist/controls/slider.js +16 -2
- package/dist/controls/slider.js.map +1 -1
- package/dist/element.d.ts +9 -1
- package/dist/element.d.ts.map +1 -1
- package/dist/element.js +35 -5
- package/dist/element.js.map +1 -1
- package/dist/elements/airplay-button.d.ts +13 -0
- package/dist/elements/airplay-button.d.ts.map +1 -0
- package/dist/elements/airplay-button.js +54 -0
- package/dist/elements/airplay-button.js.map +1 -0
- package/dist/elements/control-bar.d.ts.map +1 -1
- package/dist/elements/control-bar.js +2 -1
- package/dist/elements/control-bar.js.map +1 -1
- package/dist/entries/airplay-button.d.ts +5 -0
- package/dist/entries/airplay-button.d.ts.map +1 -0
- package/dist/entries/airplay-button.js +9 -0
- package/dist/entries/airplay-button.js.map +1 -0
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/asyncToGenerator.js +1 -1
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/defineProperty.js +1 -1
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/objectSpread2.js +1 -1
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPrimitive.js +1 -1
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPropertyKey.js +1 -1
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/typeof.js +1 -1
- package/dist/es2015/compose.js +2 -2
- package/dist/es2015/controls/airplay.js +29 -0
- package/dist/es2015/controls/icons.js +2 -0
- package/dist/es2015/controls/menu.js +1 -1
- package/dist/es2015/controls/slider.js +13 -1
- package/dist/es2015/element.js +26 -8
- package/dist/es2015/elements/airplay-button.js +52 -0
- package/dist/es2015/elements/control-bar.js +2 -1
- package/dist/es2015/elements/drm-badge.js +1 -1
- package/dist/es2015/elements/menu-element.js +2 -2
- package/dist/es2015/elements/seek-bar.js +1 -1
- package/dist/es2015/elements/skip-button.js +1 -1
- package/dist/es2015/entries/airplay-button.js +7 -0
- package/dist/es2015/index.js +3 -1
- package/dist/es2015/presets.js +1 -1
- package/dist/es2015/tags.js +2 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/tags.d.ts +1 -0
- package/dist/tags.d.ts.map +1 -1
- package/dist/tags.js +1 -0
- package/dist/tags.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _typeof from "./typeof.js";
|
|
2
2
|
import toPrimitive from "./toPrimitive.js";
|
|
3
|
-
//#region \0@oxc-project+runtime@0.
|
|
3
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
|
|
4
4
|
function toPropertyKey(t) {
|
|
5
5
|
var i = toPrimitive(t, "string");
|
|
6
6
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
|
|
2
2
|
function _typeof(o) {
|
|
3
3
|
"@babel/helpers - typeof";
|
|
4
4
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
package/dist/es2015/compose.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AUDIO_MENU, CHAPTERS_MENU, CONTROL_BAR, CURRENT_TIME, DRM_BADGE, DURATION, ERROR_SCREEN, FULLSCREEN_BUTTON, LIVE_BUTTON, PANELS, PIP_BUTTON, PLAY_BUTTON, QUALITY_MENU, SEEK_BAR, SKIP_BUTTON, SPACER, SPEED_MENU, START_BUTTON, SUBTITLES_MENU, VOLUME } from "./tags.js";
|
|
1
|
+
import { AIRPLAY_BUTTON, AUDIO_MENU, CHAPTERS_MENU, CONTROL_BAR, CURRENT_TIME, DRM_BADGE, DURATION, ERROR_SCREEN, FULLSCREEN_BUTTON, LIVE_BUTTON, PANELS, PIP_BUTTON, PLAY_BUTTON, QUALITY_MENU, SEEK_BAR, SKIP_BUTTON, SPACER, SPEED_MENU, START_BUTTON, SUBTITLES_MENU, VOLUME } from "./tags.js";
|
|
2
2
|
//#region src/compose.ts
|
|
3
3
|
/**
|
|
4
4
|
* The default compositions: what a player gets when the page wrote none of
|
|
@@ -20,7 +20,7 @@ function each(...tags) {
|
|
|
20
20
|
/** The screens and the bar. */
|
|
21
21
|
function composeBar() {
|
|
22
22
|
const bar = document.createElement(CONTROL_BAR);
|
|
23
|
-
bar.append(...each(CURRENT_TIME, SEEK_BAR, DURATION, LIVE_BUTTON), skip(-10), document.createElement(PLAY_BUTTON), skip(10), ...each(VOLUME, SPACER, SPEED_MENU, CHAPTERS_MENU, SUBTITLES_MENU, AUDIO_MENU), ...each(QUALITY_MENU, PIP_BUTTON, FULLSCREEN_BUTTON));
|
|
23
|
+
bar.append(...each(CURRENT_TIME, SEEK_BAR, DURATION, LIVE_BUTTON), skip(-10), document.createElement(PLAY_BUTTON), skip(10), ...each(VOLUME, SPACER, SPEED_MENU, CHAPTERS_MENU, SUBTITLES_MENU, AUDIO_MENU), ...each(QUALITY_MENU, AIRPLAY_BUTTON, PIP_BUTTON, FULLSCREEN_BUTTON));
|
|
24
24
|
return [...each(START_BUTTON, ERROR_SCREEN), bar];
|
|
25
25
|
}
|
|
26
26
|
/** The row under the video. */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/controls/airplay.ts
|
|
2
|
+
const WIRELESS_CHANGED = "webkitcurrentplaybacktargetiswirelesschanged";
|
|
3
|
+
function airplay(video) {
|
|
4
|
+
const apple = video;
|
|
5
|
+
if (!("WebKitPlaybackTargetAvailabilityEvent" in globalThis && typeof apple.webkitShowPlaybackTargetPicker === "function")) return {
|
|
6
|
+
supported: false,
|
|
7
|
+
offered: () => false,
|
|
8
|
+
active: () => false,
|
|
9
|
+
show() {},
|
|
10
|
+
watch: () => () => {}
|
|
11
|
+
};
|
|
12
|
+
return {
|
|
13
|
+
supported: true,
|
|
14
|
+
offered: () => video.disableRemotePlayback !== true,
|
|
15
|
+
active: () => apple.webkitCurrentPlaybackTargetIsWireless === true,
|
|
16
|
+
show() {
|
|
17
|
+
var _apple$webkitShowPlay;
|
|
18
|
+
(_apple$webkitShowPlay = apple.webkitShowPlaybackTargetPicker) === null || _apple$webkitShowPlay === void 0 || _apple$webkitShowPlay.call(apple);
|
|
19
|
+
},
|
|
20
|
+
watch(fn) {
|
|
21
|
+
video.addEventListener(WIRELESS_CHANGED, fn);
|
|
22
|
+
return () => {
|
|
23
|
+
video.removeEventListener(WIRELESS_CHANGED, fn);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { airplay };
|
|
@@ -27,6 +27,8 @@ const PATHS = {
|
|
|
27
27
|
"playback-speed": "M13.9213 5.53573C14.3146 5.45804 14.6666 5.76987 14.6666 6.17079V7.57215C14.6666 7.89777 14.4305 8.17277 14.114 8.24925C12.5981 8.61559 11.2506 9.41368 10.2091 10.506C9.98474 10.7414 9.62903 10.8079 9.34742 10.6453L8.14112 9.94885C7.79394 9.7484 7.69985 9.28777 7.96359 8.98585C9.48505 7.24409 11.5636 6.00143 13.9213 5.53573Z M5.88974 12.5908C6.01805 12.2101 6.46491 12.0603 6.81279 12.2611L8.01201 12.9535C8.29379 13.1162 8.41396 13.4577 8.32238 13.7699C8.11252 14.4854 7.99998 15.2424 7.99998 16.0257C7.99998 16.809 8.11252 17.566 8.32238 18.2814C8.41396 18.5936 8.29378 18.9352 8.01201 19.0979L6.82742 19.7818C6.48051 19.9821 6.03488 19.8337 5.90521 19.4547C5.5345 18.3712 5.33331 17.2091 5.33331 16C5.33331 14.8078 5.5289 13.6613 5.88974 12.5908Z M8.17106 22.0852C7.82291 22.2862 7.72949 22.7486 7.99532 23.0502C9.51387 24.773 11.5799 26.0017 13.9213 26.4642C14.3146 26.5419 14.6666 26.2301 14.6666 25.8291V24.4792C14.6666 24.1536 14.4305 23.8786 14.114 23.8021C12.5981 23.4358 11.2506 22.6377 10.2091 21.5453C9.98474 21.31 9.62903 21.2435 9.34742 21.4061L8.17106 22.0852Z M17.3333 25.8291C17.3333 26.2301 17.6857 26.5418 18.079 26.4641C22.9748 25.4969 26.6666 21.1796 26.6666 16C26.6666 10.8204 22.9748 6.50302 18.079 5.5358C17.6857 5.4581 17.3333 5.76987 17.3333 6.17079V7.57215C17.3333 7.89777 17.5697 8.17282 17.8862 8.24932C21.3942 9.09721 24 12.2572 24 16.0257C24 19.7942 21.3942 22.9542 17.8862 23.802C17.5697 23.8785 17.3333 24.1536 17.3333 24.4792V25.8291Z M14.3961 10.4163C13.9561 10.0911 13.3333 10.4053 13.3333 10.9525L13.3333 21.0474C13.3333 21.5946 13.9561 21.9087 14.3962 21.5836L21.2273 16.5359C21.5879 16.2694 21.5879 15.73 21.2273 15.4635L14.3961 10.4163Z",
|
|
28
28
|
"picture-in-picture": "M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",
|
|
29
29
|
"picture-in-picture-exit": "M5.33334 26V19.4667C5.33334 19.393 5.39304 19.3333 5.46668 19.3333H7.86668C7.94031 19.3333 8.00001 19.393 8.00001 19.4667V23.3333C8.00001 23.7015 8.29849 24 8.66668 24H23.3333C23.7015 24 24 23.7015 24 23.3333V8.66666C24 8.29847 23.7015 7.99999 23.3333 7.99999H19.4667C19.393 7.99999 19.3333 7.9403 19.3333 7.86666V5.46666C19.3333 5.39302 19.393 5.33333 19.4667 5.33333H26C26.3682 5.33333 26.6667 5.63181 26.6667 5.99999V26C26.6667 26.3682 26.3682 26.6667 26 26.6667H6.00001C5.63182 26.6667 5.33334 26.3682 5.33334 26Z M14.0098 8.42359H10.806C10.6872 8.42359 10.6277 8.56721 10.7117 8.6512L16.5491 14.4886C16.8094 14.7489 16.8094 15.171 16.5491 15.4314L15.3234 16.657C15.0631 16.9174 14.641 16.9174 14.3806 16.657L8.63739 10.9138C8.55339 10.8298 8.40978 10.8893 8.40978 11.0081V14.0236C8.40978 14.3918 8.1113 14.6903 7.74311 14.6903H6.00978C5.64159 14.6903 5.34311 14.3918 5.34311 14.0236L5.34311 6.02359C5.34311 5.6554 5.64159 5.35692 6.00978 5.35692L14.0098 5.35692C14.378 5.35692 14.6764 5.6554 14.6764 6.02359V7.75692C14.6764 8.12511 14.378 8.42359 14.0098 8.42359Z",
|
|
30
|
+
airplay: "M5.33334 6.00001C5.33334 5.63182 5.63181 5.33334 6 5.33334H26C26.3682 5.33334 26.6667 5.63182 26.6667 6.00001V20.6667C26.6667 21.0349 26.3682 21.3333 26 21.3333H23.7072C23.4956 21.3333 23.2966 21.233 23.171 21.0628L22.1859 19.7295C21.8607 19.2894 22.1749 18.6667 22.7221 18.6667H23.3333C23.7015 18.6667 24 18.3682 24 18V8.66668C24 8.29849 23.7015 8.00001 23.3333 8.00001H8.66667C8.29848 8.00001 8 8.29849 8 8.66668V18C8 18.3682 8.29848 18.6667 8.66667 18.6667H9.29357C9.84072 18.6667 10.1549 19.2894 9.82976 19.7295L8.84467 21.0628C8.71898 21.233 8.52 21.3333 8.30848 21.3333H6C5.63181 21.3333 5.33334 21.0349 5.33334 20.6667V6.00001Z M8.78528 25.6038C8.46013 26.0439 8.77431 26.6667 9.32147 26.6667L22.6785 26.6667C23.2256 26.6667 23.5398 26.0439 23.2146 25.6038L16.5358 16.5653C16.2693 16.2046 15.73 16.2047 15.4635 16.5653L8.78528 25.6038Z",
|
|
31
|
+
"airplay-active": "M5.33334 6.00001C5.33334 5.63182 5.63181 5.33334 6 5.33334H26C26.3682 5.33334 26.6667 5.63182 26.6667 6.00001V20.6667C26.6667 21.0349 26.3682 21.3333 26 21.3333H6C5.63181 21.3333 5.33334 21.0349 5.33334 20.6667V6.00001Z M8.78528 25.6038C8.46013 26.0439 8.77431 26.6667 9.32147 26.6667L22.6785 26.6667C23.2256 26.6667 23.5398 26.0439 23.2146 25.6038L16.5358 16.5653C16.2693 16.2046 15.73 16.2047 15.4635 16.5653L8.78528 25.6038Z",
|
|
30
32
|
chapters: "M16.6927 25.3346C16.3245 25.3346 16.026 25.0361 16.026 24.6679L16.026 7.3346C16.026 6.96641 16.3245 6.66794 16.6927 6.66794L18.6927 6.66794C19.0609 6.66794 19.3594 6.96642 19.3594 7.3346L19.3594 24.6679C19.3594 25.0361 19.0609 25.3346 18.6927 25.3346H16.6927Z M24.026 25.3346C23.6578 25.3346 23.3594 25.0361 23.3594 24.6679L23.3594 7.3346C23.3594 6.96641 23.6578 6.66794 24.026 6.66794L26.026 6.66794C26.3942 6.66794 26.6927 6.96642 26.6927 7.3346V24.6679C26.6927 25.0361 26.3942 25.3346 26.026 25.3346H24.026Z M5.48113 23.9407C5.38584 24.2963 5.59689 24.6619 5.95254 24.7572L7.88439 25.2748C8.24003 25.3701 8.60559 25.159 8.70089 24.8034L13.1871 8.06067C13.2824 7.70503 13.0713 7.33947 12.7157 7.24417L10.7838 6.72654C10.4282 6.63124 10.0626 6.8423 9.96733 7.19794L5.48113 23.9407Z"
|
|
31
33
|
};
|
|
32
34
|
const SVG = "http://www.w3.org/2000/svg";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { el, state } from "../dom.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.149.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
//#region src/controls/menu.ts
|
|
4
4
|
/**
|
|
5
5
|
* The menu primitive the quality, audio, subtitles and speed menus share: a
|
|
@@ -17,6 +17,11 @@ import { el } from "../dom.js";
|
|
|
17
17
|
*
|
|
18
18
|
* The steps are read on every key, so an element can take them from its
|
|
19
19
|
* attributes as they change.
|
|
20
|
+
*
|
|
21
|
+
* A drag ends on `pointerup`, and also on a move that reports no button
|
|
22
|
+
* held: the button went up where no `pointerup` reached the slider, such
|
|
23
|
+
* as outside the window, and the thumb must not stay on the pointer. A
|
|
24
|
+
* lost capture ends it too.
|
|
20
25
|
*/
|
|
21
26
|
function clamp(value, min, max) {
|
|
22
27
|
return Math.min(max, Math.max(min, value));
|
|
@@ -62,7 +67,12 @@ function slider(options) {
|
|
|
62
67
|
onInput(at(event.clientX));
|
|
63
68
|
}
|
|
64
69
|
function move(event) {
|
|
65
|
-
if (held)
|
|
70
|
+
if (!held) return;
|
|
71
|
+
if (event.buttons === 0) {
|
|
72
|
+
up(event);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
onInput(at(event.clientX));
|
|
66
76
|
}
|
|
67
77
|
function up(event) {
|
|
68
78
|
if (!held) return;
|
|
@@ -104,6 +114,7 @@ function slider(options) {
|
|
|
104
114
|
root.addEventListener("pointermove", move);
|
|
105
115
|
root.addEventListener("pointerup", up);
|
|
106
116
|
root.addEventListener("pointercancel", cancel);
|
|
117
|
+
root.addEventListener("lostpointercapture", cancel);
|
|
107
118
|
root.addEventListener("keydown", key);
|
|
108
119
|
return {
|
|
109
120
|
root,
|
|
@@ -133,6 +144,7 @@ function slider(options) {
|
|
|
133
144
|
root.removeEventListener("pointermove", move);
|
|
134
145
|
root.removeEventListener("pointerup", up);
|
|
135
146
|
root.removeEventListener("pointercancel", cancel);
|
|
147
|
+
root.removeEventListener("lostpointercapture", cancel);
|
|
136
148
|
root.removeEventListener("keydown", key);
|
|
137
149
|
}
|
|
138
150
|
};
|
package/dist/es2015/element.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CONTROL_BAR, PANELS, PLAYER } from "./tags.js";
|
|
2
2
|
import { composeBar, composePanels } from "./compose.js";
|
|
3
3
|
import { namespaces } from "./namespaces.js";
|
|
4
|
-
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.
|
|
4
|
+
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.149.0/helpers/esm/asyncToGenerator.js";
|
|
5
5
|
import { drmGuard, resolvePreset } from "./presets.js";
|
|
6
6
|
import { STYLE } from "./style.js";
|
|
7
7
|
import { errorSurface } from "./surface.js";
|
|
8
|
-
import _objectSpread2 from "./_virtual/_@oxc-project_runtime@0.
|
|
9
|
-
import { createPlayer, matteboxHandler, nativeHandler } from "@mattebox/player-core";
|
|
8
|
+
import _objectSpread2 from "./_virtual/_@oxc-project_runtime@0.149.0/helpers/esm/objectSpread2.js";
|
|
9
|
+
import { createPlayer, inferType, matteboxHandler, nativeHandler } from "@mattebox/player-core";
|
|
10
10
|
//#region src/element.ts
|
|
11
11
|
/** Attributes forwarded onto the video as attributes, never as properties. */
|
|
12
12
|
const FORWARDED = [
|
|
@@ -45,14 +45,15 @@ const STATE_EVENTS = [
|
|
|
45
45
|
"ended",
|
|
46
46
|
"emptied",
|
|
47
47
|
"volumechange",
|
|
48
|
-
"loadedmetadata"
|
|
48
|
+
"loadedmetadata",
|
|
49
|
+
"resize"
|
|
49
50
|
];
|
|
50
51
|
/** Every stage the engine ships. A narrower preset is optimization. */
|
|
51
52
|
const DEFAULT_PRESET = "full";
|
|
52
53
|
/**
|
|
53
54
|
* What `define()` recorded, for the elements the parser creates. It is the
|
|
54
|
-
* one value shared across elements,
|
|
55
|
-
*
|
|
55
|
+
* one value shared across elements, because a page that writes only markup
|
|
56
|
+
* still has to be able to say what the engine carries.
|
|
56
57
|
*/
|
|
57
58
|
let defaults = {};
|
|
58
59
|
/**
|
|
@@ -159,8 +160,24 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
|
|
|
159
160
|
this.toggleAttribute("playing", !video.paused);
|
|
160
161
|
this.toggleAttribute("ended", video.ended);
|
|
161
162
|
this.toggleAttribute("muted", video.muted);
|
|
163
|
+
this.toggleAttribute("audio", this.audio());
|
|
162
164
|
this.reflecting = false;
|
|
163
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Whether the source has no picture. Once the metadata is in, the video's
|
|
168
|
+
* size decides: zero by zero is sound alone, and `resize` catches a stream
|
|
169
|
+
* that moves to or from an audio-only rendition. Before that, the type the
|
|
170
|
+
* page wrote or the URL implies is the hint, so an mp3 is `audio` from
|
|
171
|
+
* the start rather than from its metadata.
|
|
172
|
+
*/
|
|
173
|
+
audio() {
|
|
174
|
+
var _this$getAttribute;
|
|
175
|
+
const video = this.media;
|
|
176
|
+
if (video.readyState >= HTMLMediaElement.HAVE_METADATA) return video.videoWidth === 0 && video.videoHeight === 0;
|
|
177
|
+
const src = this.getAttribute("src");
|
|
178
|
+
const type = (_this$getAttribute = this.getAttribute("type")) !== null && _this$getAttribute !== void 0 ? _this$getAttribute : src === null ? void 0 : inferType(src);
|
|
179
|
+
return (type === null || type === void 0 ? void 0 : type.startsWith("audio/")) === true;
|
|
180
|
+
}
|
|
164
181
|
disconnectedCallback() {
|
|
165
182
|
this.enqueue(() => this.teardown());
|
|
166
183
|
}
|
|
@@ -178,6 +195,7 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
|
|
|
178
195
|
return;
|
|
179
196
|
}
|
|
180
197
|
if (name === "preset") this.enqueue(() => this.discard());
|
|
198
|
+
if (name === "src" || name === "type") this.toggleAttribute("audio", this.audio());
|
|
181
199
|
this.reload();
|
|
182
200
|
}
|
|
183
201
|
/**
|
|
@@ -309,11 +327,11 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
|
|
|
309
327
|
chain() {
|
|
310
328
|
var _this3 = this;
|
|
311
329
|
return _asyncToGenerator(function* () {
|
|
312
|
-
var _this$
|
|
330
|
+
var _this$getAttribute2;
|
|
313
331
|
if (_this3.options.handlers !== void 0) return _this3.options.handlers;
|
|
314
332
|
const config = _this3.options.config === void 0 ? {} : { config: _this3.options.config };
|
|
315
333
|
if (_this3.options.stages !== void 0) return [matteboxHandler(_objectSpread2({ stages: _this3.options.stages }, config)), nativeHandler()];
|
|
316
|
-
const name = (_this$
|
|
334
|
+
const name = (_this$getAttribute2 = _this3.getAttribute("preset")) !== null && _this$getAttribute2 !== void 0 ? _this$getAttribute2 : DEFAULT_PRESET;
|
|
317
335
|
const preset = yield resolvePreset(name);
|
|
318
336
|
if (preset === null) {
|
|
319
337
|
_this3.report({
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { airplay } from "../controls/airplay.js";
|
|
2
|
+
import { icon } from "../controls/icons.js";
|
|
3
|
+
import { Component } from "./component.js";
|
|
4
|
+
import { BUTTON_STYLE, iconSlots, show, style } from "./shared.js";
|
|
5
|
+
//#region src/elements/airplay-button.ts
|
|
6
|
+
const STATES = ["default", "active"];
|
|
7
|
+
var MbxAirplayButton = class extends Component {
|
|
8
|
+
static get observedAttributes() {
|
|
9
|
+
return ["label", "label-active"];
|
|
10
|
+
}
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.api = null;
|
|
14
|
+
const root = this.attachShadow({ mode: "open" });
|
|
15
|
+
this.button = document.createElement("button");
|
|
16
|
+
this.button.type = "button";
|
|
17
|
+
this.button.setAttribute("part", "button");
|
|
18
|
+
this.slots = iconSlots(STATES, (state) => icon(state === "active" ? "airplay-active" : "airplay"));
|
|
19
|
+
for (const state of STATES) this.button.append(this.slots[state]);
|
|
20
|
+
this.button.addEventListener("click", () => {
|
|
21
|
+
var _this$api;
|
|
22
|
+
(_this$api = this.api) === null || _this$api === void 0 || _this$api.show();
|
|
23
|
+
});
|
|
24
|
+
root.append(style(BUTTON_STYLE), this.button);
|
|
25
|
+
}
|
|
26
|
+
attach(player) {
|
|
27
|
+
const api = airplay(player.video);
|
|
28
|
+
this.api = api;
|
|
29
|
+
this.keep(api.watch(() => {
|
|
30
|
+
this.render();
|
|
31
|
+
}));
|
|
32
|
+
this.follow(player, () => {
|
|
33
|
+
this.render();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
detach(player) {
|
|
37
|
+
this.api = null;
|
|
38
|
+
player.removeAttribute("airplay");
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
var _this$getAttribute, _this$getAttribute2;
|
|
42
|
+
const player = this.player;
|
|
43
|
+
if (player === null || this.api === null) return;
|
|
44
|
+
const active = this.api.active();
|
|
45
|
+
this.hidden = !this.api.supported || !this.api.offered();
|
|
46
|
+
show(this.slots, active ? "active" : "default");
|
|
47
|
+
this.button.setAttribute("aria-label", active ? (_this$getAttribute = this.getAttribute("label-active")) !== null && _this$getAttribute !== void 0 ? _this$getAttribute : "Stop AirPlay" : (_this$getAttribute2 = this.getAttribute("label")) !== null && _this$getAttribute2 !== void 0 ? _this$getAttribute2 : "AirPlay");
|
|
48
|
+
player.toggleAttribute("airplay", active);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { MbxAirplayButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AUDIO_MENU, CHAPTERS_MENU, DRM_BADGE, MUTE_BUTTON, PIP_BUTTON, QUALITY_MENU, SKIP_BUTTON, SPEED_MENU, SUBTITLES_MENU, VOLUME, VOLUME_SLIDER } from "../tags.js";
|
|
1
|
+
import { AIRPLAY_BUTTON, AUDIO_MENU, CHAPTERS_MENU, DRM_BADGE, MUTE_BUTTON, PIP_BUTTON, QUALITY_MENU, SKIP_BUTTON, SPEED_MENU, SUBTITLES_MENU, VOLUME, VOLUME_SLIDER } from "../tags.js";
|
|
2
2
|
import { Component } from "./component.js";
|
|
3
3
|
import { number, style } from "./shared.js";
|
|
4
4
|
import { cueLift, cueStyle } from "../controls/cues.js";
|
|
@@ -24,6 +24,7 @@ const PRIORITY = {
|
|
|
24
24
|
[AUDIO_MENU]: 3,
|
|
25
25
|
[QUALITY_MENU]: 3,
|
|
26
26
|
[PIP_BUTTON]: 3,
|
|
27
|
+
[AIRPLAY_BUTTON]: 2,
|
|
27
28
|
[SKIP_BUTTON]: 2,
|
|
28
29
|
[SUBTITLES_MENU]: 1,
|
|
29
30
|
[VOLUME]: 1,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { namespaces } from "../namespaces.js";
|
|
2
2
|
import { el } from "../dom.js";
|
|
3
3
|
import { icon } from "../controls/icons.js";
|
|
4
|
-
import { fill } from "../labels.js";
|
|
5
4
|
import { Component } from "./component.js";
|
|
6
5
|
import { style } from "./shared.js";
|
|
6
|
+
import { fill } from "../labels.js";
|
|
7
7
|
//#region src/elements/drm-badge.ts
|
|
8
8
|
const STYLE = `
|
|
9
9
|
:host { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--mbx-muted); border-radius: var(--mbx-radius); cursor: default; }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { icon } from "../controls/icons.js";
|
|
2
|
-
import { menu } from "../controls/menu.js";
|
|
3
|
-
import { fill } from "../labels.js";
|
|
4
2
|
import { Component } from "./component.js";
|
|
5
3
|
import { MENU_STYLE, iconSlots, style } from "./shared.js";
|
|
4
|
+
import { menu } from "../controls/menu.js";
|
|
5
|
+
import { fill } from "../labels.js";
|
|
6
6
|
//#region src/elements/menu-element.ts
|
|
7
7
|
var MenuElement = class extends Component {
|
|
8
8
|
constructor(states, glyphs) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { el } from "../dom.js";
|
|
2
|
-
import { fill } from "../labels.js";
|
|
3
2
|
import { Component } from "./component.js";
|
|
4
3
|
import { SLIDER_STYLE, number, seekRow, style } from "./shared.js";
|
|
4
|
+
import { fill } from "../labels.js";
|
|
5
5
|
import { chapterAt, chapters, followChapters } from "../controls/chapters.js";
|
|
6
6
|
import { format } from "../controls/time.js";
|
|
7
7
|
import { EMPTY, at, clip, fraction } from "../controls/ranges.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { icon } from "../controls/icons.js";
|
|
2
|
-
import { fill } from "../labels.js";
|
|
3
2
|
import { Component } from "./component.js";
|
|
4
3
|
import { BUTTON_STYLE, style } from "./shared.js";
|
|
4
|
+
import { fill } from "../labels.js";
|
|
5
5
|
//#region src/elements/skip-button.ts
|
|
6
6
|
const SECONDS = 10;
|
|
7
7
|
/** The glyph for a skip amount: the set draws 10 and 30, and a plain arrow says the rest. */
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AIRPLAY_BUTTON } from "../tags.js";
|
|
2
|
+
import "../element-entry.js";
|
|
3
|
+
import { MbxAirplayButton } from "../elements/airplay-button.js";
|
|
4
|
+
//#region src/entries/airplay-button.ts
|
|
5
|
+
if (customElements.get("mbx-airplay-button") === void 0) customElements.define(AIRPLAY_BUTTON, MbxAirplayButton);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { MbxAirplayButton };
|
package/dist/es2015/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { MatteboxPlayerElement } from "./element.js";
|
|
2
2
|
import "./element-entry.js";
|
|
3
|
+
import { MbxAirplayButton } from "./elements/airplay-button.js";
|
|
4
|
+
import "./entries/airplay-button.js";
|
|
3
5
|
import { MbxAudioMenu } from "./elements/audio-menu.js";
|
|
4
6
|
import "./entries/audio-menu.js";
|
|
5
7
|
import { MbxChaptersMenu } from "./elements/chapters-menu.js";
|
|
@@ -46,4 +48,4 @@ import { MbxVolumeSlider } from "./elements/volume-slider.js";
|
|
|
46
48
|
import "./entries/volume-slider.js";
|
|
47
49
|
import { MbxVolume } from "./elements/volume.js";
|
|
48
50
|
import "./entries/volume.js";
|
|
49
|
-
export { MatteboxPlayerElement, MbxAudioMenu, MbxChaptersMenu, MbxControlBar, MbxCurrentTime, MbxDrmBadge, MbxDuration, MbxErrorScreen, MbxFullscreenButton, MbxLiveButton, MbxMuteButton, MbxPanels, MbxPipButton, MbxPlayButton, MbxQualityMenu, MbxRemainingTime, MbxSeekBar, MbxSkipButton, MbxSpacer, MbxSpeedMenu, MbxStartButton, MbxSubtitlesMenu, MbxVolume, MbxVolumeSlider };
|
|
51
|
+
export { MatteboxPlayerElement, MbxAirplayButton, MbxAudioMenu, MbxChaptersMenu, MbxControlBar, MbxCurrentTime, MbxDrmBadge, MbxDuration, MbxErrorScreen, MbxFullscreenButton, MbxLiveButton, MbxMuteButton, MbxPanels, MbxPipButton, MbxPlayButton, MbxQualityMenu, MbxRemainingTime, MbxSeekBar, MbxSkipButton, MbxSpacer, MbxSpeedMenu, MbxStartButton, MbxSubtitlesMenu, MbxVolume, MbxVolumeSlider };
|
package/dist/es2015/presets.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.149.0/helpers/esm/asyncToGenerator.js";
|
|
2
2
|
//#region 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 = [
|
package/dist/es2015/tags.js
CHANGED
|
@@ -8,6 +8,7 @@ const MUTE_BUTTON = "mbx-mute-button";
|
|
|
8
8
|
const VOLUME_SLIDER = "mbx-volume-slider";
|
|
9
9
|
const SKIP_BUTTON = "mbx-skip-button";
|
|
10
10
|
const PIP_BUTTON = "mbx-pip-button";
|
|
11
|
+
const AIRPLAY_BUTTON = "mbx-airplay-button";
|
|
11
12
|
const FULLSCREEN_BUTTON = "mbx-fullscreen-button";
|
|
12
13
|
const START_BUTTON = "mbx-start-button";
|
|
13
14
|
const ERROR_SCREEN = "mbx-error-screen";
|
|
@@ -25,4 +26,4 @@ const PANELS = "mbx-panels";
|
|
|
25
26
|
const VOLUME = "mbx-volume";
|
|
26
27
|
const CHAPTERS_MENU = "mbx-chapters-menu";
|
|
27
28
|
//#endregion
|
|
28
|
-
export { AUDIO_MENU, CHAPTERS_MENU, CONTROL_BAR, CURRENT_TIME, DRM_BADGE, DURATION, ERROR_SCREEN, FULLSCREEN_BUTTON, LIVE_BUTTON, MUTE_BUTTON, PANELS, PIP_BUTTON, PLAYER, PLAY_BUTTON, QUALITY_MENU, REMAINING_TIME, SEEK_BAR, SKIP_BUTTON, SPACER, SPEED_MENU, START_BUTTON, SUBTITLES_MENU, VOLUME, VOLUME_SLIDER };
|
|
29
|
+
export { AIRPLAY_BUTTON, AUDIO_MENU, CHAPTERS_MENU, CONTROL_BAR, CURRENT_TIME, DRM_BADGE, DURATION, ERROR_SCREEN, FULLSCREEN_BUTTON, LIVE_BUTTON, MUTE_BUTTON, PANELS, PIP_BUTTON, PLAYER, PLAY_BUTTON, QUALITY_MENU, REMAINING_TIME, SEEK_BAR, SKIP_BUTTON, SPACER, SPEED_MENU, START_BUTTON, SUBTITLES_MENU, VOLUME, VOLUME_SLIDER };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* `@mattebox/player/element` and the `@mattebox/player/elements/*` entries.
|
|
6
6
|
*/
|
|
7
7
|
import type { MatteboxPlayerElement } from './element-entry.js';
|
|
8
|
+
import type { MbxAirplayButton } from './entries/airplay-button.js';
|
|
8
9
|
import type { MbxAudioMenu } from './entries/audio-menu.js';
|
|
9
10
|
import type { MbxChaptersMenu } from './entries/chapters-menu.js';
|
|
10
11
|
import type { MbxControlBar } from './entries/control-bar.js';
|
|
@@ -30,6 +31,7 @@ import type { MbxVolume } from './entries/volume.js';
|
|
|
30
31
|
import type { MbxVolumeSlider } from './entries/volume-slider.js';
|
|
31
32
|
export type { MatteboxPlayerOptions } from './element-entry.js';
|
|
32
33
|
export { MatteboxPlayerElement } from './element-entry.js';
|
|
34
|
+
export { MbxAirplayButton } from './entries/airplay-button.js';
|
|
33
35
|
export { MbxAudioMenu } from './entries/audio-menu.js';
|
|
34
36
|
export { MbxChaptersMenu } from './entries/chapters-menu.js';
|
|
35
37
|
export { MbxControlBar } from './entries/control-bar.js';
|
|
@@ -75,6 +77,7 @@ declare global {
|
|
|
75
77
|
'mbx-live-button': MbxLiveButton;
|
|
76
78
|
'mbx-speed-menu': MbxSpeedMenu;
|
|
77
79
|
'mbx-quality-menu': MbxQualityMenu;
|
|
80
|
+
'mbx-airplay-button': MbxAirplayButton;
|
|
78
81
|
'mbx-audio-menu': MbxAudioMenu;
|
|
79
82
|
'mbx-subtitles-menu': MbxSubtitlesMenu;
|
|
80
83
|
'mbx-drm-badge': MbxDrmBadge;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EA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|
export { MatteboxPlayerElement } from './element-entry.js';
|
|
2
|
+
export { MbxAirplayButton } from './entries/airplay-button.js';
|
|
2
3
|
export { MbxAudioMenu } from './entries/audio-menu.js';
|
|
3
4
|
export { MbxChaptersMenu } from './entries/chapters-menu.js';
|
|
4
5
|
export { MbxControlBar } from './entries/control-bar.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/tags.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const MUTE_BUTTON = "mbx-mute-button";
|
|
|
7
7
|
export declare const VOLUME_SLIDER = "mbx-volume-slider";
|
|
8
8
|
export declare const SKIP_BUTTON = "mbx-skip-button";
|
|
9
9
|
export declare const PIP_BUTTON = "mbx-pip-button";
|
|
10
|
+
export declare const AIRPLAY_BUTTON = "mbx-airplay-button";
|
|
10
11
|
export declare const FULLSCREEN_BUTTON = "mbx-fullscreen-button";
|
|
11
12
|
export declare const START_BUTTON = "mbx-start-button";
|
|
12
13
|
export declare const ERROR_SCREEN = "mbx-error-screen";
|
package/dist/tags.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../src/tags.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,eAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,MAAM,eAAe,CAAC;AACnC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,aAAa,sBAAsB,CAAC;AACjD,eAAO,MAAM,WAAW,oBAA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AC;AAC/C,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,SAAS,kBAAkB,CAAC;AACzC,eAAO,MAAM,MAAM,eAAe,CAAC;AACnC,eAAO,MAAM,MAAM,eAAe,CAAC;AACnC,eAAO,MAAM,aAAa,sBAAsB,CAAC"}
|
package/dist/tags.js
CHANGED
|
@@ -7,6 +7,7 @@ export const MUTE_BUTTON = 'mbx-mute-button';
|
|
|
7
7
|
export const VOLUME_SLIDER = 'mbx-volume-slider';
|
|
8
8
|
export const SKIP_BUTTON = 'mbx-skip-button';
|
|
9
9
|
export const PIP_BUTTON = 'mbx-pip-button';
|
|
10
|
+
export const AIRPLAY_BUTTON = 'mbx-airplay-button';
|
|
10
11
|
export const FULLSCREEN_BUTTON = 'mbx-fullscreen-button';
|
|
11
12
|
export const START_BUTTON = 'mbx-start-button';
|
|
12
13
|
export const ERROR_SCREEN = 'mbx-error-screen';
|
package/dist/tags.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../src/tags.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,MAAM,CAAC,MAAM,MAAM,GAAG,iBAAiB,CAAC;AACxC,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC7C,MAA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0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A <mattebox-player> custom element over @mattebox/player-core.",
|
|
5
5
|
"author": "Josep Boix Requesens",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "git+https://github.com/jboix/mattebox-player.git",
|
|
9
9
|
"directory": "packages/player"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.
|
|
11
|
+
"homepage": "https://jboix.github.io/mattebox-player/",
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/jboix/mattebox-player/issues"
|
|
14
14
|
},
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"release:ci": "semantic-release"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@mattebox/player-core": "^0.
|
|
73
|
+
"@mattebox/player-core": "^0.2.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"mattebox": "^0.
|
|
76
|
+
"mattebox": "^0.5.0"
|
|
77
77
|
}
|
|
78
78
|
}
|