@mattebox/player 0.7.0 → 0.9.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 (138) hide show
  1. package/dist/cdn/mattebox-player.min.js +3 -3
  2. package/dist/controls/icons.d.ts +5 -28
  3. package/dist/controls/icons.d.ts.map +1 -1
  4. package/dist/controls/icons.js +38 -29
  5. package/dist/controls/icons.js.map +1 -1
  6. package/dist/controls/markers.d.ts +39 -0
  7. package/dist/controls/markers.d.ts.map +1 -0
  8. package/dist/controls/markers.js +38 -0
  9. package/dist/controls/markers.js.map +1 -0
  10. package/dist/controls/menu.d.ts +14 -2
  11. package/dist/controls/menu.d.ts.map +1 -1
  12. package/dist/controls/menu.js +50 -4
  13. package/dist/controls/menu.js.map +1 -1
  14. package/dist/controls/native-tracks.d.ts +28 -0
  15. package/dist/controls/native-tracks.d.ts.map +1 -0
  16. package/dist/controls/native-tracks.js +30 -0
  17. package/dist/controls/native-tracks.js.map +1 -0
  18. package/dist/controls/quality-names.d.ts +15 -0
  19. package/dist/controls/quality-names.d.ts.map +1 -0
  20. package/dist/controls/quality-names.js +62 -0
  21. package/dist/controls/quality-names.js.map +1 -0
  22. package/dist/controls/track-names.d.ts +40 -0
  23. package/dist/controls/track-names.d.ts.map +1 -0
  24. package/dist/controls/track-names.js +59 -0
  25. package/dist/controls/track-names.js.map +1 -0
  26. package/dist/element.d.ts +60 -2
  27. package/dist/element.d.ts.map +1 -1
  28. package/dist/element.js +182 -23
  29. package/dist/element.js.map +1 -1
  30. package/dist/elements/audio-menu.d.ts +19 -8
  31. package/dist/elements/audio-menu.d.ts.map +1 -1
  32. package/dist/elements/audio-menu.js +60 -19
  33. package/dist/elements/audio-menu.js.map +1 -1
  34. package/dist/elements/component.d.ts.map +1 -1
  35. package/dist/elements/component.js +10 -0
  36. package/dist/elements/component.js.map +1 -1
  37. package/dist/elements/control-bar.d.ts +2 -0
  38. package/dist/elements/control-bar.d.ts.map +1 -1
  39. package/dist/elements/control-bar.js +23 -7
  40. package/dist/elements/control-bar.js.map +1 -1
  41. package/dist/elements/current-time.d.ts.map +1 -1
  42. package/dist/elements/current-time.js +1 -1
  43. package/dist/elements/current-time.js.map +1 -1
  44. package/dist/elements/drm-badge.d.ts +3 -2
  45. package/dist/elements/drm-badge.d.ts.map +1 -1
  46. package/dist/elements/drm-badge.js +11 -9
  47. package/dist/elements/drm-badge.js.map +1 -1
  48. package/dist/elements/duration.d.ts.map +1 -1
  49. package/dist/elements/duration.js +6 -2
  50. package/dist/elements/duration.js.map +1 -1
  51. package/dist/elements/error-screen.js +1 -1
  52. package/dist/elements/live-button.js +1 -1
  53. package/dist/elements/marker-button.d.ts +22 -0
  54. package/dist/elements/marker-button.d.ts.map +1 -0
  55. package/dist/elements/marker-button.js +95 -0
  56. package/dist/elements/marker-button.js.map +1 -0
  57. package/dist/elements/quality-menu.d.ts +4 -0
  58. package/dist/elements/quality-menu.d.ts.map +1 -1
  59. package/dist/elements/quality-menu.js +22 -8
  60. package/dist/elements/quality-menu.js.map +1 -1
  61. package/dist/elements/scan-button.js +1 -1
  62. package/dist/elements/seek-bar.d.ts +6 -1
  63. package/dist/elements/seek-bar.d.ts.map +1 -1
  64. package/dist/elements/seek-bar.js +37 -25
  65. package/dist/elements/seek-bar.js.map +1 -1
  66. package/dist/elements/shared.js +3 -3
  67. package/dist/elements/skip-button.js +2 -2
  68. package/dist/elements/skip-button.js.map +1 -1
  69. package/dist/elements/spinner.js +1 -1
  70. package/dist/elements/start-button.d.ts +5 -0
  71. package/dist/elements/start-button.d.ts.map +1 -1
  72. package/dist/elements/start-button.js +15 -2
  73. package/dist/elements/start-button.js.map +1 -1
  74. package/dist/elements/subtitles-menu.d.ts +7 -1
  75. package/dist/elements/subtitles-menu.d.ts.map +1 -1
  76. package/dist/elements/subtitles-menu.js +62 -20
  77. package/dist/elements/subtitles-menu.js.map +1 -1
  78. package/dist/elements/title.d.ts.map +1 -1
  79. package/dist/elements/title.js +3 -1
  80. package/dist/elements/title.js.map +1 -1
  81. package/dist/elements/volume-slider.js +1 -1
  82. package/dist/elements/volume.js +1 -1
  83. package/dist/entries/marker-button.d.ts +5 -0
  84. package/dist/entries/marker-button.d.ts.map +1 -0
  85. package/dist/entries/marker-button.js +9 -0
  86. package/dist/entries/marker-button.js.map +1 -0
  87. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/asyncToGenerator.js +1 -1
  88. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/defineProperty.js +1 -1
  89. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/objectSpread2.js +1 -1
  90. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/toPrimitive.js +1 -1
  91. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/toPropertyKey.js +1 -1
  92. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.152.0}/helpers/esm/typeof.js +1 -1
  93. package/dist/es2015/controls/chapters.js +1 -1
  94. package/dist/es2015/controls/icons.js +38 -29
  95. package/dist/es2015/controls/markers.js +36 -0
  96. package/dist/es2015/controls/menu.js +52 -5
  97. package/dist/es2015/controls/native-tracks.js +29 -0
  98. package/dist/es2015/controls/quality-names.js +67 -0
  99. package/dist/es2015/controls/track-names.js +57 -0
  100. package/dist/es2015/element.js +185 -29
  101. package/dist/es2015/elements/audio-menu.js +66 -20
  102. package/dist/es2015/elements/component.js +10 -0
  103. package/dist/es2015/elements/control-bar.js +23 -7
  104. package/dist/es2015/elements/current-time.js +1 -1
  105. package/dist/es2015/elements/drm-badge.js +12 -9
  106. package/dist/es2015/elements/duration.js +6 -2
  107. package/dist/es2015/elements/error-screen.js +1 -1
  108. package/dist/es2015/elements/live-button.js +1 -1
  109. package/dist/es2015/elements/marker-button.js +96 -0
  110. package/dist/es2015/elements/quality-menu.js +23 -8
  111. package/dist/es2015/elements/scan-button.js +1 -1
  112. package/dist/es2015/elements/seek-bar.js +42 -29
  113. package/dist/es2015/elements/shared.js +3 -3
  114. package/dist/es2015/elements/skip-button.js +2 -2
  115. package/dist/es2015/elements/spinner.js +1 -1
  116. package/dist/es2015/elements/start-button.js +15 -2
  117. package/dist/es2015/elements/subtitles-menu.js +72 -26
  118. package/dist/es2015/elements/title.js +3 -1
  119. package/dist/es2015/elements/volume-slider.js +1 -1
  120. package/dist/es2015/elements/volume.js +1 -1
  121. package/dist/es2015/entries/marker-button.js +7 -0
  122. package/dist/es2015/index.js +3 -1
  123. package/dist/es2015/presets.js +1 -1
  124. package/dist/es2015/style.js +1 -1
  125. package/dist/es2015/tags.js +2 -1
  126. package/dist/host.d.ts +3 -0
  127. package/dist/host.d.ts.map +1 -1
  128. package/dist/host.js.map +1 -1
  129. package/dist/index.d.ts +4 -0
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +3 -1
  132. package/dist/style.js +1 -1
  133. package/dist/tags.d.ts +1 -0
  134. package/dist/tags.d.ts.map +1 -1
  135. package/dist/tags.js +2 -1
  136. package/dist/tags.js.map +1 -1
  137. package/package.json +4 -5
  138. package/NOTICE +0 -24
