@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
|
@@ -1231,7 +1231,7 @@ var isServer = typeof window === "undefined" || typeof globalThis.customElements
|
|
|
1231
1231
|
var internalGlobalThis = isServer ? globalThisShim : globalThis;
|
|
1232
1232
|
var internalDocument = isServer ? globalThisShim.document : globalThis.document;
|
|
1233
1233
|
|
|
1234
|
-
// node_modules/media-chrome/dist/constants.js
|
|
1234
|
+
// ../../node_modules/media-chrome/dist/constants.js
|
|
1235
1235
|
var MediaUIEvents = {
|
|
1236
1236
|
MEDIA_PLAY_REQUEST: "mediaplayrequest",
|
|
1237
1237
|
MEDIA_PAUSE_REQUEST: "mediapauserequest",
|
|
@@ -1364,7 +1364,7 @@ var TextTrackKinds = {
|
|
|
1364
1364
|
METADATA: "metadata"
|
|
1365
1365
|
};
|
|
1366
1366
|
|
|
1367
|
-
// node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
1367
|
+
// ../../node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
1368
1368
|
var EventTarget2 = class {
|
|
1369
1369
|
addEventListener() {
|
|
1370
1370
|
}
|
|
@@ -1470,7 +1470,7 @@ var isShimmed = Object.keys(globalThisShim2).every((key) => key in globalThis);
|
|
|
1470
1470
|
var GlobalThis = isServer2 && !isShimmed ? globalThisShim2 : globalThis;
|
|
1471
1471
|
var Document2 = isServer2 && !isShimmed ? documentShim : globalThis.document;
|
|
1472
1472
|
|
|
1473
|
-
// node_modules/media-chrome/dist/utils/template-parts.js
|
|
1473
|
+
// ../../node_modules/media-chrome/dist/utils/template-parts.js
|
|
1474
1474
|
var __accessCheck2 = (obj, member, msg) => {
|
|
1475
1475
|
if (!member.has(obj))
|
|
1476
1476
|
throw TypeError("Cannot " + msg);
|
|
@@ -1801,7 +1801,7 @@ function swapdom(parent, a, b, end = null) {
|
|
|
1801
1801
|
return b;
|
|
1802
1802
|
}
|
|
1803
1803
|
|
|
1804
|
-
// node_modules/media-chrome/dist/utils/utils.js
|
|
1804
|
+
// ../../node_modules/media-chrome/dist/utils/utils.js
|
|
1805
1805
|
function parseRenditionList(renditions) {
|
|
1806
1806
|
return renditions == null ? void 0 : renditions.split(/\s+/).map(parseRendition);
|
|
1807
1807
|
}
|
|
@@ -1834,7 +1834,7 @@ function isNumericString(str) {
|
|
|
1834
1834
|
return !isNaN(str) && !isNaN(parseFloat(str));
|
|
1835
1835
|
}
|
|
1836
1836
|
|
|
1837
|
-
// node_modules/media-chrome/dist/utils/template-processor.js
|
|
1837
|
+
// ../../node_modules/media-chrome/dist/utils/template-processor.js
|
|
1838
1838
|
var pipeModifiers = {
|
|
1839
1839
|
string: (value) => String(value)
|
|
1840
1840
|
};
|
|
@@ -2061,7 +2061,7 @@ function tokenize2(str, parsers) {
|
|
|
2061
2061
|
return tokens;
|
|
2062
2062
|
}
|
|
2063
2063
|
|
|
2064
|
-
// node_modules/media-chrome/dist/media-theme-element.js
|
|
2064
|
+
// ../../node_modules/media-chrome/dist/media-theme-element.js
|
|
2065
2065
|
var __accessCheck3 = (obj, member, msg) => {
|
|
2066
2066
|
if (!member.has(obj))
|
|
2067
2067
|
throw TypeError("Cannot " + msg);
|
|
@@ -2322,7 +2322,7 @@ if (!GlobalThis.customElements.get("media-theme")) {
|
|
|
2322
2322
|
GlobalThis.customElements.define("media-theme", MediaThemeElement);
|
|
2323
2323
|
}
|
|
2324
2324
|
|
|
2325
|
-
// node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
2325
|
+
// ../../node_modules/media-chrome/dist/utils/anchor-utils.js
|
|
2326
2326
|
function computePosition({
|
|
2327
2327
|
anchor,
|
|
2328
2328
|
floating,
|
|
@@ -2398,7 +2398,7 @@ function getSideAxis(placement) {
|
|
|
2398
2398
|
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
2399
2399
|
}
|
|
2400
2400
|
|
|
2401
|
-
// node_modules/media-chrome/dist/utils/resize-observer.js
|
|
2401
|
+
// ../../node_modules/media-chrome/dist/utils/resize-observer.js
|
|
2402
2402
|
var callbacksMap = /* @__PURE__ */ new WeakMap();
|
|
2403
2403
|
var getCallbacks = (element) => {
|
|
2404
2404
|
let callbacks = callbacksMap.get(element);
|
|
@@ -2427,7 +2427,7 @@ function unobserveResize(element, callback) {
|
|
|
2427
2427
|
}
|
|
2428
2428
|
}
|
|
2429
2429
|
|
|
2430
|
-
// node_modules/media-chrome/dist/utils/events.js
|
|
2430
|
+
// ../../node_modules/media-chrome/dist/utils/events.js
|
|
2431
2431
|
var InvokeEvent = class extends Event {
|
|
2432
2432
|
/**
|
|
2433
2433
|
* @param init - The event options.
|
|
@@ -2449,7 +2449,7 @@ var ToggleEvent = class extends Event {
|
|
|
2449
2449
|
}
|
|
2450
2450
|
};
|
|
2451
2451
|
|
|
2452
|
-
// node_modules/media-chrome/dist/utils/element-utils.js
|
|
2452
|
+
// ../../node_modules/media-chrome/dist/utils/element-utils.js
|
|
2453
2453
|
function namedNodeMapToObject(namedNodeMap) {
|
|
2454
2454
|
const obj = {};
|
|
2455
2455
|
for (const attr of namedNodeMap) {
|
|
@@ -2616,7 +2616,7 @@ function setStringAttr(el, attrName, value) {
|
|
|
2616
2616
|
el.setAttribute(attrName, nextValue);
|
|
2617
2617
|
}
|
|
2618
2618
|
|
|
2619
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2619
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu.js
|
|
2620
2620
|
var __accessCheck4 = (obj, member, msg) => {
|
|
2621
2621
|
if (!member.has(obj))
|
|
2622
2622
|
throw TypeError("Cannot " + msg);
|
|
@@ -3461,7 +3461,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu")) {
|
|
|
3461
3461
|
GlobalThis.customElements.define("media-chrome-menu", MediaChromeMenu);
|
|
3462
3462
|
}
|
|
3463
3463
|
|
|
3464
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
3464
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-item.js
|
|
3465
3465
|
var __accessCheck5 = (obj, member, msg) => {
|
|
3466
3466
|
if (!member.has(obj))
|
|
3467
3467
|
throw TypeError("Cannot " + msg);
|
|
@@ -3913,7 +3913,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-item")) {
|
|
|
3913
3913
|
);
|
|
3914
3914
|
}
|
|
3915
3915
|
|
|
3916
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3916
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu.js
|
|
3917
3917
|
function getTemplateHTML3(_attrs) {
|
|
3918
3918
|
return (
|
|
3919
3919
|
/*html*/
|
|
@@ -3973,7 +3973,7 @@ if (!GlobalThis.customElements.get("media-settings-menu")) {
|
|
|
3973
3973
|
GlobalThis.customElements.define("media-settings-menu", MediaSettingsMenu);
|
|
3974
3974
|
}
|
|
3975
3975
|
|
|
3976
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3976
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-item.js
|
|
3977
3977
|
function getTemplateHTML4(_attrs) {
|
|
3978
3978
|
return (
|
|
3979
3979
|
/*html*/
|
|
@@ -4013,7 +4013,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-item")) {
|
|
|
4013
4013
|
);
|
|
4014
4014
|
}
|
|
4015
4015
|
|
|
4016
|
-
// node_modules/media-chrome/dist/media-tooltip.js
|
|
4016
|
+
// ../../node_modules/media-chrome/dist/media-tooltip.js
|
|
4017
4017
|
var Attributes3 = {
|
|
4018
4018
|
PLACEMENT: "placement",
|
|
4019
4019
|
BOUNDS: "bounds"
|
|
@@ -4215,7 +4215,7 @@ if (!GlobalThis.customElements.get("media-tooltip")) {
|
|
|
4215
4215
|
}
|
|
4216
4216
|
var media_tooltip_default = MediaTooltip;
|
|
4217
4217
|
|
|
4218
|
-
// node_modules/media-chrome/dist/media-chrome-button.js
|
|
4218
|
+
// ../../node_modules/media-chrome/dist/media-chrome-button.js
|
|
4219
4219
|
var __accessCheck6 = (obj, member, msg) => {
|
|
4220
4220
|
if (!member.has(obj))
|
|
4221
4221
|
throw TypeError("Cannot " + msg);
|
|
@@ -4538,7 +4538,7 @@ if (!GlobalThis.customElements.get("media-chrome-button")) {
|
|
|
4538
4538
|
GlobalThis.customElements.define("media-chrome-button", MediaChromeButton);
|
|
4539
4539
|
}
|
|
4540
4540
|
|
|
4541
|
-
// node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
4541
|
+
// ../../node_modules/media-chrome/dist/menu/media-chrome-menu-button.js
|
|
4542
4542
|
var MediaChromeMenuButton = class extends MediaChromeButton {
|
|
4543
4543
|
connectedCallback() {
|
|
4544
4544
|
super.connectedCallback();
|
|
@@ -4579,7 +4579,7 @@ if (!GlobalThis.customElements.get("media-chrome-menu-button")) {
|
|
|
4579
4579
|
);
|
|
4580
4580
|
}
|
|
4581
4581
|
|
|
4582
|
-
// node_modules/media-chrome/dist/lang/en.js
|
|
4582
|
+
// ../../node_modules/media-chrome/dist/lang/en.js
|
|
4583
4583
|
var En = {
|
|
4584
4584
|
"Start airplay": "Start airplay",
|
|
4585
4585
|
"Stop airplay": "Stop airplay",
|
|
@@ -4654,7 +4654,7 @@ var En = {
|
|
|
4654
4654
|
"video not loaded, unknown time.": "video not loaded, unknown time."
|
|
4655
4655
|
};
|
|
4656
4656
|
|
|
4657
|
-
// node_modules/media-chrome/dist/utils/i18n.js
|
|
4657
|
+
// ../../node_modules/media-chrome/dist/utils/i18n.js
|
|
4658
4658
|
var _a;
|
|
4659
4659
|
var translations = {
|
|
4660
4660
|
en: En
|
|
@@ -4670,7 +4670,7 @@ var t = (key, vars = {}) => resolveTranslation(key).replace(
|
|
|
4670
4670
|
(_, v) => v in vars ? String(vars[v]) : `{${v}}`
|
|
4671
4671
|
);
|
|
4672
4672
|
|
|
4673
|
-
// node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4673
|
+
// ../../node_modules/media-chrome/dist/menu/media-settings-menu-button.js
|
|
4674
4674
|
function getSlotTemplateHTML2() {
|
|
4675
4675
|
return (
|
|
4676
4676
|
/*html*/
|
|
@@ -4718,7 +4718,7 @@ if (!GlobalThis.customElements.get("media-settings-menu-button")) {
|
|
|
4718
4718
|
);
|
|
4719
4719
|
}
|
|
4720
4720
|
|
|
4721
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4721
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu.js
|
|
4722
4722
|
var __accessCheck7 = (obj, member, msg) => {
|
|
4723
4723
|
if (!member.has(obj))
|
|
4724
4724
|
throw TypeError("Cannot " + msg);
|
|
@@ -4852,7 +4852,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu")) {
|
|
|
4852
4852
|
);
|
|
4853
4853
|
}
|
|
4854
4854
|
|
|
4855
|
-
// node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4855
|
+
// ../../node_modules/media-chrome/dist/menu/media-audio-track-menu-button.js
|
|
4856
4856
|
var audioTrackIcon = (
|
|
4857
4857
|
/*html*/
|
|
4858
4858
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -4929,7 +4929,7 @@ if (!GlobalThis.customElements.get("media-audio-track-menu-button")) {
|
|
|
4929
4929
|
);
|
|
4930
4930
|
}
|
|
4931
4931
|
|
|
4932
|
-
// node_modules/media-chrome/dist/utils/captions.js
|
|
4932
|
+
// ../../node_modules/media-chrome/dist/utils/captions.js
|
|
4933
4933
|
var splitTextTracksStr = (textTracksStr = "") => textTracksStr.split(/\s+/);
|
|
4934
4934
|
var parseTextTrackStr = (textTrackStr = "") => {
|
|
4935
4935
|
const [kind, language, encodedLabel] = textTrackStr.split(":");
|
|
@@ -4965,7 +4965,7 @@ var areSubsOn = (el) => {
|
|
|
4965
4965
|
return showingSubtitles;
|
|
4966
4966
|
};
|
|
4967
4967
|
|
|
4968
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4968
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu.js
|
|
4969
4969
|
var __accessCheck8 = (obj, member, msg) => {
|
|
4970
4970
|
if (!member.has(obj))
|
|
4971
4971
|
throw TypeError("Cannot " + msg);
|
|
@@ -5158,7 +5158,7 @@ if (!GlobalThis.customElements.get("media-captions-menu")) {
|
|
|
5158
5158
|
GlobalThis.customElements.define("media-captions-menu", MediaCaptionsMenu);
|
|
5159
5159
|
}
|
|
5160
5160
|
|
|
5161
|
-
// node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
5161
|
+
// ../../node_modules/media-chrome/dist/menu/media-captions-menu-button.js
|
|
5162
5162
|
var ccIconOn = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
5163
5163
|
<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"/>
|
|
5164
5164
|
</svg>`;
|
|
@@ -5281,7 +5281,7 @@ if (!GlobalThis.customElements.get("media-captions-menu-button")) {
|
|
|
5281
5281
|
);
|
|
5282
5282
|
}
|
|
5283
5283
|
|
|
5284
|
-
// node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
5284
|
+
// ../../node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
5285
5285
|
var __accessCheck9 = (obj, member, msg) => {
|
|
5286
5286
|
if (!member.has(obj))
|
|
5287
5287
|
throw TypeError("Cannot " + msg);
|
|
@@ -5394,7 +5394,7 @@ tokens_get = function() {
|
|
|
5394
5394
|
return __privateGet9(this, _tokenSet).size ? __privateGet9(this, _tokenSet) : __privateGet9(this, _defaultSet);
|
|
5395
5395
|
};
|
|
5396
5396
|
|
|
5397
|
-
// node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
5397
|
+
// ../../node_modules/media-chrome/dist/media-playback-rate-button.js
|
|
5398
5398
|
var __accessCheck10 = (obj, member, msg) => {
|
|
5399
5399
|
if (!member.has(obj))
|
|
5400
5400
|
throw TypeError("Cannot " + msg);
|
|
@@ -5518,7 +5518,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-button")) {
|
|
|
5518
5518
|
);
|
|
5519
5519
|
}
|
|
5520
5520
|
|
|
5521
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
5521
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu.js
|
|
5522
5522
|
var __accessCheck11 = (obj, member, msg) => {
|
|
5523
5523
|
if (!member.has(obj))
|
|
5524
5524
|
throw TypeError("Cannot " + msg);
|
|
@@ -5665,7 +5665,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu")) {
|
|
|
5665
5665
|
);
|
|
5666
5666
|
}
|
|
5667
5667
|
|
|
5668
|
-
// node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5668
|
+
// ../../node_modules/media-chrome/dist/menu/media-playback-rate-menu-button.js
|
|
5669
5669
|
var DEFAULT_RATE2 = 1;
|
|
5670
5670
|
function getSlotTemplateHTML6(attrs) {
|
|
5671
5671
|
return (
|
|
@@ -5748,7 +5748,7 @@ if (!GlobalThis.customElements.get("media-playback-rate-menu-button")) {
|
|
|
5748
5748
|
);
|
|
5749
5749
|
}
|
|
5750
5750
|
|
|
5751
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5751
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu.js
|
|
5752
5752
|
var __accessCheck12 = (obj, member, msg) => {
|
|
5753
5753
|
if (!member.has(obj))
|
|
5754
5754
|
throw TypeError("Cannot " + msg);
|
|
@@ -5791,7 +5791,8 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5791
5791
|
MediaUIAttributes.MEDIA_RENDITION_LIST,
|
|
5792
5792
|
MediaUIAttributes.MEDIA_RENDITION_SELECTED,
|
|
5793
5793
|
MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE,
|
|
5794
|
-
MediaUIAttributes.MEDIA_HEIGHT
|
|
5794
|
+
MediaUIAttributes.MEDIA_HEIGHT,
|
|
5795
|
+
MediaUIAttributes.MEDIA_WIDTH
|
|
5795
5796
|
];
|
|
5796
5797
|
}
|
|
5797
5798
|
static formatMenuItemText(text, rendition) {
|
|
@@ -5815,14 +5816,21 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5815
5816
|
}
|
|
5816
5817
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
5817
5818
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
5818
|
-
if (
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5819
|
+
if (oldValue !== newValue) {
|
|
5820
|
+
switch (attrName) {
|
|
5821
|
+
case MediaUIAttributes.MEDIA_RENDITION_SELECTED:
|
|
5822
|
+
this.value = newValue != null ? newValue : "auto";
|
|
5823
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5824
|
+
break;
|
|
5825
|
+
case MediaUIAttributes.MEDIA_RENDITION_LIST:
|
|
5826
|
+
__privateSet10(this, _renditionList, parseRenditionList(newValue));
|
|
5827
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5828
|
+
break;
|
|
5829
|
+
case MediaUIAttributes.MEDIA_HEIGHT:
|
|
5830
|
+
case MediaUIAttributes.MEDIA_WIDTH:
|
|
5831
|
+
__privateMethod8(this, _render4, render_fn4).call(this);
|
|
5832
|
+
break;
|
|
5833
|
+
}
|
|
5826
5834
|
}
|
|
5827
5835
|
}
|
|
5828
5836
|
connectedCallback() {
|
|
@@ -5865,6 +5873,12 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
|
|
|
5865
5873
|
set mediaHeight(height) {
|
|
5866
5874
|
setNumericAttr(this, MediaUIAttributes.MEDIA_HEIGHT, height);
|
|
5867
5875
|
}
|
|
5876
|
+
get mediaWidth() {
|
|
5877
|
+
return getNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH);
|
|
5878
|
+
}
|
|
5879
|
+
set mediaWidth(width) {
|
|
5880
|
+
setNumericAttr(this, MediaUIAttributes.MEDIA_WIDTH, width);
|
|
5881
|
+
}
|
|
5868
5882
|
compareRendition(a, b) {
|
|
5869
5883
|
const ctor = this.constructor;
|
|
5870
5884
|
return ctor.compareRendition(a, b);
|
|
@@ -5887,12 +5901,15 @@ _renditionList = /* @__PURE__ */ new WeakMap();
|
|
|
5887
5901
|
_prevState3 = /* @__PURE__ */ new WeakMap();
|
|
5888
5902
|
_render4 = /* @__PURE__ */ new WeakSet();
|
|
5889
5903
|
render_fn4 = function() {
|
|
5890
|
-
|
|
5904
|
+
const isAuto = !this.mediaRenditionSelected;
|
|
5905
|
+
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)
|
|
5891
5906
|
return;
|
|
5892
5907
|
__privateGet12(this, _prevState3).mediaRenditionList = JSON.stringify(
|
|
5893
5908
|
this.mediaRenditionList
|
|
5894
5909
|
);
|
|
5895
5910
|
__privateGet12(this, _prevState3).mediaHeight = this.mediaHeight;
|
|
5911
|
+
__privateGet12(this, _prevState3).mediaWidth = this.mediaWidth;
|
|
5912
|
+
__privateGet12(this, _prevState3).isAuto = isAuto;
|
|
5896
5913
|
const renditionList = this.mediaRenditionList.sort(
|
|
5897
5914
|
this.compareRendition.bind(this)
|
|
5898
5915
|
);
|
|
@@ -5903,7 +5920,6 @@ render_fn4 = function() {
|
|
|
5903
5920
|
rendition.selected = rendition === selectedRendition;
|
|
5904
5921
|
}
|
|
5905
5922
|
this.defaultSlot.textContent = "";
|
|
5906
|
-
const isAuto = !this.mediaRenditionSelected;
|
|
5907
5923
|
for (const rendition of renditionList) {
|
|
5908
5924
|
const text = this.formatRendition(rendition, {
|
|
5909
5925
|
showBitrate: this.showRenditionBitrate(rendition)
|
|
@@ -5918,15 +5934,22 @@ render_fn4 = function() {
|
|
|
5918
5934
|
this.defaultSlot.append(item2);
|
|
5919
5935
|
}
|
|
5920
5936
|
const showSelectedBitrate = selectedRendition && this.showRenditionBitrate(selectedRendition);
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
selectedRendition
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5937
|
+
let autoText = void 0;
|
|
5938
|
+
if (isAuto) {
|
|
5939
|
+
if (selectedRendition) {
|
|
5940
|
+
autoText = this.formatMenuItemText(
|
|
5941
|
+
`${t("Auto")} \u2022 ${this.formatRendition(selectedRendition, {
|
|
5942
|
+
showBitrate: showSelectedBitrate
|
|
5943
|
+
})}`,
|
|
5944
|
+
selectedRendition
|
|
5945
|
+
);
|
|
5946
|
+
} else if (this.mediaHeight > 0 && this.mediaWidth > 0) {
|
|
5947
|
+
autoText = this.formatMenuItemText(`${t("Auto")} (${Math.min(this.mediaWidth, this.mediaHeight)}p)`);
|
|
5948
|
+
}
|
|
5949
|
+
}
|
|
5950
|
+
if (!autoText) {
|
|
5951
|
+
autoText = this.formatMenuItemText(t("Auto"));
|
|
5952
|
+
}
|
|
5930
5953
|
const item = createMenuItem({
|
|
5931
5954
|
type: "radio",
|
|
5932
5955
|
text: autoText,
|
|
@@ -5955,7 +5978,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu")) {
|
|
|
5955
5978
|
GlobalThis.customElements.define("media-rendition-menu", MediaRenditionMenu);
|
|
5956
5979
|
}
|
|
5957
5980
|
|
|
5958
|
-
// node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5981
|
+
// ../../node_modules/media-chrome/dist/menu/media-rendition-menu-button.js
|
|
5959
5982
|
var renditionIcon = (
|
|
5960
5983
|
/*html*/
|
|
5961
5984
|
`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
@@ -6024,7 +6047,7 @@ if (!GlobalThis.customElements.get("media-rendition-menu-button")) {
|
|
|
6024
6047
|
);
|
|
6025
6048
|
}
|
|
6026
6049
|
|
|
6027
|
-
// node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
6050
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu.js
|
|
6028
6051
|
var __accessCheck13 = (obj, member, msg) => {
|
|
6029
6052
|
if (!member.has(obj))
|
|
6030
6053
|
throw TypeError("Cannot " + msg);
|
|
@@ -6210,7 +6233,7 @@ if (!GlobalThis.customElements.get("media-context-menu")) {
|
|
|
6210
6233
|
GlobalThis.customElements.define("media-context-menu", MediaContextMenu);
|
|
6211
6234
|
}
|
|
6212
6235
|
|
|
6213
|
-
// node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
6236
|
+
// ../../node_modules/media-chrome/dist/menu/media-context-menu-item.js
|
|
6214
6237
|
function getTemplateHTML9(_attrs) {
|
|
6215
6238
|
return (
|
|
6216
6239
|
/*html*/
|