@mux/mux-player 3.11.9-canary.2 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.cjs.js +74 -74
- package/dist/base.mjs +1 -1
- package/dist/mux-player.js +90 -90
- package/dist/mux-player.mjs +90 -90
- package/dist/themes/classic/index.cjs.js +76 -53
- package/dist/themes/classic/index.js +76 -53
- package/dist/themes/classic/index.mjs +76 -53
- package/dist/themes/gerwig/index.cjs.js +76 -53
- package/dist/themes/gerwig/index.js +76 -53
- package/dist/themes/gerwig/index.mjs +76 -53
- package/dist/themes/microvideo/index.cjs.js +895 -657
- package/dist/themes/microvideo/index.js +895 -657
- package/dist/themes/microvideo/index.mjs +895 -657
- package/dist/themes/minimal/index.cjs.js +889 -653
- package/dist/themes/minimal/index.js +889 -653
- package/dist/themes/minimal/index.mjs +889 -653
- package/dist/themes/news/index.cjs.js +76 -53
- package/dist/themes/news/index.js +76 -53
- package/dist/themes/news/index.mjs +76 -53
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1206,7 +1206,7 @@ var isServer = typeof window === "undefined" || typeof globalThis.customElements
|
|
|
1206
1206
|
var internalGlobalThis = isServer ? globalThisShim : globalThis;
|
|
1207
1207
|
var internalDocument = isServer ? globalThisShim.document : globalThis.document;
|
|
1208
1208
|
|
|
1209
|
-
// node_modules/media-chrome/dist/constants.js
|
|
1209
|
+
// ../../node_modules/media-chrome/dist/constants.js
|
|
1210
1210
|
var MediaUIEvents = {
|
|
1211
1211
|
MEDIA_PLAY_REQUEST: "mediaplayrequest",
|
|
1212
1212
|
MEDIA_PAUSE_REQUEST: "mediapauserequest",
|
|
@@ -1339,7 +1339,7 @@ var TextTrackKinds = {
|
|
|
1339
1339
|
METADATA: "metadata"
|
|
1340
1340
|
};
|
|
1341
1341
|
|
|
1342
|
-
// node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
1342
|
+
// ../../node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
1343
1343
|
var EventTarget2 = class {
|
|
1344
1344
|
addEventListener() {
|
|
1345
1345
|
}
|
|
@@ -1445,7 +1445,7 @@ var isShimmed = Object.keys(globalThisShim2).every((key) => key in globalThis);
|
|
|
1445
1445
|
var GlobalThis = isServer2 && !isShimmed ? globalThisShim2 : globalThis;
|
|
1446
1446
|
var Document2 = isServer2 && !isShimmed ? documentShim : globalThis.document;
|
|
1447
1447
|
|
|
1448
|
-
// node_modules/media-chrome/dist/utils/template-parts.js
|
|
1448
|
+
// ../../node_modules/media-chrome/dist/utils/template-parts.js
|
|
1449
1449
|
var __accessCheck2 = (obj, member, msg) => {
|
|
1450
1450
|
if (!member.has(obj))
|
|
1451
1451
|
throw TypeError("Cannot " + msg);
|
|
@@ -1776,7 +1776,7 @@ function swapdom(parent, a, b, end = null) {
|
|
|
1776
1776
|
return b;
|
|
1777
1777
|
}
|
|
1778
1778
|
|
|
1779
|
-
// node_modules/media-chrome/dist/utils/utils.js
|
|
1779
|
+
// ../../node_modules/media-chrome/dist/utils/utils.js
|
|
1780
1780
|
function parseRenditionList(renditions) {
|
|
1781
1781
|
return renditions == null ? void 0 : renditions.split(/\s+/).map(parseRendition);
|
|
1782
1782
|
}
|
|
@@ -1809,7 +1809,7 @@ function isNumericString(str) {
|
|
|
1809
1809
|
return !isNaN(str) && !isNaN(parseFloat(str));
|
|
1810
1810
|
}
|
|
1811
1811
|
|
|
1812
|
-
// node_modules/media-chrome/dist/utils/template-processor.js
|
|
1812
|
+
// ../../node_modules/media-chrome/dist/utils/template-processor.js
|
|
1813
1813
|
var pipeModifiers = {
|
|
1814
1814
|
string: (value) => String(value)
|
|
1815
1815
|
};
|
|
@@ -2036,7 +2036,7 @@ function tokenize2(str, parsers) {
|
|
|
2036
2036
|
return tokens;
|
|
2037
2037
|
}
|
|
2038
2038
|
|
|
2039
|
-
// node_modules/media-chrome/dist/media-theme-element.js
|
|
2039
|
+
// ../../node_modules/media-chrome/dist/media-theme-element.js
|
|
2040
2040
|
var __accessCheck3 = (obj, member, msg) => {
|
|
2041
2041
|
if (!member.has(obj))
|
|
2042
2042
|
throw TypeError("Cannot " + msg);
|
|
@@ -2297,7 +2297,7 @@ if (!GlobalThis.customElements.get("media-theme")) {
|
|
|
2297
2297
|
GlobalThis.customElements.define("media-theme", MediaThemeElement);
|
|
2298
2298
|
}
|
|
2299
2299
|
|
|
2300
|
-
// node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
2300
|
+
// ../../node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
2301
2301
|
function computePosition({
|
|
2302
2302
|
anchor,
|
|
2303
2303
|
floating,
|
|
@@ -2373,7 +2373,7 @@ function getSideAxis(placement) {
|
|
|
2373
2373
|
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
2374
2374
|
}
|
|
2375
2375
|
|
|
2376
|
-
// node_modules/media-chrome/dist/utils/resize-observer.js
|
|
2376
|
+
// ../../node_modules/media-chrome/dist/utils/resize-observer.js
|
|
2377
2377
|
var callbacksMap = /* @__PURE__ */ new WeakMap();
|
|
2378
2378
|
var getCallbacks = (element) => {
|
|
2379
2379
|
let callbacks = callbacksMap.get(element);
|
|
@@ -2402,7 +2402,7 @@ function unobserveResize(element, callback) {
|
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
2404
|
|
|
2405
|
-
// node_modules/media-chrome/dist/utils/events.js
|
|
2405
|
+
// ../../node_modules/media-chrome/dist/utils/events.js
|
|
2406
2406
|
var InvokeEvent = class extends Event {
|
|
2407
2407
|
/**
|
|
2408
2408
|
* @param init - The event options.
|
|
@@ -2424,7 +2424,7 @@ var ToggleEvent = class extends Event {
|
|
|
2424
2424
|
}
|
|
2425
2425
|
};
|
|
2426
2426
|
|
|
2427
|
-
// node_modules/media-chrome/dist/utils/element-utils.js
|
|
2427
|
+
// ../../node_modules/media-chrome/dist/utils/element-utils.js
|
|
2428
2428
|
function namedNodeMapToObject(namedNodeMap) {
|
|
2429
2429
|
const obj = {};
|
|
2430
2430
|
for (const attr of namedNodeMap) {
|
|
@@ -2591,7 +2591,7 @@ function setStringAttr(el, attrName, value) {
|
|
|
2591
2591
|
el.setAttribute(attrName, nextValue);
|
|
2592
2592
|
}
|
|
2593
2593
|
|
|
2594
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2594
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2595
2595
|
var __accessCheck4 = (obj, member, msg) => {
|
|
2596
2596
|
if (!member.has(obj))
|
|
2597
2597
|
throw TypeError("Cannot " + msg);
|
|
@@ -3436,7 +3436,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu")) {
|
|
|
3436
3436
|
GlobalThis.customElements.define("media-chrome-menu", MediaChromeMenu);
|
|
3437
3437
|
}
|
|
3438
3438
|
|
|
3439
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
3439
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
3440
3440
|
var __accessCheck5 = (obj, member, msg) => {
|
|
3441
3441
|
if (!member.has(obj))
|
|
3442
3442
|
throw TypeError("Cannot " + msg);
|
|
@@ -3888,7 +3888,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-item")) {
|
|
|
3888
3888
|
);
|
|
3889
3889
|
}
|
|
3890
3890
|
|
|
3891
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3891
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3892
3892
|
function getTemplateHTML3(_attrs) {
|
|
3893
3893
|
return (
|
|
3894
3894
|
/*html*/
|
|
@@ -3948,7 +3948,7 @@ if (!GlobalThis.customElements.get("media-settings-menu")) {
|
|
|
3948
3948
|
GlobalThis.customElements.define("media-settings-menu", MediaSettingsMenu);
|
|
3949
3949
|
}
|
|
3950
3950
|
|
|
3951
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3951
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3952
3952
|
function getTemplateHTML4(_attrs) {
|
|
3953
3953
|
return (
|
|
3954
3954
|
/*html*/
|
|
@@ -3988,7 +3988,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-item")) {
|
|
|
3988
3988
|
);
|
|
3989
3989
|
}
|
|
3990
3990
|
|
|
3991
|
-
// node_modules/media-chrome/dist/media-tooltip.js
|
|
3991
|
+
// ../../node_modules/media-chrome/dist/media-tooltip.js
|
|
3992
3992
|
var Attributes3 = {
|
|
3993
3993
|
PLACEMENT: "placement",
|
|
3994
3994
|
BOUNDS: "bounds"
|
|
@@ -4190,7 +4190,7 @@ if (!GlobalThis.customElements.get("media-tooltip")) {
|
|
|
4190
4190
|
}
|
|
4191
4191
|
var media_tooltip_default = MediaTooltip;
|
|
4192
4192
|
|
|
4193
|
-
// node_modules/media-chrome/dist/media-chrome-button.js
|
|
4193
|
+
// ../../node_modules/media-chrome/dist/media-chrome-button.js
|
|
4194
4194
|
var __accessCheck6 = (obj, member, msg) => {
|
|
4195
4195
|
if (!member.has(obj))
|
|
4196
4196
|
throw TypeError("Cannot " + msg);
|
|
@@ -4513,7 +4513,7 @@ if (!GlobalThis.customElements.get("media-chrome-button")) {
|
|
|
4513
4513
|
GlobalThis.customElements.define("media-chrome-button", MediaChromeButton);
|
|
4514
4514
|
}
|
|
4515
4515
|
|
|
4516
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
4516
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
4517
4517
|
var MediaChromeMenuButton = class extends MediaChromeButton {
|
|
4518
4518
|
connectedCallback() {
|
|
4519
4519
|
super.connectedCallback();
|
|
@@ -4554,7 +4554,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-button")) {
|
|
|
4554
4554
|
);
|
|
4555
4555
|
}
|
|
4556
4556
|
|
|
4557
|
-
// node_modules/media-chrome/dist/lang/en.js
|
|
4557
|
+
// ../../node_modules/media-chrome/dist/lang/en.js
|
|
4558
4558
|
var En = {
|
|
4559
4559
|
"Start airplay": "Start airplay",
|
|
4560
4560
|
"Stop airplay": "Stop airplay",
|
|
@@ -4629,7 +4629,7 @@ var En = {
|
|
|
4629
4629
|
"video not loaded, unknown time.": "video not loaded, unknown time."
|
|
4630
4630
|
};
|
|
4631
4631
|
|
|
4632
|
-
// node_modules/media-chrome/dist/utils/i18n.js
|
|
4632
|
+
// ../../node_modules/media-chrome/dist/utils/i18n.js
|
|
4633
4633
|
var _a;
|
|
4634
4634
|
var translations = {
|
|
4635
4635
|
en: En
|
|
@@ -4645,7 +4645,7 @@ var t = (key, vars = {}) => resolveTranslation(key).replace(
|
|
|
4645
4645
|
(_, v) => v in vars ? String(vars[v]) : `{${v}}`
|
|
4646
4646
|
);
|
|
4647
4647
|
|
|
4648
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4648
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4649
4649
|
function getSlotTemplateHTML2() {
|
|
4650
4650
|
return (
|
|
4651
4651
|
/*html*/
|
|
@@ -4693,7 +4693,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-button")) {
|
|
|
4693
4693
|
);
|
|
4694
4694
|
}
|
|
4695
4695
|
|
|
4696
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4696
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4697
4697
|
var __accessCheck7 = (obj, member, msg) => {
|
|
4698
4698
|
if (!member.has(obj))
|
|
4699
4699
|
throw TypeError("Cannot " + msg);
|
|
@@ -4827,7 +4827,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu")) {
|
|
|
4827
4827
|
);
|
|
4828
4828
|
}
|
|
4829
4829
|
|
|
4830
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4830
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4831
4831
|
var audioTrackIcon = (
|
|
4832
4832
|
/*html*/
|
|
4833
4833
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -4904,7 +4904,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu-button")) {
|
|
|
4904
4904
|
);
|
|
4905
4905
|
}
|
|
4906
4906
|
|
|
4907
|
-
// node_modules/media-chrome/dist/utils/captions.js
|
|
4907
|
+
// ../../node_modules/media-chrome/dist/utils/captions.js
|
|
4908
4908
|
var splitTextTracksStr = (textTracksStr = "") => textTracksStr.split(/\s+/);
|
|
4909
4909
|
var parseTextTrackStr = (textTrackStr = "") => {
|
|
4910
4910
|
const [kind, language, encodedLabel] = textTrackStr.split(":");
|
|
@@ -4940,7 +4940,7 @@ var areSubsOn = (el) => {
|
|
|
4940
4940
|
return showingSubtitles;
|
|
4941
4941
|
};
|
|
4942
4942
|
|
|
4943
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4943
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4944
4944
|
var __accessCheck8 = (obj, member, msg) => {
|
|
4945
4945
|
if (!member.has(obj))
|
|
4946
4946
|
throw TypeError("Cannot " + msg);
|
|
@@ -5133,7 +5133,7 @@ if (!GlobalThis.customElements.get("media-captions-menu")) {
|
|
|
5133
5133
|
GlobalThis.customElements.define("media-captions-menu", MediaCaptionsMenu);
|
|
5134
5134
|
}
|
|
5135
5135
|
|
|
5136
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
5136
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
5137
5137
|
var ccIconOn = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
5138
5138
|
<path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
|
|
5139
5139
|
</svg>`;
|
|
@@ -5256,7 +5256,7 @@ if (!GlobalThis.customElements.get("media-captions-menu-button")) {
|
|
|
5256
5256
|
);
|
|
5257
5257
|
}
|
|
5258
5258
|
|
|
5259
|
-
// node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
5259
|
+
// ../../node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
5260
5260
|
var __accessCheck9 = (obj, member, msg) => {
|
|
5261
5261
|
if (!member.has(obj))
|
|
5262
5262
|
throw TypeError("Cannot " + msg);
|
|
@@ -5369,7 +5369,7 @@ tokens_get = function() {
|
|
|
5369
5369
|
return __privateGet9(this, _tokenSet).size ? __privateGet9(this, _tokenSet) : __privateGet9(this, _defaultSet);
|
|
5370
5370
|
};
|
|
5371
5371
|
|
|
5372
|
-
// node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
5372
|
+
// ../../node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
5373
5373
|
var __accessCheck10 = (obj, member, msg) => {
|
|
5374
5374
|
if (!member.has(obj))
|
|
5375
5375
|
throw TypeError("Cannot " + msg);
|
|
@@ -5493,7 +5493,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-button")) {
|
|
|
5493
5493
|
);
|
|
5494
5494
|
}
|
|
5495
5495
|
|
|
5496
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
5496
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
5497
5497
|
var __accessCheck11 = (obj, member, msg) => {
|
|
5498
5498
|
if (!member.has(obj))
|
|
5499
5499
|
throw TypeError("Cannot " + msg);
|
|
@@ -5640,7 +5640,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu")) {
|
|
|
5640
5640
|
);
|
|
5641
5641
|
}
|
|
5642
5642
|
|
|
5643
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5643
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5644
5644
|
var DEFAULT_RATE2 = 1;
|
|
5645
5645
|
function getSlotTemplateHTML6(attrs) {
|
|
5646
5646
|
return (
|
|
@@ -5723,7 +5723,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu-button")) {
|
|
|
5723
5723
|
);
|
|
5724
5724
|
}
|
|
5725
5725
|
|
|
5726
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5726
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5727
5727
|
var __accessCheck12 = (obj, member, msg) => {
|
|
5728
5728
|
if (!member.has(obj))
|
|
5729
5729
|
throw TypeError("Cannot " + msg);
|
|
@@ -5766,7 +5766,8 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5766
5766
|
MediaUIAttributes.MEDIA_RENDITION_LIST,
|
|
5767
5767
|
MediaUIAttributes.MEDIA_RENDITION_SELECTED,
|
|
5768
5768
|
MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE,
|
|
5769
|
-
MediaUIAttributes.MEDIA_HEIGHT
|
|
5769
|
+
MediaUIAttributes.MEDIA_HEIGHT,
|
|
5770
|
+
MediaUIAttributes.MEDIA_WIDTH
|
|
5770
5771
|
];
|
|
5771
5772
|
}
|
|
5772
5773
|
static formatMenuItemText(text, rendition) {
|
|
@@ -5790,14 +5791,21 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5790
5791
|
}
|
|
5791
5792
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
5792
5793
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
5793
|
-
if (
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5794
|
+
if (oldValue !== newValue) {
|
|
5795
|
+
switch (attrName) {
|
|
5796
|
+
case MediaUIAttributes.MEDIA_RENDITION_SELECTED:
|
|
5797
|
+
this.value = newValue != null ? newValue : "auto";
|
|
5798
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5799
|
+
break;
|
|
5800
|
+
case MediaUIAttributes.MEDIA_RENDITION_LIST:
|
|
5801
|
+
__privateSet10(this, _renditionList, parseRenditionList(newValue));
|
|
5802
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5803
|
+
break;
|
|
5804
|
+
case MediaUIAttributes.MEDIA_HEIGHT:
|
|
5805
|
+
case MediaUIAttributes.MEDIA_WIDTH:
|
|
5806
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5807
|
+
break;
|
|
5808
|
+
}
|
|
5801
5809
|
}
|
|
5802
5810
|
}
|
|
5803
5811
|
connectedCallback() {
|
|
@@ -5840,6 +5848,12 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5840
5848
|
set mediaHeight(height) {
|
|
5841
5849
|
setNumericAttr(this, MediaUIAttributes.MEDIA_HEIGHT, height);
|
|
5842
5850
|
}
|
|
5851
|
+
get mediaWidth() {
|
|
5852
|
+
return getNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH);
|
|
5853
|
+
}
|
|
5854
|
+
set mediaWidth(width) {
|
|
5855
|
+
setNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH, width);
|
|
5856
|
+
}
|
|
5843
5857
|
compareRendition(a, b) {
|
|
5844
5858
|
const ctor = this.constructor;
|
|
5845
5859
|
return ctor.compareRendition(a, b);
|
|
@@ -5862,12 +5876,15 @@ _renditionList = /* @__PURE__ */ new WeakMap();
|
|
|
5862
5876
|
_prevState3 = /* @__PURE__ */ new WeakMap();
|
|
5863
5877
|
_render4 = /* @__PURE__ */ new WeakSet();
|
|
5864
5878
|
render_fn4 = function() {
|
|
5865
|
-
|
|
5879
|
+
const isAuto = !this.mediaRenditionSelected;
|
|
5880
|
+
if (__privateGet12(this, _prevState3).mediaRenditionList === JSON.stringify(this.mediaRenditionList) && __privateGet12(this, _prevState3).mediaHeight === this.mediaHeight && __privateGet12(this, _prevState3).mediaWidth === this.mediaWidth && __privateGet12(this, _prevState3).isAuto === isAuto)
|
|
5866
5881
|
return;
|
|
5867
5882
|
__privateGet12(this, _prevState3).mediaRenditionList = JSON.stringify(
|
|
5868
5883
|
this.mediaRenditionList
|
|
5869
5884
|
);
|
|
5870
5885
|
__privateGet12(this, _prevState3).mediaHeight = this.mediaHeight;
|
|
5886
|
+
__privateGet12(this, _prevState3).mediaWidth = this.mediaWidth;
|
|
5887
|
+
__privateGet12(this, _prevState3).isAuto = isAuto;
|
|
5871
5888
|
const renditionList = this.mediaRenditionList.sort(
|
|
5872
5889
|
this.compareRendition.bind(this)
|
|
5873
5890
|
);
|
|
@@ -5878,7 +5895,6 @@ render_fn4 = function() {
|
|
|
5878
5895
|
rendition.selected = rendition === selectedRendition;
|
|
5879
5896
|
}
|
|
5880
5897
|
this.defaultSlot.textContent = "";
|
|
5881
|
-
const isAuto = !this.mediaRenditionSelected;
|
|
5882
5898
|
for (const rendition of renditionList) {
|
|
5883
5899
|
const text = this.formatRendition(rendition, {
|
|
5884
5900
|
showBitrate: this.showRenditionBitrate(rendition)
|
|
@@ -5893,15 +5909,22 @@ render_fn4 = function() {
|
|
|
5893
5909
|
this.defaultSlot.append(item2);
|
|
5894
5910
|
}
|
|
5895
5911
|
const showSelectedBitrate = selectedRendition && this.showRenditionBitrate(selectedRendition);
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
selectedRendition
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5912
|
+
let autoText = void 0;
|
|
5913
|
+
if (isAuto) {
|
|
5914
|
+
if (selectedRendition) {
|
|
5915
|
+
autoText = this.formatMenuItemText(
|
|
5916
|
+
`${t("Auto")} \u2022 ${this.formatRendition(selectedRendition, {
|
|
5917
|
+
showBitrate: showSelectedBitrate
|
|
5918
|
+
})}`,
|
|
5919
|
+
selectedRendition
|
|
5920
|
+
);
|
|
5921
|
+
} else if (this.mediaHeight > 0 && this.mediaWidth > 0) {
|
|
5922
|
+
autoText = this.formatMenuItemText(`${t("Auto")} (${Math.min(this.mediaWidth, this.mediaHeight)}p)`);
|
|
5923
|
+
}
|
|
5924
|
+
}
|
|
5925
|
+
if (!autoText) {
|
|
5926
|
+
autoText = this.formatMenuItemText(t("Auto"));
|
|
5927
|
+
}
|
|
5905
5928
|
const item = createMenuItem({
|
|
5906
5929
|
type: "radio",
|
|
5907
5930
|
text: autoText,
|
|
@@ -5930,7 +5953,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu")) {
|
|
|
5930
5953
|
GlobalThis.customElements.define("media-rendition-menu", MediaRenditionMenu);
|
|
5931
5954
|
}
|
|
5932
5955
|
|
|
5933
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5956
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5934
5957
|
var renditionIcon = (
|
|
5935
5958
|
/*html*/
|
|
5936
5959
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -5999,7 +6022,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu-button")) {
|
|
|
5999
6022
|
);
|
|
6000
6023
|
}
|
|
6001
6024
|
|
|
6002
|
-
// node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
6025
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
6003
6026
|
var __accessCheck13 = (obj, member, msg) => {
|
|
6004
6027
|
if (!member.has(obj))
|
|
6005
6028
|
throw TypeError("Cannot " + msg);
|
|
@@ -6185,7 +6208,7 @@ if (!GlobalThis.customElements.get("media-context-menu")) {
|
|
|
6185
6208
|
GlobalThis.customElements.define("media-context-menu", MediaContextMenu);
|
|
6186
6209
|
}
|
|
6187
6210
|
|
|
6188
|
-
// node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
6211
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
6189
6212
|
function getTemplateHTML9(_attrs) {
|
|
6190
6213
|
return (
|
|
6191
6214
|
/*html*/
|