@@ -2,7 +2,7 @@ import { icon } from "../controls/icons.js";
2
2
  import { Component } from "./component.js";
3
3
  import { BUTTON_STYLE, iconSlots, show, style } from "./shared.js";
4
4
  //#region src/elements/start-button.ts
5
- const STYLE_CSS = ":host{margin:-32px 0 0 -52px;position:absolute;top:50%;left:50%}[part~=button]{width:104px;height:64px;color:var(--mbx-text);opacity:.9;background:#00000073;border:1px solid #ffffff2e;transition:opacity .15s,background .15s}[part~=button]:hover{opacity:1;background:#0009}:host([cramped]){display:none}[part~=icon],::slotted(*){width:40px;height:40px;margin-left:2px}@media (prefers-reduced-motion:reduce){[part~=button]{transition:none}}";
5
+ const STYLE_CSS = ":host{--mbx-tooltip:none;top:var(--mbx-start-top,50%);margin:-2.5em 0 0 -2.5em;position:absolute;left:50%}[part~=button]{z-index:0;width:5em;height:5em;color:var(--mbx-text);background:0 0;border:0;transition:color .15s;position:relative}[part~=button]:before{content:\"\";z-index:-1;background:var(--mbx-surface);opacity:.88;clip-path:polygon(0 0,79% 0,100% 21%,100% 100%,21% 100%,0 79%);transition:opacity .15s,background .15s;position:absolute;top:0;bottom:0;left:0;right:0}[part~=button]:hover{color:var(--mbx-surface)}[part~=button]:hover:before{background:var(--mbx-accent);opacity:1}:host([cramped]){display:none}[part~=icon],::slotted(*){width:3em;height:3em}@media (prefers-reduced-motion:reduce){[part~=button],[part~=button]:before{transition:none}}";
6
6
  const STATES = ["play", "replay"];
7
7
  const STYLE = BUTTON_STYLE + STYLE_CSS;
8
8
  var MbxStartButton = class extends Component {
@@ -63,6 +63,8 @@ var MbxStartButton = class extends Component {
63
63
  this.fit(player);
64
64
  });
65
65
  this.resizer.observe(player);
66
+ const bar = player.querySelector("mbx-control-bar");
67
+ if (bar !== null) this.resizer.observe(bar);
66
68
  }
67
69
  this.fit(player);
68
70
  this.render();
@@ -72,8 +74,14 @@ var MbxStartButton = class extends Component {
72
74
  (_this$resizer = this.resizer) === null || _this$resizer === void 0 || _this$resizer.disconnect();
73
75
  this.resizer = null;
74
76
  this.removeAttribute("cramped");
77
+ this.style.removeProperty("--mbx-start-top");
75
78
  }
