@mattebox/player 0.9.1 → 0.10.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.
Files changed (35) hide show
  1. package/dist/announcer.d.ts +7 -0
  2. package/dist/announcer.d.ts.map +1 -0
  3. package/dist/announcer.js +44 -0
  4. package/dist/announcer.js.map +1 -0
  5. package/dist/cdn/mattebox-player.min.js +3 -3
  6. package/dist/element.d.ts +17 -0
  7. package/dist/element.d.ts.map +1 -1
  8. package/dist/element.js +71 -1
  9. package/dist/element.js.map +1 -1
  10. package/dist/elements/audio-menu.js +1 -1
  11. package/dist/elements/drm-badge.js +2 -2
  12. package/dist/elements/menu-element.js +1 -1
  13. package/dist/elements/seek-bar.js +1 -1
  14. package/dist/elements/skip-button.js +1 -1
  15. package/dist/elements/subtitles-menu.js +1 -1
  16. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/asyncToGenerator.js +1 -1
  17. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/defineProperty.js +1 -1
  18. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/objectSpread2.js +1 -1
  19. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/toPrimitive.js +1 -1
  20. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/toPropertyKey.js +1 -1
  21. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/typeof.js +1 -1
  22. package/dist/es2015/announcer.js +43 -0
  23. package/dist/es2015/controls/chapters.js +1 -1
  24. package/dist/es2015/controls/menu.js +1 -1
  25. package/dist/es2015/element.js +79 -5
  26. package/dist/es2015/elements/audio-menu.js +1 -1
  27. package/dist/es2015/elements/drm-badge.js +2 -2
  28. package/dist/es2015/elements/menu-element.js +1 -1
  29. package/dist/es2015/elements/seek-bar.js +1 -1
  30. package/dist/es2015/elements/skip-button.js +1 -1
  31. package/dist/es2015/elements/subtitles-menu.js +1 -1
  32. package/dist/es2015/presets.js +1 -1
  33. package/dist/es2015/style.js +1 -1
  34. package/dist/style.js +1 -1
  35. package/package.json +4 -4
@@ -1,11 +1,13 @@
1
+ import { announcer } from "./announcer.js";
1
2
  import { createMarkers } from "./controls/markers.js";
3
+ import { languageName } from "./controls/track-names.js";
2
4
  import { namespaces } from "./namespaces.js";
3
- import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/asyncToGenerator.js";
5
+ import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/asyncToGenerator.js";
4
6
  import { drmGuard, resolvePreset } from "./presets.js";
5
7
  import { STYLE } from "./style.js";
6
8
  import { errorSurface } from "./surface.js";
7
9
  import { PLAYER } from "./tags.js";
8
- import _objectSpread2 from "./_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
10
+ import _objectSpread2 from "./_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/objectSpread2.js";
9
11
  import { createPlayer, inferType, matteboxHandler, nativeHandler, preferNativeHls } from "@mattebox/player-core";
10
12
  //#region src/element.ts
11
13
  /**
@@ -93,6 +95,16 @@ const STATE_EVENTS = [
93
95
  "stalled",
94
96
  "canplay"
95
97
  ];
98
+ /**
99
+ * How long the video waits for data before the live region says so. A
100
+ * seek within the buffer waits for less, and saying it would only be noise.
101
+ */
102
+ const LOADING_MS = 1e3;
103
+ /** A track's name for the live region: its name in the stream, else its language's. */
104
+ function trackName(name, lang) {
105
+ var _languageName;
106
+ return name || lang && ((_languageName = languageName(lang)) !== null && _languageName !== void 0 ? _languageName : lang) || "";
107
+ }
96
108
  /** The stages that register a key system, which a native session's DRM offers. */
97
109
  const KEY_SYSTEMS = ["eme-fairplay", "eme-cenc"];
98
110
  /** Every stage the engine ships. A narrower preset is optimization. */
@@ -149,12 +161,22 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
149
161
  this.offs = [];
150
162
  this.queue = Promise.resolve();
151
163
  this.pending = false;
