@mux/mux-player 3.14.1-canary.2 → 3.14.1
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 +301 -299
- package/dist/base.mjs +1 -1
- package/dist/mux-player.js +312 -310
- package/dist/mux-player.mjs +312 -310
- package/dist/themes/classic/index.cjs.js +14 -1
- package/dist/themes/classic/index.js +14 -1
- package/dist/themes/classic/index.mjs +14 -1
- package/dist/themes/gerwig/index.cjs.js +14 -1
- package/dist/themes/gerwig/index.js +14 -1
- package/dist/themes/gerwig/index.mjs +14 -1
- package/dist/themes/microvideo/index.cjs.js +1083 -988
- package/dist/themes/microvideo/index.js +1083 -988
- package/dist/themes/microvideo/index.mjs +1083 -988
- package/dist/themes/minimal/index.cjs.js +1083 -988
- package/dist/themes/minimal/index.js +1083 -988
- package/dist/themes/minimal/index.mjs +1083 -988
- package/dist/themes/news/index.cjs.js +14 -1
- package/dist/themes/news/index.js +14 -1
- package/dist/themes/news/index.mjs +14 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -213,6 +213,16 @@ function isNumericString(str) {
|
|
|
213
213
|
return !isNaN(str) && !isNaN(parseFloat(str));
|
|
214
214
|
}
|
|
215
215
|
var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
216
|
+
var htmlEscapes = {
|
|
217
|
+
"&": "&",
|
|
218
|
+
"<": "<",
|
|
219
|
+
">": ">",
|
|
220
|
+
'"': """,
|
|
221
|
+
"'": "'"
|
|
222
|
+
};
|
|
223
|
+
function escapeHTML(value) {
|
|
224
|
+
return String(value).replace(/[&<>"']/g, (char) => htmlEscapes[char]);
|
|
225
|
+
}
|
|
216
226
|
|
|
217
227
|
// ../../node_modules/media-chrome/dist/lang/en.js
|
|
218
228
|
var En = {
|
|
@@ -1085,7 +1095,11 @@ function getTemplateHTML2(_attrs) {
|
|
|
1085
1095
|
|
|
1086
1096
|
${/* ::slotted([slot=poster]) doesn't work for slot fallback content so hide parent slot instead */
|
|
1087
1097
|
""}
|
|
1088
|
-
:
|
|
1098
|
+
${/* Hide the poster once playback started: played, or moved off 0 (e.g. seeked while paused).
|
|
1099
|
+
* The current time check only applies to on-demand media, since live streams start off 0. */
|
|
1100
|
+
""}
|
|
1101
|
+
:host(:not([${Attributes.AUDIO}])[${MediaUIAttributes.MEDIA_HAS_PLAYED}]) slot[name=poster],
|
|
1102
|
+
:host(:not([${Attributes.AUDIO}])[${MediaUIAttributes.MEDIA_STREAM_TYPE}="${StreamTypes.ON_DEMAND}"][${MediaUIAttributes.MEDIA_CURRENT_TIME}]:not([${MediaUIAttributes.MEDIA_CURRENT_TIME}="0"])) slot[name=poster] {
|
|
1089
1103
|
display: none;
|
|
1090
1104
|
}
|
|
1091
1105
|
|
|
@@ -1490,7 +1504,7 @@ if (!GlobalThis.customElements.get("media-container")) {
|
|
|
1490
1504
|
GlobalThis.customElements.define("media-container", MediaContainer);
|
|
1491
1505
|
}
|
|
1492
1506
|
|
|
1493
|
-
// ../../node_modules/media-chrome/dist/
|
|
1507
|
+
// ../../node_modules/media-chrome/dist/media-chrome-dialog.js
|
|
1494
1508
|
var __accessCheck3 = (obj, member, msg) => {
|
|
1495
1509
|
if (!member.has(obj))
|
|
1496
1510
|
throw TypeError("Cannot " + msg);
|
|
@@ -1509,152 +1523,659 @@ var __privateSet3 = (obj, member, value, setter) => {
|
|
|
1509
1523
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
1510
1524
|
return value;
|
|
1511
1525
|
};
|
|
1512
|
-
var
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
var
|
|
1517
|
-
var
|
|
1518
|
-
var
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1526
|
+
var __privateMethod2 = (obj, member, method) => {
|
|
1527
|
+
__accessCheck3(obj, member, "access private method");
|
|
1528
|
+
return method;
|
|
1529
|
+
};
|
|
1530
|
+
var _isInit;
|
|
1531
|
+
var _previouslyFocused;
|
|
1532
|
+
var _invokerElement;
|
|
1533
|
+
var _init;
|
|
1534
|
+
var init_fn;
|
|
1535
|
+
var _handleOpen;
|
|
1536
|
+
var handleOpen_fn;
|
|
1537
|
+
var _handleClosed;
|
|
1538
|
+
var handleClosed_fn;
|
|
1539
|
+
var _handleInvoke;
|
|
1540
|
+
var handleInvoke_fn;
|
|
1541
|
+
var _handleFocusOut;
|
|
1542
|
+
var handleFocusOut_fn;
|
|
1543
|
+
var _handleKeyDown;
|
|
1544
|
+
var handleKeyDown_fn;
|
|
1545
|
+
function getTemplateHTML3(_attrs) {
|
|
1546
|
+
return (
|
|
1547
|
+
/*html*/
|
|
1548
|
+
`
|
|
1549
|
+
<style>
|
|
1550
|
+
:host {
|
|
1551
|
+
font: var(--media-font,
|
|
1552
|
+
var(--media-font-weight, normal)
|
|
1553
|
+
var(--media-font-size, 14px) /
|
|
1554
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
1555
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
1556
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
1557
|
+
display: var(--media-dialog-display, inline-flex);
|
|
1558
|
+
justify-content: center;
|
|
1559
|
+
align-items: center;
|
|
1560
|
+
${/** The hide transition is defined below after a short delay. */
|
|
1561
|
+
""}
|
|
1562
|
+
transition-behavior: allow-discrete;
|
|
1563
|
+
visibility: hidden;
|
|
1564
|
+
opacity: 0;
|
|
1565
|
+
transform: translateY(2px) scale(.99);
|
|
1566
|
+
pointer-events: none;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
:host([open]) {
|
|
1570
|
+
transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
|
|
1571
|
+
visibility: visible;
|
|
1572
|
+
opacity: 1;
|
|
1573
|
+
transform: translateY(0) scale(1);
|
|
1574
|
+
pointer-events: auto;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
#content {
|
|
1578
|
+
display: flex;
|
|
1579
|
+
position: relative;
|
|
1580
|
+
box-sizing: border-box;
|
|
1581
|
+
width: min(320px, 100%);
|
|
1582
|
+
word-wrap: break-word;
|
|
1583
|
+
max-height: 100%;
|
|
1584
|
+
overflow: auto;
|
|
1585
|
+
text-align: center;
|
|
1586
|
+
line-height: 1.4;
|
|
1587
|
+
}
|
|
1588
|
+
</style>
|
|
1589
|
+
${this.getSlotTemplateHTML(_attrs)}
|
|
1590
|
+
`
|
|
1591
|
+
);
|
|
1592
|
+
}
|
|
1593
|
+
function getSlotTemplateHTML(_attrs) {
|
|
1594
|
+
return (
|
|
1595
|
+
/*html*/
|
|
1596
|
+
`
|
|
1597
|
+
<slot id="content"></slot>
|
|
1598
|
+
`
|
|
1599
|
+
);
|
|
1600
|
+
}
|
|
1601
|
+
var Attributes2 = {
|
|
1602
|
+
OPEN: "open",
|
|
1603
|
+
ANCHOR: "anchor"
|
|
1604
|
+
};
|
|
1605
|
+
var MediaChromeDialog = class extends GlobalThis.HTMLElement {
|
|
1606
|
+
constructor() {
|
|
1607
|
+
super();
|
|
1608
|
+
__privateAdd3(this, _init);
|
|
1609
|
+
__privateAdd3(this, _handleOpen);
|
|
1610
|
+
__privateAdd3(this, _handleClosed);
|
|
1611
|
+
__privateAdd3(this, _handleInvoke);
|
|
1612
|
+
__privateAdd3(this, _handleFocusOut);
|
|
1613
|
+
__privateAdd3(this, _handleKeyDown);
|
|
1614
|
+
__privateAdd3(this, _isInit, false);
|
|
1615
|
+
__privateAdd3(this, _previouslyFocused, null);
|
|
1616
|
+
__privateAdd3(this, _invokerElement, null);
|
|
1548
1617
|
}
|
|
1549
|
-
|
|
1550
|
-
return [
|
|
1618
|
+
static get observedAttributes() {
|
|
1619
|
+
return [Attributes2.OPEN, Attributes2.ANCHOR];
|
|
1551
1620
|
}
|
|
1552
|
-
|
|
1553
|
-
return
|
|
1621
|
+
get open() {
|
|
1622
|
+
return getBooleanAttr(this, Attributes2.OPEN);
|
|
1554
1623
|
}
|
|
1555
|
-
|
|
1556
|
-
|
|
1624
|
+
set open(value) {
|
|
1625
|
+
setBooleanAttr(this, Attributes2.OPEN, value);
|
|
1557
1626
|
}
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1627
|
+
handleEvent(event) {
|
|
1628
|
+
switch (event.type) {
|
|
1629
|
+
case "invoke":
|
|
1630
|
+
__privateMethod2(this, _handleInvoke, handleInvoke_fn).call(this, event);
|
|
1631
|
+
break;
|
|
1632
|
+
case "focusout":
|
|
1633
|
+
__privateMethod2(this, _handleFocusOut, handleFocusOut_fn).call(this, event);
|
|
1634
|
+
break;
|
|
1635
|
+
case "keydown":
|
|
1636
|
+
__privateMethod2(this, _handleKeyDown, handleKeyDown_fn).call(this, event);
|
|
1637
|
+
break;
|
|
1563
1638
|
}
|
|
1564
|
-
(_b2 = __privateGet3(this, _el)) == null ? void 0 : _b2.setAttribute(`${__privateGet3(this, _attr)}`, `${this.value}`);
|
|
1565
1639
|
}
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1640
|
+
connectedCallback() {
|
|
1641
|
+
__privateMethod2(this, _init, init_fn).call(this);
|
|
1642
|
+
if (!this.role) {
|
|
1643
|
+
this.role = "dialog";
|
|
1644
|
+
}
|
|
1645
|
+
this.addEventListener("invoke", this);
|
|
1646
|
+
this.addEventListener("focusout", this);
|
|
1647
|
+
this.addEventListener("keydown", this);
|
|
1570
1648
|
}
|
|
1571
|
-
|
|
1572
|
-
|
|
1649
|
+
disconnectedCallback() {
|
|
1650
|
+
this.removeEventListener("invoke", this);
|
|
1651
|
+
this.removeEventListener("focusout", this);
|
|
1652
|
+
this.removeEventListener("keydown", this);
|
|
1573
1653
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1654
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
1655
|
+
__privateMethod2(this, _init, init_fn).call(this);
|
|
1656
|
+
if (attrName === Attributes2.OPEN && newValue !== oldValue) {
|
|
1657
|
+
if (this.open) {
|
|
1658
|
+
__privateMethod2(this, _handleOpen, handleOpen_fn).call(this);
|
|
1579
1659
|
} else {
|
|
1580
|
-
this.
|
|
1581
|
-
return false;
|
|
1660
|
+
__privateMethod2(this, _handleClosed, handleClosed_fn).call(this);
|
|
1582
1661
|
}
|
|
1583
1662
|
}
|
|
1584
|
-
if (this.contains(token)) {
|
|
1585
|
-
this.remove(token);
|
|
1586
|
-
return false;
|
|
1587
|
-
}
|
|
1588
|
-
this.add(token);
|
|
1589
|
-
return true;
|
|
1590
1663
|
}
|
|
1591
|
-
|
|
1592
|
-
this
|
|
1593
|
-
this.
|
|
1594
|
-
|
|
1664
|
+
focus() {
|
|
1665
|
+
__privateSet3(this, _previouslyFocused, getActiveElement());
|
|
1666
|
+
const focusCancelled = !this.dispatchEvent(new Event("focus", { composed: true, cancelable: true }));
|
|
1667
|
+
const focusInCancelled = !this.dispatchEvent(new Event("focusin", { composed: true, bubbles: true, cancelable: true }));
|
|
1668
|
+
if (focusCancelled || focusInCancelled)
|
|
1669
|
+
return;
|
|
1670
|
+
const focusable = this.querySelector(
|
|
1671
|
+
'[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]'
|
|
1672
|
+
);
|
|
1673
|
+
focusable == null ? void 0 : focusable.focus();
|
|
1674
|
+
}
|
|
1675
|
+
get keysUsed() {
|
|
1676
|
+
return ["Escape", "Tab"];
|
|
1595
1677
|
}
|
|
1596
1678
|
};
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
};
|
|
1616
|
-
};
|
|
1617
|
-
var parseTextTracksStr = (textTracksStr = "", textTrackLikeObj = {}) => {
|
|
1618
|
-
return splitTextTracksStr(textTracksStr).map((textTrackStr) => {
|
|
1619
|
-
const textTrackObj = parseTextTrackStr(textTrackStr);
|
|
1620
|
-
return {
|
|
1621
|
-
...textTrackLikeObj,
|
|
1622
|
-
...textTrackObj
|
|
1623
|
-
};
|
|
1624
|
-
});
|
|
1625
|
-
};
|
|
1626
|
-
var parseTracks = (trackOrTracks) => {
|
|
1627
|
-
if (!trackOrTracks)
|
|
1628
|
-
return [];
|
|
1629
|
-
if (Array.isArray(trackOrTracks)) {
|
|
1630
|
-
return trackOrTracks.map((trackObjOrStr) => {
|
|
1631
|
-
if (typeof trackObjOrStr === "string") {
|
|
1632
|
-
return parseTextTrackStr(trackObjOrStr);
|
|
1633
|
-
}
|
|
1634
|
-
return trackObjOrStr;
|
|
1679
|
+
_isInit = /* @__PURE__ */ new WeakMap();
|
|
1680
|
+
_previouslyFocused = /* @__PURE__ */ new WeakMap();
|
|
1681
|
+
_invokerElement = /* @__PURE__ */ new WeakMap();
|
|
1682
|
+
_init = /* @__PURE__ */ new WeakSet();
|
|
1683
|
+
init_fn = function() {
|
|
1684
|
+
if (__privateGet3(this, _isInit))
|
|
1685
|
+
return;
|
|
1686
|
+
__privateSet3(this, _isInit, true);
|
|
1687
|
+
if (!this.shadowRoot) {
|
|
1688
|
+
this.attachShadow(this.constructor.shadowRootOptions);
|
|
1689
|
+
const attrs = namedNodeMapToObject(this.attributes);
|
|
1690
|
+
this.shadowRoot.innerHTML = this.constructor.getTemplateHTML(attrs);
|
|
1691
|
+
queueMicrotask(() => {
|
|
1692
|
+
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
1693
|
+
style.setProperty(
|
|
1694
|
+
"transition",
|
|
1695
|
+
`display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in`
|
|
1696
|
+
);
|
|
1635
1697
|
});
|
|
1636
1698
|
}
|
|
1637
|
-
if (typeof trackOrTracks === "string") {
|
|
1638
|
-
return parseTextTracksStr(trackOrTracks);
|
|
1639
|
-
}
|
|
1640
|
-
return [trackOrTracks];
|
|
1641
1699
|
};
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
)}
|
|
1700
|
+
_handleOpen = /* @__PURE__ */ new WeakSet();
|
|
1701
|
+
handleOpen_fn = function() {
|
|
1702
|
+
var _a3;
|
|
1703
|
+
(_a3 = __privateGet3(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "true");
|
|
1704
|
+
this.dispatchEvent(new Event("open", { composed: true, bubbles: true }));
|
|
1705
|
+
this.addEventListener("transitionend", () => this.focus(), { once: true });
|
|
1648
1706
|
};
|
|
1649
|
-
|
|
1650
|
-
|
|
1707
|
+
_handleClosed = /* @__PURE__ */ new WeakSet();
|
|
1708
|
+
handleClosed_fn = function() {
|
|
1709
|
+
var _a3;
|
|
1710
|
+
(_a3 = __privateGet3(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "false");
|
|
1711
|
+
this.dispatchEvent(new Event("close", { composed: true, bubbles: true }));
|
|
1651
1712
|
};
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1713
|
+
_handleInvoke = /* @__PURE__ */ new WeakSet();
|
|
1714
|
+
handleInvoke_fn = function(event) {
|
|
1715
|
+
__privateSet3(this, _invokerElement, event.relatedTarget);
|
|
1716
|
+
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
1717
|
+
this.open = !this.open;
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
_handleFocusOut = /* @__PURE__ */ new WeakSet();
|
|
1721
|
+
handleFocusOut_fn = function(event) {
|
|
1722
|
+
var _a3;
|
|
1723
|
+
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
1724
|
+
(_a3 = __privateGet3(this, _previouslyFocused)) == null ? void 0 : _a3.focus();
|
|
1725
|
+
if (__privateGet3(this, _invokerElement) && __privateGet3(this, _invokerElement) !== event.relatedTarget && this.open) {
|
|
1726
|
+
this.open = false;
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
};
|
|
1730
|
+
_handleKeyDown = /* @__PURE__ */ new WeakSet();
|
|
1731
|
+
handleKeyDown_fn = function(event) {
|
|
1732
|
+
var _a3, _b2, _c, _d, _e;
|
|
1733
|
+
const { key, ctrlKey, altKey, metaKey } = event;
|
|
1734
|
+
if (ctrlKey || altKey || metaKey) {
|
|
1735
|
+
return;
|
|
1736
|
+
}
|
|
1737
|
+
if (!this.keysUsed.includes(key)) {
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
event.preventDefault();
|
|
1741
|
+
event.stopPropagation();
|
|
1742
|
+
if (key === "Tab") {
|
|
1743
|
+
if (event.shiftKey) {
|
|
1744
|
+
(_b2 = (_a3 = this.previousElementSibling) == null ? void 0 : _a3.focus) == null ? void 0 : _b2.call(_a3);
|
|
1745
|
+
} else {
|
|
1746
|
+
(_d = (_c = this.nextElementSibling) == null ? void 0 : _c.focus) == null ? void 0 : _d.call(_c);
|
|
1747
|
+
}
|
|
1748
|
+
this.blur();
|
|
1749
|
+
} else if (key === "Escape") {
|
|
1750
|
+
(_e = __privateGet3(this, _previouslyFocused)) == null ? void 0 : _e.focus();
|
|
1751
|
+
this.open = false;
|
|
1752
|
+
}
|
|
1753
|
+
};
|
|
1754
|
+
MediaChromeDialog.shadowRootOptions = { mode: "open" };
|
|
1755
|
+
MediaChromeDialog.getTemplateHTML = getTemplateHTML3;
|
|
1756
|
+
MediaChromeDialog.getSlotTemplateHTML = getSlotTemplateHTML;
|
|
1757
|
+
if (!GlobalThis.customElements.get("media-chrome-dialog")) {
|
|
1758
|
+
GlobalThis.customElements.define("media-chrome-dialog", MediaChromeDialog);
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
// ../../node_modules/media-chrome/dist/media-keyboard-shortcuts-dialog.js
|
|
1762
|
+
var __accessCheck4 = (obj, member, msg) => {
|
|
1763
|
+
if (!member.has(obj))
|
|
1764
|
+
throw TypeError("Cannot " + msg);
|
|
1765
|
+
};
|
|
1766
|
+
var __privateGet4 = (obj, member, getter) => {
|
|
1767
|
+
__accessCheck4(obj, member, "read from private field");
|
|
1768
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
1769
|
+
};
|
|
1770
|
+
var __privateAdd4 = (obj, member, value) => {
|
|
1771
|
+
if (member.has(obj))
|
|
1772
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
1773
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
1774
|
+
};
|
|
1775
|
+
var _clickHandler;
|
|
1776
|
+
var _keyDownHandler;
|
|
1777
|
+
var Attributes3 = {
|
|
1778
|
+
HOTKEYS: "hotkeys"
|
|
1779
|
+
};
|
|
1780
|
+
var shortcuts = [
|
|
1781
|
+
{
|
|
1782
|
+
keys: [{ key: " ", label: "Space" }, { key: "k" }],
|
|
1783
|
+
description: "Toggle Playback"
|
|
1784
|
+
},
|
|
1785
|
+
{ keys: [{ key: "m" }], description: "Toggle mute" },
|
|
1786
|
+
{ keys: [{ key: "f" }], description: "Toggle fullscreen" },
|
|
1787
|
+
{
|
|
1788
|
+
keys: [{ key: "c" }],
|
|
1789
|
+
description: "Toggle captions or subtitles, if available"
|
|
1790
|
+
},
|
|
1791
|
+
{ keys: [{ key: "p" }], description: "Toggle Picture in Picture" },
|
|
1792
|
+
{
|
|
1793
|
+
keys: [{ key: "ArrowLeft", label: "\u2190" }, { key: "j" }],
|
|
1794
|
+
description: "Seek back 10s"
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
keys: [{ key: "ArrowRight", label: "\u2192" }, { key: "l" }],
|
|
1798
|
+
description: "Seek forward 10s"
|
|
1799
|
+
},
|
|
1800
|
+
{ keys: [{ key: "ArrowUp", label: "\u2191" }], description: "Turn volume up" },
|
|
1801
|
+
{ keys: [{ key: "ArrowDown", label: "\u2193" }], description: "Turn volume down" },
|
|
1802
|
+
{
|
|
1803
|
+
keys: [{ key: "<", label: "< (SHIFT+,)" }],
|
|
1804
|
+
description: "Decrease playback rate"
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
keys: [{ key: ">", label: "> (SHIFT+.)" }],
|
|
1808
|
+
description: "Increase playback rate"
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
keys: [{ key: "shift+/", label: "SHIFT+/" }],
|
|
1812
|
+
description: "Show keyboard shortcuts"
|
|
1813
|
+
}
|
|
1814
|
+
];
|
|
1815
|
+
function getHotkeyToken(key) {
|
|
1816
|
+
return key === " " ? "nospace" : `no${key.toLowerCase()}`;
|
|
1817
|
+
}
|
|
1818
|
+
function getEnabledShortcuts(hotkeys) {
|
|
1819
|
+
const disabled = new Set(hotkeys == null ? void 0 : hotkeys.split(/\s+/));
|
|
1820
|
+
return shortcuts.map(({ keys, description }) => ({
|
|
1821
|
+
keys: keys.filter(({ key }) => !disabled.has(getHotkeyToken(key))),
|
|
1822
|
+
description
|
|
1823
|
+
})).filter(({ keys }) => keys.length);
|
|
1824
|
+
}
|
|
1825
|
+
function getSlotTemplateHTML2(attrs) {
|
|
1826
|
+
return (
|
|
1827
|
+
/*html*/
|
|
1828
|
+
`
|
|
1829
|
+
<style>
|
|
1830
|
+
:host {
|
|
1831
|
+
position: fixed;
|
|
1832
|
+
top: 0;
|
|
1833
|
+
left: 0;
|
|
1834
|
+
z-index: 9999;
|
|
1835
|
+
background: rgb(20 20 30 / .8);
|
|
1836
|
+
backdrop-filter: blur(10px);
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
#content {
|
|
1840
|
+
display: block;
|
|
1841
|
+
width: clamp(400px, 40vw, 700px);
|
|
1842
|
+
max-width: 90vw;
|
|
1843
|
+
text-align: left;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
h2 {
|
|
1847
|
+
margin: 0 0 1.5rem 0;
|
|
1848
|
+
font-size: 1.5rem;
|
|
1849
|
+
font-weight: 500;
|
|
1850
|
+
text-align: center;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
.shortcuts-table {
|
|
1854
|
+
width: 100%;
|
|
1855
|
+
border-collapse: collapse;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
.shortcuts-table tr {
|
|
1859
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
.shortcuts-table tr:last-child {
|
|
1863
|
+
border-bottom: none;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
.shortcuts-table td {
|
|
1867
|
+
padding: 0.75rem 0.5rem;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
.shortcuts-table td:first-child {
|
|
1871
|
+
text-align: right;
|
|
1872
|
+
padding-right: 1rem;
|
|
1873
|
+
width: 40%;
|
|
1874
|
+
min-width: 120px;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
.shortcuts-table td:last-child {
|
|
1878
|
+
padding-left: 1rem;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
.key {
|
|
1882
|
+
display: inline-block;
|
|
1883
|
+
background: rgba(255, 255, 255, 0.15);
|
|
1884
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
1885
|
+
border-radius: 4px;
|
|
1886
|
+
padding: 0.25rem 0.5rem;
|
|
1887
|
+
font-family: 'Courier New', monospace;
|
|
1888
|
+
font-size: 0.9rem;
|
|
1889
|
+
font-weight: 500;
|
|
1890
|
+
min-width: 1.5rem;
|
|
1891
|
+
text-align: center;
|
|
1892
|
+
margin: 0 0.2rem;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
.description {
|
|
1896
|
+
color: rgba(255, 255, 255, 0.9);
|
|
1897
|
+
font-size: 0.95rem;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
.key-combo {
|
|
1901
|
+
display: flex;
|
|
1902
|
+
align-items: center;
|
|
1903
|
+
justify-content: flex-end;
|
|
1904
|
+
gap: 0.3rem;
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
.key-separator {
|
|
1908
|
+
color: rgba(255, 255, 255, 0.5);
|
|
1909
|
+
font-size: 0.9rem;
|
|
1910
|
+
}
|
|
1911
|
+
</style>
|
|
1912
|
+
<slot id="content">
|
|
1913
|
+
${formatKeyboardShortcuts(attrs[Attributes3.HOTKEYS])}
|
|
1914
|
+
</slot>
|
|
1915
|
+
`
|
|
1916
|
+
);
|
|
1917
|
+
}
|
|
1918
|
+
function formatKeyboardShortcuts(hotkeys) {
|
|
1919
|
+
const rows = getEnabledShortcuts(hotkeys).map(({ keys, description }) => {
|
|
1920
|
+
const keyCombo = keys.map(
|
|
1921
|
+
({ key, label = key }, index) => index > 0 ? `<span class="key-separator">or</span><span class="key">${label}</span>` : `<span class="key">${label}</span>`
|
|
1922
|
+
).join("");
|
|
1923
|
+
return `
|
|
1924
|
+
<tr>
|
|
1925
|
+
<td>
|
|
1926
|
+
<div class="key-combo">${keyCombo}</div>
|
|
1927
|
+
</td>
|
|
1928
|
+
<td class="description">${description}</td>
|
|
1929
|
+
</tr>
|
|
1930
|
+
`;
|
|
1931
|
+
}).join("");
|
|
1932
|
+
return `
|
|
1933
|
+
<h2>Keyboard Shortcuts</h2>
|
|
1934
|
+
<table class="shortcuts-table">${rows}</table>
|
|
1935
|
+
`;
|
|
1936
|
+
}
|
|
1937
|
+
var MediaKeyboardShortcutsDialog = class extends MediaChromeDialog {
|
|
1938
|
+
constructor() {
|
|
1939
|
+
super(...arguments);
|
|
1940
|
+
__privateAdd4(this, _clickHandler, (e) => {
|
|
1941
|
+
var _a3;
|
|
1942
|
+
if (!this.open)
|
|
1943
|
+
return;
|
|
1944
|
+
const content = (_a3 = this.shadowRoot) == null ? void 0 : _a3.querySelector("#content");
|
|
1945
|
+
if (!content)
|
|
1946
|
+
return;
|
|
1947
|
+
const path = e.composedPath();
|
|
1948
|
+
const isClickOnHost = path[0] === this || path.includes(this);
|
|
1949
|
+
const isClickInsideContent = path.includes(content);
|
|
1950
|
+
if (isClickOnHost && !isClickInsideContent) {
|
|
1951
|
+
this.open = false;
|
|
1952
|
+
}
|
|
1953
|
+
});
|
|
1954
|
+
__privateAdd4(this, _keyDownHandler, (e) => {
|
|
1955
|
+
if (!this.open)
|
|
1956
|
+
return;
|
|
1957
|
+
const isShiftSlash = e.shiftKey && (e.key === "/" || e.key === "?");
|
|
1958
|
+
if ((e.key === "Escape" || isShiftSlash) && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
|
1959
|
+
this.open = false;
|
|
1960
|
+
e.preventDefault();
|
|
1961
|
+
e.stopPropagation();
|
|
1962
|
+
}
|
|
1963
|
+
});
|
|
1964
|
+
}
|
|
1965
|
+
static get observedAttributes() {
|
|
1966
|
+
return [...super.observedAttributes, Attributes3.HOTKEYS];
|
|
1967
|
+
}
|
|
1968
|
+
get hotkeys() {
|
|
1969
|
+
var _a3;
|
|
1970
|
+
return (_a3 = getStringAttr(this, Attributes3.HOTKEYS)) != null ? _a3 : void 0;
|
|
1971
|
+
}
|
|
1972
|
+
set hotkeys(value) {
|
|
1973
|
+
setStringAttr(this, Attributes3.HOTKEYS, value);
|
|
1974
|
+
}
|
|
1975
|
+
connectedCallback() {
|
|
1976
|
+
super.connectedCallback();
|
|
1977
|
+
if (this.open) {
|
|
1978
|
+
this.addEventListener("click", __privateGet4(this, _clickHandler));
|
|
1979
|
+
document.addEventListener("keydown", __privateGet4(this, _keyDownHandler));
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
disconnectedCallback() {
|
|
1983
|
+
this.removeEventListener("click", __privateGet4(this, _clickHandler));
|
|
1984
|
+
document.removeEventListener("keydown", __privateGet4(this, _keyDownHandler));
|
|
1985
|
+
}
|
|
1986
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
1987
|
+
var _a3;
|
|
1988
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
1989
|
+
if (attrName === "open") {
|
|
1990
|
+
if (this.open) {
|
|
1991
|
+
this.addEventListener("click", __privateGet4(this, _clickHandler));
|
|
1992
|
+
document.addEventListener("keydown", __privateGet4(this, _keyDownHandler));
|
|
1993
|
+
} else {
|
|
1994
|
+
this.removeEventListener("click", __privateGet4(this, _clickHandler));
|
|
1995
|
+
document.removeEventListener("keydown", __privateGet4(this, _keyDownHandler));
|
|
1996
|
+
}
|
|
1997
|
+
} else if (attrName === Attributes3.HOTKEYS && newValue !== oldValue) {
|
|
1998
|
+
const content = (_a3 = this.shadowRoot) == null ? void 0 : _a3.querySelector("#content");
|
|
1999
|
+
if (content)
|
|
2000
|
+
content.innerHTML = formatKeyboardShortcuts(newValue);
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
};
|
|
2004
|
+
_clickHandler = /* @__PURE__ */ new WeakMap();
|
|
2005
|
+
_keyDownHandler = /* @__PURE__ */ new WeakMap();
|
|
2006
|
+
MediaKeyboardShortcutsDialog.getSlotTemplateHTML = getSlotTemplateHTML2;
|
|
2007
|
+
if (!GlobalThis.customElements.get("media-keyboard-shortcuts-dialog")) {
|
|
2008
|
+
GlobalThis.customElements.define(
|
|
2009
|
+
"media-keyboard-shortcuts-dialog",
|
|
2010
|
+
MediaKeyboardShortcutsDialog
|
|
2011
|
+
);
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
// ../../node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
2015
|
+
var __accessCheck5 = (obj, member, msg) => {
|
|
2016
|
+
if (!member.has(obj))
|
|
2017
|
+
throw TypeError("Cannot " + msg);
|
|
2018
|
+
};
|
|
2019
|
+
var __privateGet5 = (obj, member, getter) => {
|
|
2020
|
+
__accessCheck5(obj, member, "read from private field");
|
|
2021
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
2022
|
+
};
|
|
2023
|
+
var __privateAdd5 = (obj, member, value) => {
|
|
2024
|
+
if (member.has(obj))
|
|
2025
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
2026
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
2027
|
+
};
|
|
2028
|
+
var __privateSet4 = (obj, member, value, setter) => {
|
|
2029
|
+
__accessCheck5(obj, member, "write to private field");
|
|
2030
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
2031
|
+
return value;
|
|
2032
|
+
};
|
|
2033
|
+
var _el;
|
|
2034
|
+
var _attr;
|
|
2035
|
+
var _defaultSet;
|
|
2036
|
+
var _tokenSet;
|
|
2037
|
+
var _tokens;
|
|
2038
|
+
var tokens_get;
|
|
2039
|
+
var AttributeTokenList = class {
|
|
2040
|
+
constructor(el, attr, { defaultValue } = { defaultValue: void 0 }) {
|
|
2041
|
+
__privateAdd5(this, _tokens);
|
|
2042
|
+
__privateAdd5(this, _el, void 0);
|
|
2043
|
+
__privateAdd5(this, _attr, void 0);
|
|
2044
|
+
__privateAdd5(this, _defaultSet, void 0);
|
|
2045
|
+
__privateAdd5(this, _tokenSet, /* @__PURE__ */ new Set());
|
|
2046
|
+
__privateSet4(this, _el, el);
|
|
2047
|
+
__privateSet4(this, _attr, attr);
|
|
2048
|
+
__privateSet4(this, _defaultSet, new Set(defaultValue));
|
|
2049
|
+
}
|
|
2050
|
+
[Symbol.iterator]() {
|
|
2051
|
+
return __privateGet5(this, _tokens, tokens_get).values();
|
|
2052
|
+
}
|
|
2053
|
+
get length() {
|
|
2054
|
+
return __privateGet5(this, _tokens, tokens_get).size;
|
|
2055
|
+
}
|
|
2056
|
+
get value() {
|
|
2057
|
+
var _a3;
|
|
2058
|
+
return (_a3 = [...__privateGet5(this, _tokens, tokens_get)].join(" ")) != null ? _a3 : "";
|
|
2059
|
+
}
|
|
2060
|
+
set value(val) {
|
|
2061
|
+
var _a3;
|
|
2062
|
+
if (val === this.value)
|
|
2063
|
+
return;
|
|
2064
|
+
__privateSet4(this, _tokenSet, /* @__PURE__ */ new Set());
|
|
2065
|
+
this.add(...(_a3 = val == null ? void 0 : val.split(" ")) != null ? _a3 : []);
|
|
2066
|
+
}
|
|
2067
|
+
toString() {
|
|
2068
|
+
return this.value;
|
|
2069
|
+
}
|
|
2070
|
+
item(index) {
|
|
2071
|
+
return [...__privateGet5(this, _tokens, tokens_get)][index];
|
|
2072
|
+
}
|
|
2073
|
+
values() {
|
|
2074
|
+
return __privateGet5(this, _tokens, tokens_get).values();
|
|
2075
|
+
}
|
|
2076
|
+
forEach(callback, thisArg) {
|
|
2077
|
+
__privateGet5(this, _tokens, tokens_get).forEach(callback, thisArg);
|
|
2078
|
+
}
|
|
2079
|
+
add(...tokens) {
|
|
2080
|
+
var _a3, _b2;
|
|
2081
|
+
tokens.forEach((t2) => __privateGet5(this, _tokenSet).add(t2));
|
|
2082
|
+
if (this.value === "" && !((_a3 = __privateGet5(this, _el)) == null ? void 0 : _a3.hasAttribute(`${__privateGet5(this, _attr)}`))) {
|
|
2083
|
+
return;
|
|
2084
|
+
}
|
|
2085
|
+
(_b2 = __privateGet5(this, _el)) == null ? void 0 : _b2.setAttribute(`${__privateGet5(this, _attr)}`, `${this.value}`);
|
|
2086
|
+
}
|
|
2087
|
+
remove(...tokens) {
|
|
2088
|
+
var _a3;
|
|
2089
|
+
tokens.forEach((t2) => __privateGet5(this, _tokenSet).delete(t2));
|
|
2090
|
+
(_a3 = __privateGet5(this, _el)) == null ? void 0 : _a3.setAttribute(`${__privateGet5(this, _attr)}`, `${this.value}`);
|
|
2091
|
+
}
|
|
2092
|
+
contains(token) {
|
|
2093
|
+
return __privateGet5(this, _tokens, tokens_get).has(token);
|
|
2094
|
+
}
|
|
2095
|
+
toggle(token, force) {
|
|
2096
|
+
if (typeof force !== "undefined") {
|
|
2097
|
+
if (force) {
|
|
2098
|
+
this.add(token);
|
|
2099
|
+
return true;
|
|
2100
|
+
} else {
|
|
2101
|
+
this.remove(token);
|
|
2102
|
+
return false;
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
if (this.contains(token)) {
|
|
2106
|
+
this.remove(token);
|
|
2107
|
+
return false;
|
|
2108
|
+
}
|
|
2109
|
+
this.add(token);
|
|
2110
|
+
return true;
|
|
2111
|
+
}
|
|
2112
|
+
replace(oldToken, newToken) {
|
|
2113
|
+
this.remove(oldToken);
|
|
2114
|
+
this.add(newToken);
|
|
2115
|
+
return oldToken === newToken;
|
|
2116
|
+
}
|
|
2117
|
+
};
|
|
2118
|
+
_el = /* @__PURE__ */ new WeakMap();
|
|
2119
|
+
_attr = /* @__PURE__ */ new WeakMap();
|
|
2120
|
+
_defaultSet = /* @__PURE__ */ new WeakMap();
|
|
2121
|
+
_tokenSet = /* @__PURE__ */ new WeakMap();
|
|
2122
|
+
_tokens = /* @__PURE__ */ new WeakSet();
|
|
2123
|
+
tokens_get = function() {
|
|
2124
|
+
return __privateGet5(this, _tokenSet).size ? __privateGet5(this, _tokenSet) : __privateGet5(this, _defaultSet);
|
|
2125
|
+
};
|
|
2126
|
+
|
|
2127
|
+
// ../../node_modules/media-chrome/dist/utils/captions.js
|
|
2128
|
+
var splitTextTracksStr = (textTracksStr = "") => textTracksStr.split(/\s+/);
|
|
2129
|
+
var parseTextTrackStr = (textTrackStr = "") => {
|
|
2130
|
+
const [kind, language, encodedLabel] = textTrackStr.split(":");
|
|
2131
|
+
const label = encodedLabel ? decodeURIComponent(encodedLabel) : void 0;
|
|
2132
|
+
return {
|
|
2133
|
+
kind: kind === "cc" ? TextTrackKinds.CAPTIONS : TextTrackKinds.SUBTITLES,
|
|
2134
|
+
language,
|
|
2135
|
+
label
|
|
2136
|
+
};
|
|
2137
|
+
};
|
|
2138
|
+
var parseTextTracksStr = (textTracksStr = "", textTrackLikeObj = {}) => {
|
|
2139
|
+
return splitTextTracksStr(textTracksStr).map((textTrackStr) => {
|
|
2140
|
+
const textTrackObj = parseTextTrackStr(textTrackStr);
|
|
2141
|
+
return {
|
|
2142
|
+
...textTrackLikeObj,
|
|
2143
|
+
...textTrackObj
|
|
2144
|
+
};
|
|
2145
|
+
});
|
|
2146
|
+
};
|
|
2147
|
+
var parseTracks = (trackOrTracks) => {
|
|
2148
|
+
if (!trackOrTracks)
|
|
2149
|
+
return [];
|
|
2150
|
+
if (Array.isArray(trackOrTracks)) {
|
|
2151
|
+
return trackOrTracks.map((trackObjOrStr) => {
|
|
2152
|
+
if (typeof trackObjOrStr === "string") {
|
|
2153
|
+
return parseTextTrackStr(trackObjOrStr);
|
|
2154
|
+
}
|
|
2155
|
+
return trackObjOrStr;
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
if (typeof trackOrTracks === "string") {
|
|
2159
|
+
return parseTextTracksStr(trackOrTracks);
|
|
2160
|
+
}
|
|
2161
|
+
return [trackOrTracks];
|
|
2162
|
+
};
|
|
2163
|
+
var formatTextTrackObj = ({ kind, label, language } = { kind: "subtitles" }) => {
|
|
2164
|
+
if (!label)
|
|
2165
|
+
return language;
|
|
2166
|
+
return `${kind === "captions" ? "cc" : "sb"}:${language}:${encodeURIComponent(
|
|
2167
|
+
label
|
|
2168
|
+
)}`;
|
|
2169
|
+
};
|
|
2170
|
+
var stringifyTextTrackList = (textTracks = []) => {
|
|
2171
|
+
return Array.prototype.map.call(textTracks, formatTextTrackObj).join(" ");
|
|
2172
|
+
};
|
|
2173
|
+
var isMatchingPropOf = (key, value) => (obj) => obj[key] === value;
|
|
2174
|
+
var textTrackObjAsPred = (filterObj) => {
|
|
2175
|
+
const preds = Object.entries(filterObj).map(([key, value]) => {
|
|
2176
|
+
return isMatchingPropOf(key, value);
|
|
2177
|
+
});
|
|
2178
|
+
return (textTrack) => preds.every((pred) => pred(textTrack));
|
|
1658
2179
|
};
|
|
1659
2180
|
var updateTracksModeTo = (mode, tracks = [], tracksToUpdate = []) => {
|
|
1660
2181
|
const preds = parseTracks(tracksToUpdate).map(textTrackObjAsPred);
|
|
@@ -3256,26 +3777,26 @@ var createMediaStore = ({
|
|
|
3256
3777
|
};
|
|
3257
3778
|
|
|
3258
3779
|
// ../../node_modules/media-chrome/dist/media-controller.js
|
|
3259
|
-
var
|
|
3780
|
+
var __accessCheck6 = (obj, member, msg) => {
|
|
3260
3781
|
if (!member.has(obj))
|
|
3261
3782
|
throw TypeError("Cannot " + msg);
|
|
3262
3783
|
};
|
|
3263
|
-
var
|
|
3264
|
-
|
|
3784
|
+
var __privateGet6 = (obj, member, getter) => {
|
|
3785
|
+
__accessCheck6(obj, member, "read from private field");
|
|
3265
3786
|
return getter ? getter.call(obj) : member.get(obj);
|
|
3266
3787
|
};
|
|
3267
|
-
var
|
|
3788
|
+
var __privateAdd6 = (obj, member, value) => {
|
|
3268
3789
|
if (member.has(obj))
|
|
3269
3790
|
throw TypeError("Cannot add the same private member more than once");
|
|
3270
3791
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
3271
3792
|
};
|
|
3272
|
-
var
|
|
3273
|
-
|
|
3793
|
+
var __privateSet5 = (obj, member, value, setter) => {
|
|
3794
|
+
__accessCheck6(obj, member, "write to private field");
|
|
3274
3795
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
3275
3796
|
return value;
|
|
3276
3797
|
};
|
|
3277
|
-
var
|
|
3278
|
-
|
|
3798
|
+
var __privateMethod3 = (obj, member, method) => {
|
|
3799
|
+
__accessCheck6(obj, member, "access private method");
|
|
3279
3800
|
return method;
|
|
3280
3801
|
};
|
|
3281
3802
|
var _hotKeys;
|
|
@@ -3289,8 +3810,10 @@ var _subtitlesState;
|
|
|
3289
3810
|
var _setupDefaultStore;
|
|
3290
3811
|
var setupDefaultStore_fn;
|
|
3291
3812
|
var _keyUpHandler;
|
|
3292
|
-
var
|
|
3813
|
+
var _keyDownHandler2;
|
|
3293
3814
|
var keyDownHandler_fn;
|
|
3815
|
+
var _syncKeyboardShortcutsDialog;
|
|
3816
|
+
var syncKeyboardShortcutsDialog_fn;
|
|
3294
3817
|
var _showKeyboardShortcutsDialog;
|
|
3295
3818
|
var showKeyboardShortcutsDialog_fn;
|
|
3296
3819
|
var ButtonPressedKeys = [
|
|
@@ -3315,7 +3838,7 @@ var DEFAULT_VOLUME_STEP = 0.025;
|
|
|
3315
3838
|
var DEFAULT_PLAYBACK_RATE_STEP = 0.25;
|
|
3316
3839
|
var MIN_PLAYBACK_RATE = 0.25;
|
|
3317
3840
|
var MAX_PLAYBACK_RATE = 2;
|
|
3318
|
-
var
|
|
3841
|
+
var Attributes4 = {
|
|
3319
3842
|
DEFAULT_SUBTITLES: "defaultsubtitles",
|
|
3320
3843
|
DEFAULT_STREAM_TYPE: "defaultstreamtype",
|
|
3321
3844
|
DEFAULT_DURATION: "defaultduration",
|
|
@@ -3340,35 +3863,36 @@ var Attributes2 = {
|
|
|
3340
3863
|
var MediaController = class extends MediaContainer {
|
|
3341
3864
|
constructor() {
|
|
3342
3865
|
super();
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3866
|
+
__privateAdd6(this, _setupDefaultStore);
|
|
3867
|
+
__privateAdd6(this, _keyDownHandler2);
|
|
3868
|
+
__privateAdd6(this, _syncKeyboardShortcutsDialog);
|
|
3869
|
+
__privateAdd6(this, _showKeyboardShortcutsDialog);
|
|
3346
3870
|
this.mediaStateReceivers = [];
|
|
3347
3871
|
this.associatedElementSubscriptions = /* @__PURE__ */ new Map();
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3872
|
+
__privateAdd6(this, _hotKeys, new AttributeTokenList(this, Attributes4.HOTKEYS));
|
|
3873
|
+
__privateAdd6(this, _fullscreenElement, void 0);
|
|
3874
|
+
__privateAdd6(this, _mediaStore, void 0);
|
|
3875
|
+
__privateAdd6(this, _keyboardShortcutsDialog, null);
|
|
3876
|
+
__privateAdd6(this, _mediaStateCallback, void 0);
|
|
3877
|
+
__privateAdd6(this, _mediaStoreUnsubscribe, void 0);
|
|
3878
|
+
__privateAdd6(this, _mediaStateEventHandler, (event) => {
|
|
3355
3879
|
var _a3;
|
|
3356
|
-
(_a3 =
|
|
3880
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch(event);
|
|
3357
3881
|
});
|
|
3358
|
-
|
|
3359
|
-
|
|
3882
|
+
__privateAdd6(this, _subtitlesState, void 0);
|
|
3883
|
+
__privateAdd6(this, _keyUpHandler, (e) => {
|
|
3360
3884
|
const { key, shiftKey } = e;
|
|
3361
3885
|
const isShiftSlash = shiftKey && (key === "/" || key === "?");
|
|
3362
3886
|
const shouldHandle = isShiftSlash || ButtonPressedKeys.includes(key);
|
|
3363
3887
|
if (!shouldHandle) {
|
|
3364
|
-
this.removeEventListener("keyup",
|
|
3888
|
+
this.removeEventListener("keyup", __privateGet6(this, _keyUpHandler));
|
|
3365
3889
|
return;
|
|
3366
3890
|
}
|
|
3367
3891
|
this.keyboardShortcutHandler(e);
|
|
3368
3892
|
});
|
|
3369
3893
|
this.associateElement(this);
|
|
3370
3894
|
let prevState = {};
|
|
3371
|
-
|
|
3895
|
+
__privateSet5(this, _mediaStateCallback, (nextState) => {
|
|
3372
3896
|
Object.entries(nextState).forEach(([stateName, stateValue]) => {
|
|
3373
3897
|
if (stateName in prevState && prevState[stateName] === stateValue)
|
|
3374
3898
|
return;
|
|
@@ -3385,118 +3909,118 @@ var MediaController = class extends MediaContainer {
|
|
|
3385
3909
|
}
|
|
3386
3910
|
static get observedAttributes() {
|
|
3387
3911
|
return super.observedAttributes.concat(
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3912
|
+
Attributes4.NO_HOTKEYS,
|
|
3913
|
+
Attributes4.HOTKEYS,
|
|
3914
|
+
Attributes4.DEFAULT_STREAM_TYPE,
|
|
3915
|
+
Attributes4.DEFAULT_SUBTITLES,
|
|
3916
|
+
Attributes4.DEFAULT_DURATION,
|
|
3917
|
+
Attributes4.NO_MUTED_PREF,
|
|
3918
|
+
Attributes4.NO_VOLUME_PREF,
|
|
3919
|
+
Attributes4.LANG,
|
|
3920
|
+
Attributes4.LOOP,
|
|
3921
|
+
Attributes4.LIVE_EDGE_OFFSET,
|
|
3922
|
+
Attributes4.SEEK_TO_LIVE_OFFSET,
|
|
3923
|
+
Attributes4.NO_AUTO_SEEK_TO_LIVE
|
|
3400
3924
|
);
|
|
3401
3925
|
}
|
|
3402
3926
|
get mediaStore() {
|
|
3403
|
-
return
|
|
3927
|
+
return __privateGet6(this, _mediaStore);
|
|
3404
3928
|
}
|
|
3405
3929
|
set mediaStore(value) {
|
|
3406
3930
|
var _a3, _b2;
|
|
3407
|
-
if (
|
|
3408
|
-
(_a3 =
|
|
3409
|
-
|
|
3931
|
+
if (__privateGet6(this, _mediaStore)) {
|
|
3932
|
+
(_a3 = __privateGet6(this, _mediaStoreUnsubscribe)) == null ? void 0 : _a3.call(this);
|
|
3933
|
+
__privateSet5(this, _mediaStoreUnsubscribe, void 0);
|
|
3410
3934
|
}
|
|
3411
|
-
|
|
3412
|
-
if (!
|
|
3413
|
-
|
|
3935
|
+
__privateSet5(this, _mediaStore, value);
|
|
3936
|
+
if (!__privateGet6(this, _mediaStore) && !this.hasAttribute(Attributes4.NO_DEFAULT_STORE)) {
|
|
3937
|
+
__privateMethod3(this, _setupDefaultStore, setupDefaultStore_fn).call(this);
|
|
3414
3938
|
return;
|
|
3415
3939
|
}
|
|
3416
|
-
|
|
3417
|
-
|
|
3940
|
+
__privateSet5(this, _mediaStoreUnsubscribe, (_b2 = __privateGet6(this, _mediaStore)) == null ? void 0 : _b2.subscribe(
|
|
3941
|
+
__privateGet6(this, _mediaStateCallback)
|
|
3418
3942
|
));
|
|
3419
3943
|
}
|
|
3420
3944
|
get fullscreenElement() {
|
|
3421
3945
|
var _a3;
|
|
3422
|
-
return (_a3 =
|
|
3946
|
+
return (_a3 = __privateGet6(this, _fullscreenElement)) != null ? _a3 : this;
|
|
3423
3947
|
}
|
|
3424
3948
|
set fullscreenElement(element) {
|
|
3425
3949
|
var _a3;
|
|
3426
|
-
if (this.hasAttribute(
|
|
3427
|
-
this.removeAttribute(
|
|
3950
|
+
if (this.hasAttribute(Attributes4.FULLSCREEN_ELEMENT)) {
|
|
3951
|
+
this.removeAttribute(Attributes4.FULLSCREEN_ELEMENT);
|
|
3428
3952
|
}
|
|
3429
|
-
|
|
3430
|
-
(_a3 =
|
|
3953
|
+
__privateSet5(this, _fullscreenElement, element);
|
|
3954
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3431
3955
|
type: "fullscreenelementchangerequest",
|
|
3432
3956
|
detail: this.fullscreenElement
|
|
3433
3957
|
});
|
|
3434
3958
|
}
|
|
3435
3959
|
get defaultSubtitles() {
|
|
3436
|
-
return getBooleanAttr(this,
|
|
3960
|
+
return getBooleanAttr(this, Attributes4.DEFAULT_SUBTITLES);
|
|
3437
3961
|
}
|
|
3438
3962
|
set defaultSubtitles(value) {
|
|
3439
|
-
setBooleanAttr(this,
|
|
3963
|
+
setBooleanAttr(this, Attributes4.DEFAULT_SUBTITLES, value);
|
|
3440
3964
|
}
|
|
3441
3965
|
get defaultStreamType() {
|
|
3442
|
-
return getStringAttr(this,
|
|
3966
|
+
return getStringAttr(this, Attributes4.DEFAULT_STREAM_TYPE);
|
|
3443
3967
|
}
|
|
3444
3968
|
set defaultStreamType(value) {
|
|
3445
|
-
setStringAttr(this,
|
|
3969
|
+
setStringAttr(this, Attributes4.DEFAULT_STREAM_TYPE, value);
|
|
3446
3970
|
}
|
|
3447
3971
|
get defaultDuration() {
|
|
3448
|
-
return getNumericAttr(this,
|
|
3972
|
+
return getNumericAttr(this, Attributes4.DEFAULT_DURATION);
|
|
3449
3973
|
}
|
|
3450
3974
|
set defaultDuration(value) {
|
|
3451
|
-
setNumericAttr(this,
|
|
3975
|
+
setNumericAttr(this, Attributes4.DEFAULT_DURATION, value);
|
|
3452
3976
|
}
|
|
3453
3977
|
get noHotkeys() {
|
|
3454
|
-
return getBooleanAttr(this,
|
|
3978
|
+
return getBooleanAttr(this, Attributes4.NO_HOTKEYS);
|
|
3455
3979
|
}
|
|
3456
3980
|
set noHotkeys(value) {
|
|
3457
|
-
setBooleanAttr(this,
|
|
3981
|
+
setBooleanAttr(this, Attributes4.NO_HOTKEYS, value);
|
|
3458
3982
|
}
|
|
3459
3983
|
get keysUsed() {
|
|
3460
|
-
return getStringAttr(this,
|
|
3984
|
+
return getStringAttr(this, Attributes4.KEYS_USED);
|
|
3461
3985
|
}
|
|
3462
3986
|
set keysUsed(value) {
|
|
3463
|
-
setStringAttr(this,
|
|
3987
|
+
setStringAttr(this, Attributes4.KEYS_USED, value);
|
|
3464
3988
|
}
|
|
3465
3989
|
get liveEdgeOffset() {
|
|
3466
|
-
return getNumericAttr(this,
|
|
3990
|
+
return getNumericAttr(this, Attributes4.LIVE_EDGE_OFFSET);
|
|
3467
3991
|
}
|
|
3468
3992
|
set liveEdgeOffset(value) {
|
|
3469
|
-
setNumericAttr(this,
|
|
3993
|
+
setNumericAttr(this, Attributes4.LIVE_EDGE_OFFSET, value);
|
|
3470
3994
|
}
|
|
3471
3995
|
get noAutoSeekToLive() {
|
|
3472
|
-
return getBooleanAttr(this,
|
|
3996
|
+
return getBooleanAttr(this, Attributes4.NO_AUTO_SEEK_TO_LIVE);
|
|
3473
3997
|
}
|
|
3474
3998
|
set noAutoSeekToLive(value) {
|
|
3475
|
-
setBooleanAttr(this,
|
|
3999
|
+
setBooleanAttr(this, Attributes4.NO_AUTO_SEEK_TO_LIVE, value);
|
|
3476
4000
|
}
|
|
3477
4001
|
get noVolumePref() {
|
|
3478
|
-
return getBooleanAttr(this,
|
|
4002
|
+
return getBooleanAttr(this, Attributes4.NO_VOLUME_PREF);
|
|
3479
4003
|
}
|
|
3480
4004
|
set noVolumePref(value) {
|
|
3481
|
-
setBooleanAttr(this,
|
|
4005
|
+
setBooleanAttr(this, Attributes4.NO_VOLUME_PREF, value);
|
|
3482
4006
|
}
|
|
3483
4007
|
get noMutedPref() {
|
|
3484
|
-
return getBooleanAttr(this,
|
|
4008
|
+
return getBooleanAttr(this, Attributes4.NO_MUTED_PREF);
|
|
3485
4009
|
}
|
|
3486
4010
|
set noMutedPref(value) {
|
|
3487
|
-
setBooleanAttr(this,
|
|
4011
|
+
setBooleanAttr(this, Attributes4.NO_MUTED_PREF, value);
|
|
3488
4012
|
}
|
|
3489
4013
|
get noSubtitlesLangPref() {
|
|
3490
|
-
return getBooleanAttr(this,
|
|
4014
|
+
return getBooleanAttr(this, Attributes4.NO_SUBTITLES_LANG_PREF);
|
|
3491
4015
|
}
|
|
3492
4016
|
set noSubtitlesLangPref(value) {
|
|
3493
|
-
setBooleanAttr(this,
|
|
4017
|
+
setBooleanAttr(this, Attributes4.NO_SUBTITLES_LANG_PREF, value);
|
|
3494
4018
|
}
|
|
3495
4019
|
get noDefaultStore() {
|
|
3496
|
-
return getBooleanAttr(this,
|
|
4020
|
+
return getBooleanAttr(this, Attributes4.NO_DEFAULT_STORE);
|
|
3497
4021
|
}
|
|
3498
4022
|
set noDefaultStore(value) {
|
|
3499
|
-
setBooleanAttr(this,
|
|
4023
|
+
setBooleanAttr(this, Attributes4.NO_DEFAULT_STORE, value);
|
|
3500
4024
|
}
|
|
3501
4025
|
get resolvedLang() {
|
|
3502
4026
|
return getResolvedLanguage();
|
|
@@ -3504,9 +4028,9 @@ var MediaController = class extends MediaContainer {
|
|
|
3504
4028
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
3505
4029
|
var _a3, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
3506
4030
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
3507
|
-
if (attrName ===
|
|
4031
|
+
if (attrName === Attributes4.NO_HOTKEYS) {
|
|
3508
4032
|
if (newValue !== oldValue && newValue === "") {
|
|
3509
|
-
if (this.hasAttribute(
|
|
4033
|
+
if (this.hasAttribute(Attributes4.HOTKEYS)) {
|
|
3510
4034
|
console.warn(
|
|
3511
4035
|
"Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."
|
|
3512
4036
|
);
|
|
@@ -3515,78 +4039,80 @@ var MediaController = class extends MediaContainer {
|
|
|
3515
4039
|
} else if (newValue !== oldValue && newValue === null) {
|
|
3516
4040
|
this.enableHotkeys();
|
|
3517
4041
|
}
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
(
|
|
4042
|
+
__privateMethod3(this, _syncKeyboardShortcutsDialog, syncKeyboardShortcutsDialog_fn).call(this);
|
|
4043
|
+
} else if (attrName === Attributes4.HOTKEYS) {
|
|
4044
|
+
__privateGet6(this, _hotKeys).value = newValue;
|
|
4045
|
+
__privateMethod3(this, _syncKeyboardShortcutsDialog, syncKeyboardShortcutsDialog_fn).call(this);
|
|
4046
|
+
} else if (attrName === Attributes4.DEFAULT_SUBTITLES && newValue !== oldValue) {
|
|
4047
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3522
4048
|
type: "optionschangerequest",
|
|
3523
4049
|
detail: {
|
|
3524
|
-
defaultSubtitles: this.hasAttribute(
|
|
4050
|
+
defaultSubtitles: this.hasAttribute(Attributes4.DEFAULT_SUBTITLES)
|
|
3525
4051
|
}
|
|
3526
4052
|
});
|
|
3527
|
-
} else if (attrName ===
|
|
3528
|
-
(_c =
|
|
4053
|
+
} else if (attrName === Attributes4.DEFAULT_STREAM_TYPE) {
|
|
4054
|
+
(_c = __privateGet6(this, _mediaStore)) == null ? void 0 : _c.dispatch({
|
|
3529
4055
|
type: "optionschangerequest",
|
|
3530
4056
|
detail: {
|
|
3531
|
-
defaultStreamType: (_b2 = this.getAttribute(
|
|
4057
|
+
defaultStreamType: (_b2 = this.getAttribute(Attributes4.DEFAULT_STREAM_TYPE)) != null ? _b2 : void 0
|
|
3532
4058
|
}
|
|
3533
4059
|
});
|
|
3534
|
-
} else if (attrName ===
|
|
3535
|
-
(_d =
|
|
4060
|
+
} else if (attrName === Attributes4.LIVE_EDGE_OFFSET && newValue !== oldValue) {
|
|
4061
|
+
(_d = __privateGet6(this, _mediaStore)) == null ? void 0 : _d.dispatch({
|
|
3536
4062
|
type: "optionschangerequest",
|
|
3537
4063
|
detail: {
|
|
3538
|
-
liveEdgeOffset: this.hasAttribute(
|
|
3539
|
-
seekToLiveOffset: this.hasAttribute(
|
|
4064
|
+
liveEdgeOffset: this.hasAttribute(Attributes4.LIVE_EDGE_OFFSET) ? +this.getAttribute(Attributes4.LIVE_EDGE_OFFSET) : void 0,
|
|
4065
|
+
seekToLiveOffset: this.hasAttribute(Attributes4.SEEK_TO_LIVE_OFFSET) ? +this.getAttribute(Attributes4.SEEK_TO_LIVE_OFFSET) : this.hasAttribute(Attributes4.LIVE_EDGE_OFFSET) ? +this.getAttribute(Attributes4.LIVE_EDGE_OFFSET) : void 0
|
|
3540
4066
|
}
|
|
3541
4067
|
});
|
|
3542
|
-
} else if (attrName ===
|
|
3543
|
-
(_e =
|
|
4068
|
+
} else if (attrName === Attributes4.SEEK_TO_LIVE_OFFSET && newValue !== oldValue) {
|
|
4069
|
+
(_e = __privateGet6(this, _mediaStore)) == null ? void 0 : _e.dispatch({
|
|
3544
4070
|
type: "optionschangerequest",
|
|
3545
4071
|
detail: {
|
|
3546
4072
|
// Mirror #setupDefaultStore: prefer seektoliveoffset, fall back to
|
|
3547
4073
|
// liveedgeoffset, otherwise undefined.
|
|
3548
|
-
seekToLiveOffset: this.hasAttribute(
|
|
4074
|
+
seekToLiveOffset: this.hasAttribute(Attributes4.SEEK_TO_LIVE_OFFSET) ? +this.getAttribute(Attributes4.SEEK_TO_LIVE_OFFSET) : this.hasAttribute(Attributes4.LIVE_EDGE_OFFSET) ? +this.getAttribute(Attributes4.LIVE_EDGE_OFFSET) : void 0
|
|
3549
4075
|
}
|
|
3550
4076
|
});
|
|
3551
|
-
} else if (attrName ===
|
|
3552
|
-
(_f =
|
|
4077
|
+
} else if (attrName === Attributes4.NO_AUTO_SEEK_TO_LIVE) {
|
|
4078
|
+
(_f = __privateGet6(this, _mediaStore)) == null ? void 0 : _f.dispatch({
|
|
3553
4079
|
type: "optionschangerequest",
|
|
3554
4080
|
detail: {
|
|
3555
|
-
noAutoSeekToLive: this.hasAttribute(
|
|
4081
|
+
noAutoSeekToLive: this.hasAttribute(Attributes4.NO_AUTO_SEEK_TO_LIVE)
|
|
3556
4082
|
}
|
|
3557
4083
|
});
|
|
3558
|
-
} else if (attrName ===
|
|
4084
|
+
} else if (attrName === Attributes4.FULLSCREEN_ELEMENT) {
|
|
3559
4085
|
const el = newValue ? (_g = this.getRootNode()) == null ? void 0 : _g.getElementById(newValue) : void 0;
|
|
3560
|
-
|
|
3561
|
-
(_h =
|
|
4086
|
+
__privateSet5(this, _fullscreenElement, el);
|
|
4087
|
+
(_h = __privateGet6(this, _mediaStore)) == null ? void 0 : _h.dispatch({
|
|
3562
4088
|
type: "fullscreenelementchangerequest",
|
|
3563
4089
|
detail: this.fullscreenElement
|
|
3564
4090
|
});
|
|
3565
|
-
} else if (attrName ===
|
|
4091
|
+
} else if (attrName === Attributes4.LANG && newValue !== oldValue) {
|
|
3566
4092
|
setLanguage(newValue);
|
|
3567
|
-
(_i =
|
|
4093
|
+
(_i = __privateGet6(this, _mediaStore)) == null ? void 0 : _i.dispatch({
|
|
3568
4094
|
type: "optionschangerequest",
|
|
3569
4095
|
detail: {
|
|
3570
4096
|
mediaLang: newValue
|
|
3571
4097
|
}
|
|
3572
4098
|
});
|
|
3573
|
-
} else if (attrName ===
|
|
3574
|
-
(_j =
|
|
4099
|
+
} else if (attrName === Attributes4.LOOP && newValue !== oldValue) {
|
|
4100
|
+
(_j = __privateGet6(this, _mediaStore)) == null ? void 0 : _j.dispatch({
|
|
3575
4101
|
type: MediaUIEvents.MEDIA_LOOP_REQUEST,
|
|
3576
4102
|
detail: newValue != null
|
|
3577
4103
|
});
|
|
3578
|
-
} else if (attrName ===
|
|
3579
|
-
(_k =
|
|
4104
|
+
} else if (attrName === Attributes4.NO_VOLUME_PREF && newValue !== oldValue) {
|
|
4105
|
+
(_k = __privateGet6(this, _mediaStore)) == null ? void 0 : _k.dispatch({
|
|
3580
4106
|
type: "optionschangerequest",
|
|
3581
4107
|
detail: {
|
|
3582
|
-
noVolumePref: this.hasAttribute(
|
|
4108
|
+
noVolumePref: this.hasAttribute(Attributes4.NO_VOLUME_PREF)
|
|
3583
4109
|
}
|
|
3584
4110
|
});
|
|
3585
|
-
} else if (attrName ===
|
|
3586
|
-
(_l =
|
|
4111
|
+
} else if (attrName === Attributes4.NO_MUTED_PREF && newValue !== oldValue) {
|
|
4112
|
+
(_l = __privateGet6(this, _mediaStore)) == null ? void 0 : _l.dispatch({
|
|
3587
4113
|
type: "optionschangerequest",
|
|
3588
4114
|
detail: {
|
|
3589
|
-
noMutedPref: this.hasAttribute(
|
|
4115
|
+
noMutedPref: this.hasAttribute(Attributes4.NO_MUTED_PREF)
|
|
3590
4116
|
}
|
|
3591
4117
|
});
|
|
3592
4118
|
}
|
|
@@ -3594,64 +4120,64 @@ var MediaController = class extends MediaContainer {
|
|
|
3594
4120
|
connectedCallback() {
|
|
3595
4121
|
var _a3, _b2, _c;
|
|
3596
4122
|
this.associateElement(this);
|
|
3597
|
-
if (!
|
|
3598
|
-
|
|
4123
|
+
if (!__privateGet6(this, _mediaStore) && !this.hasAttribute(Attributes4.NO_DEFAULT_STORE)) {
|
|
4124
|
+
__privateMethod3(this, _setupDefaultStore, setupDefaultStore_fn).call(this);
|
|
3599
4125
|
}
|
|
3600
|
-
(_a3 =
|
|
4126
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3601
4127
|
type: "documentelementchangerequest",
|
|
3602
4128
|
detail: Document2
|
|
3603
4129
|
});
|
|
3604
|
-
(_b2 =
|
|
4130
|
+
(_b2 = __privateGet6(this, _mediaStore)) == null ? void 0 : _b2.dispatch({
|
|
3605
4131
|
type: "fullscreenelementchangerequest",
|
|
3606
4132
|
detail: this.fullscreenElement
|
|
3607
4133
|
});
|
|
3608
4134
|
super.connectedCallback();
|
|
3609
|
-
if (
|
|
3610
|
-
|
|
3611
|
-
|
|
4135
|
+
if (__privateGet6(this, _mediaStore) && !__privateGet6(this, _mediaStoreUnsubscribe)) {
|
|
4136
|
+
__privateSet5(this, _mediaStoreUnsubscribe, (_c = __privateGet6(this, _mediaStore)) == null ? void 0 : _c.subscribe(
|
|
4137
|
+
__privateGet6(this, _mediaStateCallback)
|
|
3612
4138
|
));
|
|
3613
4139
|
}
|
|
3614
|
-
if (
|
|
4140
|
+
if (__privateGet6(this, _subtitlesState) !== void 0 && __privateGet6(this, _mediaStore) && this.media) {
|
|
3615
4141
|
setTimeout(() => {
|
|
3616
4142
|
var _a22, _b22, _c2;
|
|
3617
4143
|
if ((_b22 = (_a22 = this.media) == null ? void 0 : _a22.textTracks) == null ? void 0 : _b22.length) {
|
|
3618
|
-
(_c2 =
|
|
4144
|
+
(_c2 = __privateGet6(this, _mediaStore)) == null ? void 0 : _c2.dispatch({
|
|
3619
4145
|
type: MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST,
|
|
3620
|
-
detail:
|
|
4146
|
+
detail: __privateGet6(this, _subtitlesState)
|
|
3621
4147
|
});
|
|
3622
4148
|
}
|
|
3623
4149
|
}, 0);
|
|
3624
4150
|
}
|
|
3625
|
-
this.hasAttribute(
|
|
4151
|
+
this.hasAttribute(Attributes4.NO_HOTKEYS) ? this.disableHotkeys() : this.enableHotkeys();
|
|
3626
4152
|
}
|
|
3627
4153
|
disconnectedCallback() {
|
|
3628
4154
|
var _a3, _b2, _c, _d, _e, _f;
|
|
3629
4155
|
(_a3 = super.disconnectedCallback) == null ? void 0 : _a3.call(this);
|
|
3630
4156
|
this.disableHotkeys();
|
|
3631
|
-
if (
|
|
3632
|
-
const currentState =
|
|
3633
|
-
|
|
3634
|
-
(_c =
|
|
4157
|
+
if (__privateGet6(this, _mediaStore)) {
|
|
4158
|
+
const currentState = __privateGet6(this, _mediaStore).getState();
|
|
4159
|
+
__privateSet5(this, _subtitlesState, !!((_b2 = currentState.mediaSubtitlesShowing) == null ? void 0 : _b2.length));
|
|
4160
|
+
(_c = __privateGet6(this, _mediaStore)) == null ? void 0 : _c.dispatch({
|
|
3635
4161
|
type: "fullscreenelementchangerequest",
|
|
3636
4162
|
detail: void 0
|
|
3637
4163
|
});
|
|
3638
|
-
(_d =
|
|
4164
|
+
(_d = __privateGet6(this, _mediaStore)) == null ? void 0 : _d.dispatch({
|
|
3639
4165
|
type: "documentelementchangerequest",
|
|
3640
4166
|
detail: void 0
|
|
3641
4167
|
});
|
|
3642
|
-
(_e =
|
|
4168
|
+
(_e = __privateGet6(this, _mediaStore)) == null ? void 0 : _e.dispatch({
|
|
3643
4169
|
type: MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST,
|
|
3644
4170
|
detail: false
|
|
3645
4171
|
});
|
|
3646
4172
|
}
|
|
3647
|
-
if (
|
|
3648
|
-
(_f =
|
|
3649
|
-
|
|
4173
|
+
if (__privateGet6(this, _mediaStoreUnsubscribe)) {
|
|
4174
|
+
(_f = __privateGet6(this, _mediaStoreUnsubscribe)) == null ? void 0 : _f.call(this);
|
|
4175
|
+
__privateSet5(this, _mediaStoreUnsubscribe, void 0);
|
|
3650
4176
|
}
|
|
3651
4177
|
this.unassociateElement(this);
|
|
3652
|
-
if (
|
|
3653
|
-
|
|
3654
|
-
|
|
4178
|
+
if (__privateGet6(this, _keyboardShortcutsDialog)) {
|
|
4179
|
+
__privateGet6(this, _keyboardShortcutsDialog).remove();
|
|
4180
|
+
__privateSet5(this, _keyboardShortcutsDialog, null);
|
|
3655
4181
|
}
|
|
3656
4182
|
}
|
|
3657
4183
|
/**
|
|
@@ -3661,7 +4187,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3661
4187
|
mediaSetCallback(media) {
|
|
3662
4188
|
var _a3;
|
|
3663
4189
|
super.mediaSetCallback(media);
|
|
3664
|
-
(_a3 =
|
|
4190
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3665
4191
|
type: "mediaelementchangerequest",
|
|
3666
4192
|
detail: media
|
|
3667
4193
|
});
|
|
@@ -3676,7 +4202,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3676
4202
|
mediaUnsetCallback(media) {
|
|
3677
4203
|
var _a3;
|
|
3678
4204
|
super.mediaUnsetCallback(media);
|
|
3679
|
-
(_a3 =
|
|
4205
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3680
4206
|
type: "mediaelementchangerequest",
|
|
3681
4207
|
detail: void 0
|
|
3682
4208
|
});
|
|
@@ -3698,7 +4224,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3698
4224
|
unregisterMediaStateReceiver
|
|
3699
4225
|
);
|
|
3700
4226
|
Object.values(MediaUIEvents).forEach((eventName) => {
|
|
3701
|
-
element.addEventListener(eventName,
|
|
4227
|
+
element.addEventListener(eventName, __privateGet6(this, _mediaStateEventHandler));
|
|
3702
4228
|
});
|
|
3703
4229
|
associatedElementSubscriptions.set(element, unsubscribe);
|
|
3704
4230
|
}
|
|
@@ -3712,7 +4238,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3712
4238
|
unsubscribe();
|
|
3713
4239
|
associatedElementSubscriptions.delete(element);
|
|
3714
4240
|
Object.values(MediaUIEvents).forEach((eventName) => {
|
|
3715
|
-
element.removeEventListener(eventName,
|
|
4241
|
+
element.removeEventListener(eventName, __privateGet6(this, _mediaStateEventHandler));
|
|
3716
4242
|
});
|
|
3717
4243
|
}
|
|
3718
4244
|
registerMediaStateReceiver(el) {
|
|
@@ -3723,8 +4249,8 @@ var MediaController = class extends MediaContainer {
|
|
|
3723
4249
|
if (index > -1)
|
|
3724
4250
|
return;
|
|
3725
4251
|
els.push(el);
|
|
3726
|
-
if (
|
|
3727
|
-
Object.entries(
|
|
4252
|
+
if (__privateGet6(this, _mediaStore)) {
|
|
4253
|
+
Object.entries(__privateGet6(this, _mediaStore).getState()).forEach(
|
|
3728
4254
|
([stateName, stateValue]) => {
|
|
3729
4255
|
propagateMediaState([el], stateName, stateValue);
|
|
3730
4256
|
}
|
|
@@ -3739,38 +4265,36 @@ var MediaController = class extends MediaContainer {
|
|
|
3739
4265
|
els.splice(index, 1);
|
|
3740
4266
|
}
|
|
3741
4267
|
enableHotkeys() {
|
|
3742
|
-
this.addEventListener("keydown",
|
|
4268
|
+
this.addEventListener("keydown", __privateMethod3(this, _keyDownHandler2, keyDownHandler_fn));
|
|
3743
4269
|
}
|
|
3744
4270
|
disableHotkeys() {
|
|
3745
|
-
this.removeEventListener("keydown",
|
|
3746
|
-
this.removeEventListener("keyup",
|
|
4271
|
+
this.removeEventListener("keydown", __privateMethod3(this, _keyDownHandler2, keyDownHandler_fn));
|
|
4272
|
+
this.removeEventListener("keyup", __privateGet6(this, _keyUpHandler));
|
|
3747
4273
|
}
|
|
3748
4274
|
// Added string to support JSX compatibility
|
|
3749
4275
|
get hotkeys() {
|
|
3750
|
-
return
|
|
4276
|
+
return __privateGet6(this, _hotKeys);
|
|
3751
4277
|
}
|
|
3752
4278
|
set hotkeys(value) {
|
|
3753
|
-
setStringAttr(this,
|
|
4279
|
+
setStringAttr(this, Attributes4.HOTKEYS, value);
|
|
3754
4280
|
}
|
|
3755
4281
|
keyboardShortcutHandler(e) {
|
|
3756
4282
|
var _a3, _b2, _c, _d, _e, _f, _g, _h, _i;
|
|
3757
4283
|
const target = e.target;
|
|
3758
|
-
const keysUsed = ((_c = (_b2 = (_a3 = target.getAttribute(
|
|
4284
|
+
const keysUsed = ((_c = (_b2 = (_a3 = target.getAttribute(Attributes4.KEYS_USED)) == null ? void 0 : _a3.split(" ")) != null ? _b2 : target == null ? void 0 : target.keysUsed) != null ? _c : []).map((key) => key === "Space" ? " " : key).filter(Boolean);
|
|
3759
4285
|
if (keysUsed.includes(e.key)) {
|
|
3760
4286
|
return;
|
|
3761
4287
|
}
|
|
3762
4288
|
let eventName, detail, evt;
|
|
3763
|
-
if (
|
|
3764
|
-
return;
|
|
3765
|
-
if (e.key === " " && __privateGet4(this, _hotKeys).contains(`nospace`))
|
|
4289
|
+
if (__privateGet6(this, _hotKeys).contains(getHotkeyToken(e.key)))
|
|
3766
4290
|
return;
|
|
3767
4291
|
const isShiftSlash = e.shiftKey && (e.key === "/" || e.key === "?");
|
|
3768
|
-
if (isShiftSlash &&
|
|
4292
|
+
if (isShiftSlash && __privateGet6(this, _hotKeys).contains("noshift+/"))
|
|
3769
4293
|
return;
|
|
3770
4294
|
switch (e.key) {
|
|
3771
4295
|
case " ":
|
|
3772
4296
|
case "k":
|
|
3773
|
-
eventName =
|
|
4297
|
+
eventName = __privateGet6(this, _mediaStore).getState().mediaPaused ? MediaUIEvents.MEDIA_PLAY_REQUEST : MediaUIEvents.MEDIA_PAUSE_REQUEST;
|
|
3774
4298
|
this.dispatchEvent(
|
|
3775
4299
|
new GlobalThis.CustomEvent(eventName, {
|
|
3776
4300
|
composed: true,
|
|
@@ -3807,8 +4331,8 @@ var MediaController = class extends MediaContainer {
|
|
|
3807
4331
|
case "ArrowLeft":
|
|
3808
4332
|
case "j": {
|
|
3809
4333
|
const offsetValue = this.hasAttribute(
|
|
3810
|
-
|
|
3811
|
-
) ? +this.getAttribute(
|
|
4334
|
+
Attributes4.KEYBOARD_BACKWARD_SEEK_OFFSET
|
|
4335
|
+
) ? +this.getAttribute(Attributes4.KEYBOARD_BACKWARD_SEEK_OFFSET) : DEFAULT_SEEK_OFFSET;
|
|
3812
4336
|
detail = Math.max(
|
|
3813
4337
|
((_d = this.mediaStore.getState().mediaCurrentTime) != null ? _d : 0) - offsetValue,
|
|
3814
4338
|
0
|
|
@@ -3824,8 +4348,8 @@ var MediaController = class extends MediaContainer {
|
|
|
3824
4348
|
case "ArrowRight":
|
|
3825
4349
|
case "l": {
|
|
3826
4350
|
const offsetValue = this.hasAttribute(
|
|
3827
|
-
|
|
3828
|
-
) ? +this.getAttribute(
|
|
4351
|
+
Attributes4.KEYBOARD_FORWARD_SEEK_OFFSET
|
|
4352
|
+
) ? +this.getAttribute(Attributes4.KEYBOARD_FORWARD_SEEK_OFFSET) : DEFAULT_SEEK_OFFSET;
|
|
3829
4353
|
detail = Math.max(
|
|
3830
4354
|
((_e = this.mediaStore.getState().mediaCurrentTime) != null ? _e : 0) + offsetValue,
|
|
3831
4355
|
0
|
|
@@ -3839,7 +4363,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3839
4363
|
break;
|
|
3840
4364
|
}
|
|
3841
4365
|
case "ArrowUp": {
|
|
3842
|
-
const step = this.hasAttribute(
|
|
4366
|
+
const step = this.hasAttribute(Attributes4.KEYBOARD_UP_VOLUME_STEP) ? +this.getAttribute(Attributes4.KEYBOARD_UP_VOLUME_STEP) : DEFAULT_VOLUME_STEP;
|
|
3843
4367
|
detail = Math.min(
|
|
3844
4368
|
((_f = this.mediaStore.getState().mediaVolume) != null ? _f : 1) + step,
|
|
3845
4369
|
1
|
|
@@ -3853,7 +4377,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3853
4377
|
break;
|
|
3854
4378
|
}
|
|
3855
4379
|
case "ArrowDown": {
|
|
3856
|
-
const step = this.hasAttribute(
|
|
4380
|
+
const step = this.hasAttribute(Attributes4.KEYBOARD_DOWN_VOLUME_STEP) ? +this.getAttribute(Attributes4.KEYBOARD_DOWN_VOLUME_STEP) : DEFAULT_VOLUME_STEP;
|
|
3857
4381
|
detail = Math.max(
|
|
3858
4382
|
((_g = this.mediaStore.getState().mediaVolume) != null ? _g : 1) - step,
|
|
3859
4383
|
0
|
|
@@ -3897,7 +4421,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3897
4421
|
case "/":
|
|
3898
4422
|
case "?": {
|
|
3899
4423
|
if (e.shiftKey) {
|
|
3900
|
-
|
|
4424
|
+
__privateMethod3(this, _showKeyboardShortcutsDialog, showKeyboardShortcutsDialog_fn).call(this);
|
|
3901
4425
|
}
|
|
3902
4426
|
break;
|
|
3903
4427
|
}
|
|
@@ -3930,56 +4454,66 @@ setupDefaultStore_fn = function() {
|
|
|
3930
4454
|
media: this.media,
|
|
3931
4455
|
fullscreenElement: this.fullscreenElement,
|
|
3932
4456
|
options: {
|
|
3933
|
-
defaultSubtitles: this.hasAttribute(
|
|
3934
|
-
defaultDuration: this.hasAttribute(
|
|
4457
|
+
defaultSubtitles: this.hasAttribute(Attributes4.DEFAULT_SUBTITLES),
|
|
4458
|
+
defaultDuration: this.hasAttribute(Attributes4.DEFAULT_DURATION) ? +this.getAttribute(Attributes4.DEFAULT_DURATION) : void 0,
|
|
3935
4459
|
defaultStreamType: (
|
|
3936
4460
|
/** @type {import('./media-store/state-mediator.js').StreamTypeValue} */
|
|
3937
4461
|
(_a3 = this.getAttribute(
|
|
3938
|
-
|
|
4462
|
+
Attributes4.DEFAULT_STREAM_TYPE
|
|
3939
4463
|
)) != null ? _a3 : void 0
|
|
3940
4464
|
),
|
|
3941
|
-
liveEdgeOffset: this.hasAttribute(
|
|
3942
|
-
seekToLiveOffset: this.hasAttribute(
|
|
3943
|
-
noAutoSeekToLive: this.hasAttribute(
|
|
4465
|
+
liveEdgeOffset: this.hasAttribute(Attributes4.LIVE_EDGE_OFFSET) ? +this.getAttribute(Attributes4.LIVE_EDGE_OFFSET) : void 0,
|
|
4466
|
+
seekToLiveOffset: this.hasAttribute(Attributes4.SEEK_TO_LIVE_OFFSET) ? +this.getAttribute(Attributes4.SEEK_TO_LIVE_OFFSET) : this.hasAttribute(Attributes4.LIVE_EDGE_OFFSET) ? +this.getAttribute(Attributes4.LIVE_EDGE_OFFSET) : void 0,
|
|
4467
|
+
noAutoSeekToLive: this.hasAttribute(Attributes4.NO_AUTO_SEEK_TO_LIVE),
|
|
3944
4468
|
// NOTE: This wasn't updated if it was changed later. Should it be? (CJP)
|
|
3945
|
-
noVolumePref: this.hasAttribute(
|
|
3946
|
-
noMutedPref: this.hasAttribute(
|
|
4469
|
+
noVolumePref: this.hasAttribute(Attributes4.NO_VOLUME_PREF),
|
|
4470
|
+
noMutedPref: this.hasAttribute(Attributes4.NO_MUTED_PREF),
|
|
3947
4471
|
noSubtitlesLangPref: this.hasAttribute(
|
|
3948
|
-
|
|
4472
|
+
Attributes4.NO_SUBTITLES_LANG_PREF
|
|
3949
4473
|
)
|
|
3950
4474
|
}
|
|
3951
4475
|
});
|
|
3952
4476
|
};
|
|
3953
4477
|
_keyUpHandler = /* @__PURE__ */ new WeakMap();
|
|
3954
|
-
|
|
4478
|
+
_keyDownHandler2 = /* @__PURE__ */ new WeakSet();
|
|
3955
4479
|
keyDownHandler_fn = function(e) {
|
|
3956
4480
|
var _a3;
|
|
3957
4481
|
const { metaKey, altKey, key, shiftKey } = e;
|
|
3958
4482
|
const isShiftSlash = shiftKey && (key === "/" || key === "?");
|
|
3959
|
-
if (isShiftSlash && ((_a3 =
|
|
3960
|
-
this.removeEventListener("keyup",
|
|
4483
|
+
if (isShiftSlash && ((_a3 = __privateGet6(this, _keyboardShortcutsDialog)) == null ? void 0 : _a3.open)) {
|
|
4484
|
+
this.removeEventListener("keyup", __privateGet6(this, _keyUpHandler));
|
|
3961
4485
|
return;
|
|
3962
4486
|
}
|
|
3963
4487
|
if (metaKey || altKey || !isShiftSlash && !ButtonPressedKeys.includes(key)) {
|
|
3964
|
-
this.removeEventListener("keyup",
|
|
4488
|
+
this.removeEventListener("keyup", __privateGet6(this, _keyUpHandler));
|
|
3965
4489
|
return;
|
|
3966
4490
|
}
|
|
3967
4491
|
const target = e.target;
|
|
3968
4492
|
const isRangeInput = target instanceof HTMLElement && (target.tagName.toLowerCase() === "media-volume-range" || target.tagName.toLowerCase() === "media-time-range");
|
|
3969
|
-
if ([" ", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(key) && !(
|
|
4493
|
+
if ([" ", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(key) && !__privateGet6(this, _hotKeys).contains(getHotkeyToken(key)) && !isRangeInput) {
|
|
3970
4494
|
e.preventDefault();
|
|
3971
4495
|
}
|
|
3972
|
-
this.addEventListener("keyup",
|
|
4496
|
+
this.addEventListener("keyup", __privateGet6(this, _keyUpHandler), { once: true });
|
|
4497
|
+
};
|
|
4498
|
+
_syncKeyboardShortcutsDialog = /* @__PURE__ */ new WeakSet();
|
|
4499
|
+
syncKeyboardShortcutsDialog_fn = function() {
|
|
4500
|
+
if (!__privateGet6(this, _keyboardShortcutsDialog))
|
|
4501
|
+
return;
|
|
4502
|
+
__privateGet6(this, _keyboardShortcutsDialog).hotkeys = __privateGet6(this, _hotKeys).value || void 0;
|
|
4503
|
+
if (this.noHotkeys || __privateGet6(this, _hotKeys).contains("noshift+/")) {
|
|
4504
|
+
__privateGet6(this, _keyboardShortcutsDialog).open = false;
|
|
4505
|
+
}
|
|
3973
4506
|
};
|
|
3974
4507
|
_showKeyboardShortcutsDialog = /* @__PURE__ */ new WeakSet();
|
|
3975
4508
|
showKeyboardShortcutsDialog_fn = function() {
|
|
3976
|
-
if (!
|
|
3977
|
-
|
|
4509
|
+
if (!__privateGet6(this, _keyboardShortcutsDialog)) {
|
|
4510
|
+
__privateSet5(this, _keyboardShortcutsDialog, Document2.createElement(
|
|
3978
4511
|
"media-keyboard-shortcuts-dialog"
|
|
3979
4512
|
));
|
|
3980
|
-
|
|
4513
|
+
__privateMethod3(this, _syncKeyboardShortcutsDialog, syncKeyboardShortcutsDialog_fn).call(this);
|
|
4514
|
+
this.appendChild(__privateGet6(this, _keyboardShortcutsDialog));
|
|
3981
4515
|
}
|
|
3982
|
-
|
|
4516
|
+
__privateGet6(this, _keyboardShortcutsDialog).open = true;
|
|
3983
4517
|
};
|
|
3984
4518
|
var MEDIA_UI_ATTRIBUTE_NAMES2 = Object.values(MediaUIAttributes);
|
|
3985
4519
|
var MEDIA_UI_PROP_NAMES = Object.values(MediaUIProps);
|
|
@@ -4186,11 +4720,11 @@ if (!GlobalThis.customElements.get("media-controller")) {
|
|
|
4186
4720
|
}
|
|
4187
4721
|
|
|
4188
4722
|
// ../../node_modules/media-chrome/dist/media-tooltip.js
|
|
4189
|
-
var
|
|
4723
|
+
var Attributes5 = {
|
|
4190
4724
|
PLACEMENT: "placement",
|
|
4191
4725
|
BOUNDS: "bounds"
|
|
4192
4726
|
};
|
|
4193
|
-
function
|
|
4727
|
+
function getTemplateHTML4(_attrs) {
|
|
4194
4728
|
return (
|
|
4195
4729
|
/*html*/
|
|
4196
4730
|
`
|
|
@@ -4358,71 +4892,73 @@ var MediaTooltip = class extends GlobalThis.HTMLElement {
|
|
|
4358
4892
|
}
|
|
4359
4893
|
}
|
|
4360
4894
|
static get observedAttributes() {
|
|
4361
|
-
return [
|
|
4895
|
+
return [Attributes5.PLACEMENT, Attributes5.BOUNDS];
|
|
4362
4896
|
}
|
|
4363
4897
|
/**
|
|
4364
4898
|
* Get or set tooltip placement
|
|
4365
4899
|
*/
|
|
4366
4900
|
get placement() {
|
|
4367
|
-
return getStringAttr(this,
|
|
4901
|
+
return getStringAttr(this, Attributes5.PLACEMENT);
|
|
4368
4902
|
}
|
|
4369
4903
|
set placement(value) {
|
|
4370
|
-
setStringAttr(this,
|
|
4904
|
+
setStringAttr(this, Attributes5.PLACEMENT, value);
|
|
4371
4905
|
}
|
|
4372
4906
|
/**
|
|
4373
4907
|
* Get or set tooltip container ID selector that will constrain the tooltips
|
|
4374
4908
|
* horizontal position.
|
|
4375
4909
|
*/
|
|
4376
4910
|
get bounds() {
|
|
4377
|
-
return getStringAttr(this,
|
|
4911
|
+
return getStringAttr(this, Attributes5.BOUNDS);
|
|
4378
4912
|
}
|
|
4379
4913
|
set bounds(value) {
|
|
4380
|
-
setStringAttr(this,
|
|
4914
|
+
setStringAttr(this, Attributes5.BOUNDS, value);
|
|
4381
4915
|
}
|
|
4382
4916
|
};
|
|
4383
4917
|
MediaTooltip.shadowRootOptions = { mode: "open" };
|
|
4384
|
-
MediaTooltip.getTemplateHTML =
|
|
4918
|
+
MediaTooltip.getTemplateHTML = getTemplateHTML4;
|
|
4385
4919
|
if (!GlobalThis.customElements.get("media-tooltip")) {
|
|
4386
4920
|
GlobalThis.customElements.define("media-tooltip", MediaTooltip);
|
|
4387
4921
|
}
|
|
4388
4922
|
var media_tooltip_default = MediaTooltip;
|
|
4389
4923
|
|
|
4390
4924
|
// ../../node_modules/media-chrome/dist/media-chrome-button.js
|
|
4391
|
-
var
|
|
4925
|
+
var __accessCheck7 = (obj, member, msg) => {
|
|
4392
4926
|
if (!member.has(obj))
|
|
4393
4927
|
throw TypeError("Cannot " + msg);
|
|
4394
4928
|
};
|
|
4395
|
-
var
|
|
4396
|
-
|
|
4929
|
+
var __privateGet7 = (obj, member, getter) => {
|
|
4930
|
+
__accessCheck7(obj, member, "read from private field");
|
|
4397
4931
|
return getter ? getter.call(obj) : member.get(obj);
|
|
4398
4932
|
};
|
|
4399
|
-
var
|
|
4933
|
+
var __privateAdd7 = (obj, member, value) => {
|
|
4400
4934
|
if (member.has(obj))
|
|
4401
4935
|
throw TypeError("Cannot add the same private member more than once");
|
|
4402
4936
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
4403
4937
|
};
|
|
4404
|
-
var
|
|
4405
|
-
|
|
4938
|
+
var __privateSet6 = (obj, member, value, setter) => {
|
|
4939
|
+
__accessCheck7(obj, member, "write to private field");
|
|
4406
4940
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
4407
4941
|
return value;
|
|
4408
4942
|
};
|
|
4409
|
-
var
|
|
4410
|
-
|
|
4943
|
+
var __privateMethod4 = (obj, member, method) => {
|
|
4944
|
+
__accessCheck7(obj, member, "access private method");
|
|
4411
4945
|
return method;
|
|
4412
4946
|
};
|
|
4413
4947
|
var _mediaController2;
|
|
4414
4948
|
var _clickListener;
|
|
4949
|
+
var _isTooltipShown;
|
|
4950
|
+
var isTooltipShown_fn;
|
|
4415
4951
|
var _positionTooltip;
|
|
4416
4952
|
var _keyupListener;
|
|
4417
4953
|
var _keydownListener;
|
|
4418
4954
|
var _setupTooltip;
|
|
4419
4955
|
var setupTooltip_fn;
|
|
4420
|
-
var
|
|
4956
|
+
var Attributes6 = {
|
|
4421
4957
|
TOOLTIP_PLACEMENT: "tooltipplacement",
|
|
4422
4958
|
DISABLED: "disabled",
|
|
4423
4959
|
NO_TOOLTIP: "notooltip"
|
|
4424
4960
|
};
|
|
4425
|
-
function
|
|
4961
|
+
function getTemplateHTML5(_attrs, _props = {}) {
|
|
4426
4962
|
return (
|
|
4427
4963
|
/*html*/
|
|
4428
4964
|
`
|
|
@@ -4523,7 +5059,7 @@ function getTemplateHTML4(_attrs, _props = {}) {
|
|
|
4523
5059
|
`
|
|
4524
5060
|
);
|
|
4525
5061
|
}
|
|
4526
|
-
function
|
|
5062
|
+
function getSlotTemplateHTML3(_attrs, _props) {
|
|
4527
5063
|
return (
|
|
4528
5064
|
/*html*/
|
|
4529
5065
|
`
|
|
@@ -4537,37 +5073,38 @@ function getTooltipContentHTML() {
|
|
|
4537
5073
|
var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
4538
5074
|
constructor() {
|
|
4539
5075
|
super();
|
|
4540
|
-
|
|
4541
|
-
|
|
5076
|
+
__privateAdd7(this, _isTooltipShown);
|
|
5077
|
+
__privateAdd7(this, _setupTooltip);
|
|
5078
|
+
__privateAdd7(this, _mediaController2, void 0);
|
|
4542
5079
|
this.preventClick = false;
|
|
4543
5080
|
this.tooltipEl = null;
|
|
4544
|
-
|
|
5081
|
+
__privateAdd7(this, _clickListener, (e) => {
|
|
4545
5082
|
if (!this.preventClick) {
|
|
4546
5083
|
this.handleClick(e);
|
|
4547
5084
|
}
|
|
4548
|
-
setTimeout(
|
|
5085
|
+
setTimeout(__privateGet7(this, _positionTooltip), 0);
|
|
4549
5086
|
});
|
|
4550
|
-
|
|
5087
|
+
__privateAdd7(this, _positionTooltip, () => {
|
|
4551
5088
|
var _a3, _b2;
|
|
4552
5089
|
(_b2 = (_a3 = this.tooltipEl) == null ? void 0 : _a3.updateXOffset) == null ? void 0 : _b2.call(_a3);
|
|
4553
5090
|
});
|
|
4554
|
-
|
|
5091
|
+
__privateAdd7(this, _keyupListener, (e) => {
|
|
4555
5092
|
const { key } = e;
|
|
4556
5093
|
if (!this.keysUsed.includes(key)) {
|
|
4557
|
-
this.removeEventListener("keyup",
|
|
5094
|
+
this.removeEventListener("keyup", __privateGet7(this, _keyupListener));
|
|
4558
5095
|
return;
|
|
4559
5096
|
}
|
|
4560
5097
|
if (!this.preventClick) {
|
|
4561
5098
|
this.handleClick(e);
|
|
4562
5099
|
}
|
|
4563
5100
|
});
|
|
4564
|
-
|
|
5101
|
+
__privateAdd7(this, _keydownListener, (e) => {
|
|
4565
5102
|
const { metaKey, altKey, key } = e;
|
|
4566
5103
|
if (metaKey || altKey || !this.keysUsed.includes(key)) {
|
|
4567
|
-
this.removeEventListener("keyup",
|
|
5104
|
+
this.removeEventListener("keyup", __privateGet7(this, _keyupListener));
|
|
4568
5105
|
return;
|
|
4569
5106
|
}
|
|
4570
|
-
this.addEventListener("keyup",
|
|
5107
|
+
this.addEventListener("keyup", __privateGet7(this, _keyupListener), { once: true });
|
|
4571
5108
|
});
|
|
4572
5109
|
if (!this.shadowRoot) {
|
|
4573
5110
|
this.attachShadow(this.constructor.shadowRootOptions);
|
|
@@ -4580,32 +5117,32 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4580
5117
|
static get observedAttributes() {
|
|
4581
5118
|
return [
|
|
4582
5119
|
"disabled",
|
|
4583
|
-
|
|
5120
|
+
Attributes6.TOOLTIP_PLACEMENT,
|
|
4584
5121
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER,
|
|
4585
5122
|
MediaUIAttributes.MEDIA_LANG
|
|
4586
5123
|
];
|
|
4587
5124
|
}
|
|
4588
5125
|
enable() {
|
|
4589
|
-
this.addEventListener("click",
|
|
4590
|
-
this.addEventListener("keydown",
|
|
5126
|
+
this.addEventListener("click", __privateGet7(this, _clickListener));
|
|
5127
|
+
this.addEventListener("keydown", __privateGet7(this, _keydownListener));
|
|
4591
5128
|
this.tabIndex = 0;
|
|
4592
5129
|
}
|
|
4593
5130
|
disable() {
|
|
4594
|
-
this.removeEventListener("click",
|
|
4595
|
-
this.removeEventListener("keydown",
|
|
4596
|
-
this.removeEventListener("keyup",
|
|
5131
|
+
this.removeEventListener("click", __privateGet7(this, _clickListener));
|
|
5132
|
+
this.removeEventListener("keydown", __privateGet7(this, _keydownListener));
|
|
5133
|
+
this.removeEventListener("keyup", __privateGet7(this, _keyupListener));
|
|
4597
5134
|
this.tabIndex = -1;
|
|
4598
5135
|
}
|
|
4599
5136
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
4600
5137
|
var _a3, _b2, _c, _d, _e;
|
|
4601
5138
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
4602
5139
|
if (oldValue) {
|
|
4603
|
-
(_b2 = (_a3 =
|
|
4604
|
-
|
|
5140
|
+
(_b2 = (_a3 = __privateGet7(this, _mediaController2)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5141
|
+
__privateSet6(this, _mediaController2, null);
|
|
4605
5142
|
}
|
|
4606
5143
|
if (newValue && this.isConnected) {
|
|
4607
|
-
|
|
4608
|
-
(_e = (_d =
|
|
5144
|
+
__privateSet6(this, _mediaController2, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
5145
|
+
(_e = (_d = __privateGet7(this, _mediaController2)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
4609
5146
|
}
|
|
4610
5147
|
} else if (attrName === "disabled" && newValue !== oldValue) {
|
|
4611
5148
|
if (newValue == null) {
|
|
@@ -4613,12 +5150,14 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4613
5150
|
} else {
|
|
4614
5151
|
this.disable();
|
|
4615
5152
|
}
|
|
4616
|
-
} else if (attrName ===
|
|
5153
|
+
} else if (attrName === Attributes6.TOOLTIP_PLACEMENT && this.tooltipEl && newValue !== oldValue) {
|
|
4617
5154
|
this.tooltipEl.placement = newValue;
|
|
4618
5155
|
} else if (attrName === MediaUIAttributes.MEDIA_LANG) {
|
|
4619
5156
|
this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML = this.constructor.getTooltipContentHTML();
|
|
4620
5157
|
}
|
|
4621
|
-
|
|
5158
|
+
if (__privateMethod4(this, _isTooltipShown, isTooltipShown_fn).call(this)) {
|
|
5159
|
+
__privateGet7(this, _positionTooltip).call(this);
|
|
5160
|
+
}
|
|
4622
5161
|
}
|
|
4623
5162
|
connectedCallback() {
|
|
4624
5163
|
var _a3, _b2, _c;
|
|
@@ -4637,24 +5176,24 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4637
5176
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER
|
|
4638
5177
|
);
|
|
4639
5178
|
if (mediaControllerId) {
|
|
4640
|
-
|
|
5179
|
+
__privateSet6(
|
|
4641
5180
|
this,
|
|
4642
5181
|
_mediaController2,
|
|
4643
5182
|
// @ts-ignore
|
|
4644
5183
|
(_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(mediaControllerId)
|
|
4645
5184
|
);
|
|
4646
|
-
(_c = (_b2 =
|
|
5185
|
+
(_c = (_b2 = __privateGet7(this, _mediaController2)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
4647
5186
|
}
|
|
4648
|
-
GlobalThis.customElements.whenDefined("media-tooltip").then(() =>
|
|
5187
|
+
GlobalThis.customElements.whenDefined("media-tooltip").then(() => __privateMethod4(this, _setupTooltip, setupTooltip_fn).call(this));
|
|
4649
5188
|
}
|
|
4650
5189
|
disconnectedCallback() {
|
|
4651
5190
|
var _a3, _b2;
|
|
4652
5191
|
this.disable();
|
|
4653
|
-
(_b2 = (_a3 =
|
|
4654
|
-
|
|
4655
|
-
this.removeEventListener("mouseenter",
|
|
4656
|
-
this.removeEventListener("focus",
|
|
4657
|
-
this.removeEventListener("click",
|
|
5192
|
+
(_b2 = (_a3 = __privateGet7(this, _mediaController2)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5193
|
+
__privateSet6(this, _mediaController2, null);
|
|
5194
|
+
this.removeEventListener("mouseenter", __privateGet7(this, _positionTooltip));
|
|
5195
|
+
this.removeEventListener("focus", __privateGet7(this, _positionTooltip));
|
|
5196
|
+
this.removeEventListener("click", __privateGet7(this, _clickListener));
|
|
4658
5197
|
}
|
|
4659
5198
|
get keysUsed() {
|
|
4660
5199
|
return ["Enter", " "];
|
|
@@ -4663,10 +5202,10 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4663
5202
|
* Get or set tooltip placement
|
|
4664
5203
|
*/
|
|
4665
5204
|
get tooltipPlacement() {
|
|
4666
|
-
return getStringAttr(this,
|
|
5205
|
+
return getStringAttr(this, Attributes6.TOOLTIP_PLACEMENT);
|
|
4667
5206
|
}
|
|
4668
5207
|
set tooltipPlacement(value) {
|
|
4669
|
-
setStringAttr(this,
|
|
5208
|
+
setStringAttr(this, Attributes6.TOOLTIP_PLACEMENT, value);
|
|
4670
5209
|
}
|
|
4671
5210
|
get mediaController() {
|
|
4672
5211
|
return getStringAttr(this, MediaStateReceiverAttributes.MEDIA_CONTROLLER);
|
|
@@ -4675,16 +5214,16 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4675
5214
|
setStringAttr(this, MediaStateReceiverAttributes.MEDIA_CONTROLLER, value);
|
|
4676
5215
|
}
|
|
4677
5216
|
get disabled() {
|
|
4678
|
-
return getBooleanAttr(this,
|
|
5217
|
+
return getBooleanAttr(this, Attributes6.DISABLED);
|
|
4679
5218
|
}
|
|
4680
5219
|
set disabled(value) {
|
|
4681
|
-
setBooleanAttr(this,
|
|
5220
|
+
setBooleanAttr(this, Attributes6.DISABLED, value);
|
|
4682
5221
|
}
|
|
4683
5222
|
get noTooltip() {
|
|
4684
|
-
return getBooleanAttr(this,
|
|
5223
|
+
return getBooleanAttr(this, Attributes6.NO_TOOLTIP);
|
|
4685
5224
|
}
|
|
4686
5225
|
set noTooltip(value) {
|
|
4687
|
-
setBooleanAttr(this,
|
|
5226
|
+
setBooleanAttr(this, Attributes6.NO_TOOLTIP, value);
|
|
4688
5227
|
}
|
|
4689
5228
|
/**
|
|
4690
5229
|
* @abstract
|
|
@@ -4694,22 +5233,30 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4694
5233
|
};
|
|
4695
5234
|
_mediaController2 = /* @__PURE__ */ new WeakMap();
|
|
4696
5235
|
_clickListener = /* @__PURE__ */ new WeakMap();
|
|
5236
|
+
_isTooltipShown = /* @__PURE__ */ new WeakSet();
|
|
5237
|
+
isTooltipShown_fn = function() {
|
|
5238
|
+
try {
|
|
5239
|
+
return this.matches(":hover, :focus-visible");
|
|
5240
|
+
} catch {
|
|
5241
|
+
return this.matches(":hover, :focus");
|
|
5242
|
+
}
|
|
5243
|
+
};
|
|
4697
5244
|
_positionTooltip = /* @__PURE__ */ new WeakMap();
|
|
4698
5245
|
_keyupListener = /* @__PURE__ */ new WeakMap();
|
|
4699
5246
|
_keydownListener = /* @__PURE__ */ new WeakMap();
|
|
4700
5247
|
_setupTooltip = /* @__PURE__ */ new WeakSet();
|
|
4701
5248
|
setupTooltip_fn = function() {
|
|
4702
|
-
this.addEventListener("mouseenter",
|
|
4703
|
-
this.addEventListener("focus",
|
|
4704
|
-
this.addEventListener("click",
|
|
5249
|
+
this.addEventListener("mouseenter", __privateGet7(this, _positionTooltip));
|
|
5250
|
+
this.addEventListener("focus", __privateGet7(this, _positionTooltip));
|
|
5251
|
+
this.addEventListener("click", __privateGet7(this, _clickListener));
|
|
4705
5252
|
const initialPlacement = this.tooltipPlacement;
|
|
4706
5253
|
if (initialPlacement && this.tooltipEl) {
|
|
4707
5254
|
this.tooltipEl.placement = initialPlacement;
|
|
4708
5255
|
}
|
|
4709
5256
|
};
|
|
4710
5257
|
MediaChromeButton.shadowRootOptions = { mode: "open" };
|
|
4711
|
-
MediaChromeButton.getTemplateHTML =
|
|
4712
|
-
MediaChromeButton.getSlotTemplateHTML =
|
|
5258
|
+
MediaChromeButton.getTemplateHTML = getTemplateHTML5;
|
|
5259
|
+
MediaChromeButton.getSlotTemplateHTML = getSlotTemplateHTML3;
|
|
4713
5260
|
MediaChromeButton.getTooltipContentHTML = getTooltipContentHTML;
|
|
4714
5261
|
if (!GlobalThis.customElements.get("media-chrome-button")) {
|
|
4715
5262
|
GlobalThis.customElements.define("media-chrome-button", MediaChromeButton);
|
|
@@ -4720,7 +5267,7 @@ var airplayIcon = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
|
4720
5267
|
<path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>
|
|
4721
5268
|
</svg>
|
|
4722
5269
|
`;
|
|
4723
|
-
function
|
|
5270
|
+
function getSlotTemplateHTML4(_attrs) {
|
|
4724
5271
|
return (
|
|
4725
5272
|
/*html*/
|
|
4726
5273
|
`
|
|
@@ -4808,7 +5355,7 @@ var MediaAirplayButton = class extends MediaChromeButton {
|
|
|
4808
5355
|
this.dispatchEvent(evt);
|
|
4809
5356
|
}
|
|
4810
5357
|
};
|
|
4811
|
-
MediaAirplayButton.getSlotTemplateHTML =
|
|
5358
|
+
MediaAirplayButton.getSlotTemplateHTML = getSlotTemplateHTML4;
|
|
4812
5359
|
MediaAirplayButton.getTooltipContentHTML = getTooltipContentHTML2;
|
|
4813
5360
|
if (!GlobalThis.customElements.get("media-airplay-button")) {
|
|
4814
5361
|
GlobalThis.customElements.define("media-airplay-button", MediaAirplayButton);
|
|
@@ -4821,7 +5368,7 @@ var ccIconOn = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
|
4821
5368
|
var ccIconOff = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
4822
5369
|
<path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
|
|
4823
5370
|
</svg>`;
|
|
4824
|
-
function
|
|
5371
|
+
function getSlotTemplateHTML5(_attrs) {
|
|
4825
5372
|
return (
|
|
4826
5373
|
/*html*/
|
|
4827
5374
|
`
|
|
@@ -4913,7 +5460,7 @@ var MediaCaptionsButton = class extends MediaChromeButton {
|
|
|
4913
5460
|
);
|
|
4914
5461
|
}
|
|
4915
5462
|
};
|
|
4916
|
-
MediaCaptionsButton.getSlotTemplateHTML =
|
|
5463
|
+
MediaCaptionsButton.getSlotTemplateHTML = getSlotTemplateHTML5;
|
|
4917
5464
|
MediaCaptionsButton.getTooltipContentHTML = getTooltipContentHTML3;
|
|
4918
5465
|
var getSubtitlesListAttr = (el, attrName) => {
|
|
4919
5466
|
const attrVal = el.getAttribute(attrName);
|
|
@@ -4940,7 +5487,7 @@ if (!GlobalThis.customElements.get("media-captions-button")) {
|
|
|
4940
5487
|
// ../../node_modules/media-chrome/dist/media-cast-button.js
|
|
4941
5488
|
var enterIcon = `<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg>`;
|
|
4942
5489
|
var exitIcon = `<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>`;
|
|
4943
|
-
function
|
|
5490
|
+
function getSlotTemplateHTML6(_attrs) {
|
|
4944
5491
|
return (
|
|
4945
5492
|
/*html*/
|
|
4946
5493
|
`
|
|
@@ -5017,294 +5564,40 @@ var MediaCastButton = class extends MediaChromeButton {
|
|
|
5017
5564
|
set mediaCastUnavailable(value) {
|
|
5018
5565
|
setStringAttr(this, MediaUIAttributes.MEDIA_CAST_UNAVAILABLE, value);
|
|
5019
5566
|
}
|
|
5020
|
-
handleClick() {
|
|
5021
|
-
const eventName = this.mediaIsCasting ? MediaUIEvents.MEDIA_EXIT_CAST_REQUEST : MediaUIEvents.MEDIA_ENTER_CAST_REQUEST;
|
|
5022
|
-
this.dispatchEvent(
|
|
5023
|
-
new GlobalThis.CustomEvent(eventName, { composed: true, bubbles: true })
|
|
5024
|
-
);
|
|
5025
|
-
}
|
|
5026
|
-
};
|
|
5027
|
-
MediaCastButton.getSlotTemplateHTML = getSlotTemplateHTML4;
|
|
5028
|
-
MediaCastButton.getTooltipContentHTML = getTooltipContentHTML4;
|
|
5029
|
-
if (!GlobalThis.customElements.get("media-cast-button")) {
|
|
5030
|
-
GlobalThis.customElements.define("media-cast-button", MediaCastButton);
|
|
5031
|
-
}
|
|
5032
|
-
|
|
5033
|
-
// ../../node_modules/media-chrome/dist/media-chrome-dialog.js
|
|
5034
|
-
var __accessCheck6 = (obj, member, msg) => {
|
|
5035
|
-
if (!member.has(obj))
|
|
5036
|
-
throw TypeError("Cannot " + msg);
|
|
5037
|
-
};
|
|
5038
|
-
var __privateGet6 = (obj, member, getter) => {
|
|
5039
|
-
__accessCheck6(obj, member, "read from private field");
|
|
5040
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
5041
|
-
};
|
|
5042
|
-
var __privateAdd6 = (obj, member, value) => {
|
|
5043
|
-
if (member.has(obj))
|
|
5044
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
5045
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
5046
|
-
};
|
|
5047
|
-
var __privateSet6 = (obj, member, value, setter) => {
|
|
5048
|
-
__accessCheck6(obj, member, "write to private field");
|
|
5049
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
5050
|
-
return value;
|
|
5051
|
-
};
|
|
5052
|
-
var __privateMethod4 = (obj, member, method) => {
|
|
5053
|
-
__accessCheck6(obj, member, "access private method");
|
|
5054
|
-
return method;
|
|
5055
|
-
};
|
|
5056
|
-
var _isInit;
|
|
5057
|
-
var _previouslyFocused;
|
|
5058
|
-
var _invokerElement;
|
|
5059
|
-
var _init;
|
|
5060
|
-
var init_fn;
|
|
5061
|
-
var _handleOpen;
|
|
5062
|
-
var handleOpen_fn;
|
|
5063
|
-
var _handleClosed;
|
|
5064
|
-
var handleClosed_fn;
|
|
5065
|
-
var _handleInvoke;
|
|
5066
|
-
var handleInvoke_fn;
|
|
5067
|
-
var _handleFocusOut;
|
|
5068
|
-
var handleFocusOut_fn;
|
|
5069
|
-
var _handleKeyDown;
|
|
5070
|
-
var handleKeyDown_fn;
|
|
5071
|
-
function getTemplateHTML5(_attrs) {
|
|
5072
|
-
return (
|
|
5073
|
-
/*html*/
|
|
5074
|
-
`
|
|
5075
|
-
<style>
|
|
5076
|
-
:host {
|
|
5077
|
-
font: var(--media-font,
|
|
5078
|
-
var(--media-font-weight, normal)
|
|
5079
|
-
var(--media-font-size, 14px) /
|
|
5080
|
-
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
5081
|
-
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
5082
|
-
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
5083
|
-
display: var(--media-dialog-display, inline-flex);
|
|
5084
|
-
justify-content: center;
|
|
5085
|
-
align-items: center;
|
|
5086
|
-
${/** The hide transition is defined below after a short delay. */
|
|
5087
|
-
""}
|
|
5088
|
-
transition-behavior: allow-discrete;
|
|
5089
|
-
visibility: hidden;
|
|
5090
|
-
opacity: 0;
|
|
5091
|
-
transform: translateY(2px) scale(.99);
|
|
5092
|
-
pointer-events: none;
|
|
5093
|
-
}
|
|
5094
|
-
|
|
5095
|
-
:host([open]) {
|
|
5096
|
-
transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
|
|
5097
|
-
visibility: visible;
|
|
5098
|
-
opacity: 1;
|
|
5099
|
-
transform: translateY(0) scale(1);
|
|
5100
|
-
pointer-events: auto;
|
|
5101
|
-
}
|
|
5102
|
-
|
|
5103
|
-
#content {
|
|
5104
|
-
display: flex;
|
|
5105
|
-
position: relative;
|
|
5106
|
-
box-sizing: border-box;
|
|
5107
|
-
width: min(320px, 100%);
|
|
5108
|
-
word-wrap: break-word;
|
|
5109
|
-
max-height: 100%;
|
|
5110
|
-
overflow: auto;
|
|
5111
|
-
text-align: center;
|
|
5112
|
-
line-height: 1.4;
|
|
5113
|
-
}
|
|
5114
|
-
</style>
|
|
5115
|
-
${this.getSlotTemplateHTML(_attrs)}
|
|
5116
|
-
`
|
|
5117
|
-
);
|
|
5118
|
-
}
|
|
5119
|
-
function getSlotTemplateHTML5(_attrs) {
|
|
5120
|
-
return (
|
|
5121
|
-
/*html*/
|
|
5122
|
-
`
|
|
5123
|
-
<slot id="content"></slot>
|
|
5124
|
-
`
|
|
5125
|
-
);
|
|
5126
|
-
}
|
|
5127
|
-
var Attributes5 = {
|
|
5128
|
-
OPEN: "open",
|
|
5129
|
-
ANCHOR: "anchor"
|
|
5130
|
-
};
|
|
5131
|
-
var MediaChromeDialog = class extends GlobalThis.HTMLElement {
|
|
5132
|
-
constructor() {
|
|
5133
|
-
super();
|
|
5134
|
-
__privateAdd6(this, _init);
|
|
5135
|
-
__privateAdd6(this, _handleOpen);
|
|
5136
|
-
__privateAdd6(this, _handleClosed);
|
|
5137
|
-
__privateAdd6(this, _handleInvoke);
|
|
5138
|
-
__privateAdd6(this, _handleFocusOut);
|
|
5139
|
-
__privateAdd6(this, _handleKeyDown);
|
|
5140
|
-
__privateAdd6(this, _isInit, false);
|
|
5141
|
-
__privateAdd6(this, _previouslyFocused, null);
|
|
5142
|
-
__privateAdd6(this, _invokerElement, null);
|
|
5143
|
-
}
|
|
5144
|
-
static get observedAttributes() {
|
|
5145
|
-
return [Attributes5.OPEN, Attributes5.ANCHOR];
|
|
5146
|
-
}
|
|
5147
|
-
get open() {
|
|
5148
|
-
return getBooleanAttr(this, Attributes5.OPEN);
|
|
5149
|
-
}
|
|
5150
|
-
set open(value) {
|
|
5151
|
-
setBooleanAttr(this, Attributes5.OPEN, value);
|
|
5152
|
-
}
|
|
5153
|
-
handleEvent(event) {
|
|
5154
|
-
switch (event.type) {
|
|
5155
|
-
case "invoke":
|
|
5156
|
-
__privateMethod4(this, _handleInvoke, handleInvoke_fn).call(this, event);
|
|
5157
|
-
break;
|
|
5158
|
-
case "focusout":
|
|
5159
|
-
__privateMethod4(this, _handleFocusOut, handleFocusOut_fn).call(this, event);
|
|
5160
|
-
break;
|
|
5161
|
-
case "keydown":
|
|
5162
|
-
__privateMethod4(this, _handleKeyDown, handleKeyDown_fn).call(this, event);
|
|
5163
|
-
break;
|
|
5164
|
-
}
|
|
5165
|
-
}
|
|
5166
|
-
connectedCallback() {
|
|
5167
|
-
__privateMethod4(this, _init, init_fn).call(this);
|
|
5168
|
-
if (!this.role) {
|
|
5169
|
-
this.role = "dialog";
|
|
5170
|
-
}
|
|
5171
|
-
this.addEventListener("invoke", this);
|
|
5172
|
-
this.addEventListener("focusout", this);
|
|
5173
|
-
this.addEventListener("keydown", this);
|
|
5174
|
-
}
|
|
5175
|
-
disconnectedCallback() {
|
|
5176
|
-
this.removeEventListener("invoke", this);
|
|
5177
|
-
this.removeEventListener("focusout", this);
|
|
5178
|
-
this.removeEventListener("keydown", this);
|
|
5179
|
-
}
|
|
5180
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
5181
|
-
__privateMethod4(this, _init, init_fn).call(this);
|
|
5182
|
-
if (attrName === Attributes5.OPEN && newValue !== oldValue) {
|
|
5183
|
-
if (this.open) {
|
|
5184
|
-
__privateMethod4(this, _handleOpen, handleOpen_fn).call(this);
|
|
5185
|
-
} else {
|
|
5186
|
-
__privateMethod4(this, _handleClosed, handleClosed_fn).call(this);
|
|
5187
|
-
}
|
|
5188
|
-
}
|
|
5189
|
-
}
|
|
5190
|
-
focus() {
|
|
5191
|
-
__privateSet6(this, _previouslyFocused, getActiveElement());
|
|
5192
|
-
const focusCancelled = !this.dispatchEvent(new Event("focus", { composed: true, cancelable: true }));
|
|
5193
|
-
const focusInCancelled = !this.dispatchEvent(new Event("focusin", { composed: true, bubbles: true, cancelable: true }));
|
|
5194
|
-
if (focusCancelled || focusInCancelled)
|
|
5195
|
-
return;
|
|
5196
|
-
const focusable = this.querySelector(
|
|
5197
|
-
'[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]'
|
|
5198
|
-
);
|
|
5199
|
-
focusable == null ? void 0 : focusable.focus();
|
|
5200
|
-
}
|
|
5201
|
-
get keysUsed() {
|
|
5202
|
-
return ["Escape", "Tab"];
|
|
5203
|
-
}
|
|
5204
|
-
};
|
|
5205
|
-
_isInit = /* @__PURE__ */ new WeakMap();
|
|
5206
|
-
_previouslyFocused = /* @__PURE__ */ new WeakMap();
|
|
5207
|
-
_invokerElement = /* @__PURE__ */ new WeakMap();
|
|
5208
|
-
_init = /* @__PURE__ */ new WeakSet();
|
|
5209
|
-
init_fn = function() {
|
|
5210
|
-
if (__privateGet6(this, _isInit))
|
|
5211
|
-
return;
|
|
5212
|
-
__privateSet6(this, _isInit, true);
|
|
5213
|
-
if (!this.shadowRoot) {
|
|
5214
|
-
this.attachShadow(this.constructor.shadowRootOptions);
|
|
5215
|
-
const attrs = namedNodeMapToObject(this.attributes);
|
|
5216
|
-
this.shadowRoot.innerHTML = this.constructor.getTemplateHTML(attrs);
|
|
5217
|
-
queueMicrotask(() => {
|
|
5218
|
-
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
5219
|
-
style.setProperty(
|
|
5220
|
-
"transition",
|
|
5221
|
-
`display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in`
|
|
5222
|
-
);
|
|
5223
|
-
});
|
|
5224
|
-
}
|
|
5225
|
-
};
|
|
5226
|
-
_handleOpen = /* @__PURE__ */ new WeakSet();
|
|
5227
|
-
handleOpen_fn = function() {
|
|
5228
|
-
var _a3;
|
|
5229
|
-
(_a3 = __privateGet6(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "true");
|
|
5230
|
-
this.dispatchEvent(new Event("open", { composed: true, bubbles: true }));
|
|
5231
|
-
this.addEventListener("transitionend", () => this.focus(), { once: true });
|
|
5232
|
-
};
|
|
5233
|
-
_handleClosed = /* @__PURE__ */ new WeakSet();
|
|
5234
|
-
handleClosed_fn = function() {
|
|
5235
|
-
var _a3;
|
|
5236
|
-
(_a3 = __privateGet6(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "false");
|
|
5237
|
-
this.dispatchEvent(new Event("close", { composed: true, bubbles: true }));
|
|
5238
|
-
};
|
|
5239
|
-
_handleInvoke = /* @__PURE__ */ new WeakSet();
|
|
5240
|
-
handleInvoke_fn = function(event) {
|
|
5241
|
-
__privateSet6(this, _invokerElement, event.relatedTarget);
|
|
5242
|
-
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
5243
|
-
this.open = !this.open;
|
|
5244
|
-
}
|
|
5245
|
-
};
|
|
5246
|
-
_handleFocusOut = /* @__PURE__ */ new WeakSet();
|
|
5247
|
-
handleFocusOut_fn = function(event) {
|
|
5248
|
-
var _a3;
|
|
5249
|
-
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
5250
|
-
(_a3 = __privateGet6(this, _previouslyFocused)) == null ? void 0 : _a3.focus();
|
|
5251
|
-
if (__privateGet6(this, _invokerElement) && __privateGet6(this, _invokerElement) !== event.relatedTarget && this.open) {
|
|
5252
|
-
this.open = false;
|
|
5253
|
-
}
|
|
5254
|
-
}
|
|
5255
|
-
};
|
|
5256
|
-
_handleKeyDown = /* @__PURE__ */ new WeakSet();
|
|
5257
|
-
handleKeyDown_fn = function(event) {
|
|
5258
|
-
var _a3, _b2, _c, _d, _e;
|
|
5259
|
-
const { key, ctrlKey, altKey, metaKey } = event;
|
|
5260
|
-
if (ctrlKey || altKey || metaKey) {
|
|
5261
|
-
return;
|
|
5262
|
-
}
|
|
5263
|
-
if (!this.keysUsed.includes(key)) {
|
|
5264
|
-
return;
|
|
5265
|
-
}
|
|
5266
|
-
event.preventDefault();
|
|
5267
|
-
event.stopPropagation();
|
|
5268
|
-
if (key === "Tab") {
|
|
5269
|
-
if (event.shiftKey) {
|
|
5270
|
-
(_b2 = (_a3 = this.previousElementSibling) == null ? void 0 : _a3.focus) == null ? void 0 : _b2.call(_a3);
|
|
5271
|
-
} else {
|
|
5272
|
-
(_d = (_c = this.nextElementSibling) == null ? void 0 : _c.focus) == null ? void 0 : _d.call(_c);
|
|
5273
|
-
}
|
|
5274
|
-
this.blur();
|
|
5275
|
-
} else if (key === "Escape") {
|
|
5276
|
-
(_e = __privateGet6(this, _previouslyFocused)) == null ? void 0 : _e.focus();
|
|
5277
|
-
this.open = false;
|
|
5278
|
-
}
|
|
5567
|
+
handleClick() {
|
|
5568
|
+
const eventName = this.mediaIsCasting ? MediaUIEvents.MEDIA_EXIT_CAST_REQUEST : MediaUIEvents.MEDIA_ENTER_CAST_REQUEST;
|
|
5569
|
+
this.dispatchEvent(
|
|
5570
|
+
new GlobalThis.CustomEvent(eventName, { composed: true, bubbles: true })
|
|
5571
|
+
);
|
|
5572
|
+
}
|
|
5279
5573
|
};
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
GlobalThis.customElements.define("media-chrome-dialog", MediaChromeDialog);
|
|
5574
|
+
MediaCastButton.getSlotTemplateHTML = getSlotTemplateHTML6;
|
|
5575
|
+
MediaCastButton.getTooltipContentHTML = getTooltipContentHTML4;
|
|
5576
|
+
if (!GlobalThis.customElements.get("media-cast-button")) {
|
|
5577
|
+
GlobalThis.customElements.define("media-cast-button", MediaCastButton);
|
|
5285
5578
|
}
|
|
5286
5579
|
|
|
5287
5580
|
// ../../node_modules/media-chrome/dist/media-chrome-range.js
|
|
5288
|
-
var
|
|
5581
|
+
var __accessCheck8 = (obj, member, msg) => {
|
|
5289
5582
|
if (!member.has(obj))
|
|
5290
5583
|
throw TypeError("Cannot " + msg);
|
|
5291
5584
|
};
|
|
5292
|
-
var
|
|
5293
|
-
|
|
5585
|
+
var __privateGet8 = (obj, member, getter) => {
|
|
5586
|
+
__accessCheck8(obj, member, "read from private field");
|
|
5294
5587
|
return getter ? getter.call(obj) : member.get(obj);
|
|
5295
5588
|
};
|
|
5296
|
-
var
|
|
5589
|
+
var __privateAdd8 = (obj, member, value) => {
|
|
5297
5590
|
if (member.has(obj))
|
|
5298
5591
|
throw TypeError("Cannot add the same private member more than once");
|
|
5299
5592
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
5300
5593
|
};
|
|
5301
5594
|
var __privateSet7 = (obj, member, value, setter) => {
|
|
5302
|
-
|
|
5595
|
+
__accessCheck8(obj, member, "write to private field");
|
|
5303
5596
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
5304
5597
|
return value;
|
|
5305
5598
|
};
|
|
5306
5599
|
var __privateMethod5 = (obj, member, method) => {
|
|
5307
|
-
|
|
5600
|
+
__accessCheck8(obj, member, "access private method");
|
|
5308
5601
|
return method;
|
|
5309
5602
|
};
|
|
5310
5603
|
var _mediaController3;
|
|
@@ -5594,21 +5887,21 @@ function getContainerTemplateHTML(_attrs) {
|
|
|
5594
5887
|
var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
5595
5888
|
constructor() {
|
|
5596
5889
|
super();
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5890
|
+
__privateAdd8(this, _updateActiveSegment);
|
|
5891
|
+
__privateAdd8(this, _enableUserEvents);
|
|
5892
|
+
__privateAdd8(this, _disableUserEvents);
|
|
5893
|
+
__privateAdd8(this, _handlePointerDown);
|
|
5894
|
+
__privateAdd8(this, _handlePointerEnter);
|
|
5895
|
+
__privateAdd8(this, _handlePointerUp2);
|
|
5896
|
+
__privateAdd8(this, _handlePointerLeave);
|
|
5897
|
+
__privateAdd8(this, _handlePointerMove2);
|
|
5898
|
+
__privateAdd8(this, _mediaController3, void 0);
|
|
5899
|
+
__privateAdd8(this, _isInputTarget, void 0);
|
|
5900
|
+
__privateAdd8(this, _startpoint, void 0);
|
|
5901
|
+
__privateAdd8(this, _endpoint, void 0);
|
|
5902
|
+
__privateAdd8(this, _cssRules, {});
|
|
5903
|
+
__privateAdd8(this, _segments, []);
|
|
5904
|
+
__privateAdd8(this, _onFocusIn, () => {
|
|
5612
5905
|
if (this.range.matches(":focus-visible")) {
|
|
5613
5906
|
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
5614
5907
|
style.setProperty(
|
|
@@ -5617,11 +5910,11 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5617
5910
|
);
|
|
5618
5911
|
}
|
|
5619
5912
|
});
|
|
5620
|
-
|
|
5913
|
+
__privateAdd8(this, _onFocusOut, () => {
|
|
5621
5914
|
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
5622
5915
|
style.removeProperty("--_focus-visible-box-shadow");
|
|
5623
5916
|
});
|
|
5624
|
-
|
|
5917
|
+
__privateAdd8(this, _updateComputedStyles, () => {
|
|
5625
5918
|
const clipping = this.shadowRoot.querySelector("#segments-clipping");
|
|
5626
5919
|
if (clipping)
|
|
5627
5920
|
clipping.parentNode.append(clipping);
|
|
@@ -5649,12 +5942,12 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5649
5942
|
var _a3, _b2, _c, _d, _e;
|
|
5650
5943
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
5651
5944
|
if (oldValue) {
|
|
5652
|
-
(_b2 = (_a3 =
|
|
5945
|
+
(_b2 = (_a3 = __privateGet8(this, _mediaController3)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5653
5946
|
__privateSet7(this, _mediaController3, null);
|
|
5654
5947
|
}
|
|
5655
5948
|
if (newValue && this.isConnected) {
|
|
5656
5949
|
__privateSet7(this, _mediaController3, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
5657
|
-
(_e = (_d =
|
|
5950
|
+
(_e = (_d = __privateGet8(this, _mediaController3)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
5658
5951
|
}
|
|
5659
5952
|
} else if (attrName === "disabled" || attrName === "aria-disabled" && oldValue !== newValue) {
|
|
5660
5953
|
if (newValue == null) {
|
|
@@ -5673,13 +5966,13 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5673
5966
|
"display",
|
|
5674
5967
|
`var(--media-control-display, var(--${this.localName}-display, inline-flex))`
|
|
5675
5968
|
);
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5969
|
+
__privateGet8(this, _cssRules).pointer = getOrInsertCSSRule(this.shadowRoot, "#pointer");
|
|
5970
|
+
__privateGet8(this, _cssRules).progress = getOrInsertCSSRule(this.shadowRoot, "#progress");
|
|
5971
|
+
__privateGet8(this, _cssRules).thumb = getOrInsertCSSRule(
|
|
5679
5972
|
this.shadowRoot,
|
|
5680
5973
|
'#thumb, ::slotted([slot="thumb"])'
|
|
5681
5974
|
);
|
|
5682
|
-
|
|
5975
|
+
__privateGet8(this, _cssRules).activeSegment = getOrInsertCSSRule(
|
|
5683
5976
|
this.shadowRoot,
|
|
5684
5977
|
"#segments-clipping rect:nth-child(0)"
|
|
5685
5978
|
);
|
|
@@ -5690,26 +5983,26 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5690
5983
|
__privateSet7(this, _mediaController3, (_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(
|
|
5691
5984
|
mediaControllerId
|
|
5692
5985
|
));
|
|
5693
|
-
(_c = (_b2 =
|
|
5986
|
+
(_c = (_b2 = __privateGet8(this, _mediaController3)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
5694
5987
|
}
|
|
5695
5988
|
this.updateBar();
|
|
5696
|
-
this.shadowRoot.addEventListener("focusin",
|
|
5697
|
-
this.shadowRoot.addEventListener("focusout",
|
|
5989
|
+
this.shadowRoot.addEventListener("focusin", __privateGet8(this, _onFocusIn));
|
|
5990
|
+
this.shadowRoot.addEventListener("focusout", __privateGet8(this, _onFocusOut));
|
|
5698
5991
|
__privateMethod5(this, _enableUserEvents, enableUserEvents_fn).call(this);
|
|
5699
|
-
observeResize(this.container,
|
|
5992
|
+
observeResize(this.container, __privateGet8(this, _updateComputedStyles));
|
|
5700
5993
|
}
|
|
5701
5994
|
disconnectedCallback() {
|
|
5702
5995
|
var _a3, _b2;
|
|
5703
5996
|
__privateMethod5(this, _disableUserEvents, disableUserEvents_fn).call(this);
|
|
5704
|
-
(_b2 = (_a3 =
|
|
5997
|
+
(_b2 = (_a3 = __privateGet8(this, _mediaController3)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5705
5998
|
__privateSet7(this, _mediaController3, null);
|
|
5706
|
-
this.shadowRoot.removeEventListener("focusin",
|
|
5707
|
-
this.shadowRoot.removeEventListener("focusout",
|
|
5708
|
-
unobserveResize(this.container,
|
|
5999
|
+
this.shadowRoot.removeEventListener("focusin", __privateGet8(this, _onFocusIn));
|
|
6000
|
+
this.shadowRoot.removeEventListener("focusout", __privateGet8(this, _onFocusOut));
|
|
6001
|
+
unobserveResize(this.container, __privateGet8(this, _updateComputedStyles));
|
|
5709
6002
|
}
|
|
5710
6003
|
updatePointerBar(evt) {
|
|
5711
6004
|
var _a3;
|
|
5712
|
-
(_a3 =
|
|
6005
|
+
(_a3 = __privateGet8(this, _cssRules).pointer) == null ? void 0 : _a3.style.setProperty(
|
|
5713
6006
|
"width",
|
|
5714
6007
|
`${this.getPointerRatio(evt) * 100}%`
|
|
5715
6008
|
);
|
|
@@ -5717,8 +6010,8 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5717
6010
|
updateBar() {
|
|
5718
6011
|
var _a3, _b2;
|
|
5719
6012
|
const rangePercent = this.range.valueAsNumber * 100;
|
|
5720
|
-
(_a3 =
|
|
5721
|
-
(_b2 =
|
|
6013
|
+
(_a3 = __privateGet8(this, _cssRules).progress) == null ? void 0 : _a3.style.setProperty("width", `${rangePercent}%`);
|
|
6014
|
+
(_b2 = __privateGet8(this, _cssRules).thumb) == null ? void 0 : _b2.style.setProperty("left", `${rangePercent}%`);
|
|
5722
6015
|
}
|
|
5723
6016
|
updateSegments(segments) {
|
|
5724
6017
|
const clipping = this.shadowRoot.querySelector("#segments-clipping");
|
|
@@ -5757,8 +6050,8 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5757
6050
|
return getPointProgressOnLine(
|
|
5758
6051
|
evt.clientX,
|
|
5759
6052
|
evt.clientY,
|
|
5760
|
-
|
|
5761
|
-
|
|
6053
|
+
__privateGet8(this, _startpoint).getBoundingClientRect(),
|
|
6054
|
+
__privateGet8(this, _endpoint).getBoundingClientRect()
|
|
5762
6055
|
);
|
|
5763
6056
|
}
|
|
5764
6057
|
get dragging() {
|
|
@@ -5801,11 +6094,11 @@ _onFocusOut = /* @__PURE__ */ new WeakMap();
|
|
|
5801
6094
|
_updateComputedStyles = /* @__PURE__ */ new WeakMap();
|
|
5802
6095
|
_updateActiveSegment = /* @__PURE__ */ new WeakSet();
|
|
5803
6096
|
updateActiveSegment_fn = function(evt) {
|
|
5804
|
-
const rule =
|
|
6097
|
+
const rule = __privateGet8(this, _cssRules).activeSegment;
|
|
5805
6098
|
if (!rule)
|
|
5806
6099
|
return;
|
|
5807
6100
|
const pointerRatio = this.getPointerRatio(evt);
|
|
5808
|
-
const segmentIndex =
|
|
6101
|
+
const segmentIndex = __privateGet8(this, _segments).findIndex((start, i, arr) => {
|
|
5809
6102
|
const end = arr[i + 1];
|
|
5810
6103
|
return end != null && pointerRatio >= start && pointerRatio <= end;
|
|
5811
6104
|
});
|
|
@@ -5864,7 +6157,7 @@ handlePointerLeave_fn = function() {
|
|
|
5864
6157
|
(_a3 = GlobalThis.window) == null ? void 0 : _a3.removeEventListener("pointermove", this);
|
|
5865
6158
|
this.toggleAttribute("dragging", false);
|
|
5866
6159
|
this.range.disabled = this.hasAttribute("disabled");
|
|
5867
|
-
(_b2 =
|
|
6160
|
+
(_b2 = __privateGet8(this, _cssRules).activeSegment) == null ? void 0 : _b2.style.removeProperty("transform");
|
|
5868
6161
|
};
|
|
5869
6162
|
_handlePointerMove2 = /* @__PURE__ */ new WeakSet();
|
|
5870
6163
|
handlePointerMove_fn2 = function(evt) {
|
|
@@ -5877,7 +6170,7 @@ handlePointerMove_fn2 = function(evt) {
|
|
|
5877
6170
|
);
|
|
5878
6171
|
this.updatePointerBar(evt);
|
|
5879
6172
|
__privateMethod5(this, _updateActiveSegment, updateActiveSegment_fn).call(this, evt);
|
|
5880
|
-
if (this.dragging && (evt.pointerType !== "mouse" || !
|
|
6173
|
+
if (this.dragging && (evt.pointerType !== "mouse" || !__privateGet8(this, _isInputTarget))) {
|
|
5881
6174
|
this.range.disabled = true;
|
|
5882
6175
|
this.range.valueAsNumber = this.getPointerRatio(evt);
|
|
5883
6176
|
this.range.dispatchEvent(
|
|
@@ -5893,21 +6186,21 @@ if (!GlobalThis.customElements.get("media-chrome-range")) {
|
|
|
5893
6186
|
}
|
|
5894
6187
|
|
|
5895
6188
|
// ../../node_modules/media-chrome/dist/media-control-bar.js
|
|
5896
|
-
var
|
|
6189
|
+
var __accessCheck9 = (obj, member, msg) => {
|
|
5897
6190
|
if (!member.has(obj))
|
|
5898
6191
|
throw TypeError("Cannot " + msg);
|
|
5899
6192
|
};
|
|
5900
|
-
var
|
|
5901
|
-
|
|
6193
|
+
var __privateGet9 = (obj, member, getter) => {
|
|
6194
|
+
__accessCheck9(obj, member, "read from private field");
|
|
5902
6195
|
return getter ? getter.call(obj) : member.get(obj);
|
|
5903
6196
|
};
|
|
5904
|
-
var
|
|
6197
|
+
var __privateAdd9 = (obj, member, value) => {
|
|
5905
6198
|
if (member.has(obj))
|
|
5906
6199
|
throw TypeError("Cannot add the same private member more than once");
|
|
5907
6200
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
5908
6201
|
};
|
|
5909
6202
|
var __privateSet8 = (obj, member, value, setter) => {
|
|
5910
|
-
|
|
6203
|
+
__accessCheck9(obj, member, "write to private field");
|
|
5911
6204
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
5912
6205
|
return value;
|
|
5913
6206
|
};
|
|
@@ -5948,7 +6241,7 @@ function getTemplateHTML7(_attrs) {
|
|
|
5948
6241
|
var MediaControlBar = class extends GlobalThis.HTMLElement {
|
|
5949
6242
|
constructor() {
|
|
5950
6243
|
super();
|
|
5951
|
-
|
|
6244
|
+
__privateAdd9(this, _mediaController4, void 0);
|
|
5952
6245
|
if (!this.shadowRoot) {
|
|
5953
6246
|
this.attachShadow(this.constructor.shadowRootOptions);
|
|
5954
6247
|
const attrs = namedNodeMapToObject(this.attributes);
|
|
@@ -5962,12 +6255,12 @@ var MediaControlBar = class extends GlobalThis.HTMLElement {
|
|
|
5962
6255
|
var _a3, _b2, _c, _d, _e;
|
|
5963
6256
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
5964
6257
|
if (oldValue) {
|
|
5965
|
-
(_b2 = (_a3 =
|
|
6258
|
+
(_b2 = (_a3 = __privateGet9(this, _mediaController4)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5966
6259
|
__privateSet8(this, _mediaController4, null);
|
|
5967
6260
|
}
|
|
5968
6261
|
if (newValue && this.isConnected) {
|
|
5969
6262
|
__privateSet8(this, _mediaController4, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
5970
|
-
(_e = (_d =
|
|
6263
|
+
(_e = (_d = __privateGet9(this, _mediaController4)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
5971
6264
|
}
|
|
5972
6265
|
}
|
|
5973
6266
|
}
|
|
@@ -5980,12 +6273,12 @@ var MediaControlBar = class extends GlobalThis.HTMLElement {
|
|
|
5980
6273
|
__privateSet8(this, _mediaController4, (_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(
|
|
5981
6274
|
mediaControllerId
|
|
5982
6275
|
));
|
|
5983
|
-
(_c = (_b2 =
|
|
6276
|
+
(_c = (_b2 = __privateGet9(this, _mediaController4)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
5984
6277
|
}
|
|
5985
6278
|
}
|
|
5986
6279
|
disconnectedCallback() {
|
|
5987
6280
|
var _a3, _b2;
|
|
5988
|
-
(_b2 = (_a3 =
|
|
6281
|
+
(_b2 = (_a3 = __privateGet9(this, _mediaController4)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5989
6282
|
__privateSet8(this, _mediaController4, null);
|
|
5990
6283
|
}
|
|
5991
6284
|
};
|
|
@@ -5997,21 +6290,21 @@ if (!GlobalThis.customElements.get("media-control-bar")) {
|
|
|
5997
6290
|
}
|
|
5998
6291
|
|
|
5999
6292
|
// ../../node_modules/media-chrome/dist/media-text-display.js
|
|
6000
|
-
var
|
|
6293
|
+
var __accessCheck10 = (obj, member, msg) => {
|
|
6001
6294
|
if (!member.has(obj))
|
|
6002
6295
|
throw TypeError("Cannot " + msg);
|
|
6003
6296
|
};
|
|
6004
|
-
var
|
|
6005
|
-
|
|
6297
|
+
var __privateGet10 = (obj, member, getter) => {
|
|
6298
|
+
__accessCheck10(obj, member, "read from private field");
|
|
6006
6299
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6007
6300
|
};
|
|
6008
|
-
var
|
|
6301
|
+
var __privateAdd10 = (obj, member, value) => {
|
|
6009
6302
|
if (member.has(obj))
|
|
6010
6303
|
throw TypeError("Cannot add the same private member more than once");
|
|
6011
6304
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6012
6305
|
};
|
|
6013
6306
|
var __privateSet9 = (obj, member, value, setter) => {
|
|
6014
|
-
|
|
6307
|
+
__accessCheck10(obj, member, "write to private field");
|
|
6015
6308
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6016
6309
|
return value;
|
|
6017
6310
|
};
|
|
@@ -6063,7 +6356,7 @@ function getTemplateHTML8(_attrs, _props = {}) {
|
|
|
6063
6356
|
`
|
|
6064
6357
|
);
|
|
6065
6358
|
}
|
|
6066
|
-
function
|
|
6359
|
+
function getSlotTemplateHTML7(_attrs, _props) {
|
|
6067
6360
|
return (
|
|
6068
6361
|
/*html*/
|
|
6069
6362
|
`
|
|
@@ -6074,7 +6367,7 @@ function getSlotTemplateHTML6(_attrs, _props) {
|
|
|
6074
6367
|
var MediaTextDisplay = class extends GlobalThis.HTMLElement {
|
|
6075
6368
|
constructor() {
|
|
6076
6369
|
super();
|
|
6077
|
-
|
|
6370
|
+
__privateAdd10(this, _mediaController5, void 0);
|
|
6078
6371
|
if (!this.shadowRoot) {
|
|
6079
6372
|
this.attachShadow(this.constructor.shadowRootOptions);
|
|
6080
6373
|
const attrs = namedNodeMapToObject(this.attributes);
|
|
@@ -6088,12 +6381,12 @@ var MediaTextDisplay = class extends GlobalThis.HTMLElement {
|
|
|
6088
6381
|
var _a3, _b2, _c, _d, _e;
|
|
6089
6382
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
6090
6383
|
if (oldValue) {
|
|
6091
|
-
(_b2 = (_a3 =
|
|
6384
|
+
(_b2 = (_a3 = __privateGet10(this, _mediaController5)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
6092
6385
|
__privateSet9(this, _mediaController5, null);
|
|
6093
6386
|
}
|
|
6094
6387
|
if (newValue && this.isConnected) {
|
|
6095
6388
|
__privateSet9(this, _mediaController5, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
6096
|
-
(_e = (_d =
|
|
6389
|
+
(_e = (_d = __privateGet10(this, _mediaController5)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
6097
6390
|
}
|
|
6098
6391
|
}
|
|
6099
6392
|
}
|
|
@@ -6111,44 +6404,44 @@ var MediaTextDisplay = class extends GlobalThis.HTMLElement {
|
|
|
6111
6404
|
__privateSet9(this, _mediaController5, (_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(
|
|
6112
6405
|
mediaControllerId
|
|
6113
6406
|
));
|
|
6114
|
-
(_c = (_b2 =
|
|
6407
|
+
(_c = (_b2 = __privateGet10(this, _mediaController5)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
6115
6408
|
}
|
|
6116
6409
|
}
|
|
6117
6410
|
disconnectedCallback() {
|
|
6118
6411
|
var _a3, _b2;
|
|
6119
|
-
(_b2 = (_a3 =
|
|
6412
|
+
(_b2 = (_a3 = __privateGet10(this, _mediaController5)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
6120
6413
|
__privateSet9(this, _mediaController5, null);
|
|
6121
6414
|
}
|
|
6122
6415
|
};
|
|
6123
6416
|
_mediaController5 = /* @__PURE__ */ new WeakMap();
|
|
6124
6417
|
MediaTextDisplay.shadowRootOptions = { mode: "open" };
|
|
6125
6418
|
MediaTextDisplay.getTemplateHTML = getTemplateHTML8;
|
|
6126
|
-
MediaTextDisplay.getSlotTemplateHTML =
|
|
6419
|
+
MediaTextDisplay.getSlotTemplateHTML = getSlotTemplateHTML7;
|
|
6127
6420
|
if (!GlobalThis.customElements.get("media-text-display")) {
|
|
6128
6421
|
GlobalThis.customElements.define("media-text-display", MediaTextDisplay);
|
|
6129
6422
|
}
|
|
6130
6423
|
|
|
6131
6424
|
// ../../node_modules/media-chrome/dist/media-duration-display.js
|
|
6132
|
-
var
|
|
6425
|
+
var __accessCheck11 = (obj, member, msg) => {
|
|
6133
6426
|
if (!member.has(obj))
|
|
6134
6427
|
throw TypeError("Cannot " + msg);
|
|
6135
6428
|
};
|
|
6136
|
-
var
|
|
6137
|
-
|
|
6429
|
+
var __privateGet11 = (obj, member, getter) => {
|
|
6430
|
+
__accessCheck11(obj, member, "read from private field");
|
|
6138
6431
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6139
6432
|
};
|
|
6140
|
-
var
|
|
6433
|
+
var __privateAdd11 = (obj, member, value) => {
|
|
6141
6434
|
if (member.has(obj))
|
|
6142
6435
|
throw TypeError("Cannot add the same private member more than once");
|
|
6143
6436
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6144
6437
|
};
|
|
6145
6438
|
var __privateSet10 = (obj, member, value, setter) => {
|
|
6146
|
-
|
|
6439
|
+
__accessCheck11(obj, member, "write to private field");
|
|
6147
6440
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6148
6441
|
return value;
|
|
6149
6442
|
};
|
|
6150
6443
|
var _slot;
|
|
6151
|
-
function
|
|
6444
|
+
function getSlotTemplateHTML8(_attrs, props) {
|
|
6152
6445
|
return (
|
|
6153
6446
|
/*html*/
|
|
6154
6447
|
`
|
|
@@ -6160,16 +6453,16 @@ var MediaDurationDisplay = class extends MediaTextDisplay {
|
|
|
6160
6453
|
constructor() {
|
|
6161
6454
|
var _a3;
|
|
6162
6455
|
super();
|
|
6163
|
-
|
|
6456
|
+
__privateAdd11(this, _slot, void 0);
|
|
6164
6457
|
__privateSet10(this, _slot, this.shadowRoot.querySelector("slot"));
|
|
6165
|
-
|
|
6458
|
+
__privateGet11(this, _slot).textContent = formatTime((_a3 = this.mediaDuration) != null ? _a3 : 0);
|
|
6166
6459
|
}
|
|
6167
6460
|
static get observedAttributes() {
|
|
6168
6461
|
return [...super.observedAttributes, MediaUIAttributes.MEDIA_DURATION];
|
|
6169
6462
|
}
|
|
6170
6463
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
6171
6464
|
if (attrName === MediaUIAttributes.MEDIA_DURATION) {
|
|
6172
|
-
|
|
6465
|
+
__privateGet11(this, _slot).textContent = formatTime(+newValue);
|
|
6173
6466
|
}
|
|
6174
6467
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
6175
6468
|
}
|
|
@@ -6184,7 +6477,7 @@ var MediaDurationDisplay = class extends MediaTextDisplay {
|
|
|
6184
6477
|
}
|
|
6185
6478
|
};
|
|
6186
6479
|
_slot = /* @__PURE__ */ new WeakMap();
|
|
6187
|
-
MediaDurationDisplay.getSlotTemplateHTML =
|
|
6480
|
+
MediaDurationDisplay.getSlotTemplateHTML = getSlotTemplateHTML8;
|
|
6188
6481
|
if (!GlobalThis.customElements.get("media-duration-display")) {
|
|
6189
6482
|
GlobalThis.customElements.define(
|
|
6190
6483
|
"media-duration-display",
|
|
@@ -6220,26 +6513,27 @@ var formatError = (error) => {
|
|
|
6220
6513
|
};
|
|
6221
6514
|
|
|
6222
6515
|
// ../../node_modules/media-chrome/dist/media-error-dialog.js
|
|
6223
|
-
var
|
|
6516
|
+
var __accessCheck12 = (obj, member, msg) => {
|
|
6224
6517
|
if (!member.has(obj))
|
|
6225
6518
|
throw TypeError("Cannot " + msg);
|
|
6226
6519
|
};
|
|
6227
|
-
var
|
|
6228
|
-
|
|
6520
|
+
var __privateGet12 = (obj, member, getter) => {
|
|
6521
|
+
__accessCheck12(obj, member, "read from private field");
|
|
6229
6522
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6230
6523
|
};
|
|
6231
|
-
var
|
|
6524
|
+
var __privateAdd12 = (obj, member, value) => {
|
|
6232
6525
|
if (member.has(obj))
|
|
6233
6526
|
throw TypeError("Cannot add the same private member more than once");
|
|
6234
6527
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6235
6528
|
};
|
|
6236
6529
|
var __privateSet11 = (obj, member, value, setter) => {
|
|
6237
|
-
|
|
6530
|
+
__accessCheck12(obj, member, "write to private field");
|
|
6238
6531
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6239
6532
|
return value;
|
|
6240
6533
|
};
|
|
6241
6534
|
var _mediaError;
|
|
6242
|
-
function
|
|
6535
|
+
function getSlotTemplateHTML9(attrs) {
|
|
6536
|
+
const code = +attrs.mediaerrorcode;
|
|
6243
6537
|
return (
|
|
6244
6538
|
/*html*/
|
|
6245
6539
|
`
|
|
@@ -6258,8 +6552,8 @@ function getSlotTemplateHTML8(attrs) {
|
|
|
6258
6552
|
margin-block: 0 .3em;
|
|
6259
6553
|
}
|
|
6260
6554
|
</style>
|
|
6261
|
-
<slot name="error-${
|
|
6262
|
-
${formatErrorMessage({ code
|
|
6555
|
+
<slot name="error-${code}" id="content">
|
|
6556
|
+
${formatErrorMessage({ code, message: attrs.mediaerrormessage })}
|
|
6263
6557
|
</slot>
|
|
6264
6558
|
`
|
|
6265
6559
|
);
|
|
@@ -6270,11 +6564,12 @@ function shouldOpenErrorDialog(error) {
|
|
|
6270
6564
|
function formatErrorMessage(error) {
|
|
6271
6565
|
var _a3;
|
|
6272
6566
|
const { title, message } = (_a3 = formatError(error)) != null ? _a3 : {};
|
|
6567
|
+
const code = escapeHTML(error.code);
|
|
6273
6568
|
let html = "";
|
|
6274
6569
|
if (title)
|
|
6275
|
-
html += `<slot name="error-${
|
|
6570
|
+
html += `<slot name="error-${code}-title"><h3>${escapeHTML(title)}</h3></slot>`;
|
|
6276
6571
|
if (message)
|
|
6277
|
-
html += `<slot name="error-${
|
|
6572
|
+
html += `<slot name="error-${code}-message"><p>${escapeHTML(message)}</p></slot>`;
|
|
6278
6573
|
return html;
|
|
6279
6574
|
}
|
|
6280
6575
|
var observedAttributes = [
|
|
@@ -6284,7 +6579,7 @@ var observedAttributes = [
|
|
|
6284
6579
|
var MediaErrorDialog = class extends MediaChromeDialog {
|
|
6285
6580
|
constructor() {
|
|
6286
6581
|
super(...arguments);
|
|
6287
|
-
|
|
6582
|
+
__privateAdd12(this, _mediaError, null);
|
|
6288
6583
|
}
|
|
6289
6584
|
static get observedAttributes() {
|
|
6290
6585
|
return [...super.observedAttributes, ...observedAttributes];
|
|
@@ -6313,7 +6608,7 @@ var MediaErrorDialog = class extends MediaChromeDialog {
|
|
|
6313
6608
|
}
|
|
6314
6609
|
}
|
|
6315
6610
|
get mediaError() {
|
|
6316
|
-
return
|
|
6611
|
+
return __privateGet12(this, _mediaError);
|
|
6317
6612
|
}
|
|
6318
6613
|
set mediaError(value) {
|
|
6319
6614
|
__privateSet11(this, _mediaError, value);
|
|
@@ -6332,212 +6627,12 @@ var MediaErrorDialog = class extends MediaChromeDialog {
|
|
|
6332
6627
|
}
|
|
6333
6628
|
};
|
|
6334
6629
|
_mediaError = /* @__PURE__ */ new WeakMap();
|
|
6335
|
-
MediaErrorDialog.getSlotTemplateHTML =
|
|
6630
|
+
MediaErrorDialog.getSlotTemplateHTML = getSlotTemplateHTML9;
|
|
6336
6631
|
MediaErrorDialog.formatErrorMessage = formatErrorMessage;
|
|
6337
6632
|
if (!GlobalThis.customElements.get("media-error-dialog")) {
|
|
6338
6633
|
GlobalThis.customElements.define("media-error-dialog", MediaErrorDialog);
|
|
6339
6634
|
}
|
|
6340
6635
|
|
|
6341
|
-
// ../../node_modules/media-chrome/dist/media-keyboard-shortcuts-dialog.js
|
|
6342
|
-
var __accessCheck12 = (obj, member, msg) => {
|
|
6343
|
-
if (!member.has(obj))
|
|
6344
|
-
throw TypeError("Cannot " + msg);
|
|
6345
|
-
};
|
|
6346
|
-
var __privateGet12 = (obj, member, getter) => {
|
|
6347
|
-
__accessCheck12(obj, member, "read from private field");
|
|
6348
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
6349
|
-
};
|
|
6350
|
-
var __privateAdd12 = (obj, member, value) => {
|
|
6351
|
-
if (member.has(obj))
|
|
6352
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
6353
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6354
|
-
};
|
|
6355
|
-
var _clickHandler;
|
|
6356
|
-
var _keyDownHandler2;
|
|
6357
|
-
function getSlotTemplateHTML9(_attrs) {
|
|
6358
|
-
return (
|
|
6359
|
-
/*html*/
|
|
6360
|
-
`
|
|
6361
|
-
<style>
|
|
6362
|
-
:host {
|
|
6363
|
-
position: fixed;
|
|
6364
|
-
top: 0;
|
|
6365
|
-
left: 0;
|
|
6366
|
-
z-index: 9999;
|
|
6367
|
-
background: rgb(20 20 30 / .8);
|
|
6368
|
-
backdrop-filter: blur(10px);
|
|
6369
|
-
}
|
|
6370
|
-
|
|
6371
|
-
#content {
|
|
6372
|
-
display: block;
|
|
6373
|
-
width: clamp(400px, 40vw, 700px);
|
|
6374
|
-
max-width: 90vw;
|
|
6375
|
-
text-align: left;
|
|
6376
|
-
}
|
|
6377
|
-
|
|
6378
|
-
h2 {
|
|
6379
|
-
margin: 0 0 1.5rem 0;
|
|
6380
|
-
font-size: 1.5rem;
|
|
6381
|
-
font-weight: 500;
|
|
6382
|
-
text-align: center;
|
|
6383
|
-
}
|
|
6384
|
-
|
|
6385
|
-
.shortcuts-table {
|
|
6386
|
-
width: 100%;
|
|
6387
|
-
border-collapse: collapse;
|
|
6388
|
-
}
|
|
6389
|
-
|
|
6390
|
-
.shortcuts-table tr {
|
|
6391
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
6392
|
-
}
|
|
6393
|
-
|
|
6394
|
-
.shortcuts-table tr:last-child {
|
|
6395
|
-
border-bottom: none;
|
|
6396
|
-
}
|
|
6397
|
-
|
|
6398
|
-
.shortcuts-table td {
|
|
6399
|
-
padding: 0.75rem 0.5rem;
|
|
6400
|
-
}
|
|
6401
|
-
|
|
6402
|
-
.shortcuts-table td:first-child {
|
|
6403
|
-
text-align: right;
|
|
6404
|
-
padding-right: 1rem;
|
|
6405
|
-
width: 40%;
|
|
6406
|
-
min-width: 120px;
|
|
6407
|
-
}
|
|
6408
|
-
|
|
6409
|
-
.shortcuts-table td:last-child {
|
|
6410
|
-
padding-left: 1rem;
|
|
6411
|
-
}
|
|
6412
|
-
|
|
6413
|
-
.key {
|
|
6414
|
-
display: inline-block;
|
|
6415
|
-
background: rgba(255, 255, 255, 0.15);
|
|
6416
|
-
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
6417
|
-
border-radius: 4px;
|
|
6418
|
-
padding: 0.25rem 0.5rem;
|
|
6419
|
-
font-family: 'Courier New', monospace;
|
|
6420
|
-
font-size: 0.9rem;
|
|
6421
|
-
font-weight: 500;
|
|
6422
|
-
min-width: 1.5rem;
|
|
6423
|
-
text-align: center;
|
|
6424
|
-
margin: 0 0.2rem;
|
|
6425
|
-
}
|
|
6426
|
-
|
|
6427
|
-
.description {
|
|
6428
|
-
color: rgba(255, 255, 255, 0.9);
|
|
6429
|
-
font-size: 0.95rem;
|
|
6430
|
-
}
|
|
6431
|
-
|
|
6432
|
-
.key-combo {
|
|
6433
|
-
display: flex;
|
|
6434
|
-
align-items: center;
|
|
6435
|
-
justify-content: flex-end;
|
|
6436
|
-
gap: 0.3rem;
|
|
6437
|
-
}
|
|
6438
|
-
|
|
6439
|
-
.key-separator {
|
|
6440
|
-
color: rgba(255, 255, 255, 0.5);
|
|
6441
|
-
font-size: 0.9rem;
|
|
6442
|
-
}
|
|
6443
|
-
</style>
|
|
6444
|
-
<slot id="content">
|
|
6445
|
-
${formatKeyboardShortcuts()}
|
|
6446
|
-
</slot>
|
|
6447
|
-
`
|
|
6448
|
-
);
|
|
6449
|
-
}
|
|
6450
|
-
function formatKeyboardShortcuts() {
|
|
6451
|
-
const shortcuts = [
|
|
6452
|
-
{ keys: ["Space", "k"], description: "Toggle Playback" },
|
|
6453
|
-
{ keys: ["m"], description: "Toggle mute" },
|
|
6454
|
-
{ keys: ["f"], description: "Toggle fullscreen" },
|
|
6455
|
-
{ keys: ["c"], description: "Toggle captions or subtitles, if available" },
|
|
6456
|
-
{ keys: ["p"], description: "Toggle Picture in Picture" },
|
|
6457
|
-
{ keys: ["\u2190", "j"], description: "Seek back 10s" },
|
|
6458
|
-
{ keys: ["\u2192", "l"], description: "Seek forward 10s" },
|
|
6459
|
-
{ keys: ["\u2191"], description: "Turn volume up" },
|
|
6460
|
-
{ keys: ["\u2193"], description: "Turn volume down" },
|
|
6461
|
-
{ keys: ["< (SHIFT+,)"], description: "Decrease playback rate" },
|
|
6462
|
-
{ keys: ["> (SHIFT+.)"], description: "Increase playback rate" }
|
|
6463
|
-
];
|
|
6464
|
-
const rows = shortcuts.map(({ keys, description }) => {
|
|
6465
|
-
const keyCombo = keys.map(
|
|
6466
|
-
(key, index) => index > 0 ? `<span class="key-separator">or</span><span class="key">${key}</span>` : `<span class="key">${key}</span>`
|
|
6467
|
-
).join("");
|
|
6468
|
-
return `
|
|
6469
|
-
<tr>
|
|
6470
|
-
<td>
|
|
6471
|
-
<div class="key-combo">${keyCombo}</div>
|
|
6472
|
-
</td>
|
|
6473
|
-
<td class="description">${description}</td>
|
|
6474
|
-
</tr>
|
|
6475
|
-
`;
|
|
6476
|
-
}).join("");
|
|
6477
|
-
return `
|
|
6478
|
-
<h2>Keyboard Shortcuts</h2>
|
|
6479
|
-
<table class="shortcuts-table">${rows}</table>
|
|
6480
|
-
`;
|
|
6481
|
-
}
|
|
6482
|
-
var MediaKeyboardShortcutsDialog = class extends MediaChromeDialog {
|
|
6483
|
-
constructor() {
|
|
6484
|
-
super(...arguments);
|
|
6485
|
-
__privateAdd12(this, _clickHandler, (e) => {
|
|
6486
|
-
var _a3;
|
|
6487
|
-
if (!this.open)
|
|
6488
|
-
return;
|
|
6489
|
-
const content = (_a3 = this.shadowRoot) == null ? void 0 : _a3.querySelector("#content");
|
|
6490
|
-
if (!content)
|
|
6491
|
-
return;
|
|
6492
|
-
const path = e.composedPath();
|
|
6493
|
-
const isClickOnHost = path[0] === this || path.includes(this);
|
|
6494
|
-
const isClickInsideContent = path.includes(content);
|
|
6495
|
-
if (isClickOnHost && !isClickInsideContent) {
|
|
6496
|
-
this.open = false;
|
|
6497
|
-
}
|
|
6498
|
-
});
|
|
6499
|
-
__privateAdd12(this, _keyDownHandler2, (e) => {
|
|
6500
|
-
if (!this.open)
|
|
6501
|
-
return;
|
|
6502
|
-
const isShiftSlash = e.shiftKey && (e.key === "/" || e.key === "?");
|
|
6503
|
-
if ((e.key === "Escape" || isShiftSlash) && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
|
6504
|
-
this.open = false;
|
|
6505
|
-
e.preventDefault();
|
|
6506
|
-
e.stopPropagation();
|
|
6507
|
-
}
|
|
6508
|
-
});
|
|
6509
|
-
}
|
|
6510
|
-
connectedCallback() {
|
|
6511
|
-
super.connectedCallback();
|
|
6512
|
-
if (this.open) {
|
|
6513
|
-
this.addEventListener("click", __privateGet12(this, _clickHandler));
|
|
6514
|
-
document.addEventListener("keydown", __privateGet12(this, _keyDownHandler2));
|
|
6515
|
-
}
|
|
6516
|
-
}
|
|
6517
|
-
disconnectedCallback() {
|
|
6518
|
-
this.removeEventListener("click", __privateGet12(this, _clickHandler));
|
|
6519
|
-
document.removeEventListener("keydown", __privateGet12(this, _keyDownHandler2));
|
|
6520
|
-
}
|
|
6521
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
6522
|
-
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
6523
|
-
if (attrName === "open") {
|
|
6524
|
-
if (this.open) {
|
|
6525
|
-
this.addEventListener("click", __privateGet12(this, _clickHandler));
|
|
6526
|
-
document.addEventListener("keydown", __privateGet12(this, _keyDownHandler2));
|
|
6527
|
-
} else {
|
|
6528
|
-
this.removeEventListener("click", __privateGet12(this, _clickHandler));
|
|
6529
|
-
document.removeEventListener("keydown", __privateGet12(this, _keyDownHandler2));
|
|
6530
|
-
}
|
|
6531
|
-
}
|
|
6532
|
-
}
|
|
6533
|
-
};
|
|
6534
|
-
_clickHandler = /* @__PURE__ */ new WeakMap();
|
|
6535
|
-
_keyDownHandler2 = /* @__PURE__ */ new WeakMap();
|
|
6536
|
-
MediaKeyboardShortcutsDialog.getSlotTemplateHTML = getSlotTemplateHTML9;
|
|
6537
|
-
if (!GlobalThis.customElements.get("media-keyboard-shortcuts-dialog")) {
|
|
6538
|
-
GlobalThis.customElements.define("media-keyboard-shortcuts-dialog", MediaKeyboardShortcutsDialog);
|
|
6539
|
-
}
|
|
6540
|
-
|
|
6541
6636
|
// ../../node_modules/media-chrome/dist/media-fullscreen-button.js
|
|
6542
6637
|
var __accessCheck13 = (obj, member, msg) => {
|
|
6543
6638
|
if (!member.has(obj))
|
|
@@ -6803,7 +6898,7 @@ var __privateSet13 = (obj, member, value, setter) => {
|
|
|
6803
6898
|
};
|
|
6804
6899
|
var _mediaController6;
|
|
6805
6900
|
var _delay;
|
|
6806
|
-
var
|
|
6901
|
+
var Attributes7 = {
|
|
6807
6902
|
LOADING_DELAY: "loadingdelay",
|
|
6808
6903
|
NO_AUTOHIDE: "noautohide"
|
|
6809
6904
|
};
|
|
@@ -6891,12 +6986,12 @@ var MediaLoadingIndicator = class extends GlobalThis.HTMLElement {
|
|
|
6891
6986
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER,
|
|
6892
6987
|
MediaUIAttributes.MEDIA_PAUSED,
|
|
6893
6988
|
MediaUIAttributes.MEDIA_LOADING,
|
|
6894
|
-
|
|
6989
|
+
Attributes7.LOADING_DELAY
|
|
6895
6990
|
];
|
|
6896
6991
|
}
|
|
6897
6992
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
6898
6993
|
var _a3, _b2, _c, _d, _e;
|
|
6899
|
-
if (attrName ===
|
|
6994
|
+
if (attrName === Attributes7.LOADING_DELAY && oldValue !== newValue) {
|
|
6900
6995
|
this.loadingDelay = Number(newValue);
|
|
6901
6996
|
} else if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
6902
6997
|
if (oldValue) {
|
|
@@ -6965,10 +7060,10 @@ var MediaLoadingIndicator = class extends GlobalThis.HTMLElement {
|
|
|
6965
7060
|
setStringAttr(this, MediaStateReceiverAttributes.MEDIA_CONTROLLER, value);
|
|
6966
7061
|
}
|
|
6967
7062
|
get noAutohide() {
|
|
6968
|
-
return getBooleanAttr(this,
|
|
7063
|
+
return getBooleanAttr(this, Attributes7.NO_AUTOHIDE);
|
|
6969
7064
|
}
|
|
6970
7065
|
set noAutohide(value) {
|
|
6971
|
-
setBooleanAttr(this,
|
|
7066
|
+
setBooleanAttr(this, Attributes7.NO_AUTOHIDE, value);
|
|
6972
7067
|
}
|
|
6973
7068
|
};
|
|
6974
7069
|
_mediaController6 = /* @__PURE__ */ new WeakMap();
|
|
@@ -7186,7 +7281,7 @@ var __privateAdd15 = (obj, member, value) => {
|
|
|
7186
7281
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
7187
7282
|
};
|
|
7188
7283
|
var _rates;
|
|
7189
|
-
var
|
|
7284
|
+
var Attributes8 = {
|
|
7190
7285
|
RATES: "rates"
|
|
7191
7286
|
};
|
|
7192
7287
|
var DEFAULT_RATES = [1, 1.2, 1.5, 1.7, 2];
|
|
@@ -7216,7 +7311,7 @@ var MediaPlaybackRateButton = class extends MediaChromeButton {
|
|
|
7216
7311
|
constructor() {
|
|
7217
7312
|
var _a3;
|
|
7218
7313
|
super();
|
|
7219
|
-
__privateAdd15(this, _rates, new AttributeTokenList(this,
|
|
7314
|
+
__privateAdd15(this, _rates, new AttributeTokenList(this, Attributes8.RATES, {
|
|
7220
7315
|
defaultValue: DEFAULT_RATES
|
|
7221
7316
|
}));
|
|
7222
7317
|
this.container = this.shadowRoot.querySelector('slot[name="icon"]');
|
|
@@ -7226,12 +7321,12 @@ var MediaPlaybackRateButton = class extends MediaChromeButton {
|
|
|
7226
7321
|
return [
|
|
7227
7322
|
...super.observedAttributes,
|
|
7228
7323
|
MediaUIAttributes.MEDIA_PLAYBACK_RATE,
|
|
7229
|
-
|
|
7324
|
+
Attributes8.RATES
|
|
7230
7325
|
];
|
|
7231
7326
|
}
|
|
7232
7327
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
7233
7328
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
7234
|
-
if (attrName ===
|
|
7329
|
+
if (attrName === Attributes8.RATES) {
|
|
7235
7330
|
__privateGet15(this, _rates).value = newValue;
|
|
7236
7331
|
}
|
|
7237
7332
|
if (attrName === MediaUIAttributes.MEDIA_PLAYBACK_RATE) {
|
|
@@ -7385,7 +7480,7 @@ if (!GlobalThis.customElements.get("media-play-button")) {
|
|
|
7385
7480
|
}
|
|
7386
7481
|
|
|
7387
7482
|
// ../../node_modules/media-chrome/dist/media-poster-image.js
|
|
7388
|
-
var
|
|
7483
|
+
var Attributes9 = {
|
|
7389
7484
|
PLACEHOLDER_SRC: "placeholdersrc",
|
|
7390
7485
|
SRC: "src"
|
|
7391
7486
|
};
|
|
@@ -7425,7 +7520,7 @@ var setBackgroundImage = (el, image) => {
|
|
|
7425
7520
|
};
|
|
7426
7521
|
var MediaPosterImage = class extends GlobalThis.HTMLElement {
|
|
7427
7522
|
static get observedAttributes() {
|
|
7428
|
-
return [
|
|
7523
|
+
return [Attributes9.PLACEHOLDER_SRC, Attributes9.SRC];
|
|
7429
7524
|
}
|
|
7430
7525
|
constructor() {
|
|
7431
7526
|
super();
|
|
@@ -7437,14 +7532,14 @@ var MediaPosterImage = class extends GlobalThis.HTMLElement {
|
|
|
7437
7532
|
this.image = this.shadowRoot.querySelector("#image");
|
|
7438
7533
|
}
|
|
7439
7534
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
7440
|
-
if (attrName ===
|
|
7535
|
+
if (attrName === Attributes9.SRC) {
|
|
7441
7536
|
if (newValue == null) {
|
|
7442
|
-
this.image.removeAttribute(
|
|
7537
|
+
this.image.removeAttribute(Attributes9.SRC);
|
|
7443
7538
|
} else {
|
|
7444
|
-
this.image.setAttribute(
|
|
7539
|
+
this.image.setAttribute(Attributes9.SRC, newValue);
|
|
7445
7540
|
}
|
|
7446
7541
|
}
|
|
7447
|
-
if (attrName ===
|
|
7542
|
+
if (attrName === Attributes9.PLACEHOLDER_SRC) {
|
|
7448
7543
|
if (newValue == null) {
|
|
7449
7544
|
unsetBackgroundImage(this.image);
|
|
7450
7545
|
} else {
|
|
@@ -7456,19 +7551,19 @@ var MediaPosterImage = class extends GlobalThis.HTMLElement {
|
|
|
7456
7551
|
*
|
|
7457
7552
|
*/
|
|
7458
7553
|
get placeholderSrc() {
|
|
7459
|
-
return getStringAttr(this,
|
|
7554
|
+
return getStringAttr(this, Attributes9.PLACEHOLDER_SRC);
|
|
7460
7555
|
}
|
|
7461
7556
|
set placeholderSrc(value) {
|
|
7462
|
-
setStringAttr(this,
|
|
7557
|
+
setStringAttr(this, Attributes9.SRC, value);
|
|
7463
7558
|
}
|
|
7464
7559
|
/**
|
|
7465
7560
|
*
|
|
7466
7561
|
*/
|
|
7467
7562
|
get src() {
|
|
7468
|
-
return getStringAttr(this,
|
|
7563
|
+
return getStringAttr(this, Attributes9.SRC);
|
|
7469
7564
|
}
|
|
7470
7565
|
set src(value) {
|
|
7471
|
-
setStringAttr(this,
|
|
7566
|
+
setStringAttr(this, Attributes9.SRC, value);
|
|
7472
7567
|
}
|
|
7473
7568
|
};
|
|
7474
7569
|
MediaPosterImage.shadowRootOptions = { mode: "open" };
|
|
@@ -7786,7 +7881,7 @@ if (!GlobalThis.customElements.get("media-preview-time-display")) {
|
|
|
7786
7881
|
}
|
|
7787
7882
|
|
|
7788
7883
|
// ../../node_modules/media-chrome/dist/media-seek-backward-button.js
|
|
7789
|
-
var
|
|
7884
|
+
var Attributes10 = {
|
|
7790
7885
|
SEEK_OFFSET: "seekoffset"
|
|
7791
7886
|
};
|
|
7792
7887
|
var DEFAULT_SEEK_OFFSET2 = 30;
|
|
@@ -7818,24 +7913,24 @@ var MediaSeekBackwardButton = class extends MediaChromeButton {
|
|
|
7818
7913
|
return [
|
|
7819
7914
|
...super.observedAttributes,
|
|
7820
7915
|
MediaUIAttributes.MEDIA_CURRENT_TIME,
|
|
7821
|
-
|
|
7916
|
+
Attributes10.SEEK_OFFSET
|
|
7822
7917
|
];
|
|
7823
7918
|
}
|
|
7824
7919
|
connectedCallback() {
|
|
7825
7920
|
super.connectedCallback();
|
|
7826
7921
|
this.seekOffset = getNumericAttr(
|
|
7827
7922
|
this,
|
|
7828
|
-
|
|
7923
|
+
Attributes10.SEEK_OFFSET,
|
|
7829
7924
|
DEFAULT_SEEK_OFFSET2
|
|
7830
7925
|
);
|
|
7831
7926
|
}
|
|
7832
7927
|
attributeChangedCallback(attrName, _oldValue, newValue) {
|
|
7833
7928
|
super.attributeChangedCallback(attrName, _oldValue, newValue);
|
|
7834
7929
|
updateAriaLabel7(this, this.seekOffset);
|
|
7835
|
-
if (attrName ===
|
|
7930
|
+
if (attrName === Attributes10.SEEK_OFFSET) {
|
|
7836
7931
|
this.seekOffset = getNumericAttr(
|
|
7837
7932
|
this,
|
|
7838
|
-
|
|
7933
|
+
Attributes10.SEEK_OFFSET,
|
|
7839
7934
|
DEFAULT_SEEK_OFFSET2
|
|
7840
7935
|
);
|
|
7841
7936
|
}
|
|
@@ -7845,10 +7940,10 @@ var MediaSeekBackwardButton = class extends MediaChromeButton {
|
|
|
7845
7940
|
* Seek amount in seconds
|
|
7846
7941
|
*/
|
|
7847
7942
|
get seekOffset() {
|
|
7848
|
-
return getNumericAttr(this,
|
|
7943
|
+
return getNumericAttr(this, Attributes10.SEEK_OFFSET, DEFAULT_SEEK_OFFSET2);
|
|
7849
7944
|
}
|
|
7850
7945
|
set seekOffset(value) {
|
|
7851
|
-
setNumericAttr(this,
|
|
7946
|
+
setNumericAttr(this, Attributes10.SEEK_OFFSET, value);
|
|
7852
7947
|
this.setAttribute(
|
|
7853
7948
|
"aria-label",
|
|
7854
7949
|
t("seek back {seekOffset} seconds", { seekOffset: this.seekOffset })
|
|
@@ -7889,7 +7984,7 @@ if (!GlobalThis.customElements.get("media-seek-backward-button")) {
|
|
|
7889
7984
|
}
|
|
7890
7985
|
|
|
7891
7986
|
// ../../node_modules/media-chrome/dist/media-seek-forward-button.js
|
|
7892
|
-
var
|
|
7987
|
+
var Attributes11 = {
|
|
7893
7988
|
SEEK_OFFSET: "seekoffset"
|
|
7894
7989
|
};
|
|
7895
7990
|
var DEFAULT_SEEK_OFFSET3 = 30;
|
|
@@ -7921,24 +8016,24 @@ var MediaSeekForwardButton = class extends MediaChromeButton {
|
|
|
7921
8016
|
return [
|
|
7922
8017
|
...super.observedAttributes,
|
|
7923
8018
|
MediaUIAttributes.MEDIA_CURRENT_TIME,
|
|
7924
|
-
|
|
8019
|
+
Attributes11.SEEK_OFFSET
|
|
7925
8020
|
];
|
|
7926
8021
|
}
|
|
7927
8022
|
connectedCallback() {
|
|
7928
8023
|
super.connectedCallback();
|
|
7929
8024
|
this.seekOffset = getNumericAttr(
|
|
7930
8025
|
this,
|
|
7931
|
-
|
|
8026
|
+
Attributes11.SEEK_OFFSET,
|
|
7932
8027
|
DEFAULT_SEEK_OFFSET3
|
|
7933
8028
|
);
|
|
7934
8029
|
}
|
|
7935
8030
|
attributeChangedCallback(attrName, _oldValue, newValue) {
|
|
7936
8031
|
super.attributeChangedCallback(attrName, _oldValue, newValue);
|
|
7937
8032
|
updateAriaLabel8(this, this.seekOffset);
|
|
7938
|
-
if (attrName ===
|
|
8033
|
+
if (attrName === Attributes11.SEEK_OFFSET) {
|
|
7939
8034
|
this.seekOffset = getNumericAttr(
|
|
7940
8035
|
this,
|
|
7941
|
-
|
|
8036
|
+
Attributes11.SEEK_OFFSET,
|
|
7942
8037
|
DEFAULT_SEEK_OFFSET3
|
|
7943
8038
|
);
|
|
7944
8039
|
}
|
|
@@ -7948,10 +8043,10 @@ var MediaSeekForwardButton = class extends MediaChromeButton {
|
|
|
7948
8043
|
* Seek amount in seconds
|
|
7949
8044
|
*/
|
|
7950
8045
|
get seekOffset() {
|
|
7951
|
-
return getNumericAttr(this,
|
|
8046
|
+
return getNumericAttr(this, Attributes11.SEEK_OFFSET, DEFAULT_SEEK_OFFSET3);
|
|
7952
8047
|
}
|
|
7953
8048
|
set seekOffset(value) {
|
|
7954
|
-
setNumericAttr(this,
|
|
8049
|
+
setNumericAttr(this, Attributes11.SEEK_OFFSET, value);
|
|
7955
8050
|
this.setAttribute(
|
|
7956
8051
|
"aria-label",
|
|
7957
8052
|
t("seek forward {seekOffset} seconds", { seekOffset: this.seekOffset })
|
|
@@ -8025,13 +8120,13 @@ var _makeInteractive;
|
|
|
8025
8120
|
var makeInteractive_fn;
|
|
8026
8121
|
var _makeNonInteractive;
|
|
8027
8122
|
var makeNonInteractive_fn;
|
|
8028
|
-
var
|
|
8123
|
+
var Attributes12 = {
|
|
8029
8124
|
REMAINING: "remaining",
|
|
8030
8125
|
SHOW_DURATION: "showduration",
|
|
8031
8126
|
NO_TOGGLE: "notoggle"
|
|
8032
8127
|
};
|
|
8033
8128
|
var CombinedAttributes = [
|
|
8034
|
-
...Object.values(
|
|
8129
|
+
...Object.values(Attributes12),
|
|
8035
8130
|
MediaUIAttributes.MEDIA_CURRENT_TIME,
|
|
8036
8131
|
MediaUIAttributes.MEDIA_DURATION,
|
|
8037
8132
|
MediaUIAttributes.MEDIA_SEEKABLE
|
|
@@ -8152,7 +8247,7 @@ var MediaTimeDisplay = class extends MediaTextDisplay {
|
|
|
8152
8247
|
} else {
|
|
8153
8248
|
__privateMethod6(this, _makeNonInteractive, makeNonInteractive_fn).call(this);
|
|
8154
8249
|
}
|
|
8155
|
-
} else if (attrName ===
|
|
8250
|
+
} else if (attrName === Attributes12.NO_TOGGLE && newValue !== oldValue) {
|
|
8156
8251
|
if (this.noToggle) {
|
|
8157
8252
|
__privateMethod6(this, _makeNonInteractive, makeNonInteractive_fn).call(this);
|
|
8158
8253
|
} else {
|
|
@@ -8174,28 +8269,28 @@ var MediaTimeDisplay = class extends MediaTextDisplay {
|
|
|
8174
8269
|
* Whether to show the remaining time
|
|
8175
8270
|
*/
|
|
8176
8271
|
get remaining() {
|
|
8177
|
-
return getBooleanAttr(this,
|
|
8272
|
+
return getBooleanAttr(this, Attributes12.REMAINING);
|
|
8178
8273
|
}
|
|
8179
8274
|
set remaining(show) {
|
|
8180
|
-
setBooleanAttr(this,
|
|
8275
|
+
setBooleanAttr(this, Attributes12.REMAINING, show);
|
|
8181
8276
|
}
|
|
8182
8277
|
/**
|
|
8183
8278
|
* Whether to show the duration
|
|
8184
8279
|
*/
|
|
8185
8280
|
get showDuration() {
|
|
8186
|
-
return getBooleanAttr(this,
|
|
8281
|
+
return getBooleanAttr(this, Attributes12.SHOW_DURATION);
|
|
8187
8282
|
}
|
|
8188
8283
|
set showDuration(show) {
|
|
8189
|
-
setBooleanAttr(this,
|
|
8284
|
+
setBooleanAttr(this, Attributes12.SHOW_DURATION, show);
|
|
8190
8285
|
}
|
|
8191
8286
|
/**
|
|
8192
8287
|
* Disable the default behavior that toggles between current and remaining time
|
|
8193
8288
|
*/
|
|
8194
8289
|
get noToggle() {
|
|
8195
|
-
return getBooleanAttr(this,
|
|
8290
|
+
return getBooleanAttr(this, Attributes12.NO_TOGGLE);
|
|
8196
8291
|
}
|
|
8197
8292
|
set noToggle(noToggle) {
|
|
8198
|
-
setBooleanAttr(this,
|
|
8293
|
+
setBooleanAttr(this, Attributes12.NO_TOGGLE, noToggle);
|
|
8199
8294
|
}
|
|
8200
8295
|
// Props derived from media UI attributes
|
|
8201
8296
|
/**
|
|
@@ -10534,7 +10629,7 @@ function getTemplateHTML12(_attrs) {
|
|
|
10534
10629
|
`
|
|
10535
10630
|
);
|
|
10536
10631
|
}
|
|
10537
|
-
var
|
|
10632
|
+
var Attributes13 = {
|
|
10538
10633
|
STYLE: "style",
|
|
10539
10634
|
HIDDEN: "hidden",
|
|
10540
10635
|
DISABLED: "disabled",
|
|
@@ -10603,10 +10698,10 @@ var MediaChromeMenu = class extends GlobalThis.HTMLElement {
|
|
|
10603
10698
|
}
|
|
10604
10699
|
static get observedAttributes() {
|
|
10605
10700
|
return [
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10701
|
+
Attributes13.DISABLED,
|
|
10702
|
+
Attributes13.HIDDEN,
|
|
10703
|
+
Attributes13.STYLE,
|
|
10704
|
+
Attributes13.ANCHOR,
|
|
10610
10705
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER
|
|
10611
10706
|
];
|
|
10612
10707
|
}
|
|
@@ -10683,7 +10778,7 @@ var MediaChromeMenu = class extends GlobalThis.HTMLElement {
|
|
|
10683
10778
|
}
|
|
10684
10779
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
10685
10780
|
var _a3, _b2, _c, _d;
|
|
10686
|
-
if (attrName ===
|
|
10781
|
+
if (attrName === Attributes13.HIDDEN && newValue !== oldValue) {
|
|
10687
10782
|
if (!__privateGet25(this, _isPopover))
|
|
10688
10783
|
__privateSet22(this, _isPopover, true);
|
|
10689
10784
|
if (this.hidden) {
|
|
@@ -10707,13 +10802,13 @@ var MediaChromeMenu = class extends GlobalThis.HTMLElement {
|
|
|
10707
10802
|
__privateSet22(this, _mediaController8, getAttributeMediaController(this));
|
|
10708
10803
|
(_d = (_c = __privateGet25(this, _mediaController8)) == null ? void 0 : _c.associateElement) == null ? void 0 : _d.call(_c, this);
|
|
10709
10804
|
}
|
|
10710
|
-
} else if (attrName ===
|
|
10805
|
+
} else if (attrName === Attributes13.DISABLED && newValue !== oldValue) {
|
|
10711
10806
|
if (newValue == null) {
|
|
10712
10807
|
this.enable();
|
|
10713
10808
|
} else {
|
|
10714
10809
|
this.disable();
|
|
10715
10810
|
}
|
|
10716
|
-
} else if (attrName ===
|
|
10811
|
+
} else if (attrName === Attributes13.STYLE && newValue !== oldValue) {
|
|
10717
10812
|
__privateMethod9(this, _updateLayoutStyle, updateLayoutStyle_fn).call(this);
|
|
10718
10813
|
}
|
|
10719
10814
|
}
|
|
@@ -11254,7 +11349,7 @@ function getTemplateHTML13(_attrs) {
|
|
|
11254
11349
|
function getSuffixSlotInnerHTML(_attrs) {
|
|
11255
11350
|
return "";
|
|
11256
11351
|
}
|
|
11257
|
-
var
|
|
11352
|
+
var Attributes14 = {
|
|
11258
11353
|
TYPE: "type",
|
|
11259
11354
|
VALUE: "value",
|
|
11260
11355
|
CHECKED: "checked",
|
|
@@ -11307,10 +11402,10 @@ var MediaChromeMenuItem = class extends GlobalThis.HTMLElement {
|
|
|
11307
11402
|
}
|
|
11308
11403
|
static get observedAttributes() {
|
|
11309
11404
|
return [
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11405
|
+
Attributes14.TYPE,
|
|
11406
|
+
Attributes14.DISABLED,
|
|
11407
|
+
Attributes14.CHECKED,
|
|
11408
|
+
Attributes14.VALUE
|
|
11314
11409
|
];
|
|
11315
11410
|
}
|
|
11316
11411
|
enable() {
|
|
@@ -11346,11 +11441,11 @@ var MediaChromeMenuItem = class extends GlobalThis.HTMLElement {
|
|
|
11346
11441
|
}
|
|
11347
11442
|
}
|
|
11348
11443
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
11349
|
-
if (attrName ===
|
|
11444
|
+
if (attrName === Attributes14.CHECKED && isCheckable(this) && !__privateGet26(this, _dirty)) {
|
|
11350
11445
|
this.setAttribute("aria-checked", newValue != null ? "true" : "false");
|
|
11351
|
-
} else if (attrName ===
|
|
11446
|
+
} else if (attrName === Attributes14.TYPE && newValue !== oldValue) {
|
|
11352
11447
|
this.role = "menuitem" + newValue;
|
|
11353
|
-
} else if (attrName ===
|
|
11448
|
+
} else if (attrName === Attributes14.DISABLED && newValue !== oldValue) {
|
|
11354
11449
|
if (newValue == null) {
|
|
11355
11450
|
this.enable();
|
|
11356
11451
|
} else {
|
|
@@ -11359,7 +11454,7 @@ var MediaChromeMenuItem = class extends GlobalThis.HTMLElement {
|
|
|
11359
11454
|
}
|
|
11360
11455
|
}
|
|
11361
11456
|
connectedCallback() {
|
|
11362
|
-
if (!this.hasAttribute(
|
|
11457
|
+
if (!this.hasAttribute(Attributes14.DISABLED)) {
|
|
11363
11458
|
this.enable();
|
|
11364
11459
|
}
|
|
11365
11460
|
this.role = "menuitem" + this.type;
|
|
@@ -11408,17 +11503,17 @@ var MediaChromeMenuItem = class extends GlobalThis.HTMLElement {
|
|
|
11408
11503
|
}
|
|
11409
11504
|
get type() {
|
|
11410
11505
|
var _a3;
|
|
11411
|
-
return (_a3 = this.getAttribute(
|
|
11506
|
+
return (_a3 = this.getAttribute(Attributes14.TYPE)) != null ? _a3 : "";
|
|
11412
11507
|
}
|
|
11413
11508
|
set type(val) {
|
|
11414
|
-
this.setAttribute(
|
|
11509
|
+
this.setAttribute(Attributes14.TYPE, `${val}`);
|
|
11415
11510
|
}
|
|
11416
11511
|
get value() {
|
|
11417
11512
|
var _a3;
|
|
11418
|
-
return (_a3 = this.getAttribute(
|
|
11513
|
+
return (_a3 = this.getAttribute(Attributes14.VALUE)) != null ? _a3 : this.text;
|
|
11419
11514
|
}
|
|
11420
11515
|
set value(val) {
|
|
11421
|
-
this.setAttribute(
|
|
11516
|
+
this.setAttribute(Attributes14.VALUE, val);
|
|
11422
11517
|
}
|
|
11423
11518
|
get text() {
|
|
11424
11519
|
var _a3;
|
|
@@ -12280,7 +12375,7 @@ var _render3;
|
|
|
12280
12375
|
var render_fn3;
|
|
12281
12376
|
var _onChange3;
|
|
12282
12377
|
var onChange_fn3;
|
|
12283
|
-
var
|
|
12378
|
+
var Attributes15 = {
|
|
12284
12379
|
RATES: "rates"
|
|
12285
12380
|
};
|
|
12286
12381
|
var MediaPlaybackRateMenu = class extends MediaChromeMenu {
|
|
@@ -12288,7 +12383,7 @@ var MediaPlaybackRateMenu = class extends MediaChromeMenu {
|
|
|
12288
12383
|
super();
|
|
12289
12384
|
__privateAdd29(this, _render3);
|
|
12290
12385
|
__privateAdd29(this, _onChange3);
|
|
12291
|
-
__privateAdd29(this, _rates2, new AttributeTokenList(this,
|
|
12386
|
+
__privateAdd29(this, _rates2, new AttributeTokenList(this, Attributes15.RATES, {
|
|
12292
12387
|
defaultValue: DEFAULT_RATES
|
|
12293
12388
|
}));
|
|
12294
12389
|
__privateMethod13(this, _render3, render_fn3).call(this);
|
|
@@ -12297,7 +12392,7 @@ var MediaPlaybackRateMenu = class extends MediaChromeMenu {
|
|
|
12297
12392
|
return [
|
|
12298
12393
|
...super.observedAttributes,
|
|
12299
12394
|
MediaUIAttributes.MEDIA_PLAYBACK_RATE,
|
|
12300
|
-
|
|
12395
|
+
Attributes15.RATES
|
|
12301
12396
|
];
|
|
12302
12397
|
}
|
|
12303
12398
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
@@ -12305,7 +12400,7 @@ var MediaPlaybackRateMenu = class extends MediaChromeMenu {
|
|
|
12305
12400
|
if (attrName === MediaUIAttributes.MEDIA_PLAYBACK_RATE && oldValue != newValue) {
|
|
12306
12401
|
this.value = newValue;
|
|
12307
12402
|
__privateMethod13(this, _render3, render_fn3).call(this);
|
|
12308
|
-
} else if (attrName ===
|
|
12403
|
+
} else if (attrName === Attributes15.RATES && oldValue != newValue) {
|
|
12309
12404
|
__privateGet29(this, _rates2).value = newValue;
|
|
12310
12405
|
__privateMethod13(this, _render3, render_fn3).call(this);
|
|
12311
12406
|
}
|