@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
|
@@ -916,7 +916,7 @@ var isServer = typeof window === "undefined" || typeof globalThis.customElements
|
|
|
916
916
|
var internalGlobalThis = isServer ? globalThisShim : globalThis;
|
|
917
917
|
var internalDocument = isServer ? globalThisShim.document : globalThis.document;
|
|
918
918
|
|
|
919
|
-
// node_modules/media-chrome/dist/constants.js
|
|
919
|
+
// ../../node_modules/media-chrome/dist/constants.js
|
|
920
920
|
var MediaUIEvents = {
|
|
921
921
|
MEDIA_PLAY_REQUEST: "mediaplayrequest",
|
|
922
922
|
MEDIA_PAUSE_REQUEST: "mediapauserequest",
|
|
@@ -1049,7 +1049,7 @@ var TextTrackKinds = {
|
|
|
1049
1049
|
METADATA: "metadata"
|
|
1050
1050
|
};
|
|
1051
1051
|
|
|
1052
|
-
// node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
1052
|
+
// ../../node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
1053
1053
|
var EventTarget2 = class {
|
|
1054
1054
|
addEventListener() {
|
|
1055
1055
|
}
|
|
@@ -1155,7 +1155,7 @@ var isShimmed = Object.keys(globalThisShim2).every((key) => key in globalThis);
|
|
|
1155
1155
|
var GlobalThis = isServer2 && !isShimmed ? globalThisShim2 : globalThis;
|
|
1156
1156
|
var Document2 = isServer2 && !isShimmed ? documentShim : globalThis.document;
|
|
1157
1157
|
|
|
1158
|
-
// node_modules/media-chrome/dist/utils/template-parts.js
|
|
1158
|
+
// ../../node_modules/media-chrome/dist/utils/template-parts.js
|
|
1159
1159
|
var __accessCheck2 = (obj, member, msg) => {
|
|
1160
1160
|
if (!member.has(obj))
|
|
1161
1161
|
throw TypeError("Cannot " + msg);
|
|
@@ -1486,7 +1486,7 @@ function swapdom(parent, a, b, end = null) {
|
|
|
1486
1486
|
return b;
|
|
1487
1487
|
}
|
|
1488
1488
|
|
|
1489
|
-
// node_modules/media-chrome/dist/utils/utils.js
|
|
1489
|
+
// ../../node_modules/media-chrome/dist/utils/utils.js
|
|
1490
1490
|
function parseRenditionList(renditions) {
|
|
1491
1491
|
return renditions == null ? void 0 : renditions.split(/\s+/).map(parseRendition);
|
|
1492
1492
|
}
|
|
@@ -1519,7 +1519,7 @@ function isNumericString(str) {
|
|
|
1519
1519
|
return !isNaN(str) && !isNaN(parseFloat(str));
|
|
1520
1520
|
}
|
|
1521
1521
|
|
|
1522
|
-
// node_modules/media-chrome/dist/utils/template-processor.js
|
|
1522
|
+
// ../../node_modules/media-chrome/dist/utils/template-processor.js
|
|
1523
1523
|
var pipeModifiers = {
|
|
1524
1524
|
string: (value) => String(value)
|
|
1525
1525
|
};
|
|
@@ -1746,7 +1746,7 @@ function tokenize2(str, parsers) {
|
|
|
1746
1746
|
return tokens;
|
|
1747
1747
|
}
|
|
1748
1748
|
|
|
1749
|
-
// node_modules/media-chrome/dist/media-theme-element.js
|
|
1749
|
+
// ../../node_modules/media-chrome/dist/media-theme-element.js
|
|
1750
1750
|
var __accessCheck3 = (obj, member, msg) => {
|
|
1751
1751
|
if (!member.has(obj))
|
|
1752
1752
|
throw TypeError("Cannot " + msg);
|
|
@@ -2007,7 +2007,7 @@ if (!GlobalThis.customElements.get("media-theme")) {
|
|
|
2007
2007
|
GlobalThis.customElements.define("media-theme", MediaThemeElement);
|
|
2008
2008
|
}
|
|
2009
2009
|
|
|
2010
|
-
// node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
2010
|
+
// ../../node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
2011
2011
|
function computePosition({
|
|
2012
2012
|
anchor,
|
|
2013
2013
|
floating,
|
|
@@ -2083,7 +2083,7 @@ function getSideAxis(placement) {
|
|
|
2083
2083
|
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
2084
2084
|
}
|
|
2085
2085
|
|
|
2086
|
-
// node_modules/media-chrome/dist/utils/resize-observer.js
|
|
2086
|
+
// ../../node_modules/media-chrome/dist/utils/resize-observer.js
|
|
2087
2087
|
var callbacksMap = /* @__PURE__ */ new WeakMap();
|
|
2088
2088
|
var getCallbacks = (element) => {
|
|
2089
2089
|
let callbacks = callbacksMap.get(element);
|
|
@@ -2112,7 +2112,7 @@ function unobserveResize(element, callback) {
|
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
2114
2114
|
|
|
2115
|
-
// node_modules/media-chrome/dist/utils/events.js
|
|
2115
|
+
// ../../node_modules/media-chrome/dist/utils/events.js
|
|
2116
2116
|
var InvokeEvent = class extends Event {
|
|
2117
2117
|
/**
|
|
2118
2118
|
* @param init - The event options.
|
|
@@ -2134,7 +2134,7 @@ var ToggleEvent = class extends Event {
|
|
|
2134
2134
|
}
|
|
2135
2135
|
};
|
|
2136
2136
|
|
|
2137
|
-
// node_modules/media-chrome/dist/utils/element-utils.js
|
|
2137
|
+
// ../../node_modules/media-chrome/dist/utils/element-utils.js
|
|
2138
2138
|
function namedNodeMapToObject(namedNodeMap) {
|
|
2139
2139
|
const obj = {};
|
|
2140
2140
|
for (const attr of namedNodeMap) {
|
|
@@ -2301,7 +2301,7 @@ function setStringAttr(el, attrName, value) {
|
|
|
2301
2301
|
el.setAttribute(attrName, nextValue);
|
|
2302
2302
|
}
|
|
2303
2303
|
|
|
2304
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2304
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2305
2305
|
var __accessCheck4 = (obj, member, msg) => {
|
|
2306
2306
|
if (!member.has(obj))
|
|
2307
2307
|
throw TypeError("Cannot " + msg);
|
|
@@ -3146,7 +3146,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu")) {
|
|
|
3146
3146
|
GlobalThis.customElements.define("media-chrome-menu", MediaChromeMenu);
|
|
3147
3147
|
}
|
|
3148
3148
|
|
|
3149
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
3149
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
3150
3150
|
var __accessCheck5 = (obj, member, msg) => {
|
|
3151
3151
|
if (!member.has(obj))
|
|
3152
3152
|
throw TypeError("Cannot " + msg);
|
|
@@ -3598,7 +3598,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-item")) {
|
|
|
3598
3598
|
);
|
|
3599
3599
|
}
|
|
3600
3600
|
|
|
3601
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3601
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3602
3602
|
function getTemplateHTML3(_attrs) {
|
|
3603
3603
|
return (
|
|
3604
3604
|
/*html*/
|
|
@@ -3658,7 +3658,7 @@ if (!GlobalThis.customElements.get("media-settings-menu")) {
|
|
|
3658
3658
|
GlobalThis.customElements.define("media-settings-menu", MediaSettingsMenu);
|
|
3659
3659
|
}
|
|
3660
3660
|
|
|
3661
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3661
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3662
3662
|
function getTemplateHTML4(_attrs) {
|
|
3663
3663
|
return (
|
|
3664
3664
|
/*html*/
|
|
@@ -3698,7 +3698,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-item")) {
|
|
|
3698
3698
|
);
|
|
3699
3699
|
}
|
|
3700
3700
|
|
|
3701
|
-
// node_modules/media-chrome/dist/media-tooltip.js
|
|
3701
|
+
// ../../node_modules/media-chrome/dist/media-tooltip.js
|
|
3702
3702
|
var Attributes3 = {
|
|
3703
3703
|
PLACEMENT: "placement",
|
|
3704
3704
|
BOUNDS: "bounds"
|
|
@@ -3900,7 +3900,7 @@ if (!GlobalThis.customElements.get("media-tooltip")) {
|
|
|
3900
3900
|
}
|
|
3901
3901
|
var media_tooltip_default = MediaTooltip;
|
|
3902
3902
|
|
|
3903
|
-
// node_modules/media-chrome/dist/media-chrome-button.js
|
|
3903
|
+
// ../../node_modules/media-chrome/dist/media-chrome-button.js
|
|
3904
3904
|
var __accessCheck6 = (obj, member, msg) => {
|
|
3905
3905
|
if (!member.has(obj))
|
|
3906
3906
|
throw TypeError("Cannot " + msg);
|
|
@@ -4223,7 +4223,7 @@ if (!GlobalThis.customElements.get("media-chrome-button")) {
|
|
|
4223
4223
|
GlobalThis.customElements.define("media-chrome-button", MediaChromeButton);
|
|
4224
4224
|
}
|
|
4225
4225
|
|
|
4226
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
4226
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
4227
4227
|
var MediaChromeMenuButton = class extends MediaChromeButton {
|
|
4228
4228
|
connectedCallback() {
|
|
4229
4229
|
super.connectedCallback();
|
|
@@ -4264,7 +4264,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-button")) {
|
|
|
4264
4264
|
);
|
|
4265
4265
|
}
|
|
4266
4266
|
|
|
4267
|
-
// node_modules/media-chrome/dist/lang/en.js
|
|
4267
|
+
// ../../node_modules/media-chrome/dist/lang/en.js
|
|
4268
4268
|
var En = {
|
|
4269
4269
|
"Start airplay": "Start airplay",
|
|
4270
4270
|
"Stop airplay": "Stop airplay",
|
|
@@ -4339,7 +4339,7 @@ var En = {
|
|
|
4339
4339
|
"video not loaded, unknown time.": "video not loaded, unknown time."
|
|
4340
4340
|
};
|
|
4341
4341
|
|
|
4342
|
-
// node_modules/media-chrome/dist/utils/i18n.js
|
|
4342
|
+
// ../../node_modules/media-chrome/dist/utils/i18n.js
|
|
4343
4343
|
var _a;
|
|
4344
4344
|
var translations = {
|
|
4345
4345
|
en: En
|
|
@@ -4355,7 +4355,7 @@ var t = (key, vars = {}) => resolveTranslation(key).replace(
|
|
|
4355
4355
|
(_, v) => v in vars ? String(vars[v]) : `{${v}}`
|
|
4356
4356
|
);
|
|
4357
4357
|
|
|
4358
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4358
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4359
4359
|
function getSlotTemplateHTML2() {
|
|
4360
4360
|
return (
|
|
4361
4361
|
/*html*/
|
|
@@ -4403,7 +4403,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-button")) {
|
|
|
4403
4403
|
);
|
|
4404
4404
|
}
|
|
4405
4405
|
|
|
4406
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4406
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4407
4407
|
var __accessCheck7 = (obj, member, msg) => {
|
|
4408
4408
|
if (!member.has(obj))
|
|
4409
4409
|
throw TypeError("Cannot " + msg);
|
|
@@ -4537,7 +4537,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu")) {
|
|
|
4537
4537
|
);
|
|
4538
4538
|
}
|
|
4539
4539
|
|
|
4540
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4540
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4541
4541
|
var audioTrackIcon = (
|
|
4542
4542
|
/*html*/
|
|
4543
4543
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -4614,7 +4614,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu-button")) {
|
|
|
4614
4614
|
);
|
|
4615
4615
|
}
|
|
4616
4616
|
|
|
4617
|
-
// node_modules/media-chrome/dist/utils/captions.js
|
|
4617
|
+
// ../../node_modules/media-chrome/dist/utils/captions.js
|
|
4618
4618
|
var splitTextTracksStr = (textTracksStr = "") => textTracksStr.split(/\s+/);
|
|
4619
4619
|
var parseTextTrackStr = (textTrackStr = "") => {
|
|
4620
4620
|
const [kind, language, encodedLabel] = textTrackStr.split(":");
|
|
@@ -4650,7 +4650,7 @@ var areSubsOn = (el) => {
|
|
|
4650
4650
|
return showingSubtitles;
|
|
4651
4651
|
};
|
|
4652
4652
|
|
|
4653
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4653
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4654
4654
|
var __accessCheck8 = (obj, member, msg) => {
|
|
4655
4655
|
if (!member.has(obj))
|
|
4656
4656
|
throw TypeError("Cannot " + msg);
|
|
@@ -4843,7 +4843,7 @@ if (!GlobalThis.customElements.get("media-captions-menu")) {
|
|
|
4843
4843
|
GlobalThis.customElements.define("media-captions-menu", MediaCaptionsMenu);
|
|
4844
4844
|
}
|
|
4845
4845
|
|
|
4846
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
4846
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
4847
4847
|
var ccIconOn = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
4848
4848
|
<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"/>
|
|
4849
4849
|
</svg>`;
|
|
@@ -4966,7 +4966,7 @@ if (!GlobalThis.customElements.get("media-captions-menu-button")) {
|
|
|
4966
4966
|
);
|
|
4967
4967
|
}
|
|
4968
4968
|
|
|
4969
|
-
// node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
4969
|
+
// ../../node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
4970
4970
|
var __accessCheck9 = (obj, member, msg) => {
|
|
4971
4971
|
if (!member.has(obj))
|
|
4972
4972
|
throw TypeError("Cannot " + msg);
|
|
@@ -5079,7 +5079,7 @@ tokens_get = function() {
|
|
|
5079
5079
|
return __privateGet9(this, _tokenSet).size ? __privateGet9(this, _tokenSet) : __privateGet9(this, _defaultSet);
|
|
5080
5080
|
};
|
|
5081
5081
|
|
|
5082
|
-
// node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
5082
|
+
// ../../node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
5083
5083
|
var __accessCheck10 = (obj, member, msg) => {
|
|
5084
5084
|
if (!member.has(obj))
|
|
5085
5085
|
throw TypeError("Cannot " + msg);
|
|
@@ -5203,7 +5203,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-button")) {
|
|
|
5203
5203
|
);
|
|
5204
5204
|
}
|
|
5205
5205
|
|
|
5206
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
5206
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
5207
5207
|
var __accessCheck11 = (obj, member, msg) => {
|
|
5208
5208
|
if (!member.has(obj))
|
|
5209
5209
|
throw TypeError("Cannot " + msg);
|
|
@@ -5350,7 +5350,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu")) {
|
|
|
5350
5350
|
);
|
|
5351
5351
|
}
|
|
5352
5352
|
|
|
5353
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5353
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5354
5354
|
var DEFAULT_RATE2 = 1;
|
|
5355
5355
|
function getSlotTemplateHTML6(attrs) {
|
|
5356
5356
|
return (
|
|
@@ -5433,7 +5433,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu-button")) {
|
|
|
5433
5433
|
);
|
|
5434
5434
|
}
|
|
5435
5435
|
|
|
5436
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5436
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5437
5437
|
var __accessCheck12 = (obj, member, msg) => {
|
|
5438
5438
|
if (!member.has(obj))
|
|
5439
5439
|
throw TypeError("Cannot " + msg);
|
|
@@ -5476,7 +5476,8 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5476
5476
|
MediaUIAttributes.MEDIA_RENDITION_LIST,
|
|
5477
5477
|
MediaUIAttributes.MEDIA_RENDITION_SELECTED,
|
|
5478
5478
|
MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE,
|
|
5479
|
-
MediaUIAttributes.MEDIA_HEIGHT
|
|
5479
|
+
MediaUIAttributes.MEDIA_HEIGHT,
|
|
5480
|
+
MediaUIAttributes.MEDIA_WIDTH
|
|
5480
5481
|
];
|
|
5481
5482
|
}
|
|
5482
5483
|
static formatMenuItemText(text, rendition) {
|
|
@@ -5500,14 +5501,21 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5500
5501
|
}
|
|
5501
5502
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
5502
5503
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
5503
|
-
if (
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5504
|
+
if (oldValue !== newValue) {
|
|
5505
|
+
switch (attrName) {
|
|
5506
|
+
case MediaUIAttributes.MEDIA_RENDITION_SELECTED:
|
|
5507
|
+
this.value = newValue != null ? newValue : "auto";
|
|
5508
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5509
|
+
break;
|
|
5510
|
+
case MediaUIAttributes.MEDIA_RENDITION_LIST:
|
|
5511
|
+
__privateSet10(this, _renditionList, parseRenditionList(newValue));
|
|
5512
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5513
|
+
break;
|
|
5514
|
+
case MediaUIAttributes.MEDIA_HEIGHT:
|
|
5515
|
+
case MediaUIAttributes.MEDIA_WIDTH:
|
|
5516
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5517
|
+
break;
|
|
5518
|
+
}
|
|
5511
5519
|
}
|
|
5512
5520
|
}
|
|
5513
5521
|
connectedCallback() {
|
|
@@ -5550,6 +5558,12 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5550
5558
|
set mediaHeight(height) {
|
|
5551
5559
|
setNumericAttr(this, MediaUIAttributes.MEDIA_HEIGHT, height);
|
|
5552
5560
|
}
|
|
5561
|
+
get mediaWidth() {
|
|
5562
|
+
return getNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH);
|
|
5563
|
+
}
|
|
5564
|
+
set mediaWidth(width) {
|
|
5565
|
+
setNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH, width);
|
|
5566
|
+
}
|
|
5553
5567
|
compareRendition(a, b) {
|
|
5554
5568
|
const ctor = this.constructor;
|
|
5555
5569
|
return ctor.compareRendition(a, b);
|
|
@@ -5572,12 +5586,15 @@ _renditionList = /* @__PURE__ */ new WeakMap();
|
|
|
5572
5586
|
_prevState3 = /* @__PURE__ */ new WeakMap();
|
|
5573
5587
|
_render4 = /* @__PURE__ */ new WeakSet();
|
|
5574
5588
|
render_fn4 = function() {
|
|
5575
|
-
|
|
5589
|
+
const isAuto = !this.mediaRenditionSelected;
|
|
5590
|
+
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)
|
|
5576
5591
|
return;
|
|
5577
5592
|
__privateGet12(this, _prevState3).mediaRenditionList = JSON.stringify(
|
|
5578
5593
|
this.mediaRenditionList
|
|
5579
5594
|
);
|
|
5580
5595
|
__privateGet12(this, _prevState3).mediaHeight = this.mediaHeight;
|
|
5596
|
+
__privateGet12(this, _prevState3).mediaWidth = this.mediaWidth;
|
|
5597
|
+
__privateGet12(this, _prevState3).isAuto = isAuto;
|
|
5581
5598
|
const renditionList = this.mediaRenditionList.sort(
|
|
5582
5599
|
this.compareRendition.bind(this)
|
|
5583
5600
|
);
|
|
@@ -5588,7 +5605,6 @@ render_fn4 = function() {
|
|
|
5588
5605
|
rendition.selected = rendition === selectedRendition;
|
|
5589
5606
|
}
|
|
5590
5607
|
this.defaultSlot.textContent = "";
|
|
5591
|
-
const isAuto = !this.mediaRenditionSelected;
|
|
5592
5608
|
for (const rendition of renditionList) {
|
|
5593
5609
|
const text = this.formatRendition(rendition, {
|
|
5594
5610
|
showBitrate: this.showRenditionBitrate(rendition)
|
|
@@ -5603,15 +5619,22 @@ render_fn4 = function() {
|
|
|
5603
5619
|
this.defaultSlot.append(item2);
|
|
5604
5620
|
}
|
|
5605
5621
|
const showSelectedBitrate = selectedRendition && this.showRenditionBitrate(selectedRendition);
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
selectedRendition
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5622
|
+
let autoText = void 0;
|
|
5623
|
+
if (isAuto) {
|
|
5624
|
+
if (selectedRendition) {
|
|
5625
|
+
autoText = this.formatMenuItemText(
|
|
5626
|
+
`${t("Auto")} \u2022 ${this.formatRendition(selectedRendition, {
|
|
5627
|
+
showBitrate: showSelectedBitrate
|
|
5628
|
+
})}`,
|
|
5629
|
+
selectedRendition
|
|
5630
|
+
);
|
|
5631
|
+
} else if (this.mediaHeight > 0 && this.mediaWidth > 0) {
|
|
5632
|
+
autoText = this.formatMenuItemText(`${t("Auto")} (${Math.min(this.mediaWidth, this.mediaHeight)}p)`);
|
|
5633
|
+
}
|
|
5634
|
+
}
|
|
5635
|
+
if (!autoText) {
|
|
5636
|
+
autoText = this.formatMenuItemText(t("Auto"));
|
|
5637
|
+
}
|
|
5615
5638
|
const item = createMenuItem({
|
|
5616
5639
|
type: "radio",
|
|
5617
5640
|
text: autoText,
|
|
@@ -5640,7 +5663,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu")) {
|
|
|
5640
5663
|
GlobalThis.customElements.define("media-rendition-menu", MediaRenditionMenu);
|
|
5641
5664
|
}
|
|
5642
5665
|
|
|
5643
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5666
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5644
5667
|
var renditionIcon = (
|
|
5645
5668
|
/*html*/
|
|
5646
5669
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -5709,7 +5732,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu-button")) {
|
|
|
5709
5732
|
);
|
|
5710
5733
|
}
|
|
5711
5734
|
|
|
5712
|
-
// node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
5735
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
5713
5736
|
var __accessCheck13 = (obj, member, msg) => {
|
|
5714
5737
|
if (!member.has(obj))
|
|
5715
5738
|
throw TypeError("Cannot " + msg);
|
|
@@ -5895,7 +5918,7 @@ if (!GlobalThis.customElements.get("media-context-menu")) {
|
|
|
5895
5918
|
GlobalThis.customElements.define("media-context-menu", MediaContextMenu);
|
|
5896
5919
|
}
|
|
5897
5920
|
|
|
5898
|
-
// node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
5921
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
5899
5922
|
function getTemplateHTML9(_attrs) {
|
|
5900
5923
|
return (
|
|
5901
5924
|
/*html*/
|