@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
|
@@ -689,7 +689,7 @@ var isServer = typeof window === "undefined" || typeof globalThis.customElements
|
|
|
689
689
|
var internalGlobalThis = isServer ? globalThisShim : globalThis;
|
|
690
690
|
var internalDocument = isServer ? globalThisShim.document : globalThis.document;
|
|
691
691
|
|
|
692
|
-
// node_modules/media-chrome/dist/constants.js
|
|
692
|
+
// ../../node_modules/media-chrome/dist/constants.js
|
|
693
693
|
var MediaUIEvents = {
|
|
694
694
|
MEDIA_PLAY_REQUEST: "mediaplayrequest",
|
|
695
695
|
MEDIA_PAUSE_REQUEST: "mediapauserequest",
|
|
@@ -822,7 +822,7 @@ var TextTrackKinds = {
|
|
|
822
822
|
METADATA: "metadata"
|
|
823
823
|
};
|
|
824
824
|
|
|
825
|
-
// node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
825
|
+
// ../../node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
826
826
|
var EventTarget2 = class {
|
|
827
827
|
addEventListener() {
|
|
828
828
|
}
|
|
@@ -928,7 +928,7 @@ var isShimmed = Object.keys(globalThisShim2).every((key) => key in globalThis);
|
|
|
928
928
|
var GlobalThis = isServer2 && !isShimmed ? globalThisShim2 : globalThis;
|
|
929
929
|
var Document2 = isServer2 && !isShimmed ? documentShim : globalThis.document;
|
|
930
930
|
|
|
931
|
-
// node_modules/media-chrome/dist/utils/template-parts.js
|
|
931
|
+
// ../../node_modules/media-chrome/dist/utils/template-parts.js
|
|
932
932
|
var __accessCheck2 = (obj, member, msg) => {
|
|
933
933
|
if (!member.has(obj))
|
|
934
934
|
throw TypeError("Cannot " + msg);
|
|
@@ -1259,7 +1259,7 @@ function swapdom(parent, a, b, end = null) {
|
|
|
1259
1259
|
return b;
|
|
1260
1260
|
}
|
|
1261
1261
|
|
|
1262
|
-
// node_modules/media-chrome/dist/utils/utils.js
|
|
1262
|
+
// ../../node_modules/media-chrome/dist/utils/utils.js
|
|
1263
1263
|
function parseRenditionList(renditions) {
|
|
1264
1264
|
return renditions == null ? void 0 : renditions.split(/\s+/).map(parseRendition);
|
|
1265
1265
|
}
|
|
@@ -1292,7 +1292,7 @@ function isNumericString(str) {
|
|
|
1292
1292
|
return !isNaN(str) && !isNaN(parseFloat(str));
|
|
1293
1293
|
}
|
|
1294
1294
|
|
|
1295
|
-
// node_modules/media-chrome/dist/utils/template-processor.js
|
|
1295
|
+
// ../../node_modules/media-chrome/dist/utils/template-processor.js
|
|
1296
1296
|
var pipeModifiers = {
|
|
1297
1297
|
string: (value) => String(value)
|
|
1298
1298
|
};
|
|
@@ -1519,7 +1519,7 @@ function tokenize2(str, parsers) {
|
|
|
1519
1519
|
return tokens;
|
|
1520
1520
|
}
|
|
1521
1521
|
|
|
1522
|
-
// node_modules/media-chrome/dist/media-theme-element.js
|
|
1522
|
+
// ../../node_modules/media-chrome/dist/media-theme-element.js
|
|
1523
1523
|
var __accessCheck3 = (obj, member, msg) => {
|
|
1524
1524
|
if (!member.has(obj))
|
|
1525
1525
|
throw TypeError("Cannot " + msg);
|
|
@@ -1780,7 +1780,7 @@ if (!GlobalThis.customElements.get("media-theme")) {
|
|
|
1780
1780
|
GlobalThis.customElements.define("media-theme", MediaThemeElement);
|
|
1781
1781
|
}
|
|
1782
1782
|
|
|
1783
|
-
// node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
1783
|
+
// ../../node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
1784
1784
|
function computePosition({
|
|
1785
1785
|
anchor,
|
|
1786
1786
|
floating,
|
|
@@ -1856,7 +1856,7 @@ function getSideAxis(placement) {
|
|
|
1856
1856
|
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
1857
1857
|
}
|
|
1858
1858
|
|
|
1859
|
-
// node_modules/media-chrome/dist/utils/resize-observer.js
|
|
1859
|
+
// ../../node_modules/media-chrome/dist/utils/resize-observer.js
|
|
1860
1860
|
var callbacksMap = /* @__PURE__ */ new WeakMap();
|
|
1861
1861
|
var getCallbacks = (element) => {
|
|
1862
1862
|
let callbacks = callbacksMap.get(element);
|
|
@@ -1885,7 +1885,7 @@ function unobserveResize(element, callback) {
|
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
1887
|
|
|
1888
|
-
// node_modules/media-chrome/dist/utils/events.js
|
|
1888
|
+
// ../../node_modules/media-chrome/dist/utils/events.js
|
|
1889
1889
|
var InvokeEvent = class extends Event {
|
|
1890
1890
|
/**
|
|
1891
1891
|
* @param init - The event options.
|
|
@@ -1907,7 +1907,7 @@ var ToggleEvent = class extends Event {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
};
|
|
1909
1909
|
|
|
1910
|
-
// node_modules/media-chrome/dist/utils/element-utils.js
|
|
1910
|
+
// ../../node_modules/media-chrome/dist/utils/element-utils.js
|
|
1911
1911
|
function namedNodeMapToObject(namedNodeMap) {
|
|
1912
1912
|
const obj = {};
|
|
1913
1913
|
for (const attr of namedNodeMap) {
|
|
@@ -2074,7 +2074,7 @@ function setStringAttr(el, attrName, value) {
|
|
|
2074
2074
|
el.setAttribute(attrName, nextValue);
|
|
2075
2075
|
}
|
|
2076
2076
|
|
|
2077
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2077
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2078
2078
|
var __accessCheck4 = (obj, member, msg) => {
|
|
2079
2079
|
if (!member.has(obj))
|
|
2080
2080
|
throw TypeError("Cannot " + msg);
|
|
@@ -2919,7 +2919,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu")) {
|
|
|
2919
2919
|
GlobalThis.customElements.define("media-chrome-menu", MediaChromeMenu);
|
|
2920
2920
|
}
|
|
2921
2921
|
|
|
2922
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
2922
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
2923
2923
|
var __accessCheck5 = (obj, member, msg) => {
|
|
2924
2924
|
if (!member.has(obj))
|
|
2925
2925
|
throw TypeError("Cannot " + msg);
|
|
@@ -3371,7 +3371,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-item")) {
|
|
|
3371
3371
|
);
|
|
3372
3372
|
}
|
|
3373
3373
|
|
|
3374
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3374
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3375
3375
|
function getTemplateHTML3(_attrs) {
|
|
3376
3376
|
return (
|
|
3377
3377
|
/*html*/
|
|
@@ -3431,7 +3431,7 @@ if (!GlobalThis.customElements.get("media-settings-menu")) {
|
|
|
3431
3431
|
GlobalThis.customElements.define("media-settings-menu", MediaSettingsMenu);
|
|
3432
3432
|
}
|
|
3433
3433
|
|
|
3434
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3434
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3435
3435
|
function getTemplateHTML4(_attrs) {
|
|
3436
3436
|
return (
|
|
3437
3437
|
/*html*/
|
|
@@ -3471,7 +3471,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-item")) {
|
|
|
3471
3471
|
);
|
|
3472
3472
|
}
|
|
3473
3473
|
|
|
3474
|
-
// node_modules/media-chrome/dist/media-tooltip.js
|
|
3474
|
+
// ../../node_modules/media-chrome/dist/media-tooltip.js
|
|
3475
3475
|
var Attributes3 = {
|
|
3476
3476
|
PLACEMENT: "placement",
|
|
3477
3477
|
BOUNDS: "bounds"
|
|
@@ -3673,7 +3673,7 @@ if (!GlobalThis.customElements.get("media-tooltip")) {
|
|
|
3673
3673
|
}
|
|
3674
3674
|
var media_tooltip_default = MediaTooltip;
|
|
3675
3675
|
|
|
3676
|
-
// node_modules/media-chrome/dist/media-chrome-button.js
|
|
3676
|
+
// ../../node_modules/media-chrome/dist/media-chrome-button.js
|
|
3677
3677
|
var __accessCheck6 = (obj, member, msg) => {
|
|
3678
3678
|
if (!member.has(obj))
|
|
3679
3679
|
throw TypeError("Cannot " + msg);
|
|
@@ -3996,7 +3996,7 @@ if (!GlobalThis.customElements.get("media-chrome-button")) {
|
|
|
3996
3996
|
GlobalThis.customElements.define("media-chrome-button", MediaChromeButton);
|
|
3997
3997
|
}
|
|
3998
3998
|
|
|
3999
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
3999
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
4000
4000
|
var MediaChromeMenuButton = class extends MediaChromeButton {
|
|
4001
4001
|
connectedCallback() {
|
|
4002
4002
|
super.connectedCallback();
|
|
@@ -4037,7 +4037,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-button")) {
|
|
|
4037
4037
|
);
|
|
4038
4038
|
}
|
|
4039
4039
|
|
|
4040
|
-
// node_modules/media-chrome/dist/lang/en.js
|
|
4040
|
+
// ../../node_modules/media-chrome/dist/lang/en.js
|
|
4041
4041
|
var En = {
|
|
4042
4042
|
"Start airplay": "Start airplay",
|
|
4043
4043
|
"Stop airplay": "Stop airplay",
|
|
@@ -4112,7 +4112,7 @@ var En = {
|
|
|
4112
4112
|
"video not loaded, unknown time.": "video not loaded, unknown time."
|
|
4113
4113
|
};
|
|
4114
4114
|
|
|
4115
|
-
// node_modules/media-chrome/dist/utils/i18n.js
|
|
4115
|
+
// ../../node_modules/media-chrome/dist/utils/i18n.js
|
|
4116
4116
|
var _a;
|
|
4117
4117
|
var translations = {
|
|
4118
4118
|
en: En
|
|
@@ -4128,7 +4128,7 @@ var t = (key, vars = {}) => resolveTranslation(key).replace(
|
|
|
4128
4128
|
(_, v) => v in vars ? String(vars[v]) : `{${v}}`
|
|
4129
4129
|
);
|
|
4130
4130
|
|
|
4131
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4131
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4132
4132
|
function getSlotTemplateHTML2() {
|
|
4133
4133
|
return (
|
|
4134
4134
|
/*html*/
|
|
@@ -4176,7 +4176,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-button")) {
|
|
|
4176
4176
|
);
|
|
4177
4177
|
}
|
|
4178
4178
|
|
|
4179
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4179
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4180
4180
|
var __accessCheck7 = (obj, member, msg) => {
|
|
4181
4181
|
if (!member.has(obj))
|
|
4182
4182
|
throw TypeError("Cannot " + msg);
|
|
@@ -4310,7 +4310,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu")) {
|
|
|
4310
4310
|
);
|
|
4311
4311
|
}
|
|
4312
4312
|
|
|
4313
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4313
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4314
4314
|
var audioTrackIcon = (
|
|
4315
4315
|
/*html*/
|
|
4316
4316
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -4387,7 +4387,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu-button")) {
|
|
|
4387
4387
|
);
|
|
4388
4388
|
}
|
|
4389
4389
|
|
|
4390
|
-
// node_modules/media-chrome/dist/utils/captions.js
|
|
4390
|
+
// ../../node_modules/media-chrome/dist/utils/captions.js
|
|
4391
4391
|
var splitTextTracksStr = (textTracksStr = "") => textTracksStr.split(/\s+/);
|
|
4392
4392
|
var parseTextTrackStr = (textTrackStr = "") => {
|
|
4393
4393
|
const [kind, language, encodedLabel] = textTrackStr.split(":");
|
|
@@ -4423,7 +4423,7 @@ var areSubsOn = (el) => {
|
|
|
4423
4423
|
return showingSubtitles;
|
|
4424
4424
|
};
|
|
4425
4425
|
|
|
4426
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4426
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4427
4427
|
var __accessCheck8 = (obj, member, msg) => {
|
|
4428
4428
|
if (!member.has(obj))
|
|
4429
4429
|
throw TypeError("Cannot " + msg);
|
|
@@ -4616,7 +4616,7 @@ if (!GlobalThis.customElements.get("media-captions-menu")) {
|
|
|
4616
4616
|
GlobalThis.customElements.define("media-captions-menu", MediaCaptionsMenu);
|
|
4617
4617
|
}
|
|
4618
4618
|
|
|
4619
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
4619
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
4620
4620
|
var ccIconOn = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
4621
4621
|
<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"/>
|
|
4622
4622
|
</svg>`;
|
|
@@ -4739,7 +4739,7 @@ if (!GlobalThis.customElements.get("media-captions-menu-button")) {
|
|
|
4739
4739
|
);
|
|
4740
4740
|
}
|
|
4741
4741
|
|
|
4742
|
-
// node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
4742
|
+
// ../../node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
4743
4743
|
var __accessCheck9 = (obj, member, msg) => {
|
|
4744
4744
|
if (!member.has(obj))
|
|
4745
4745
|
throw TypeError("Cannot " + msg);
|
|
@@ -4852,7 +4852,7 @@ tokens_get = function() {
|
|
|
4852
4852
|
return __privateGet9(this, _tokenSet).size ? __privateGet9(this, _tokenSet) : __privateGet9(this, _defaultSet);
|
|
4853
4853
|
};
|
|
4854
4854
|
|
|
4855
|
-
// node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
4855
|
+
// ../../node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
4856
4856
|
var __accessCheck10 = (obj, member, msg) => {
|
|
4857
4857
|
if (!member.has(obj))
|
|
4858
4858
|
throw TypeError("Cannot " + msg);
|
|
@@ -4976,7 +4976,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-button")) {
|
|
|
4976
4976
|
);
|
|
4977
4977
|
}
|
|
4978
4978
|
|
|
4979
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
4979
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
4980
4980
|
var __accessCheck11 = (obj, member, msg) => {
|
|
4981
4981
|
if (!member.has(obj))
|
|
4982
4982
|
throw TypeError("Cannot " + msg);
|
|
@@ -5123,7 +5123,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu")) {
|
|
|
5123
5123
|
);
|
|
5124
5124
|
}
|
|
5125
5125
|
|
|
5126
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5126
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5127
5127
|
var DEFAULT_RATE2 = 1;
|
|
5128
5128
|
function getSlotTemplateHTML6(attrs) {
|
|
5129
5129
|
return (
|
|
@@ -5206,7 +5206,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu-button")) {
|
|
|
5206
5206
|
);
|
|
5207
5207
|
}
|
|
5208
5208
|
|
|
5209
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5209
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5210
5210
|
var __accessCheck12 = (obj, member, msg) => {
|
|
5211
5211
|
if (!member.has(obj))
|
|
5212
5212
|
throw TypeError("Cannot " + msg);
|
|
@@ -5249,7 +5249,8 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5249
5249
|
MediaUIAttributes.MEDIA_RENDITION_LIST,
|
|
5250
5250
|
MediaUIAttributes.MEDIA_RENDITION_SELECTED,
|
|
5251
5251
|
MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE,
|
|
5252
|
-
MediaUIAttributes.MEDIA_HEIGHT
|
|
5252
|
+
MediaUIAttributes.MEDIA_HEIGHT,
|
|
5253
|
+
MediaUIAttributes.MEDIA_WIDTH
|
|
5253
5254
|
];
|
|
5254
5255
|
}
|
|
5255
5256
|
static formatMenuItemText(text, rendition) {
|
|
@@ -5273,14 +5274,21 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5273
5274
|
}
|
|
5274
5275
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
5275
5276
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
5276
|
-
if (
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5277
|
+
if (oldValue !== newValue) {
|
|
5278
|
+
switch (attrName) {
|
|
5279
|
+
case MediaUIAttributes.MEDIA_RENDITION_SELECTED:
|
|
5280
|
+
this.value = newValue != null ? newValue : "auto";
|
|
5281
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5282
|
+
break;
|
|
5283
|
+
case MediaUIAttributes.MEDIA_RENDITION_LIST:
|
|
5284
|
+
__privateSet10(this, _renditionList, parseRenditionList(newValue));
|
|
5285
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5286
|
+
break;
|
|
5287
|
+
case MediaUIAttributes.MEDIA_HEIGHT:
|
|
5288
|
+
case MediaUIAttributes.MEDIA_WIDTH:
|
|
5289
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5290
|
+
break;
|
|
5291
|
+
}
|
|
5284
5292
|
}
|
|
5285
5293
|
}
|
|
5286
5294
|
connectedCallback() {
|
|
@@ -5323,6 +5331,12 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5323
5331
|
set mediaHeight(height) {
|
|
5324
5332
|
setNumericAttr(this, MediaUIAttributes.MEDIA_HEIGHT, height);
|
|
5325
5333
|
}
|
|
5334
|
+
get mediaWidth() {
|
|
5335
|
+
return getNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH);
|
|
5336
|
+
}
|
|
5337
|
+
set mediaWidth(width) {
|
|
5338
|
+
setNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH, width);
|
|
5339
|
+
}
|
|
5326
5340
|
compareRendition(a, b) {
|
|
5327
5341
|
const ctor = this.constructor;
|
|
5328
5342
|
return ctor.compareRendition(a, b);
|
|
@@ -5345,12 +5359,15 @@ _renditionList = /* @__PURE__ */ new WeakMap();
|
|
|
5345
5359
|
_prevState3 = /* @__PURE__ */ new WeakMap();
|
|
5346
5360
|
_render4 = /* @__PURE__ */ new WeakSet();
|
|
5347
5361
|
render_fn4 = function() {
|
|
5348
|
-
|
|
5362
|
+
const isAuto = !this.mediaRenditionSelected;
|
|
5363
|
+
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)
|
|
5349
5364
|
return;
|
|
5350
5365
|
__privateGet12(this, _prevState3).mediaRenditionList = JSON.stringify(
|
|
5351
5366
|
this.mediaRenditionList
|
|
5352
5367
|
);
|
|
5353
5368
|
__privateGet12(this, _prevState3).mediaHeight = this.mediaHeight;
|
|
5369
|
+
__privateGet12(this, _prevState3).mediaWidth = this.mediaWidth;
|
|
5370
|
+
__privateGet12(this, _prevState3).isAuto = isAuto;
|
|
5354
5371
|
const renditionList = this.mediaRenditionList.sort(
|
|
5355
5372
|
this.compareRendition.bind(this)
|
|
5356
5373
|
);
|
|
@@ -5361,7 +5378,6 @@ render_fn4 = function() {
|
|
|
5361
5378
|
rendition.selected = rendition === selectedRendition;
|
|
5362
5379
|
}
|
|
5363
5380
|
this.defaultSlot.textContent = "";
|
|
5364
|
-
const isAuto = !this.mediaRenditionSelected;
|
|
5365
5381
|
for (const rendition of renditionList) {
|
|
5366
5382
|
const text = this.formatRendition(rendition, {
|
|
5367
5383
|
showBitrate: this.showRenditionBitrate(rendition)
|
|
@@ -5376,15 +5392,22 @@ render_fn4 = function() {
|
|
|
5376
5392
|
this.defaultSlot.append(item2);
|
|
5377
5393
|
}
|
|
5378
5394
|
const showSelectedBitrate = selectedRendition && this.showRenditionBitrate(selectedRendition);
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
selectedRendition
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5395
|
+
let autoText = void 0;
|
|
5396
|
+
if (isAuto) {
|
|
5397
|
+
if (selectedRendition) {
|
|
5398
|
+
autoText = this.formatMenuItemText(
|
|
5399
|
+
`${t("Auto")} \u2022 ${this.formatRendition(selectedRendition, {
|
|
5400
|
+
showBitrate: showSelectedBitrate
|
|
5401
|
+
})}`,
|
|
5402
|
+
selectedRendition
|
|
5403
|
+
);
|
|
5404
|
+
} else if (this.mediaHeight > 0 && this.mediaWidth > 0) {
|
|
5405
|
+
autoText = this.formatMenuItemText(`${t("Auto")} (${Math.min(this.mediaWidth, this.mediaHeight)}p)`);
|
|
5406
|
+
}
|
|
5407
|
+
}
|
|
5408
|
+
if (!autoText) {
|
|
5409
|
+
autoText = this.formatMenuItemText(t("Auto"));
|
|
5410
|
+
}
|
|
5388
5411
|
const item = createMenuItem({
|
|
5389
5412
|
type: "radio",
|
|
5390
5413
|
text: autoText,
|
|
@@ -5413,7 +5436,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu")) {
|
|
|
5413
5436
|
GlobalThis.customElements.define("media-rendition-menu", MediaRenditionMenu);
|
|
5414
5437
|
}
|
|
5415
5438
|
|
|
5416
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5439
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5417
5440
|
var renditionIcon = (
|
|
5418
5441
|
/*html*/
|
|
5419
5442
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -5482,7 +5505,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu-button")) {
|
|
|
5482
5505
|
);
|
|
5483
5506
|
}
|
|
5484
5507
|
|
|
5485
|
-
// node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
5508
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
5486
5509
|
var __accessCheck13 = (obj, member, msg) => {
|
|
5487
5510
|
if (!member.has(obj))
|
|
5488
5511
|
throw TypeError("Cannot " + msg);
|
|
@@ -5668,7 +5691,7 @@ if (!GlobalThis.customElements.get("media-context-menu")) {
|
|
|
5668
5691
|
GlobalThis.customElements.define("media-context-menu", MediaContextMenu);
|
|
5669
5692
|
}
|
|
5670
5693
|
|
|
5671
|
-
// node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
5694
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
5672
5695
|
function getTemplateHTML9(_attrs) {
|
|
5673
5696
|
return (
|
|
5674
5697
|
/*html*/
|