76
79
  /**
80
+ * The button sits in the middle of the picture left over the bar's
81
+ * controls, not of the whole player: with the bar at the foot, the
82
+ * player's own middle reads as too low. The bar's top padding is the
83
+ * lead-in of its gradient, so the controls start under it.
84
+ *
77
85
  * Cramped when the button's foot would be inside the bar's box, which
78
86
  * starts at the top of its gradient: then the bar's own play button is
79
87
  * the one to press. Measured with the button shown, since a hidden one
@@ -83,13 +91,18 @@ var MbxStartButton = class extends Component {
83
91
  const bar = player.querySelector("mbx-control-bar");
84
92
  if (bar === null) {
85
93
  this.removeAttribute("cramped");
94
+ this.style.removeProperty("--mbx-start-top");
86
95
  return;
87
96
  }
97
+ const box = player.getBoundingClientRect();
98
+ const barBox = bar.getBoundingClientRect();
99
+ const controls = barBox.top + (Number.parseFloat(getComputedStyle(bar).paddingTop) || 0);
100
+ this.style.setProperty("--mbx-start-top", `${(controls - box.top) / 2}px`);
88
101
  const wasHidden = this.hidden;
89
102
  const wasCramped = this.hasAttribute("cramped");
90
103
  this.hidden = false;
91
104
  this.removeAttribute("cramped");
92
- const cramped = this.button.getBoundingClientRect().bottom > bar.getBoundingClientRect().top;
105
+ const cramped = this.button.getBoundingClientRect().bottom > barBox.top;
93
106
  this.hidden = wasHidden;
94
107
  this.toggleAttribute("cramped", cramped);
95
108
  if (cramped !== wasCramped) this.render();
@@ -1,7 +1,10 @@
1
1
  import { icon } from "../controls/icons.js";
2
2
  import { show } from "./shared.js";
3
+ import { nativeTracks, onNativeTracks } from "../controls/native-tracks.js";
4
+ import { trackNames } from "../controls/track-names.js";
3
5
  import { MenuElement } from "./menu-element.js";
4
6
  import { onTracks, trackItems } from "./audio-menu.js";
7
+ import { isSdh } from "mattebox";
5
8
  //#region src/elements/subtitles-menu.ts
6
9
  const OFF = "off";
7
10
  const SUBTITLE_SIZE = "subtitle-size";
@@ -28,72 +31,115 @@ var MbxSubtitlesMenu = class extends MenuElement {
28
31
  "label-settings",
29
32
  "label-size",
30
33
  "label-background",
34
+ "label-sdh",
35
+ "label-cc",
31
36
  ...SIZES.map(([id]) => `label-${id}`),
32
37
  ...BACKGROUNDS.map(([id]) => `label-${id}`)
33
38
  ];
34
39
  }
35
40
  constructor() {
36
- super(STATES, (state) => icon(state === "on" ? "closed-captions-on" : "closed-captions"));
41
+ super(STATES, (state) => icon(state === "on" ? "subtitles-on" : "subtitles"));
37
42
  this.engine = null;
38
43
  show(this.slots, "off");
39
44
  }
40
45
  name() {
41
46
  return "Subtitles";
42
47
  }
43
- /** A look's group: the choices named from the attributes, the value from the player's. */
44
- looks(player, attribute, name, fallback, choices, initial) {
45
- var _this$getAttribute;
48
+ /**
49
+ * A look's page: an item with the look's glyph, its name and the value
50
+ * chosen, which opens the choices. They are named from the attributes,
51
+ * and the value is the player's.
52
+ */
53
+ looks(player, attribute, name, fallback, choices, initial, glyph) {
54
+ var _this$getAttribute, _items$find$, _items$find;
46
55
  const set = player.getAttribute(attribute);
47
56
  const value = set !== null && choices.some(([id]) => id === set) ? set : initial;
57
+ const label = (_this$getAttribute = this.getAttribute(`label-${name}`)) !== null && _this$getAttribute !== void 0 ? _this$getAttribute : fallback;
58
+ const items = choices.map(([id, text]) => {
59
+ var _this$getAttribute2;
60
+ return [id, (_this$getAttribute2 = this.getAttribute(`label-${id}`)) !== null && _this$getAttribute2 !== void 0 ? _this$getAttribute2 : text];
61
+ });
48
62
  return {
49
63
  name,
50
- label: (_this$getAttribute = this.getAttribute(`label-${name}`)) !== null && _this$getAttribute !== void 0 ? _this$getAttribute : fallback,
51
- items: choices.map(([id, text]) => {
52
- var _this$getAttribute2;
53
- return [id, (_this$getAttribute2 = this.getAttribute(`label-${id}`)) !== null && _this$getAttribute2 !== void 0 ? _this$getAttribute2 : text];
54
- }),
55
- value,
56
- onSelect: (chosen) => {
57
- player.setAttribute(attribute, chosen);
58
- this.render();
59
- }
64
+ label,
65
+ glyph: () => icon(glyph),
66
+ detail: (_items$find$ = (_items$find = items.find(([id]) => id === value)) === null || _items$find === void 0 ? void 0 : _items$find[1]) !== null && _items$find$ !== void 0 ? _items$find$ : "",
67
+ entries: [{
68
+ name,
69
+ label,
70
+ hideLabel: true,
71
+ items,
72
+ value,
73
+ onSelect: (chosen) => {
74
+ player.setAttribute(attribute, chosen);
75
+ this.render();
76
+ }
77
+ }]
60
78
  };
61
79
  }
62
80
  attach(player) {
63
81
  this.follow(player, (engine) => {
64
82
  this.engine = engine;
65
83
  this.render();
66
- if (engine === null) return void 0;
67
- return onTracks(engine, () => {
84
+ const tick = () => {
68
85
  this.render();
69
- });
86
+ };
87
+ return engine === null ? onNativeTracks(player.video, "textTracks", tick) : onTracks(engine, tick);
70
88
  });
71
89
  }
90
+ /** The native session's subtitle tracks as entries, and the showing one's. */
91
+ native(tracks) {
92
+ var _this$getAttribute3;
93
+ const sdh = (_this$getAttribute3 = this.getAttribute("label-sdh")) !== null && _this$getAttribute3 !== void 0 ? _this$getAttribute3 : "SDH";
94
+ const entries = tracks.map((track, index) => [
95
+ String(index),
96
+ track.label,
97
+ track.language,
98
+ track.kind === "captions" ? [sdh] : [],
99
+ []
100
+ ]);
101
+ const on = tracks.findIndex((track) => track.mode === "showing");
102
+ return [entries, on === -1 ? null : String(on)];
103
+ }
72
104
  render() {
73
- var _this$getAttribute3, _this$getAttribute4, _this$getAttribute5;
105
+ var _nativeTracks, _this$getAttribute6, _this$getAttribute7, _this$getAttribute8, _this$getAttribute9;
74
106
  super.render();
75
107
  const engine = this.engine;
76
108
  const player = this.player;
77
- if (engine === null || player === null) {
109
+ const listed = engine === null && player !== null ? (_nativeTracks = nativeTracks(player, "textTracks")) === null || _nativeTracks === void 0 ? void 0 : _nativeTracks.filter((track) => track.kind === "subtitles" || track.kind === "captions") : void 0;
110
+ if (player === null || engine === null && listed === void 0) {
78
111
  this.hidden = true;
79
112
  return;
80
113
  }
81
- const [tracks, active] = trackItems(engine, "text");
82
- const items = [[OFF, (_this$getAttribute3 = this.getAttribute("label-off")) !== null && _this$getAttribute3 !== void 0 ? _this$getAttribute3 : "Off"], ...tracks];
114
+ const [tracks, active] = listed !== void 0 ? this.native(listed) : trackItems(engine, "text", (track) => {
115
+ var _this$getAttribute4, _this$getAttribute5;
116
+ return [...track.instreamId !== void 0 ? [(_this$getAttribute4 = this.getAttribute("label-cc")) !== null && _this$getAttribute4 !== void 0 ? _this$getAttribute4 : "CC"] : [], ...isSdh(track) ? [(_this$getAttribute5 = this.getAttribute("label-sdh")) !== null && _this$getAttribute5 !== void 0 ? _this$getAttribute5 : "SDH"] : []];
117
+ }, (track) => track.forced !== true);
118
+ const word = this.getAttribute("label-track");
119
+ const items = [[OFF, (_this$getAttribute6 = this.getAttribute("label-off")) !== null && _this$getAttribute6 !== void 0 ? _this$getAttribute6 : "Off"], ...trackNames(tracks, word)];
83
120
  this.menu.fill([{
84
121
  name: "track",
85
- label: (_this$getAttribute4 = this.getAttribute("label-track")) !== null && _this$getAttribute4 !== void 0 ? _this$getAttribute4 : "Track",
122
+ label: word !== null && word !== void 0 ? word : "Track",
123
+ hideLabel: true,
86
124
  items,
125
+ badgeGlyphs: {
126
+ [(_this$getAttribute7 = this.getAttribute("label-cc")) !== null && _this$getAttribute7 !== void 0 ? _this$getAttribute7 : "CC"]: () => icon("closed-captions"),
127
+ [(_this$getAttribute8 = this.getAttribute("label-sdh")) !== null && _this$getAttribute8 !== void 0 ? _this$getAttribute8 : "SDH"]: () => icon("sdh")
128
+ },
87
129
  value: active !== null && active !== void 0 ? active : OFF,
88
130
  onSelect: (value) => {
89
- if (value === OFF) engine.tracks.deselect("text");
90
- else engine.tracks.select(value);
131
+ if (listed !== void 0) {
132
+ for (const track of listed) track.mode = "disabled";
133
+ const chosen = listed[Number(value)];
134
+ if (chosen !== void 0) chosen.mode = "showing";
135
+ } else if (value === OFF) engine === null || engine === void 0 || engine.tracks.deselect("text");
136
+ else engine === null || engine === void 0 || engine.tracks.select(value);
91
137
  this.render();
92
138
  }
93
139
  }, {
94
140
  name: "settings",
95
- label: (_this$getAttribute5 = this.getAttribute("label-settings")) !== null && _this$getAttribute5 !== void 0 ? _this$getAttribute5 : "Settings",
96
- entries: [this.looks(player, SUBTITLE_SIZE, "size", "Size", SIZES, "medium"), this.looks(player, SUBTITLE_BACKGROUND, "background", "Background", BACKGROUNDS, "dark")]
141
+ label: (_this$getAttribute9 = this.getAttribute("label-settings")) !== null && _this$getAttribute9 !== void 0 ? _this$getAttribute9 : "Settings",
142
+ entries: [this.looks(player, SUBTITLE_SIZE, "size", "Size", SIZES, "medium", "text-size"), this.looks(player, SUBTITLE_BACKGROUND, "background", "Background", BACKGROUNDS, "dark", "text-background")]
97
143
  }]);
98
144
  show(this.slots, active === null ? "off" : "on");
99
145
  this.hidden = tracks.length === 0;
@@ -24,7 +24,7 @@ import { style } from "./shared.js";
24
24
  * override. Placed first among the screens, so the start button, the
25
25
  * error screen and the spinner paint over its band.
26
26
  */
27
- const STYLE = ":host{padding:72px calc(var(--mbx-pad) + 8px) calc(var(--mbx-bar-rows,0px) + 12px);color:var(--mbx-text);font:400 14px / 1.35 var(--mbx-font);text-shadow:0 1px 2px #0006;pointer-events:none;background:linear-gradient(#0000,#0000004d 55%,#0000008c);align-items:flex-end;display:flex;position:absolute;bottom:0;left:0;right:0}:host([playing]),:host([empty]),:host([hidden]){display:none}[part~=artwork]{border-radius:var(--mbx-radius);object-fit:cover;flex:none;width:auto;max-width:128px;height:72px;margin-right:14px;box-shadow:0 0 0 1px #ffffff24}[part~=artwork][hidden]{display:none}[part~=text]{flex-direction:column;min-width:0;max-width:60ch;display:flex}[part~=text]>:not([hidden])~:not([hidden]){margin-top:2px}[part~=heading]{letter-spacing:-.01em;white-space:nowrap;text-overflow:ellipsis;font-size:20px;font-weight:600;line-height:1.2;overflow:hidden}[part~=subheading]{color:#ffffffc7;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[part~=heading]:empty,[part~=subheading]:empty{display:none}";
27
+ const STYLE = ":host{padding:4.5em calc(var(--mbx-pad) + .5em) calc(var(--mbx-bar-rows,0px) + .75em);color:var(--mbx-text);font:400 1em / 1.35 var(--mbx-font);text-shadow:0 1px 2px #0006;pointer-events:none;background:linear-gradient(#0000,#0000004d 55%,#0000008c);align-items:flex-end;display:flex;position:absolute;bottom:0;left:0;right:0}:host([playing]),:host([empty]),:host([hidden]){display:none}[part~=artwork]{border-radius:var(--mbx-radius);object-fit:cover;flex:none;width:auto;max-width:8em;height:4.5em;margin-right:.875em;box-shadow:0 0 0 1px #ffffff24}[part~=artwork][hidden]{display:none}[part~=text]{flex-direction:column;min-width:0;max-width:60ch;font-size:.875em;display:flex}[part~=text]>:not([hidden])~:not([hidden]){margin-top:.1429em}[part~=heading]{letter-spacing:-.01em;white-space:nowrap;text-overflow:ellipsis;font-size:1.4286em;font-weight:600;line-height:1.2;overflow:hidden}[part~=subheading]{color:#ffffffc7;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[part~=heading]:empty,[part~=subheading]:empty{display:none}:host([artwork]) [part~=heading]:not(:empty){white-space:normal;-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box}:host([artwork][subheading]) [part~=heading]:not(:empty){-webkit-line-clamp:2}:host([layout=compact]){padding:.75em calc(var(--mbx-pad) + .5em) 2.5em;background:linear-gradient(#0000008c,#0000);align-items:flex-start;top:0;bottom:auto}:host([layout=compact]) [part~=artwork],:host([layout=compact]) [part~=subheading]{display:none}:host([layout=compact]) [part~=text] [part~=heading]:not(:empty){white-space:nowrap;font-size:1.1429em;display:block}";
28
28
  var MbxTitle = class extends Component {
29
29
  static get observedAttributes() {
30
30
  return [
@@ -60,6 +60,8 @@ var MbxTitle = class extends Component {
60
60
  this.fit(player);
61
61
  });
62
62
  this.resizer.observe(player);
63
+ const bar = player.querySelector("mbx-control-bar");
64
+ if (bar !== null) this.resizer.observe(bar);
63
65
  }
64
66
  this.fit(player);
65
67
  this.state(player);
@@ -2,7 +2,7 @@ import { Component } from "./component.js";
2
2
  import { SLIDER_STYLE, number, style } from "./shared.js";
3
3
  import { slider } from "../controls/slider.js";
4
4
  //#region src/elements/volume-slider.ts
5
- const VOLUME_SLIDER_CSS = ":host{flex:none;width:80px}";
5
+ const VOLUME_SLIDER_CSS = ":host{flex:none;width:5em}";
6
6
  const STEP = .05;
7
7
  const PAGE = .2;
8
8
  var MbxVolumeSlider = class extends Component {
@@ -15,7 +15,7 @@ import { style } from "./shared.js";
15
15
  * stuck. So the group carries `pointer` from a pointer press until a key
16
16
  * is pressed or focus leaves, and focus unfolds the slider only without it.
17
17
  */
18
- const STYLE = ":host{align-items:center;display:inline-flex}:host([hidden]){display:none}::slotted(mbx-volume-slider){opacity:0;width:0;transition:width .2s,opacity .2s;overflow:hidden}::slotted(mbx-volume-slider[collapsed]){display:none}:host(:hover) ::slotted(mbx-volume-slider),:host(:focus-within:not([pointer])) ::slotted(mbx-volume-slider){opacity:1;width:80px}@media (prefers-reduced-motion:reduce){::slotted(mbx-volume-slider){transition:none}}";
18
+ const STYLE = ":host{align-items:center;display:inline-flex}:host([hidden]){display:none}::slotted(mbx-volume-slider){opacity:0;width:0;transition:width .2s,opacity .2s;overflow:hidden}::slotted(mbx-volume-slider[collapsed]){display:none}:host(:hover) ::slotted(mbx-volume-slider),:host(:focus-within:not([pointer])) ::slotted(mbx-volume-slider){opacity:1;width:5em}@media (prefers-reduced-motion:reduce){::slotted(mbx-volume-slider){transition:none}}";
19
19
  var MbxVolume = class extends Component {
20
20
  constructor() {
21
21
  super();
@@ -0,0 +1,7 @@
1
+ import { MARKER_BUTTON } from "../tags.js";
2
+ import "../element-entry.js";
3
+ import { MbxMarkerButton } from "../elements/marker-button.js";
4
+ //#region src/entries/marker-button.ts
5
+ if (customElements.get("mbx-marker-button") === void 0) customElements.define(MARKER_BUTTON, MbxMarkerButton);
6
+ //#endregion
7
+ export { MbxMarkerButton };
@@ -20,6 +20,8 @@ import { MbxFullscreenButton } from "./elements/fullscreen-button.js";
20
20
  import "./entries/fullscreen-button.js";
21
21
  import { MbxLiveButton } from "./elements/live-button.js";
22
22
  import "./entries/live-button.js";
23
+ import { MbxMarkerButton } from "./elements/marker-button.js";
24
+ import "./entries/marker-button.js";
23
25
  import { MbxMuteButton } from "./elements/mute-button.js";
24
26
  import "./entries/mute-button.js";
25
27
  import { MbxPipButton } from "./elements/pip-button.js";
@@ -52,4 +54,4 @@ import { MbxVolumeSlider } from "./elements/volume-slider.js";
52
54
  import "./entries/volume-slider.js";
53
55
  import { MbxVolume } from "./elements/volume.js";
54
56
  import "./entries/volume.js";
55
- export { MatteboxPlayerElement, MbxAirplayButton, MbxAudioMenu, MbxChaptersMenu, MbxControlBar, MbxCurrentTime, MbxDrmBadge, MbxDuration, MbxErrorScreen, MbxFullscreenButton, MbxLiveButton, MbxMuteButton, MbxPipButton, MbxPlayButton, MbxQualityMenu, MbxRemainingTime, MbxScanButton, MbxSeekBar, MbxSkipButton, MbxSpacer, MbxSpeedMenu, MbxSpinner, MbxStartButton, MbxSubtitlesMenu, MbxTitle, MbxVolume, MbxVolumeSlider };
57
+ 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, MbxVolume, MbxVolumeSlider };
@@ -1,4 +1,4 @@
1
- import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/asyncToGenerator.js";
1
+ import _asyncToGenerator from "./_virtual/_@oxc-project_runtime@0.152.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:#101114;--mbx-text:#f2f3f5;--mbx-muted:#9aa0a6;--mbx-accent:#5b8cff;--mbx-error:#ffb4ab;--mbx-live:#ff4d4d;--mbx-radius:4px;--mbx-gap:10px;--mbx-pad:8px;--mbx-font:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;background:#000;outline:none;display:block;position:relative}[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}@supports (aspect-ratio:1){::slotted(video){aspect-ratio:auto 16/9}}:host([casting]) ::slotted(mbx-control-bar),:host([casting]) ::slotted(mbx-start-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 13px / 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:2px 6px}[hidden]{display:none}";
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}";
2
2
  //#endregion
3
3
  export { STYLE };
@@ -12,6 +12,7 @@ const PIP_BUTTON = "mbx-pip-button";
12
12
  const AIRPLAY_BUTTON = "mbx-airplay-button";
13
13
  const FULLSCREEN_BUTTON = "mbx-fullscreen-button";
14
14
  const START_BUTTON = "mbx-start-button";
15
+ const MARKER_BUTTON = "mbx-marker-button";
15
16
  const ERROR_SCREEN = "mbx-error-screen";
16
17
  const SPINNER = "mbx-spinner";
17
18
  const TITLE = "mbx-title";
@@ -28,4 +29,4 @@ const DRM_BADGE = "mbx-drm-badge";
28
29
  const VOLUME = "mbx-volume";
29
30
  const CHAPTERS_MENU = "mbx-chapters-menu";
30
31
  //#endregion
31
- export { AIRPLAY_BUTTON, AUDIO_MENU, CHAPTERS_MENU, CONTROL_BAR, CURRENT_TIME, DRM_BADGE, DURATION, ERROR_SCREEN, FULLSCREEN_BUTTON, LIVE_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, VOLUME, VOLUME_SLIDER };
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, VOLUME, VOLUME_SLIDER };
package/dist/host.d.ts CHANGED
@@ -10,12 +10,15 @@
10
10
  */
11
11
  import type { Player, PlayerError } from '@mattebox/player-core';
12
12
  import type { Mattebox } from 'mattebox';
13
+ import type { Markers } from './controls/markers.js';
13
14
  export interface PlayerHost extends HTMLElement {
14
15
  readonly video: HTMLVideoElement;
15
16
  readonly engine: Mattebox | null;
16
17
  readonly player: Player | null;
17
18
  /** The fatal error of the current load, or null: a control attached after the event still sees it. */
18
19
  readonly error: PlayerError | null;
20
+ /** The ranges the page named: credits to skip, parts that must not play. */
21
+ readonly markers: Markers;
19
22
  }
20
23
  /**
21
24
  * The nearest player above `node`, through shadow hosts, or null outside
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,sGAAsG;IACtG,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;CACpC;AASD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,GAAG,IAAI,CAOzD"}
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGrD,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,sGAAsG;IACtG,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AASD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,GAAG,IAAI,CAOzD"}
package/dist/host.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"host.js","names":[],"sources":["../src/host.ts"],"sourcesContent":["/**\n * What a control sees of the player it sits in: the video, the engine, the\n * core, and the element itself for its events and attributes. Declared\n * here and not imported from the element, because the element registers\n * the controls and a control that imported the element would close a cycle.\n * `MatteboxPlayerElement` implements it.\n *\n * This is the whole surface a control gets. A control that needs more\n * has found a gap in the player's public API, and the gap is the bug.\n */\nimport type { Player, PlayerError } from '@mattebox/player-core';\nimport type { Mattebox } from 'mattebox';\nimport { PLAYER } from './tags.js';\n\nexport interface PlayerHost extends HTMLElement {\n readonly video: HTMLVideoElement;\n readonly engine: Mattebox | null;\n readonly player: Player | null;\n /** The fatal error of the current load, or null: a control attached after the event still sees it. */\n readonly error: PlayerError | null;\n}\n\n/** The parent, or the host of the shadow root `node` sits in, or null at the document. */\nfunction above(node: Node): Node | null {\n const parent = node.parentNode;\n if (parent !== null) return parent;\n return node instanceof ShadowRoot ? node.host : null;\n}\n\n/**\n * The nearest player above `node`, through shadow hosts, or null outside\n * one. The element found may not be upgraded yet; the caller waits for the\n * definition before reading it.\n */\nexport function findPlayer(node: Node): HTMLElement | null {\n let current: Node | null = node;\n while (current !== null) {\n if (current instanceof HTMLElement && current.localName === PLAYER) return current;\n current = above(current);\n }\n return null;\n}\n"],"mappings":";;;AAuBA,SAAS,MAAM,MAAyB;CACtC,MAAM,SAAS,KAAK;CACpB,IAAI,WAAW,MAAM,OAAO;CAC5B,OAAO,gBAAgB,aAAa,KAAK,OAAO;AAClD;;;;;;AAOA,SAAgB,WAAW,MAAgC;CACzD,IAAI,UAAuB;CAC3B,OAAO,YAAY,MAAM;EACvB,IAAI,mBAAmB,eAAe,QAAQ,cAAA,mBAAsB,OAAO;EAC3E,UAAU,MAAM,OAAO;CACzB;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"host.js","names":[],"sources":["../src/host.ts"],"sourcesContent":["/**\n * What a control sees of the player it sits in: the video, the engine, the\n * core, and the element itself for its events and attributes. Declared\n * here and not imported from the element, because the element registers\n * the controls and a control that imported the element would close a cycle.\n * `MatteboxPlayerElement` implements it.\n *\n * This is the whole surface a control gets. A control that needs more\n * has found a gap in the player's public API, and the gap is the bug.\n */\nimport type { Player, PlayerError } from '@mattebox/player-core';\nimport type { Mattebox } from 'mattebox';\nimport type { Markers } from './controls/markers.js';\nimport { PLAYER } from './tags.js';\n\nexport interface PlayerHost extends HTMLElement {\n readonly video: HTMLVideoElement;\n readonly engine: Mattebox | null;\n readonly player: Player | null;\n /** The fatal error of the current load, or null: a control attached after the event still sees it. */\n readonly error: PlayerError | null;\n /** The ranges the page named: credits to skip, parts that must not play. */\n readonly markers: Markers;\n}\n\n/** The parent, or the host of the shadow root `node` sits in, or null at the document. */\nfunction above(node: Node): Node | null {\n const parent = node.parentNode;\n if (parent !== null) return parent;\n return node instanceof ShadowRoot ? node.host : null;\n}\n\n/**\n * The nearest player above `node`, through shadow hosts, or null outside\n * one. The element found may not be upgraded yet; the caller waits for the\n * definition before reading it.\n */\nexport function findPlayer(node: Node): HTMLElement | null {\n let current: Node | null = node;\n while (current !== null) {\n if (current instanceof HTMLElement && current.localName === PLAYER) return current;\n current = above(current);\n }\n return null;\n}\n"],"mappings":";;;AA0BA,SAAS,MAAM,MAAyB;CACtC,MAAM,SAAS,KAAK;CACpB,IAAI,WAAW,MAAM,OAAO;CAC5B,OAAO,gBAAgB,aAAa,KAAK,OAAO;AAClD;;;;;;AAOA,SAAgB,WAAW,MAAgC;CACzD,IAAI,UAAuB;CAC3B,OAAO,YAAY,MAAM;EACvB,IAAI,mBAAmB,eAAe,QAAQ,cAAA,mBAAsB,OAAO;EAC3E,UAAU,MAAM,OAAO;CACzB;CACA,OAAO;AACT"}
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ import type { MbxDuration } from './entries/duration.js';
15
15
  import type { MbxErrorScreen } from './entries/error-screen.js';
16
16
  import type { MbxFullscreenButton } from './entries/fullscreen-button.js';
17
17
  import type { MbxLiveButton } from './entries/live-button.js';
18
+ import type { MbxMarkerButton } from './entries/marker-button.js';
18
19
  import type { MbxMuteButton } from './entries/mute-button.js';
19
20
  import type { MbxPipButton } from './entries/pip-button.js';
20
21
  import type { MbxPlayButton } from './entries/play-button.js';
@@ -31,6 +32,7 @@ import type { MbxSubtitlesMenu } from './entries/subtitles-menu.js';
31
32
  import type { MbxTitle } from './entries/title.js';
32
33
  import type { MbxVolume } from './entries/volume.js';
33
34
  import type { MbxVolumeSlider } from './entries/volume-slider.js';
35
+ export type { Marker, Markers } from './controls/markers.js';
34
36
  export type { MatteboxPlayerOptions } from './element-entry.js';
35
37
  export { MatteboxPlayerElement } from './element-entry.js';
36
38
  export { MbxAirplayButton } from './entries/airplay-button.js';
@@ -43,6 +45,7 @@ export { MbxDuration } from './entries/duration.js';
43
45
  export { MbxErrorScreen } from './entries/error-screen.js';
44
46
  export { MbxFullscreenButton } from './entries/fullscreen-button.js';
45
47
  export { MbxLiveButton } from './entries/live-button.js';
48
+ export { MbxMarkerButton } from './entries/marker-button.js';
46
49
  export { MbxMuteButton } from './entries/mute-button.js';
47
50
  export { MbxPipButton } from './entries/pip-button.js';
48
51
  export { MbxPlayButton } from './entries/play-button.js';
@@ -74,6 +77,7 @@ declare global {
74
77
  'mbx-pip-button': MbxPipButton;
75
78
  'mbx-fullscreen-button': MbxFullscreenButton;
76
79
  'mbx-start-button': MbxStartButton;
80
+ 'mbx-marker-button': MbxMarkerButton;
77
81
  'mbx-error-screen': MbxErrorScreen;
78
82
  'mbx-spinner': MbxSpinner;
79
83
  'mbx-title': MbxTitle;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,aA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AC;QAC/B,kBAAkB,EAAE,cAAc,CAAC;QACnC,oBAAoB,EAAE,gBAAgB,CAAC;QACvC,gBAAgB,EAAE,YAAY,CAAC;QAC/B,oBAAoB,EAAE,gBAAgB,CAAC;QACvC,eAAe,EAAE,WAAW,CAAC;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
package/dist/index.js CHANGED
@@ -20,6 +20,8 @@ import { MbxFullscreenButton } from "./elements/fullscreen-button.js";
20
20
  import "./entries/fullscreen-button.js";
21
21
  import { MbxLiveButton } from "./elements/live-button.js";
22
22
  import "./entries/live-button.js";
23
+ import { MbxMarkerButton } from "./elements/marker-button.js";
24
+ import "./entries/marker-button.js";
23
25
  import { MbxMuteButton } from "./elements/mute-button.js";
24
26
  import "./entries/mute-button.js";
25
27
  import { MbxPipButton } from "./elements/pip-button.js";
@@ -52,4 +54,4 @@ import { MbxVolumeSlider } from "./elements/volume-slider.js";
52
54
  import "./entries/volume-slider.js";
53
55
  import { MbxVolume } from "./elements/volume.js";
54
56
  import "./entries/volume.js";
55
- export { MatteboxPlayerElement, MbxAirplayButton, MbxAudioMenu, MbxChaptersMenu, MbxControlBar, MbxCurrentTime, MbxDrmBadge, MbxDuration, MbxErrorScreen, MbxFullscreenButton, MbxLiveButton, MbxMuteButton, MbxPipButton, MbxPlayButton, MbxQualityMenu, MbxRemainingTime, MbxScanButton, MbxSeekBar, MbxSkipButton, MbxSpacer, MbxSpeedMenu, MbxSpinner, MbxStartButton, MbxSubtitlesMenu, MbxTitle, MbxVolume, MbxVolumeSlider };
57
+ 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, MbxVolume, MbxVolumeSlider };
package/dist/style.js CHANGED
@@ -1,4 +1,4 @@
1
- const STYLE = ":host{--mbx-surface:#101114;--mbx-text:#f2f3f5;--mbx-muted:#9aa0a6;--mbx-accent:#5b8cff;--mbx-error:#ffb4ab;--mbx-live:#ff4d4d;--mbx-radius:4px;--mbx-gap:10px;--mbx-pad:8px;--mbx-font:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;background:#000;outline:none;display:block;position:relative}[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}@supports (aspect-ratio:1){::slotted(video){aspect-ratio:auto 16/9}}:host([casting]) ::slotted(mbx-control-bar),:host([casting]) ::slotted(mbx-start-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 13px / 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:2px 6px}[hidden]{display:none}";
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}";
2
2
  //#endregion
3
3
  export { STYLE };
4
4
 
package/dist/tags.d.ts CHANGED
@@ -11,6 +11,7 @@ export declare const PIP_BUTTON = "mbx-pip-button";
11
11
  export declare const AIRPLAY_BUTTON = "mbx-airplay-button";
12
12
  export declare const FULLSCREEN_BUTTON = "mbx-fullscreen-button";
13
13
  export declare const START_BUTTON = "mbx-start-button";
14
+ export declare const MARKER_BUTTON = "mbx-marker-button";
14
15
  export declare const ERROR_SCREEN = "mbx-error-screen";
15
16
  export declare const SPINNER = "mbx-spinner";
16
17
  export declare const TITLE = "mbx-title";
@@ -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,oBAAoB,CAAC;AAC7C,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AACzD,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAC/C,eAAO,MAAM,OAAO,gBAAgB,CAAC;AACrC,eAAO,MAAM,KAAK,cAAc,CAAC;AACjC,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,aAAa,sBAAsB,CAAC"}
1
+ {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../src/tags.ts"],"names":[],"mappings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UTTON = "mbx-fullscreen-button";
14
14
  const START_BUTTON = "mbx-start-button";
15
+ const MARKER_BUTTON = "mbx-marker-button";
15
16
  const ERROR_SCREEN = "mbx-error-screen";
16
17
  const SPINNER = "mbx-spinner";
17
18
  const TITLE = "mbx-title";
@@ -28,6 +29,6 @@ const DRM_BADGE = "mbx-drm-badge";
28
29
  const VOLUME = "mbx-volume";
29
30
  const CHAPTERS_MENU = "mbx-chapters-menu";
30
31
  //#endregion
31
- export { AIRPLAY_BUTTON, AUDIO_MENU, CHAPTERS_MENU, CONTROL_BAR, CURRENT_TIME, DRM_BADGE, DURATION, ERROR_SCREEN, FULLSCREEN_BUTTON, LIVE_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, VOLUME, VOLUME_SLIDER };
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, VOLUME, VOLUME_SLIDER };
32
33
 
33
34
  //# sourceMappingURL=tags.js.map
package/dist/tags.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tags.js","names":[],"sources":["../src/tags.ts"],"sourcesContent":["/** The tag names, in one place, so the composition and the lookup agree with the registration. */\nexport const PLAYER = 'mattebox-player';\nexport const CONTROL_BAR = 'mbx-control-bar';\nexport const SPACER = 'mbx-spacer';\nexport const PLAY_BUTTON = 'mbx-play-button';\nexport const MUTE_BUTTON = 'mbx-mute-button';\nexport const VOLUME_SLIDER = 'mbx-volume-slider';\nexport const SKIP_BUTTON = 'mbx-skip-button';\nexport const SCAN_BUTTON = 'mbx-scan-button';\nexport const PIP_BUTTON = 'mbx-pip-button';\nexport const AIRPLAY_BUTTON = 'mbx-airplay-button';\nexport const FULLSCREEN_BUTTON = 'mbx-fullscreen-button';\nexport const START_BUTTON = 'mbx-start-button';\nexport const ERROR_SCREEN = 'mbx-error-screen';\nexport const SPINNER = 'mbx-spinner';\nexport const TITLE = 'mbx-title';\nexport const CURRENT_TIME = 'mbx-current-time';\nexport const DURATION = 'mbx-duration';\nexport const REMAINING_TIME = 'mbx-remaining-time';\nexport const SEEK_BAR = 'mbx-seek-bar';\nexport const LIVE_BUTTON = 'mbx-live-button';\nexport const SPEED_MENU = 'mbx-speed-menu';\nexport const QUALITY_MENU = 'mbx-quality-menu';\nexport const AUDIO_MENU = 'mbx-audio-menu';\nexport const SUBTITLES_MENU = 'mbx-subtitles-menu';\nexport const DRM_BADGE = 'mbx-drm-badge';\nexport const VOLUME = 'mbx-volume';\nexport const CHAPTERS_MENU = 'mbx-chapters-menu';\n"],"mappings":";;AACA,MAAa,SAAS;AACtB,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,gBAAgB;AAC7B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,eAAe;AAC5B,MAAa,eAAe;AAC5B,MAAa,UAAU;AACvB,MAAa,QAAQ;AACrB,MAAa,eAAe;AAC5B,MAAa,WAAW;AACxB,MAAa,iBAAiB;AAC9B,MAAa,WAAW;AACxB,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,aAAa;AAC1B,MAAa,iBAAiB;AAC9B,MAAa,YAAY;AACzB,MAAa,SAAS;AACtB,MAAa,gBAAgB"}
1
+ {"version":3,"file":"tags.js","names":[],"sources":["../src/tags.ts"],"sourcesContent":["/** The tag names, in one place, so the composition and the lookup agree with the registration. */\nexport const PLAYER = 'mattebox-player';\nexport const CONTROL_BAR = 'mbx-control-bar';\nexport const SPACER = 'mbx-spacer';\nexport const PLAY_BUTTON = 'mbx-play-button';\nexport const MUTE_BUTTON = 'mbx-mute-button';\nexport const VOLUME_SLIDER = 'mbx-volume-slider';\nexport const SKIP_BUTTON = 'mbx-skip-button';\nexport const SCAN_BUTTON = 'mbx-scan-button';\nexport const PIP_BUTTON = 'mbx-pip-button';\nexport const AIRPLAY_BUTTON = 'mbx-airplay-button';\nexport const FULLSCREEN_BUTTON = 'mbx-fullscreen-button';\nexport const START_BUTTON = 'mbx-start-button';\nexport const MARKER_BUTTON = 'mbx-marker-button';\nexport const ERROR_SCREEN = 'mbx-error-screen';\nexport const SPINNER = 'mbx-spinner';\nexport const TITLE = 'mbx-title';\nexport const CURRENT_TIME = 'mbx-current-time';\nexport const DURATION = 'mbx-duration';\nexport const REMAINING_TIME = 'mbx-remaining-time';\nexport const SEEK_BAR = 'mbx-seek-bar';\nexport const LIVE_BUTTON = 'mbx-live-button';\nexport const SPEED_MENU = 'mbx-speed-menu';\nexport const QUALITY_MENU = 'mbx-quality-menu';\nexport const AUDIO_MENU = 'mbx-audio-menu';\nexport const SUBTITLES_MENU = 'mbx-subtitles-menu';\nexport const DRM_BADGE = 'mbx-drm-badge';\nexport const VOLUME = 'mbx-volume';\nexport const CHAPTERS_MENU = 'mbx-chapters-menu';\n"],"mappings":";;AACA,MAAa,SAAS;AACtB,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,gBAAgB;AAC7B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,eAAe;AAC5B,MAAa,gBAAgB;AAC7B,MAAa,eAAe;AAC5B,MAAa,UAAU;AACvB,MAAa,QAAQ;AACrB,MAAa,eAAe;AAC5B,MAAa,WAAW;AACxB,MAAa,iBAAiB;AAC9B,MAAa,WAAW;AACxB,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,aAAa;AAC1B,MAAa,iBAAiB;AAC9B,MAAa,YAAY;AACzB,MAAa,SAAS;AACtB,MAAa,gBAAgB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattebox/player",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "A <mattebox-player> custom element over @mattebox/player-core.",
5
5
  "author": "Josep Boix Requesens",
6
6
  "repository": {
@@ -57,8 +57,7 @@
57
57
  }
58
58
  },
59
59
  "files": [
60
- "dist",
61
- "NOTICE"
60
+ "dist"
62
61
  ],
63
62
  "scripts": {
64
63
  "clean": "rm -rf dist",
@@ -70,9 +69,9 @@
70
69
  "release:ci": "semantic-release"
71
70
  },
72
71
  "dependencies": {
73
- "@mattebox/player-core": "^0.4.0"
72
+ "@mattebox/player-core": "^0.6.0"
74
73
  },
75
74
  "peerDependencies": {
76
- "mattebox": "^0.8.2"
75
+ "mattebox": "^0.14.0"
77
76
  }
78
77
  }
package/NOTICE DELETED
@@ -1,24 +0,0 @@
1
- @mattebox/player carries glyphs copied from media-icons
2
- (https://github.com/vidstack/media-icons), used under the MIT License:
3
-
4
- MIT License
5
-
6
- Copyright (c) 2023 Rahim Alwer
7
-
8
- Permission is hereby granted, free of charge, to any person obtaining a copy
9
- of this software and associated documentation files (the "Software"), to deal
10
- in the Software without restriction, including without limitation the rights
11
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- copies of the Software, and to permit persons to whom the Software is
13
- furnished to do so, subject to the following conditions:
14
-
15
- The above copyright notice and this permission notice shall be included in all
16
- copies or substantial portions of the Software.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
- SOFTWARE.