@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
|
@@ -891,7 +891,7 @@ var isServer = typeof window === "undefined" || typeof globalThis.customElements
|
|
|
891
891
|
var internalGlobalThis = isServer ? globalThisShim : globalThis;
|
|
892
892
|
var internalDocument = isServer ? globalThisShim.document : globalThis.document;
|
|
893
893
|
|
|
894
|
-
// node_modules/media-chrome/dist/constants.js
|
|
894
|
+
// ../../node_modules/media-chrome/dist/constants.js
|
|
895
895
|
var MediaUIEvents = {
|
|
896
896
|
MEDIA_PLAY_REQUEST: "mediaplayrequest",
|
|
897
897
|
MEDIA_PAUSE_REQUEST: "mediapauserequest",
|
|
@@ -1024,7 +1024,7 @@ var TextTrackKinds = {
|
|
|
1024
1024
|
METADATA: "metadata"
|
|
1025
1025
|
};
|
|
1026
1026
|
|
|
1027
|
-
// node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
1027
|
+
// ../../node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
1028
1028
|
var EventTarget2 = class {
|
|
1029
1029
|
addEventListener() {
|
|
1030
1030
|
}
|
|
@@ -1130,7 +1130,7 @@ var isShimmed = Object.keys(globalThisShim2).every((key) => key in globalThis);
|
|
|
1130
1130
|
var GlobalThis = isServer2 && !isShimmed ? globalThisShim2 : globalThis;
|
|
1131
1131
|
var Document2 = isServer2 && !isShimmed ? documentShim : globalThis.document;
|
|
1132
1132
|
|
|
1133
|
-
// node_modules/media-chrome/dist/utils/template-parts.js
|
|
1133
|
+
// ../../node_modules/media-chrome/dist/utils/template-parts.js
|
|
1134
1134
|
var __accessCheck2 = (obj, member, msg) => {
|
|
1135
1135
|
if (!member.has(obj))
|
|
1136
1136
|
throw TypeError("Cannot " + msg);
|
|
@@ -1461,7 +1461,7 @@ function swapdom(parent, a, b, end = null) {
|
|
|
1461
1461
|
return b;
|
|
1462
1462
|
}
|
|
1463
1463
|
|
|
1464
|
-
// node_modules/media-chrome/dist/utils/utils.js
|
|
1464
|
+
// ../../node_modules/media-chrome/dist/utils/utils.js
|
|
1465
1465
|
function parseRenditionList(renditions) {
|
|
1466
1466
|
return renditions == null ? void 0 : renditions.split(/\s+/).map(parseRendition);
|
|
1467
1467
|
}
|
|
@@ -1494,7 +1494,7 @@ function isNumericString(str) {
|
|
|
1494
1494
|
return !isNaN(str) && !isNaN(parseFloat(str));
|
|
1495
1495
|
}
|
|
1496
1496
|
|
|
1497
|
-
// node_modules/media-chrome/dist/utils/template-processor.js
|
|
1497
|
+
// ../../node_modules/media-chrome/dist/utils/template-processor.js
|
|
1498
1498
|
var pipeModifiers = {
|
|
1499
1499
|
string: (value) => String(value)
|
|
1500
1500
|
};
|
|
@@ -1721,7 +1721,7 @@ function tokenize2(str, parsers) {
|
|
|
1721
1721
|
return tokens;
|
|
1722
1722
|
}
|
|
1723
1723
|
|
|
1724
|
-
// node_modules/media-chrome/dist/media-theme-element.js
|
|
1724
|
+
// ../../node_modules/media-chrome/dist/media-theme-element.js
|
|
1725
1725
|
var __accessCheck3 = (obj, member, msg) => {
|
|
1726
1726
|
if (!member.has(obj))
|
|
1727
1727
|
throw TypeError("Cannot " + msg);
|
|
@@ -1982,7 +1982,7 @@ if (!GlobalThis.customElements.get("media-theme")) {
|
|
|
1982
1982
|
GlobalThis.customElements.define("media-theme", MediaThemeElement);
|
|
1983
1983
|
}
|
|
1984
1984
|
|
|
1985
|
-
// node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
1985
|
+
// ../../node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
1986
1986
|
function computePosition({
|
|
1987
1987
|
anchor,
|
|
1988
1988
|
floating,
|
|
@@ -2058,7 +2058,7 @@ function getSideAxis(placement) {
|
|
|
2058
2058
|
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
2059
2059
|
}
|
|
2060
2060
|
|
|
2061
|
-
// node_modules/media-chrome/dist/utils/resize-observer.js
|
|
2061
|
+
// ../../node_modules/media-chrome/dist/utils/resize-observer.js
|
|
2062
2062
|
var callbacksMap = /* @__PURE__ */ new WeakMap();
|
|
2063
2063
|
var getCallbacks = (element) => {
|
|
2064
2064
|
let callbacks = callbacksMap.get(element);
|
|
@@ -2087,7 +2087,7 @@ function unobserveResize(element, callback) {
|
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
2090
|
-
// node_modules/media-chrome/dist/utils/events.js
|
|
2090
|
+
// ../../node_modules/media-chrome/dist/utils/events.js
|
|
2091
2091
|
var InvokeEvent = class extends Event {
|
|
2092
2092
|
/**
|
|
2093
2093
|
* @param init - The event options.
|
|
@@ -2109,7 +2109,7 @@ var ToggleEvent = class extends Event {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
};
|
|
2111
2111
|
|
|
2112
|
-
// node_modules/media-chrome/dist/utils/element-utils.js
|
|
2112
|
+
// ../../node_modules/media-chrome/dist/utils/element-utils.js
|
|
2113
2113
|
function namedNodeMapToObject(namedNodeMap) {
|
|
2114
2114
|
const obj = {};
|
|
2115
2115
|
for (const attr of namedNodeMap) {
|
|
@@ -2276,7 +2276,7 @@ function setStringAttr(el, attrName, value) {
|
|
|
2276
2276
|
el.setAttribute(attrName, nextValue);
|
|
2277
2277
|
}
|
|
2278
2278
|
|
|
2279
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2279
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2280
2280
|
var __accessCheck4 = (obj, member, msg) => {
|
|
2281
2281
|
if (!member.has(obj))
|
|
2282
2282
|
throw TypeError("Cannot " + msg);
|
|
@@ -3121,7 +3121,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu")) {
|
|
|
3121
3121
|
GlobalThis.customElements.define("media-chrome-menu", MediaChromeMenu);
|
|
3122
3122
|
}
|
|
3123
3123
|
|
|
3124
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
3124
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
3125
3125
|
var __accessCheck5 = (obj, member, msg) => {
|
|
3126
3126
|
if (!member.has(obj))
|
|
3127
3127
|
throw TypeError("Cannot " + msg);
|
|
@@ -3573,7 +3573,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-item")) {
|
|
|
3573
3573
|
);
|
|
3574
3574
|
}
|
|
3575
3575
|
|
|
3576
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3576
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3577
3577
|
function getTemplateHTML3(_attrs) {
|
|
3578
3578
|
return (
|
|
3579
3579
|
/*html*/
|
|
@@ -3633,7 +3633,7 @@ if (!GlobalThis.customElements.get("media-settings-menu")) {
|
|
|
3633
3633
|
GlobalThis.customElements.define("media-settings-menu", MediaSettingsMenu);
|
|
3634
3634
|
}
|
|
3635
3635
|
|
|
3636
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3636
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3637
3637
|
function getTemplateHTML4(_attrs) {
|
|
3638
3638
|
return (
|
|
3639
3639
|
/*html*/
|
|
@@ -3673,7 +3673,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-item")) {
|
|
|
3673
3673
|
);
|
|
3674
3674
|
}
|
|
3675
3675
|
|
|
3676
|
-
// node_modules/media-chrome/dist/media-tooltip.js
|
|
3676
|
+
// ../../node_modules/media-chrome/dist/media-tooltip.js
|
|
3677
3677
|
var Attributes3 = {
|
|
3678
3678
|
PLACEMENT: "placement",
|
|
3679
3679
|
BOUNDS: "bounds"
|
|
@@ -3875,7 +3875,7 @@ if (!GlobalThis.customElements.get("media-tooltip")) {
|
|
|
3875
3875
|
}
|
|
3876
3876
|
var media_tooltip_default = MediaTooltip;
|
|
3877
3877
|
|
|
3878
|
-
// node_modules/media-chrome/dist/media-chrome-button.js
|
|
3878
|
+
// ../../node_modules/media-chrome/dist/media-chrome-button.js
|
|
3879
3879
|
var __accessCheck6 = (obj, member, msg) => {
|
|
3880
3880
|
if (!member.has(obj))
|
|
3881
3881
|
throw TypeError("Cannot " + msg);
|
|
@@ -4198,7 +4198,7 @@ if (!GlobalThis.customElements.get("media-chrome-button")) {
|
|
|
4198
4198
|
GlobalThis.customElements.define("media-chrome-button", MediaChromeButton);
|
|
4199
4199
|
}
|
|
4200
4200
|
|
|
4201
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
4201
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
4202
4202
|
var MediaChromeMenuButton = class extends MediaChromeButton {
|
|
4203
4203
|
connectedCallback() {
|
|
4204
4204
|
super.connectedCallback();
|
|
@@ -4239,7 +4239,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-button")) {
|
|
|
4239
4239
|
);
|
|
4240
4240
|
}
|
|
4241
4241
|
|
|
4242
|
-
// node_modules/media-chrome/dist/lang/en.js
|
|
4242
|
+
// ../../node_modules/media-chrome/dist/lang/en.js
|
|
4243
4243
|
var En = {
|
|
4244
4244
|
"Start airplay": "Start airplay",
|
|
4245
4245
|
"Stop airplay": "Stop airplay",
|
|
@@ -4314,7 +4314,7 @@ var En = {
|
|
|
4314
4314
|
"video not loaded, unknown time.": "video not loaded, unknown time."
|
|
4315
4315
|
};
|
|
4316
4316
|
|
|
4317
|
-
// node_modules/media-chrome/dist/utils/i18n.js
|
|
4317
|
+
// ../../node_modules/media-chrome/dist/utils/i18n.js
|
|
4318
4318
|
var _a;
|
|
4319
4319
|
var translations = {
|
|
4320
4320
|
en: En
|
|
@@ -4330,7 +4330,7 @@ var t = (key, vars = {}) => resolveTranslation(key).replace(
|
|
|
4330
4330
|
(_, v) => v in vars ? String(vars[v]) : `{${v}}`
|
|
4331
4331
|
);
|
|
4332
4332
|
|
|
4333
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4333
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4334
4334
|
function getSlotTemplateHTML2() {
|
|
4335
4335
|
return (
|
|
4336
4336
|
/*html*/
|
|
@@ -4378,7 +4378,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-button")) {
|
|
|
4378
4378
|
);
|
|
4379
4379
|
}
|
|
4380
4380
|
|
|
4381
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4381
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4382
4382
|
var __accessCheck7 = (obj, member, msg) => {
|
|
4383
4383
|
if (!member.has(obj))
|
|
4384
4384
|
throw TypeError("Cannot " + msg);
|
|
@@ -4512,7 +4512,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu")) {
|
|
|
4512
4512
|
);
|
|
4513
4513
|
}
|
|
4514
4514
|
|
|
4515
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4515
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4516
4516
|
var audioTrackIcon = (
|
|
4517
4517
|
/*html*/
|
|
4518
4518
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -4589,7 +4589,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu-button")) {
|
|
|
4589
4589
|
);
|
|
4590
4590
|
}
|
|
4591
4591
|
|
|
4592
|
-
// node_modules/media-chrome/dist/utils/captions.js
|
|
4592
|
+
// ../../node_modules/media-chrome/dist/utils/captions.js
|
|
4593
4593
|
var splitTextTracksStr = (textTracksStr = "") => textTracksStr.split(/\s+/);
|
|
4594
4594
|
var parseTextTrackStr = (textTrackStr = "") => {
|
|
4595
4595
|
const [kind, language, encodedLabel] = textTrackStr.split(":");
|
|
@@ -4625,7 +4625,7 @@ var areSubsOn = (el) => {
|
|
|
4625
4625
|
return showingSubtitles;
|
|
4626
4626
|
};
|
|
4627
4627
|
|
|
4628
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4628
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4629
4629
|
var __accessCheck8 = (obj, member, msg) => {
|
|
4630
4630
|
if (!member.has(obj))
|
|
4631
4631
|
throw TypeError("Cannot " + msg);
|
|
@@ -4818,7 +4818,7 @@ if (!GlobalThis.customElements.get("media-captions-menu")) {
|
|
|
4818
4818
|
GlobalThis.customElements.define("media-captions-menu", MediaCaptionsMenu);
|
|
4819
4819
|
}
|
|
4820
4820
|
|
|
4821
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
4821
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
4822
4822
|
var ccIconOn = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
4823
4823
|
<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"/>
|
|
4824
4824
|
</svg>`;
|
|
@@ -4941,7 +4941,7 @@ if (!GlobalThis.customElements.get("media-captions-menu-button")) {
|
|
|
4941
4941
|
);
|
|
4942
4942
|
}
|
|
4943
4943
|
|
|
4944
|
-
// node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
4944
|
+
// ../../node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
4945
4945
|
var __accessCheck9 = (obj, member, msg) => {
|
|
4946
4946
|
if (!member.has(obj))
|
|
4947
4947
|
throw TypeError("Cannot " + msg);
|
|
@@ -5054,7 +5054,7 @@ tokens_get = function() {
|
|
|
5054
5054
|
return __privateGet9(this, _tokenSet).size ? __privateGet9(this, _tokenSet) : __privateGet9(this, _defaultSet);
|
|
5055
5055
|
};
|
|
5056
5056
|
|
|
5057
|
-
// node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
5057
|
+
// ../../node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
5058
5058
|
var __accessCheck10 = (obj, member, msg) => {
|
|
5059
5059
|
if (!member.has(obj))
|
|
5060
5060
|
throw TypeError("Cannot " + msg);
|
|
@@ -5178,7 +5178,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-button")) {
|
|
|
5178
5178
|
);
|
|
5179
5179
|
}
|
|
5180
5180
|
|
|
5181
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
5181
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
5182
5182
|
var __accessCheck11 = (obj, member, msg) => {
|
|
5183
5183
|
if (!member.has(obj))
|
|
5184
5184
|
throw TypeError("Cannot " + msg);
|
|
@@ -5325,7 +5325,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu")) {
|
|
|
5325
5325
|
);
|
|
5326
5326
|
}
|
|
5327
5327
|
|
|
5328
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5328
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5329
5329
|
var DEFAULT_RATE2 = 1;
|
|
5330
5330
|
function getSlotTemplateHTML6(attrs) {
|
|
5331
5331
|
return (
|
|
@@ -5408,7 +5408,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu-button")) {
|
|
|
5408
5408
|
);
|
|
5409
5409
|
}
|
|
5410
5410
|
|
|
5411
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5411
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5412
5412
|
var __accessCheck12 = (obj, member, msg) => {
|
|
5413
5413
|
if (!member.has(obj))
|
|
5414
5414
|
throw TypeError("Cannot " + msg);
|
|
@@ -5451,7 +5451,8 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5451
5451
|
MediaUIAttributes.MEDIA_RENDITION_LIST,
|
|
5452
5452
|
MediaUIAttributes.MEDIA_RENDITION_SELECTED,
|
|
5453
5453
|
MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE,
|
|
5454
|
-
MediaUIAttributes.MEDIA_HEIGHT
|
|
5454
|
+
MediaUIAttributes.MEDIA_HEIGHT,
|
|
5455
|
+
MediaUIAttributes.MEDIA_WIDTH
|
|
5455
5456
|
];
|
|
5456
5457
|
}
|
|
5457
5458
|
static formatMenuItemText(text, rendition) {
|
|
@@ -5475,14 +5476,21 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5475
5476
|
}
|
|
5476
5477
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
5477
5478
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
5478
|
-
if (
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5479
|
+
if (oldValue !== newValue) {
|
|
5480
|
+
switch (attrName) {
|
|
5481
|
+
case MediaUIAttributes.MEDIA_RENDITION_SELECTED:
|
|
5482
|
+
this.value = newValue != null ? newValue : "auto";
|
|
5483
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5484
|
+
break;
|
|
5485
|
+
case MediaUIAttributes.MEDIA_RENDITION_LIST:
|
|
5486
|
+
__privateSet10(this, _renditionList, parseRenditionList(newValue));
|
|
5487
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5488
|
+
break;
|
|
5489
|
+
case MediaUIAttributes.MEDIA_HEIGHT:
|
|
5490
|
+
case MediaUIAttributes.MEDIA_WIDTH:
|
|
5491
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5492
|
+
break;
|
|
5493
|
+
}
|
|
5486
5494
|
}
|
|
5487
5495
|
}
|
|
5488
5496
|
connectedCallback() {
|
|
@@ -5525,6 +5533,12 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5525
5533
|
set mediaHeight(height) {
|
|
5526
5534
|
setNumericAttr(this, MediaUIAttributes.MEDIA_HEIGHT, height);
|
|
5527
5535
|
}
|
|
5536
|
+
get mediaWidth() {
|
|
5537
|
+
return getNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH);
|
|
5538
|
+
}
|
|
5539
|
+
set mediaWidth(width) {
|
|
5540
|
+
setNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH, width);
|
|
5541
|
+
}
|
|
5528
5542
|
compareRendition(a, b) {
|
|
5529
5543
|
const ctor = this.constructor;
|
|
5530
5544
|
return ctor.compareRendition(a, b);
|
|
@@ -5547,12 +5561,15 @@ _renditionList = /* @__PURE__ */ new WeakMap();
|
|
|
5547
5561
|
_prevState3 = /* @__PURE__ */ new WeakMap();
|
|
5548
5562
|
_render4 = /* @__PURE__ */ new WeakSet();
|
|
5549
5563
|
render_fn4 = function() {
|
|
5550
|
-
|
|
5564
|
+
const isAuto = !this.mediaRenditionSelected;
|
|
5565
|
+
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)
|
|
5551
5566
|
return;
|
|
5552
5567
|
__privateGet12(this, _prevState3).mediaRenditionList = JSON.stringify(
|
|
5553
5568
|
this.mediaRenditionList
|
|
5554
5569
|
);
|
|
5555
5570
|
__privateGet12(this, _prevState3).mediaHeight = this.mediaHeight;
|
|
5571
|
+
__privateGet12(this, _prevState3).mediaWidth = this.mediaWidth;
|
|
5572
|
+
__privateGet12(this, _prevState3).isAuto = isAuto;
|
|
5556
5573
|
const renditionList = this.mediaRenditionList.sort(
|
|
5557
5574
|
this.compareRendition.bind(this)
|
|
5558
5575
|
);
|
|
@@ -5563,7 +5580,6 @@ render_fn4 = function() {
|
|
|
5563
5580
|
rendition.selected = rendition === selectedRendition;
|
|
5564
5581
|
}
|
|
5565
5582
|
this.defaultSlot.textContent = "";
|
|
5566
|
-
const isAuto = !this.mediaRenditionSelected;
|
|
5567
5583
|
for (const rendition of renditionList) {
|
|
5568
5584
|
const text = this.formatRendition(rendition, {
|
|
5569
5585
|
showBitrate: this.showRenditionBitrate(rendition)
|
|
@@ -5578,15 +5594,22 @@ render_fn4 = function() {
|
|
|
5578
5594
|
this.defaultSlot.append(item2);
|
|
5579
5595
|
}
|
|
5580
5596
|
const showSelectedBitrate = selectedRendition && this.showRenditionBitrate(selectedRendition);
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
selectedRendition
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5597
|
+
let autoText = void 0;
|
|
5598
|
+
if (isAuto) {
|
|
5599
|
+
if (selectedRendition) {
|
|
5600
|
+
autoText = this.formatMenuItemText(
|
|
5601
|
+
`${t("Auto")} \u2022 ${this.formatRendition(selectedRendition, {
|
|
5602
|
+
showBitrate: showSelectedBitrate
|
|
5603
|
+
})}`,
|
|
5604
|
+
selectedRendition
|
|
5605
|
+
);
|
|
5606
|
+
} else if (this.mediaHeight > 0 && this.mediaWidth > 0) {
|
|
5607
|
+
autoText = this.formatMenuItemText(`${t("Auto")} (${Math.min(this.mediaWidth, this.mediaHeight)}p)`);
|
|
5608
|
+
}
|
|
5609
|
+
}
|
|
5610
|
+
if (!autoText) {
|
|
5611
|
+
autoText = this.formatMenuItemText(t("Auto"));
|
|
5612
|
+
}
|
|
5590
5613
|
const item = createMenuItem({
|
|
5591
5614
|
type: "radio",
|
|
5592
5615
|
text: autoText,
|
|
@@ -5615,7 +5638,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu")) {
|
|
|
5615
5638
|
GlobalThis.customElements.define("media-rendition-menu", MediaRenditionMenu);
|
|
5616
5639
|
}
|
|
5617
5640
|
|
|
5618
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5641
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5619
5642
|
var renditionIcon = (
|
|
5620
5643
|
/*html*/
|
|
5621
5644
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -5684,7 +5707,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu-button")) {
|
|
|
5684
5707
|
);
|
|
5685
5708
|
}
|
|
5686
5709
|
|
|
5687
|
-
// node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
5710
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
5688
5711
|
var __accessCheck13 = (obj, member, msg) => {
|
|
5689
5712
|
if (!member.has(obj))
|
|
5690
5713
|
throw TypeError("Cannot " + msg);
|
|
@@ -5870,7 +5893,7 @@ if (!GlobalThis.customElements.get("media-context-menu")) {
|
|
|
5870
5893
|
GlobalThis.customElements.define("media-context-menu", MediaContextMenu);
|
|
5871
5894
|
}
|
|
5872
5895
|
|
|
5873
|
-
// node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
5896
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
5874
5897
|
function getTemplateHTML9(_attrs) {
|
|
5875
5898
|
return (
|
|
5876
5899
|
/*html*/
|