164
+ this.slow = void 0;
165
+ this.heardAudio = void 0;
166
+ this.heardText = void 0;
167
+ this.offTracks = null;
152
168
  this.media = document.createElement("video");
153
169
  this.media.controls = true;
154
170
  this.media.setAttribute(PLAYSINLINE, "");
155
171
  for (const name of STATE_EVENTS) this.media.addEventListener(name, () => {
172
+ const was = this.waiting;
156
173
  this.note(name);
157
174
  this.reflect();
175
+ this.tell(name, was);
176
+ });
177
+ const lists = this.media;
178
+ for (const list of [lists.audioTracks, lists.textTracks]) list === null || list === void 0 || list.addEventListener("change", () => {
179
+ this.tracks();
158
180
  });
159
181
  this.media.addEventListener("playing", () => {
160
182
  this.failure = null;
@@ -170,10 +192,11 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
170
192
  this.surface = errorSurface(() => {
171
193
  this.reload();
172
194
  });
195
+ this.voice = announcer(this);
173
196
  const root = this.attachShadow({ mode: "open" });
174
197
  const style = document.createElement("style");
175
198
  style.textContent = STYLE;
176
- root.append(style, this.stage, this.surface.root);
199
+ root.append(style, this.stage, this.surface.root, this.voice.root);
177
200
  }
178
201
  /** The media element. Everything the browser already does is here. */
179
202
  get video() {
@@ -243,6 +266,7 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
243
266
  /** The two states the video does not hold: whether it has played once, and whether it waits for data. */
244
267
  note(event) {
245
268
  if (event === "playing") {
269
+ if (!this.started) this.tracks();
246
270
  this.started = true;
247
271
  this.waiting = false;
248
272
  } else if (event === "waiting" || event === "stalled") this.waiting = true;
@@ -250,6 +274,51 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
250
274
  else if (event === "emptied") {
251
275
  this.started = false;
252
276
  this.waiting = false;
277
+ this.heardAudio = void 0;
278
+ this.heardText = void 0;
279
+ }
280
+ }
281
+ /** Says a play or a pause, and a wait once it has lasted `LOADING_MS`. */
282
+ tell(event, was) {
283
+ if (event === "play") this.voice.say("playing", "Playing");
284
+ if (event === "pause" && !this.media.ended) this.voice.say("paused", "Paused");
285
+ if (this.waiting === was) return;
286
+ clearTimeout(this.slow);
287
+ if (this.waiting) this.slow = setTimeout(() => {
288
+ this.voice.say("loading", "Loading");
289
+ }, LOADING_MS);
290
+ }
291
+ /**
292
+ * Says a change of the audio or the subtitle track, once the video has
293
+ * played: the tracks a load starts with are no change. A forced track
294
+ * reads as off, as in the subtitles menu.
295
+ */
296
+ tracks() {
297
+ var _this$current$engine2, _this$current2;
298
+ const engine = (_this$current$engine2 = (_this$current2 = this.current) === null || _this$current2 === void 0 ? void 0 : _this$current2.engine) !== null && _this$current$engine2 !== void 0 ? _this$current$engine2 : null;
299
+ let audio;
300
+ let text;
301
+ if (engine !== null) {
302
+ const sound = engine.tracks.active("audio");
303
+ const words = engine.tracks.active("text");
304
+ audio = sound === null ? "" : trackName(sound.name, sound.lang);
305
+ text = words === null || words.forced === true ? null : trackName(words.name, words.lang);
306
+ } else {
307
+ var _video$audioTracks;
308
+ const video = this.media;
309
+ const sound = Array.from((_video$audioTracks = video.audioTracks) !== null && _video$audioTracks !== void 0 ? _video$audioTracks : []).find((track) => track.enabled);
310
+ const words = Array.from(this.media.textTracks).find((track) => (track.kind === "subtitles" || track.kind === "captions") && track.mode === "showing");
311
+ audio = sound === void 0 ? "" : trackName(sound.label, sound.language);
312
+ text = words === void 0 ? null : trackName(words.label, words.language);
313
+ }
314
+ const { heardAudio, heardText } = this;
315
+ this.heardAudio = audio;
316
+ this.heardText = text;
317
+ if (!this.started) return;
318
+ if (heardAudio !== void 0 && audio !== heardAudio) this.voice.say("audio", "Audio: {track}", audio);
319
+ if (heardText !== void 0 && text !== heardText) {
320
+ if (text === null) this.voice.say("subtitles-off", "Subtitles off");
321
+ else this.voice.say("subtitles", "Subtitles: {track}", text);
253
322
  }
254
323
  }
255
324
  /** The video's state on the element, for `mattebox-player[paused]` and the like. */
@@ -336,9 +405,9 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
336
405
  }
337
406
  /** Hands the `chapters` attribute to the engine, or keeps a hidden chapters track on the video for it. */
338
407
  chapters() {
339
- var _this$current$engine2, _this$current2;
408
+ var _this$current$engine3, _this$current3;
340
409
  const url = this.getAttribute(CHAPTERS);
341
- const engine = (_this$current$engine2 = (_this$current2 = this.current) === null || _this$current2 === void 0 ? void 0 : _this$current2.engine) !== null && _this$current$engine2 !== void 0 ? _this$current$engine2 : null;
410
+ const engine = (_this$current$engine3 = (_this$current3 = this.current) === null || _this$current3 === void 0 ? void 0 : _this$current3.engine) !== null && _this$current$engine3 !== void 0 ? _this$current$engine3 : null;
342
411
  const api = engine === null ? void 0 : namespaces(engine).chapters;
343
412
  if (api !== void 0) {
344
413
  var _this$track;
@@ -398,6 +467,8 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
398
467
  report(error) {
399
468
  if (error.fatal) {
400
469
  this.failure = error;
470
+ clearTimeout(this.slow);
471
+ if (this.querySelector("mbx-error-screen") === null) this.voice.say("error", "Playback failed");
401
472
  if (this.getAttribute(CONTROLS) !== "custom") this.surface.show(error);
402
473
  }
403
474
  this.emit("error", error);
@@ -463,7 +534,10 @@ var MatteboxPlayerElement = class MatteboxPlayerElement extends HTMLElement {
463
534
  if (_this2.core !== null) return _this2.core;
464
535
  const core = createPlayer(_this2.media, { handlers: yield _this2.chain() });
465
536
  _this2.offs.push(core.on("sourcechange", (session) => {
537
+ var _this$offTracks, _session$engine$on, _session$engine;
466
538
  _this2.current = session;
539
+ (_this$offTracks = _this2.offTracks) === null || _this$offTracks === void 0 || _this$offTracks.call(_this2);
540
+ _this2.offTracks = (_session$engine$on = session === null || session === void 0 || (_session$engine = session.engine) === null || _session$engine === void 0 ? void 0 : _session$engine.on("tracks:selected", () => _this2.tracks())) !== null && _session$engine$on !== void 0 ? _session$engine$on : null;
467
541
  if (session !== null && _this2.isConnected) _this2.adopt(session);
468
542
  _this2.emit("sourcechange", session);
469
543
  }), core.on("error", (error) => {
@@ -1,7 +1,7 @@
1
+ import { layout, trackNames } from "../controls/track-names.js";
1
2
  import { icon } from "../controls/icons.js";
2
3
  import { show } from "./shared.js";
3
4
  import { nativeTracks, onNativeTracks } from "../controls/native-tracks.js";
4
- import { layout, trackNames } from "../controls/track-names.js";
5
5
  import { MenuElement, single } from "./menu-element.js";
6
6
  import { isAudioDescription, isOriginal } from "mattebox";
7
7
  //#region src/elements/audio-menu.ts
@@ -1,9 +1,9 @@
1
- import { namespaces } from "../namespaces.js";
2
1
  import { el } from "../dom.js";
2
+ import { fill } from "../labels.js";
3
+ import { namespaces } from "../namespaces.js";
3
4
  import { icon } from "../controls/icons.js";
4
5
  import { Component } from "./component.js";
5
6
  import { style } from "./shared.js";
6
- import { fill } from "../labels.js";
7
7
  //#region src/elements/drm-badge.ts
8
8
  const STYLE = ":host{width:2.5em;height:2.5em;color:var(--mbx-muted);border-radius:var(--mbx-radius);cursor:default;justify-content:center;align-items:center;display:inline-flex;position:relative}:host([hidden]){display:none}:host(:focus){outline:2px solid var(--mbx-accent);outline-offset:-2px}:host(:focus:not(:focus-visible)){outline:none}[part~=icon],::slotted(*){fill:currentColor;width:1.75em;height:1.75em}[part~=tooltip]{border-radius:var(--mbx-radius);color:var(--mbx-text);text-align:left;white-space:nowrap;pointer-events:none;background:#1c1c20f2;margin-bottom:.6154em;padding:.6154em .7692em;font-size:.8125em;line-height:1.4;position:absolute;bottom:100%;right:0;box-shadow:0 4px 16px #00000080}[part~=tooltip][hidden]{display:none}[part~=tooltip-title]{font-weight:600}[part~=tooltip-text]{color:var(--mbx-muted)}";
9
9
  /** The name a viewer knows a key system by. */
@@ -1,8 +1,8 @@
1
+ import { fill } from "../labels.js";
1
2
  import { icon } from "../controls/icons.js";
2
3
  import { Component } from "./component.js";
3
4
  import { MENU_STYLE, iconSlots, style } from "./shared.js";
4
5
  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";
2
3
  import { Component } from "./component.js";
3
4
  import { SLIDER_STYLE, number, seekRow, style } from "./shared.js";
4
- import { fill } from "../labels.js";
5
5
  import { EMPTY, at, clip, fraction, spans } from "../controls/ranges.js";
6
6
  import { format } from "../controls/time.js";
7
7
  import { bufferGoal, live, optional, span, wall } from "../controls/session.js";
@@ -1,8 +1,8 @@
1
1
  import { setChildren } from "../dom.js";
2
+ import { fill } from "../labels.js";
2
3
  import { icon } from "../controls/icons.js";
3
4
  import { Component } from "./component.js";
4
5
  import { BUTTON_STYLE, style } from "./shared.js";
5
- import { fill } from "../labels.js";
6
6
  //#region src/elements/skip-button.ts
7
7
  const SECONDS = 10;
8
8
  /** The glyph for a skip amount: the set draws 5, 10, 15 and 30, and a plain arrow says the rest. */
@@ -1,7 +1,7 @@
1
+ import { trackNames } from "../controls/track-names.js";
1
2
  import { icon } from "../controls/icons.js";
2
3
  import { show } from "./shared.js";
3
4
  import { nativeTracks, onNativeTracks } from "../controls/native-tracks.js";
4
- import { trackNames } from "../controls/track-names.js";
5
5
  import { MenuElement } from "./menu-element.js";
6
6
  import { onTracks, trackItems } from "./audio-menu.js";
7
7
  import { isSdh } from "mattebox";
@@ -1,4 +1,4 @@
1
- import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/asyncToGenerator.js";
1
+ import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.154.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 = [
@@ -1,3 +1,3 @@
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~=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}";
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
2
  //#endregion
3
3
  export { STYLE };
package/dist/style.js CHANGED
@@ -1,4 +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~=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}";
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
2
  //#endregion
3
3
  export { STYLE };
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattebox/player",
3
- "version": "0.9.1",
3
+ "version": "0.10.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://jboix.github.io/mattebox-player/",
11
+ "homepage": "https://mattebox.ch/",
12
12
  "bugs": {
13
13
  "url": "https://github.com/jboix/mattebox-player/issues"
14
14
  },
@@ -69,9 +69,9 @@
69
69
  "release:ci": "semantic-release"
70
70
  },
71
71
  "dependencies": {
72
- "@mattebox/player-core": "^0.6.0"
72
+ "@mattebox/player-core": "^0.6.1"
73
73
  },
74
74
  "peerDependencies": {
75
- "mattebox": "^0.14.0"
75
+ "mattebox": "^0.15.0"
76
76
  }
77
77
  }