@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
|
@@ -230,6 +230,16 @@ function isNumericString(str) {
|
|
|
230
230
|
return !isNaN(str) && !isNaN(parseFloat(str));
|
|
231
231
|
}
|
|
232
232
|
var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
233
|
+
var htmlEscapes = {
|
|
234
|
+
"&": "&",
|
|
235
|
+
"<": "<",
|
|
236
|
+
">": ">",
|
|
237
|
+
'"': """,
|
|
238
|
+
"'": "'"
|
|
239
|
+
};
|
|
240
|
+
function escapeHTML(value) {
|
|
241
|
+
return String(value).replace(/[&<>"']/g, (char) => htmlEscapes[char]);
|
|
242
|
+
}
|
|
233
243
|
|
|
234
244
|
// ../../node_modules/media-chrome/dist/lang/en.js
|
|
235
245
|
var En = {
|
|
@@ -1102,7 +1112,11 @@ function getTemplateHTML2(_attrs) {
|
|
|
1102
1112
|
|
|
1103
1113
|
${/* ::slotted([slot=poster]) doesn't work for slot fallback content so hide parent slot instead */
|
|
1104
1114
|
""}
|
|
1105
|
-
:
|
|
1115
|
+
${/* Hide the poster once playback started: played, or moved off 0 (e.g. seeked while paused).
|
|
1116
|
+
* The current time check only applies to on-demand media, since live streams start off 0. */
|
|
1117
|
+
""}
|
|
1118
|
+
:host(:not([${Attributes.AUDIO}])[${MediaUIAttributes.MEDIA_HAS_PLAYED}]) slot[name=poster],
|
|
1119
|
+
:host(:not([${Attributes.AUDIO}])[${MediaUIAttributes.MEDIA_STREAM_TYPE}="${StreamTypes.ON_DEMAND}"][${MediaUIAttributes.MEDIA_CURRENT_TIME}]:not([${MediaUIAttributes.MEDIA_CURRENT_TIME}="0"])) slot[name=poster] {
|
|
1106
1120
|
display: none;
|
|
1107
1121
|
}
|
|
1108
1122
|
|
|
@@ -1507,7 +1521,7 @@ if (!GlobalThis.customElements.get("media-container")) {
|
|
|
1507
1521
|
GlobalThis.customElements.define("media-container", MediaContainer);
|
|
1508
1522
|
}
|
|
1509
1523
|
|
|
1510
|
-
// ../../node_modules/media-chrome/dist/
|
|
1524
|
+
// ../../node_modules/media-chrome/dist/media-chrome-dialog.js
|
|
1511
1525
|
var __accessCheck3 = (obj, member, msg) => {
|
|
1512
1526
|
if (!member.has(obj))
|
|
1513
1527
|
throw TypeError("Cannot " + msg);
|
|
@@ -1526,152 +1540,659 @@ var __privateSet3 = (obj, member, value, setter) => {
|
|
|
1526
1540
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
1527
1541
|
return value;
|
|
1528
1542
|
};
|
|
1529
|
-
var
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
var
|
|
1534
|
-
var
|
|
1535
|
-
var
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1543
|
+
var __privateMethod2 = (obj, member, method) => {
|
|
1544
|
+
__accessCheck3(obj, member, "access private method");
|
|
1545
|
+
return method;
|
|
1546
|
+
};
|
|
1547
|
+
var _isInit;
|
|
1548
|
+
var _previouslyFocused;
|
|
1549
|
+
var _invokerElement;
|
|
1550
|
+
var _init;
|
|
1551
|
+
var init_fn;
|
|
1552
|
+
var _handleOpen;
|
|
1553
|
+
var handleOpen_fn;
|
|
1554
|
+
var _handleClosed;
|
|
1555
|
+
var handleClosed_fn;
|
|
1556
|
+
var _handleInvoke;
|
|
1557
|
+
var handleInvoke_fn;
|
|
1558
|
+
var _handleFocusOut;
|
|
1559
|
+
var handleFocusOut_fn;
|
|
1560
|
+
var _handleKeyDown;
|
|
1561
|
+
var handleKeyDown_fn;
|
|
1562
|
+
function getTemplateHTML3(_attrs) {
|
|
1563
|
+
return (
|
|
1564
|
+
/*html*/
|
|
1565
|
+
`
|
|
1566
|
+
<style>
|
|
1567
|
+
:host {
|
|
1568
|
+
font: var(--media-font,
|
|
1569
|
+
var(--media-font-weight, normal)
|
|
1570
|
+
var(--media-font-size, 14px) /
|
|
1571
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
1572
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
1573
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
1574
|
+
display: var(--media-dialog-display, inline-flex);
|
|
1575
|
+
justify-content: center;
|
|
1576
|
+
align-items: center;
|
|
1577
|
+
${/** The hide transition is defined below after a short delay. */
|
|
1578
|
+
""}
|
|
1579
|
+
transition-behavior: allow-discrete;
|
|
1580
|
+
visibility: hidden;
|
|
1581
|
+
opacity: 0;
|
|
1582
|
+
transform: translateY(2px) scale(.99);
|
|
1583
|
+
pointer-events: none;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
:host([open]) {
|
|
1587
|
+
transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
|
|
1588
|
+
visibility: visible;
|
|
1589
|
+
opacity: 1;
|
|
1590
|
+
transform: translateY(0) scale(1);
|
|
1591
|
+
pointer-events: auto;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
#content {
|
|
1595
|
+
display: flex;
|
|
1596
|
+
position: relative;
|
|
1597
|
+
box-sizing: border-box;
|
|
1598
|
+
width: min(320px, 100%);
|
|
1599
|
+
word-wrap: break-word;
|
|
1600
|
+
max-height: 100%;
|
|
1601
|
+
overflow: auto;
|
|
1602
|
+
text-align: center;
|
|
1603
|
+
line-height: 1.4;
|
|
1604
|
+
}
|
|
1605
|
+
</style>
|
|
1606
|
+
${this.getSlotTemplateHTML(_attrs)}
|
|
1607
|
+
`
|
|
1608
|
+
);
|
|
1609
|
+
}
|
|
1610
|
+
function getSlotTemplateHTML(_attrs) {
|
|
1611
|
+
return (
|
|
1612
|
+
/*html*/
|
|
1613
|
+
`
|
|
1614
|
+
<slot id="content"></slot>
|
|
1615
|
+
`
|
|
1616
|
+
);
|
|
1617
|
+
}
|
|
1618
|
+
var Attributes2 = {
|
|
1619
|
+
OPEN: "open",
|
|
1620
|
+
ANCHOR: "anchor"
|
|
1621
|
+
};
|
|
1622
|
+
var MediaChromeDialog = class extends GlobalThis.HTMLElement {
|
|
1623
|
+
constructor() {
|
|
1624
|
+
super();
|
|
1625
|
+
__privateAdd3(this, _init);
|
|
1626
|
+
__privateAdd3(this, _handleOpen);
|
|
1627
|
+
__privateAdd3(this, _handleClosed);
|
|
1628
|
+
__privateAdd3(this, _handleInvoke);
|
|
1629
|
+
__privateAdd3(this, _handleFocusOut);
|
|
1630
|
+
__privateAdd3(this, _handleKeyDown);
|
|
1631
|
+
__privateAdd3(this, _isInit, false);
|
|
1632
|
+
__privateAdd3(this, _previouslyFocused, null);
|
|
1633
|
+
__privateAdd3(this, _invokerElement, null);
|
|
1565
1634
|
}
|
|
1566
|
-
|
|
1567
|
-
return [
|
|
1635
|
+
static get observedAttributes() {
|
|
1636
|
+
return [Attributes2.OPEN, Attributes2.ANCHOR];
|
|
1568
1637
|
}
|
|
1569
|
-
|
|
1570
|
-
return
|
|
1638
|
+
get open() {
|
|
1639
|
+
return getBooleanAttr(this, Attributes2.OPEN);
|
|
1571
1640
|
}
|
|
1572
|
-
|
|
1573
|
-
|
|
1641
|
+
set open(value) {
|
|
1642
|
+
setBooleanAttr(this, Attributes2.OPEN, value);
|
|
1574
1643
|
}
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1644
|
+
handleEvent(event) {
|
|
1645
|
+
switch (event.type) {
|
|
1646
|
+
case "invoke":
|
|
1647
|
+
__privateMethod2(this, _handleInvoke, handleInvoke_fn).call(this, event);
|
|
1648
|
+
break;
|
|
1649
|
+
case "focusout":
|
|
1650
|
+
__privateMethod2(this, _handleFocusOut, handleFocusOut_fn).call(this, event);
|
|
1651
|
+
break;
|
|
1652
|
+
case "keydown":
|
|
1653
|
+
__privateMethod2(this, _handleKeyDown, handleKeyDown_fn).call(this, event);
|
|
1654
|
+
break;
|
|
1580
1655
|
}
|
|
1581
|
-
(_b2 = __privateGet3(this, _el)) == null ? void 0 : _b2.setAttribute(`${__privateGet3(this, _attr)}`, `${this.value}`);
|
|
1582
1656
|
}
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1657
|
+
connectedCallback() {
|
|
1658
|
+
__privateMethod2(this, _init, init_fn).call(this);
|
|
1659
|
+
if (!this.role) {
|
|
1660
|
+
this.role = "dialog";
|
|
1661
|
+
}
|
|
1662
|
+
this.addEventListener("invoke", this);
|
|
1663
|
+
this.addEventListener("focusout", this);
|
|
1664
|
+
this.addEventListener("keydown", this);
|
|
1587
1665
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1666
|
+
disconnectedCallback() {
|
|
1667
|
+
this.removeEventListener("invoke", this);
|
|
1668
|
+
this.removeEventListener("focusout", this);
|
|
1669
|
+
this.removeEventListener("keydown", this);
|
|
1590
1670
|
}
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1671
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
1672
|
+
__privateMethod2(this, _init, init_fn).call(this);
|
|
1673
|
+
if (attrName === Attributes2.OPEN && newValue !== oldValue) {
|
|
1674
|
+
if (this.open) {
|
|
1675
|
+
__privateMethod2(this, _handleOpen, handleOpen_fn).call(this);
|
|
1596
1676
|
} else {
|
|
1597
|
-
this.
|
|
1598
|
-
return false;
|
|
1677
|
+
__privateMethod2(this, _handleClosed, handleClosed_fn).call(this);
|
|
1599
1678
|
}
|
|
1600
1679
|
}
|
|
1601
|
-
if (this.contains(token)) {
|
|
1602
|
-
this.remove(token);
|
|
1603
|
-
return false;
|
|
1604
|
-
}
|
|
1605
|
-
this.add(token);
|
|
1606
|
-
return true;
|
|
1607
1680
|
}
|
|
1608
|
-
|
|
1609
|
-
this
|
|
1610
|
-
this.
|
|
1611
|
-
|
|
1681
|
+
focus() {
|
|
1682
|
+
__privateSet3(this, _previouslyFocused, getActiveElement());
|
|
1683
|
+
const focusCancelled = !this.dispatchEvent(new Event("focus", { composed: true, cancelable: true }));
|
|
1684
|
+
const focusInCancelled = !this.dispatchEvent(new Event("focusin", { composed: true, bubbles: true, cancelable: true }));
|
|
1685
|
+
if (focusCancelled || focusInCancelled)
|
|
1686
|
+
return;
|
|
1687
|
+
const focusable = this.querySelector(
|
|
1688
|
+
'[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]'
|
|
1689
|
+
);
|
|
1690
|
+
focusable == null ? void 0 : focusable.focus();
|
|
1691
|
+
}
|
|
1692
|
+
get keysUsed() {
|
|
1693
|
+
return ["Escape", "Tab"];
|
|
1612
1694
|
}
|
|
1613
1695
|
};
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
};
|
|
1633
|
-
};
|
|
1634
|
-
var parseTextTracksStr = (textTracksStr = "", textTrackLikeObj = {}) => {
|
|
1635
|
-
return splitTextTracksStr(textTracksStr).map((textTrackStr) => {
|
|
1636
|
-
const textTrackObj = parseTextTrackStr(textTrackStr);
|
|
1637
|
-
return {
|
|
1638
|
-
...textTrackLikeObj,
|
|
1639
|
-
...textTrackObj
|
|
1640
|
-
};
|
|
1641
|
-
});
|
|
1642
|
-
};
|
|
1643
|
-
var parseTracks = (trackOrTracks) => {
|
|
1644
|
-
if (!trackOrTracks)
|
|
1645
|
-
return [];
|
|
1646
|
-
if (Array.isArray(trackOrTracks)) {
|
|
1647
|
-
return trackOrTracks.map((trackObjOrStr) => {
|
|
1648
|
-
if (typeof trackObjOrStr === "string") {
|
|
1649
|
-
return parseTextTrackStr(trackObjOrStr);
|
|
1650
|
-
}
|
|
1651
|
-
return trackObjOrStr;
|
|
1696
|
+
_isInit = /* @__PURE__ */ new WeakMap();
|
|
1697
|
+
_previouslyFocused = /* @__PURE__ */ new WeakMap();
|
|
1698
|
+
_invokerElement = /* @__PURE__ */ new WeakMap();
|
|
1699
|
+
_init = /* @__PURE__ */ new WeakSet();
|
|
1700
|
+
init_fn = function() {
|
|
1701
|
+
if (__privateGet3(this, _isInit))
|
|
1702
|
+
return;
|
|
1703
|
+
__privateSet3(this, _isInit, true);
|
|
1704
|
+
if (!this.shadowRoot) {
|
|
1705
|
+
this.attachShadow(this.constructor.shadowRootOptions);
|
|
1706
|
+
const attrs = namedNodeMapToObject(this.attributes);
|
|
1707
|
+
this.shadowRoot.innerHTML = this.constructor.getTemplateHTML(attrs);
|
|
1708
|
+
queueMicrotask(() => {
|
|
1709
|
+
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
1710
|
+
style.setProperty(
|
|
1711
|
+
"transition",
|
|
1712
|
+
`display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in`
|
|
1713
|
+
);
|
|
1652
1714
|
});
|
|
1653
1715
|
}
|
|
1654
|
-
if (typeof trackOrTracks === "string") {
|
|
1655
|
-
return parseTextTracksStr(trackOrTracks);
|
|
1656
|
-
}
|
|
1657
|
-
return [trackOrTracks];
|
|
1658
1716
|
};
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
)}
|
|
1717
|
+
_handleOpen = /* @__PURE__ */ new WeakSet();
|
|
1718
|
+
handleOpen_fn = function() {
|
|
1719
|
+
var _a3;
|
|
1720
|
+
(_a3 = __privateGet3(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "true");
|
|
1721
|
+
this.dispatchEvent(new Event("open", { composed: true, bubbles: true }));
|
|
1722
|
+
this.addEventListener("transitionend", () => this.focus(), { once: true });
|
|
1665
1723
|
};
|
|
1666
|
-
|
|
1667
|
-
|
|
1724
|
+
_handleClosed = /* @__PURE__ */ new WeakSet();
|
|
1725
|
+
handleClosed_fn = function() {
|
|
1726
|
+
var _a3;
|
|
1727
|
+
(_a3 = __privateGet3(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "false");
|
|
1728
|
+
this.dispatchEvent(new Event("close", { composed: true, bubbles: true }));
|
|
1668
1729
|
};
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1730
|
+
_handleInvoke = /* @__PURE__ */ new WeakSet();
|
|
1731
|
+
handleInvoke_fn = function(event) {
|
|
1732
|
+
__privateSet3(this, _invokerElement, event.relatedTarget);
|
|
1733
|
+
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
1734
|
+
this.open = !this.open;
|
|
1735
|
+
}
|
|
1736
|
+
};
|
|
1737
|
+
_handleFocusOut = /* @__PURE__ */ new WeakSet();
|
|
1738
|
+
handleFocusOut_fn = function(event) {
|
|
1739
|
+
var _a3;
|
|
1740
|
+
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
1741
|
+
(_a3 = __privateGet3(this, _previouslyFocused)) == null ? void 0 : _a3.focus();
|
|
1742
|
+
if (__privateGet3(this, _invokerElement) && __privateGet3(this, _invokerElement) !== event.relatedTarget && this.open) {
|
|
1743
|
+
this.open = false;
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
};
|
|
1747
|
+
_handleKeyDown = /* @__PURE__ */ new WeakSet();
|
|
1748
|
+
handleKeyDown_fn = function(event) {
|
|
1749
|
+
var _a3, _b2, _c, _d, _e;
|
|
1750
|
+
const { key, ctrlKey, altKey, metaKey } = event;
|
|
1751
|
+
if (ctrlKey || altKey || metaKey) {
|
|
1752
|
+
return;
|
|
1753
|
+
}
|
|
1754
|
+
if (!this.keysUsed.includes(key)) {
|
|
1755
|
+
return;
|
|
1756
|
+
}
|
|
1757
|
+
event.preventDefault();
|
|
1758
|
+
event.stopPropagation();
|
|
1759
|
+
if (key === "Tab") {
|
|
1760
|
+
if (event.shiftKey) {
|
|
1761
|
+
(_b2 = (_a3 = this.previousElementSibling) == null ? void 0 : _a3.focus) == null ? void 0 : _b2.call(_a3);
|
|
1762
|
+
} else {
|
|
1763
|
+
(_d = (_c = this.nextElementSibling) == null ? void 0 : _c.focus) == null ? void 0 : _d.call(_c);
|
|
1764
|
+
}
|
|
1765
|
+
this.blur();
|
|
1766
|
+
} else if (key === "Escape") {
|
|
1767
|
+
(_e = __privateGet3(this, _previouslyFocused)) == null ? void 0 : _e.focus();
|
|
1768
|
+
this.open = false;
|
|
1769
|
+
}
|
|
1770
|
+
};
|
|
1771
|
+
MediaChromeDialog.shadowRootOptions = { mode: "open" };
|
|
1772
|
+
MediaChromeDialog.getTemplateHTML = getTemplateHTML3;
|
|
1773
|
+
MediaChromeDialog.getSlotTemplateHTML = getSlotTemplateHTML;
|
|
1774
|
+
if (!GlobalThis.customElements.get("media-chrome-dialog")) {
|
|
1775
|
+
GlobalThis.customElements.define("media-chrome-dialog", MediaChromeDialog);
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
// ../../node_modules/media-chrome/dist/media-keyboard-shortcuts-dialog.js
|
|
1779
|
+
var __accessCheck4 = (obj, member, msg) => {
|
|
1780
|
+
if (!member.has(obj))
|
|
1781
|
+
throw TypeError("Cannot " + msg);
|
|
1782
|
+
};
|
|
1783
|
+
var __privateGet4 = (obj, member, getter) => {
|
|
1784
|
+
__accessCheck4(obj, member, "read from private field");
|
|
1785
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
1786
|
+
};
|
|
1787
|
+
var __privateAdd4 = (obj, member, value) => {
|
|
1788
|
+
if (member.has(obj))
|
|
1789
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
1790
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
1791
|
+
};
|
|
1792
|
+
var _clickHandler;
|
|
1793
|
+
var _keyDownHandler;
|
|
1794
|
+
var Attributes3 = {
|
|
1795
|
+
HOTKEYS: "hotkeys"
|
|
1796
|
+
};
|
|
1797
|
+
var shortcuts = [
|
|
1798
|
+
{
|
|
1799
|
+
keys: [{ key: " ", label: "Space" }, { key: "k" }],
|
|
1800
|
+
description: "Toggle Playback"
|
|
1801
|
+
},
|
|
1802
|
+
{ keys: [{ key: "m" }], description: "Toggle mute" },
|
|
1803
|
+
{ keys: [{ key: "f" }], description: "Toggle fullscreen" },
|
|
1804
|
+
{
|
|
1805
|
+
keys: [{ key: "c" }],
|
|
1806
|
+
description: "Toggle captions or subtitles, if available"
|
|
1807
|
+
},
|
|
1808
|
+
{ keys: [{ key: "p" }], description: "Toggle Picture in Picture" },
|
|
1809
|
+
{
|
|
1810
|
+
keys: [{ key: "ArrowLeft", label: "\u2190" }, { key: "j" }],
|
|
1811
|
+
description: "Seek back 10s"
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
keys: [{ key: "ArrowRight", label: "\u2192" }, { key: "l" }],
|
|
1815
|
+
description: "Seek forward 10s"
|
|
1816
|
+
},
|
|
1817
|
+
{ keys: [{ key: "ArrowUp", label: "\u2191" }], description: "Turn volume up" },
|
|
1818
|
+
{ keys: [{ key: "ArrowDown", label: "\u2193" }], description: "Turn volume down" },
|
|
1819
|
+
{
|
|
1820
|
+
keys: [{ key: "<", label: "< (SHIFT+,)" }],
|
|
1821
|
+
description: "Decrease playback rate"
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
keys: [{ key: ">", label: "> (SHIFT+.)" }],
|
|
1825
|
+
description: "Increase playback rate"
|
|
1826
|
+
},
|
|
1827
|
+
{
|
|
1828
|
+
keys: [{ key: "shift+/", label: "SHIFT+/" }],
|
|
1829
|
+
description: "Show keyboard shortcuts"
|
|
1830
|
+
}
|
|
1831
|
+
];
|
|
1832
|
+
function getHotkeyToken(key) {
|
|
1833
|
+
return key === " " ? "nospace" : `no${key.toLowerCase()}`;
|
|
1834
|
+
}
|
|
1835
|
+
function getEnabledShortcuts(hotkeys) {
|
|
1836
|
+
const disabled = new Set(hotkeys == null ? void 0 : hotkeys.split(/\s+/));
|
|
1837
|
+
return shortcuts.map(({ keys, description }) => ({
|
|
1838
|
+
keys: keys.filter(({ key }) => !disabled.has(getHotkeyToken(key))),
|
|
1839
|
+
description
|
|
1840
|
+
})).filter(({ keys }) => keys.length);
|
|
1841
|
+
}
|
|
1842
|
+
function getSlotTemplateHTML2(attrs) {
|
|
1843
|
+
return (
|
|
1844
|
+
/*html*/
|
|
1845
|
+
`
|
|
1846
|
+
<style>
|
|
1847
|
+
:host {
|
|
1848
|
+
position: fixed;
|
|
1849
|
+
top: 0;
|
|
1850
|
+
left: 0;
|
|
1851
|
+
z-index: 9999;
|
|
1852
|
+
background: rgb(20 20 30 / .8);
|
|
1853
|
+
backdrop-filter: blur(10px);
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
#content {
|
|
1857
|
+
display: block;
|
|
1858
|
+
width: clamp(400px, 40vw, 700px);
|
|
1859
|
+
max-width: 90vw;
|
|
1860
|
+
text-align: left;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
h2 {
|
|
1864
|
+
margin: 0 0 1.5rem 0;
|
|
1865
|
+
font-size: 1.5rem;
|
|
1866
|
+
font-weight: 500;
|
|
1867
|
+
text-align: center;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
.shortcuts-table {
|
|
1871
|
+
width: 100%;
|
|
1872
|
+
border-collapse: collapse;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
.shortcuts-table tr {
|
|
1876
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
.shortcuts-table tr:last-child {
|
|
1880
|
+
border-bottom: none;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
.shortcuts-table td {
|
|
1884
|
+
padding: 0.75rem 0.5rem;
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
.shortcuts-table td:first-child {
|
|
1888
|
+
text-align: right;
|
|
1889
|
+
padding-right: 1rem;
|
|
1890
|
+
width: 40%;
|
|
1891
|
+
min-width: 120px;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
.shortcuts-table td:last-child {
|
|
1895
|
+
padding-left: 1rem;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
.key {
|
|
1899
|
+
display: inline-block;
|
|
1900
|
+
background: rgba(255, 255, 255, 0.15);
|
|
1901
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
1902
|
+
border-radius: 4px;
|
|
1903
|
+
padding: 0.25rem 0.5rem;
|
|
1904
|
+
font-family: 'Courier New', monospace;
|
|
1905
|
+
font-size: 0.9rem;
|
|
1906
|
+
font-weight: 500;
|
|
1907
|
+
min-width: 1.5rem;
|
|
1908
|
+
text-align: center;
|
|
1909
|
+
margin: 0 0.2rem;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
.description {
|
|
1913
|
+
color: rgba(255, 255, 255, 0.9);
|
|
1914
|
+
font-size: 0.95rem;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
.key-combo {
|
|
1918
|
+
display: flex;
|
|
1919
|
+
align-items: center;
|
|
1920
|
+
justify-content: flex-end;
|
|
1921
|
+
gap: 0.3rem;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
.key-separator {
|
|
1925
|
+
color: rgba(255, 255, 255, 0.5);
|
|
1926
|
+
font-size: 0.9rem;
|
|
1927
|
+
}
|
|
1928
|
+
</style>
|
|
1929
|
+
<slot id="content">
|
|
1930
|
+
${formatKeyboardShortcuts(attrs[Attributes3.HOTKEYS])}
|
|
1931
|
+
</slot>
|
|
1932
|
+
`
|
|
1933
|
+
);
|
|
1934
|
+
}
|
|
1935
|
+
function formatKeyboardShortcuts(hotkeys) {
|
|
1936
|
+
const rows = getEnabledShortcuts(hotkeys).map(({ keys, description }) => {
|
|
1937
|
+
const keyCombo = keys.map(
|
|
1938
|
+
({ key, label = key }, index) => index > 0 ? `<span class="key-separator">or</span><span class="key">${label}</span>` : `<span class="key">${label}</span>`
|
|
1939
|
+
).join("");
|
|
1940
|
+
return `
|
|
1941
|
+
<tr>
|
|
1942
|
+
<td>
|
|
1943
|
+
<div class="key-combo">${keyCombo}</div>
|
|
1944
|
+
</td>
|
|
1945
|
+
<td class="description">${description}</td>
|
|
1946
|
+
</tr>
|
|
1947
|
+
`;
|
|
1948
|
+
}).join("");
|
|
1949
|
+
return `
|
|
1950
|
+
<h2>Keyboard Shortcuts</h2>
|
|
1951
|
+
<table class="shortcuts-table">${rows}</table>
|
|
1952
|
+
`;
|
|
1953
|
+
}
|
|
1954
|
+
var MediaKeyboardShortcutsDialog = class extends MediaChromeDialog {
|
|
1955
|
+
constructor() {
|
|
1956
|
+
super(...arguments);
|
|
1957
|
+
__privateAdd4(this, _clickHandler, (e) => {
|
|
1958
|
+
var _a3;
|
|
1959
|
+
if (!this.open)
|
|
1960
|
+
return;
|
|
1961
|
+
const content = (_a3 = this.shadowRoot) == null ? void 0 : _a3.querySelector("#content");
|
|
1962
|
+
if (!content)
|
|
1963
|
+
return;
|
|
1964
|
+
const path = e.composedPath();
|
|
1965
|
+
const isClickOnHost = path[0] === this || path.includes(this);
|
|
1966
|
+
const isClickInsideContent = path.includes(content);
|
|
1967
|
+
if (isClickOnHost && !isClickInsideContent) {
|
|
1968
|
+
this.open = false;
|
|
1969
|
+
}
|
|
1970
|
+
});
|
|
1971
|
+
__privateAdd4(this, _keyDownHandler, (e) => {
|
|
1972
|
+
if (!this.open)
|
|
1973
|
+
return;
|
|
1974
|
+
const isShiftSlash = e.shiftKey && (e.key === "/" || e.key === "?");
|
|
1975
|
+
if ((e.key === "Escape" || isShiftSlash) && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
|
1976
|
+
this.open = false;
|
|
1977
|
+
e.preventDefault();
|
|
1978
|
+
e.stopPropagation();
|
|
1979
|
+
}
|
|
1980
|
+
});
|
|
1981
|
+
}
|
|
1982
|
+
static get observedAttributes() {
|
|
1983
|
+
return [...super.observedAttributes, Attributes3.HOTKEYS];
|
|
1984
|
+
}
|
|
1985
|
+
get hotkeys() {
|
|
1986
|
+
var _a3;
|
|
1987
|
+
return (_a3 = getStringAttr(this, Attributes3.HOTKEYS)) != null ? _a3 : void 0;
|
|
1988
|
+
}
|
|
1989
|
+
set hotkeys(value) {
|
|
1990
|
+
setStringAttr(this, Attributes3.HOTKEYS, value);
|
|
1991
|
+
}
|
|
1992
|
+
connectedCallback() {
|
|
1993
|
+
super.connectedCallback();
|
|
1994
|
+
if (this.open) {
|
|
1995
|
+
this.addEventListener("click", __privateGet4(this, _clickHandler));
|
|
1996
|
+
document.addEventListener("keydown", __privateGet4(this, _keyDownHandler));
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
disconnectedCallback() {
|
|
2000
|
+
this.removeEventListener("click", __privateGet4(this, _clickHandler));
|
|
2001
|
+
document.removeEventListener("keydown", __privateGet4(this, _keyDownHandler));
|
|
2002
|
+
}
|
|
2003
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
2004
|
+
var _a3;
|
|
2005
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
2006
|
+
if (attrName === "open") {
|
|
2007
|
+
if (this.open) {
|
|
2008
|
+
this.addEventListener("click", __privateGet4(this, _clickHandler));
|
|
2009
|
+
document.addEventListener("keydown", __privateGet4(this, _keyDownHandler));
|
|
2010
|
+
} else {
|
|
2011
|
+
this.removeEventListener("click", __privateGet4(this, _clickHandler));
|
|
2012
|
+
document.removeEventListener("keydown", __privateGet4(this, _keyDownHandler));
|
|
2013
|
+
}
|
|
2014
|
+
} else if (attrName === Attributes3.HOTKEYS && newValue !== oldValue) {
|
|
2015
|
+
const content = (_a3 = this.shadowRoot) == null ? void 0 : _a3.querySelector("#content");
|
|
2016
|
+
if (content)
|
|
2017
|
+
content.innerHTML = formatKeyboardShortcuts(newValue);
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
};
|
|
2021
|
+
_clickHandler = /* @__PURE__ */ new WeakMap();
|
|
2022
|
+
_keyDownHandler = /* @__PURE__ */ new WeakMap();
|
|
2023
|
+
MediaKeyboardShortcutsDialog.getSlotTemplateHTML = getSlotTemplateHTML2;
|
|
2024
|
+
if (!GlobalThis.customElements.get("media-keyboard-shortcuts-dialog")) {
|
|
2025
|
+
GlobalThis.customElements.define(
|
|
2026
|
+
"media-keyboard-shortcuts-dialog",
|
|
2027
|
+
MediaKeyboardShortcutsDialog
|
|
2028
|
+
);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
// ../../node_modules/media-chrome/dist/utils/attribute-token-list.js
|
|
2032
|
+
var __accessCheck5 = (obj, member, msg) => {
|
|
2033
|
+
if (!member.has(obj))
|
|
2034
|
+
throw TypeError("Cannot " + msg);
|
|
2035
|
+
};
|
|
2036
|
+
var __privateGet5 = (obj, member, getter) => {
|
|
2037
|
+
__accessCheck5(obj, member, "read from private field");
|
|
2038
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
2039
|
+
};
|
|
2040
|
+
var __privateAdd5 = (obj, member, value) => {
|
|
2041
|
+
if (member.has(obj))
|
|
2042
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
2043
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
2044
|
+
};
|
|
2045
|
+
var __privateSet4 = (obj, member, value, setter) => {
|
|
2046
|
+
__accessCheck5(obj, member, "write to private field");
|
|
2047
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
2048
|
+
return value;
|
|
2049
|
+
};
|
|
2050
|
+
var _el;
|
|
2051
|
+
var _attr;
|
|
2052
|
+
var _defaultSet;
|
|
2053
|
+
var _tokenSet;
|
|
2054
|
+
var _tokens;
|
|
2055
|
+
var tokens_get;
|
|
2056
|
+
var AttributeTokenList = class {
|
|
2057
|
+
constructor(el, attr, { defaultValue } = { defaultValue: void 0 }) {
|
|
2058
|
+
__privateAdd5(this, _tokens);
|
|
2059
|
+
__privateAdd5(this, _el, void 0);
|
|
2060
|
+
__privateAdd5(this, _attr, void 0);
|
|
2061
|
+
__privateAdd5(this, _defaultSet, void 0);
|
|
2062
|
+
__privateAdd5(this, _tokenSet, /* @__PURE__ */ new Set());
|
|
2063
|
+
__privateSet4(this, _el, el);
|
|
2064
|
+
__privateSet4(this, _attr, attr);
|
|
2065
|
+
__privateSet4(this, _defaultSet, new Set(defaultValue));
|
|
2066
|
+
}
|
|
2067
|
+
[Symbol.iterator]() {
|
|
2068
|
+
return __privateGet5(this, _tokens, tokens_get).values();
|
|
2069
|
+
}
|
|
2070
|
+
get length() {
|
|
2071
|
+
return __privateGet5(this, _tokens, tokens_get).size;
|
|
2072
|
+
}
|
|
2073
|
+
get value() {
|
|
2074
|
+
var _a3;
|
|
2075
|
+
return (_a3 = [...__privateGet5(this, _tokens, tokens_get)].join(" ")) != null ? _a3 : "";
|
|
2076
|
+
}
|
|
2077
|
+
set value(val) {
|
|
2078
|
+
var _a3;
|
|
2079
|
+
if (val === this.value)
|
|
2080
|
+
return;
|
|
2081
|
+
__privateSet4(this, _tokenSet, /* @__PURE__ */ new Set());
|
|
2082
|
+
this.add(...(_a3 = val == null ? void 0 : val.split(" ")) != null ? _a3 : []);
|
|
2083
|
+
}
|
|
2084
|
+
toString() {
|
|
2085
|
+
return this.value;
|
|
2086
|
+
}
|
|
2087
|
+
item(index) {
|
|
2088
|
+
return [...__privateGet5(this, _tokens, tokens_get)][index];
|
|
2089
|
+
}
|
|
2090
|
+
values() {
|
|
2091
|
+
return __privateGet5(this, _tokens, tokens_get).values();
|
|
2092
|
+
}
|
|
2093
|
+
forEach(callback, thisArg) {
|
|
2094
|
+
__privateGet5(this, _tokens, tokens_get).forEach(callback, thisArg);
|
|
2095
|
+
}
|
|
2096
|
+
add(...tokens) {
|
|
2097
|
+
var _a3, _b2;
|
|
2098
|
+
tokens.forEach((t2) => __privateGet5(this, _tokenSet).add(t2));
|
|
2099
|
+
if (this.value === "" && !((_a3 = __privateGet5(this, _el)) == null ? void 0 : _a3.hasAttribute(`${__privateGet5(this, _attr)}`))) {
|
|
2100
|
+
return;
|
|
2101
|
+
}
|
|
2102
|
+
(_b2 = __privateGet5(this, _el)) == null ? void 0 : _b2.setAttribute(`${__privateGet5(this, _attr)}`, `${this.value}`);
|
|
2103
|
+
}
|
|
2104
|
+
remove(...tokens) {
|
|
2105
|
+
var _a3;
|
|
2106
|
+
tokens.forEach((t2) => __privateGet5(this, _tokenSet).delete(t2));
|
|
2107
|
+
(_a3 = __privateGet5(this, _el)) == null ? void 0 : _a3.setAttribute(`${__privateGet5(this, _attr)}`, `${this.value}`);
|
|
2108
|
+
}
|
|
2109
|
+
contains(token) {
|
|
2110
|
+
return __privateGet5(this, _tokens, tokens_get).has(token);
|
|
2111
|
+
}
|
|
2112
|
+
toggle(token, force) {
|
|
2113
|
+
if (typeof force !== "undefined") {
|
|
2114
|
+
if (force) {
|
|
2115
|
+
this.add(token);
|
|
2116
|
+
return true;
|
|
2117
|
+
} else {
|
|
2118
|
+
this.remove(token);
|
|
2119
|
+
return false;
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
if (this.contains(token)) {
|
|
2123
|
+
this.remove(token);
|
|
2124
|
+
return false;
|
|
2125
|
+
}
|
|
2126
|
+
this.add(token);
|
|
2127
|
+
return true;
|
|
2128
|
+
}
|
|
2129
|
+
replace(oldToken, newToken) {
|
|
2130
|
+
this.remove(oldToken);
|
|
2131
|
+
this.add(newToken);
|
|
2132
|
+
return oldToken === newToken;
|
|
2133
|
+
}
|
|
2134
|
+
};
|
|
2135
|
+
_el = /* @__PURE__ */ new WeakMap();
|
|
2136
|
+
_attr = /* @__PURE__ */ new WeakMap();
|
|
2137
|
+
_defaultSet = /* @__PURE__ */ new WeakMap();
|
|
2138
|
+
_tokenSet = /* @__PURE__ */ new WeakMap();
|
|
2139
|
+
_tokens = /* @__PURE__ */ new WeakSet();
|
|
2140
|
+
tokens_get = function() {
|
|
2141
|
+
return __privateGet5(this, _tokenSet).size ? __privateGet5(this, _tokenSet) : __privateGet5(this, _defaultSet);
|
|
2142
|
+
};
|
|
2143
|
+
|
|
2144
|
+
// ../../node_modules/media-chrome/dist/utils/captions.js
|
|
2145
|
+
var splitTextTracksStr = (textTracksStr = "") => textTracksStr.split(/\s+/);
|
|
2146
|
+
var parseTextTrackStr = (textTrackStr = "") => {
|
|
2147
|
+
const [kind, language, encodedLabel] = textTrackStr.split(":");
|
|
2148
|
+
const label = encodedLabel ? decodeURIComponent(encodedLabel) : void 0;
|
|
2149
|
+
return {
|
|
2150
|
+
kind: kind === "cc" ? TextTrackKinds.CAPTIONS : TextTrackKinds.SUBTITLES,
|
|
2151
|
+
language,
|
|
2152
|
+
label
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
var parseTextTracksStr = (textTracksStr = "", textTrackLikeObj = {}) => {
|
|
2156
|
+
return splitTextTracksStr(textTracksStr).map((textTrackStr) => {
|
|
2157
|
+
const textTrackObj = parseTextTrackStr(textTrackStr);
|
|
2158
|
+
return {
|
|
2159
|
+
...textTrackLikeObj,
|
|
2160
|
+
...textTrackObj
|
|
2161
|
+
};
|
|
2162
|
+
});
|
|
2163
|
+
};
|
|
2164
|
+
var parseTracks = (trackOrTracks) => {
|
|
2165
|
+
if (!trackOrTracks)
|
|
2166
|
+
return [];
|
|
2167
|
+
if (Array.isArray(trackOrTracks)) {
|
|
2168
|
+
return trackOrTracks.map((trackObjOrStr) => {
|
|
2169
|
+
if (typeof trackObjOrStr === "string") {
|
|
2170
|
+
return parseTextTrackStr(trackObjOrStr);
|
|
2171
|
+
}
|
|
2172
|
+
return trackObjOrStr;
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2175
|
+
if (typeof trackOrTracks === "string") {
|
|
2176
|
+
return parseTextTracksStr(trackOrTracks);
|
|
2177
|
+
}
|
|
2178
|
+
return [trackOrTracks];
|
|
2179
|
+
};
|
|
2180
|
+
var formatTextTrackObj = ({ kind, label, language } = { kind: "subtitles" }) => {
|
|
2181
|
+
if (!label)
|
|
2182
|
+
return language;
|
|
2183
|
+
return `${kind === "captions" ? "cc" : "sb"}:${language}:${encodeURIComponent(
|
|
2184
|
+
label
|
|
2185
|
+
)}`;
|
|
2186
|
+
};
|
|
2187
|
+
var stringifyTextTrackList = (textTracks = []) => {
|
|
2188
|
+
return Array.prototype.map.call(textTracks, formatTextTrackObj).join(" ");
|
|
2189
|
+
};
|
|
2190
|
+
var isMatchingPropOf = (key, value) => (obj) => obj[key] === value;
|
|
2191
|
+
var textTrackObjAsPred = (filterObj) => {
|
|
2192
|
+
const preds = Object.entries(filterObj).map(([key, value]) => {
|
|
2193
|
+
return isMatchingPropOf(key, value);
|
|
2194
|
+
});
|
|
2195
|
+
return (textTrack) => preds.every((pred) => pred(textTrack));
|
|
1675
2196
|
};
|
|
1676
2197
|
var updateTracksModeTo = (mode, tracks = [], tracksToUpdate = []) => {
|
|
1677
2198
|
const preds = parseTracks(tracksToUpdate).map(textTrackObjAsPred);
|
|
@@ -3273,26 +3794,26 @@ var createMediaStore = ({
|
|
|
3273
3794
|
};
|
|
3274
3795
|
|
|
3275
3796
|
// ../../node_modules/media-chrome/dist/media-controller.js
|
|
3276
|
-
var
|
|
3797
|
+
var __accessCheck6 = (obj, member, msg) => {
|
|
3277
3798
|
if (!member.has(obj))
|
|
3278
3799
|
throw TypeError("Cannot " + msg);
|
|
3279
3800
|
};
|
|
3280
|
-
var
|
|
3281
|
-
|
|
3801
|
+
var __privateGet6 = (obj, member, getter) => {
|
|
3802
|
+
__accessCheck6(obj, member, "read from private field");
|
|
3282
3803
|
return getter ? getter.call(obj) : member.get(obj);
|
|
3283
3804
|
};
|
|
3284
|
-
var
|
|
3805
|
+
var __privateAdd6 = (obj, member, value) => {
|
|
3285
3806
|
if (member.has(obj))
|
|
3286
3807
|
throw TypeError("Cannot add the same private member more than once");
|
|
3287
3808
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
3288
3809
|
};
|
|
3289
|
-
var
|
|
3290
|
-
|
|
3810
|
+
var __privateSet5 = (obj, member, value, setter) => {
|
|
3811
|
+
__accessCheck6(obj, member, "write to private field");
|
|
3291
3812
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
3292
3813
|
return value;
|
|
3293
3814
|
};
|
|
3294
|
-
var
|
|
3295
|
-
|
|
3815
|
+
var __privateMethod3 = (obj, member, method) => {
|
|
3816
|
+
__accessCheck6(obj, member, "access private method");
|
|
3296
3817
|
return method;
|
|
3297
3818
|
};
|
|
3298
3819
|
var _hotKeys;
|
|
@@ -3306,8 +3827,10 @@ var _subtitlesState;
|
|
|
3306
3827
|
var _setupDefaultStore;
|
|
3307
3828
|
var setupDefaultStore_fn;
|
|
3308
3829
|
var _keyUpHandler;
|
|
3309
|
-
var
|
|
3830
|
+
var _keyDownHandler2;
|
|
3310
3831
|
var keyDownHandler_fn;
|
|
3832
|
+
var _syncKeyboardShortcutsDialog;
|
|
3833
|
+
var syncKeyboardShortcutsDialog_fn;
|
|
3311
3834
|
var _showKeyboardShortcutsDialog;
|
|
3312
3835
|
var showKeyboardShortcutsDialog_fn;
|
|
3313
3836
|
var ButtonPressedKeys = [
|
|
@@ -3332,7 +3855,7 @@ var DEFAULT_VOLUME_STEP = 0.025;
|
|
|
3332
3855
|
var DEFAULT_PLAYBACK_RATE_STEP = 0.25;
|
|
3333
3856
|
var MIN_PLAYBACK_RATE = 0.25;
|
|
3334
3857
|
var MAX_PLAYBACK_RATE = 2;
|
|
3335
|
-
var
|
|
3858
|
+
var Attributes4 = {
|
|
3336
3859
|
DEFAULT_SUBTITLES: "defaultsubtitles",
|
|
3337
3860
|
DEFAULT_STREAM_TYPE: "defaultstreamtype",
|
|
3338
3861
|
DEFAULT_DURATION: "defaultduration",
|
|
@@ -3357,35 +3880,36 @@ var Attributes2 = {
|
|
|
3357
3880
|
var MediaController = class extends MediaContainer {
|
|
3358
3881
|
constructor() {
|
|
3359
3882
|
super();
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3883
|
+
__privateAdd6(this, _setupDefaultStore);
|
|
3884
|
+
__privateAdd6(this, _keyDownHandler2);
|
|
3885
|
+
__privateAdd6(this, _syncKeyboardShortcutsDialog);
|
|
3886
|
+
__privateAdd6(this, _showKeyboardShortcutsDialog);
|
|
3363
3887
|
this.mediaStateReceivers = [];
|
|
3364
3888
|
this.associatedElementSubscriptions = /* @__PURE__ */ new Map();
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3889
|
+
__privateAdd6(this, _hotKeys, new AttributeTokenList(this, Attributes4.HOTKEYS));
|
|
3890
|
+
__privateAdd6(this, _fullscreenElement, void 0);
|
|
3891
|
+
__privateAdd6(this, _mediaStore, void 0);
|
|
3892
|
+
__privateAdd6(this, _keyboardShortcutsDialog, null);
|
|
3893
|
+
__privateAdd6(this, _mediaStateCallback, void 0);
|
|
3894
|
+
__privateAdd6(this, _mediaStoreUnsubscribe, void 0);
|
|
3895
|
+
__privateAdd6(this, _mediaStateEventHandler, (event) => {
|
|
3372
3896
|
var _a3;
|
|
3373
|
-
(_a3 =
|
|
3897
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch(event);
|
|
3374
3898
|
});
|
|
3375
|
-
|
|
3376
|
-
|
|
3899
|
+
__privateAdd6(this, _subtitlesState, void 0);
|
|
3900
|
+
__privateAdd6(this, _keyUpHandler, (e) => {
|
|
3377
3901
|
const { key, shiftKey } = e;
|
|
3378
3902
|
const isShiftSlash = shiftKey && (key === "/" || key === "?");
|
|
3379
3903
|
const shouldHandle = isShiftSlash || ButtonPressedKeys.includes(key);
|
|
3380
3904
|
if (!shouldHandle) {
|
|
3381
|
-
this.removeEventListener("keyup",
|
|
3905
|
+
this.removeEventListener("keyup", __privateGet6(this, _keyUpHandler));
|
|
3382
3906
|
return;
|
|
3383
3907
|
}
|
|
3384
3908
|
this.keyboardShortcutHandler(e);
|
|
3385
3909
|
});
|
|
3386
3910
|
this.associateElement(this);
|
|
3387
3911
|
let prevState = {};
|
|
3388
|
-
|
|
3912
|
+
__privateSet5(this, _mediaStateCallback, (nextState) => {
|
|
3389
3913
|
Object.entries(nextState).forEach(([stateName, stateValue]) => {
|
|
3390
3914
|
if (stateName in prevState && prevState[stateName] === stateValue)
|
|
3391
3915
|
return;
|
|
@@ -3402,118 +3926,118 @@ var MediaController = class extends MediaContainer {
|
|
|
3402
3926
|
}
|
|
3403
3927
|
static get observedAttributes() {
|
|
3404
3928
|
return super.observedAttributes.concat(
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3929
|
+
Attributes4.NO_HOTKEYS,
|
|
3930
|
+
Attributes4.HOTKEYS,
|
|
3931
|
+
Attributes4.DEFAULT_STREAM_TYPE,
|
|
3932
|
+
Attributes4.DEFAULT_SUBTITLES,
|
|
3933
|
+
Attributes4.DEFAULT_DURATION,
|
|
3934
|
+
Attributes4.NO_MUTED_PREF,
|
|
3935
|
+
Attributes4.NO_VOLUME_PREF,
|
|
3936
|
+
Attributes4.LANG,
|
|
3937
|
+
Attributes4.LOOP,
|
|
3938
|
+
Attributes4.LIVE_EDGE_OFFSET,
|
|
3939
|
+
Attributes4.SEEK_TO_LIVE_OFFSET,
|
|
3940
|
+
Attributes4.NO_AUTO_SEEK_TO_LIVE
|
|
3417
3941
|
);
|
|
3418
3942
|
}
|
|
3419
3943
|
get mediaStore() {
|
|
3420
|
-
return
|
|
3944
|
+
return __privateGet6(this, _mediaStore);
|
|
3421
3945
|
}
|
|
3422
3946
|
set mediaStore(value) {
|
|
3423
3947
|
var _a3, _b2;
|
|
3424
|
-
if (
|
|
3425
|
-
(_a3 =
|
|
3426
|
-
|
|
3948
|
+
if (__privateGet6(this, _mediaStore)) {
|
|
3949
|
+
(_a3 = __privateGet6(this, _mediaStoreUnsubscribe)) == null ? void 0 : _a3.call(this);
|
|
3950
|
+
__privateSet5(this, _mediaStoreUnsubscribe, void 0);
|
|
3427
3951
|
}
|
|
3428
|
-
|
|
3429
|
-
if (!
|
|
3430
|
-
|
|
3952
|
+
__privateSet5(this, _mediaStore, value);
|
|
3953
|
+
if (!__privateGet6(this, _mediaStore) && !this.hasAttribute(Attributes4.NO_DEFAULT_STORE)) {
|
|
3954
|
+
__privateMethod3(this, _setupDefaultStore, setupDefaultStore_fn).call(this);
|
|
3431
3955
|
return;
|
|
3432
3956
|
}
|
|
3433
|
-
|
|
3434
|
-
|
|
3957
|
+
__privateSet5(this, _mediaStoreUnsubscribe, (_b2 = __privateGet6(this, _mediaStore)) == null ? void 0 : _b2.subscribe(
|
|
3958
|
+
__privateGet6(this, _mediaStateCallback)
|
|
3435
3959
|
));
|
|
3436
3960
|
}
|
|
3437
3961
|
get fullscreenElement() {
|
|
3438
3962
|
var _a3;
|
|
3439
|
-
return (_a3 =
|
|
3963
|
+
return (_a3 = __privateGet6(this, _fullscreenElement)) != null ? _a3 : this;
|
|
3440
3964
|
}
|
|
3441
3965
|
set fullscreenElement(element) {
|
|
3442
3966
|
var _a3;
|
|
3443
|
-
if (this.hasAttribute(
|
|
3444
|
-
this.removeAttribute(
|
|
3967
|
+
if (this.hasAttribute(Attributes4.FULLSCREEN_ELEMENT)) {
|
|
3968
|
+
this.removeAttribute(Attributes4.FULLSCREEN_ELEMENT);
|
|
3445
3969
|
}
|
|
3446
|
-
|
|
3447
|
-
(_a3 =
|
|
3970
|
+
__privateSet5(this, _fullscreenElement, element);
|
|
3971
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3448
3972
|
type: "fullscreenelementchangerequest",
|
|
3449
3973
|
detail: this.fullscreenElement
|
|
3450
3974
|
});
|
|
3451
3975
|
}
|
|
3452
3976
|
get defaultSubtitles() {
|
|
3453
|
-
return getBooleanAttr(this,
|
|
3977
|
+
return getBooleanAttr(this, Attributes4.DEFAULT_SUBTITLES);
|
|
3454
3978
|
}
|
|
3455
3979
|
set defaultSubtitles(value) {
|
|
3456
|
-
setBooleanAttr(this,
|
|
3980
|
+
setBooleanAttr(this, Attributes4.DEFAULT_SUBTITLES, value);
|
|
3457
3981
|
}
|
|
3458
3982
|
get defaultStreamType() {
|
|
3459
|
-
return getStringAttr(this,
|
|
3983
|
+
return getStringAttr(this, Attributes4.DEFAULT_STREAM_TYPE);
|
|
3460
3984
|
}
|
|
3461
3985
|
set defaultStreamType(value) {
|
|
3462
|
-
setStringAttr(this,
|
|
3986
|
+
setStringAttr(this, Attributes4.DEFAULT_STREAM_TYPE, value);
|
|
3463
3987
|
}
|
|
3464
3988
|
get defaultDuration() {
|
|
3465
|
-
return getNumericAttr(this,
|
|
3989
|
+
return getNumericAttr(this, Attributes4.DEFAULT_DURATION);
|
|
3466
3990
|
}
|
|
3467
3991
|
set defaultDuration(value) {
|
|
3468
|
-
setNumericAttr(this,
|
|
3992
|
+
setNumericAttr(this, Attributes4.DEFAULT_DURATION, value);
|
|
3469
3993
|
}
|
|
3470
3994
|
get noHotkeys() {
|
|
3471
|
-
return getBooleanAttr(this,
|
|
3995
|
+
return getBooleanAttr(this, Attributes4.NO_HOTKEYS);
|
|
3472
3996
|
}
|
|
3473
3997
|
set noHotkeys(value) {
|
|
3474
|
-
setBooleanAttr(this,
|
|
3998
|
+
setBooleanAttr(this, Attributes4.NO_HOTKEYS, value);
|
|
3475
3999
|
}
|
|
3476
4000
|
get keysUsed() {
|
|
3477
|
-
return getStringAttr(this,
|
|
4001
|
+
return getStringAttr(this, Attributes4.KEYS_USED);
|
|
3478
4002
|
}
|
|
3479
4003
|
set keysUsed(value) {
|
|
3480
|
-
setStringAttr(this,
|
|
4004
|
+
setStringAttr(this, Attributes4.KEYS_USED, value);
|
|
3481
4005
|
}
|
|
3482
4006
|
get liveEdgeOffset() {
|
|
3483
|
-
return getNumericAttr(this,
|
|
4007
|
+
return getNumericAttr(this, Attributes4.LIVE_EDGE_OFFSET);
|
|
3484
4008
|
}
|
|
3485
4009
|
set liveEdgeOffset(value) {
|
|
3486
|
-
setNumericAttr(this,
|
|
4010
|
+
setNumericAttr(this, Attributes4.LIVE_EDGE_OFFSET, value);
|
|
3487
4011
|
}
|
|
3488
4012
|
get noAutoSeekToLive() {
|
|
3489
|
-
return getBooleanAttr(this,
|
|
4013
|
+
return getBooleanAttr(this, Attributes4.NO_AUTO_SEEK_TO_LIVE);
|
|
3490
4014
|
}
|
|
3491
4015
|
set noAutoSeekToLive(value) {
|
|
3492
|
-
setBooleanAttr(this,
|
|
4016
|
+
setBooleanAttr(this, Attributes4.NO_AUTO_SEEK_TO_LIVE, value);
|
|
3493
4017
|
}
|
|
3494
4018
|
get noVolumePref() {
|
|
3495
|
-
return getBooleanAttr(this,
|
|
4019
|
+
return getBooleanAttr(this, Attributes4.NO_VOLUME_PREF);
|
|
3496
4020
|
}
|
|
3497
4021
|
set noVolumePref(value) {
|
|
3498
|
-
setBooleanAttr(this,
|
|
4022
|
+
setBooleanAttr(this, Attributes4.NO_VOLUME_PREF, value);
|
|
3499
4023
|
}
|
|
3500
4024
|
get noMutedPref() {
|
|
3501
|
-
return getBooleanAttr(this,
|
|
4025
|
+
return getBooleanAttr(this, Attributes4.NO_MUTED_PREF);
|
|
3502
4026
|
}
|
|
3503
4027
|
set noMutedPref(value) {
|
|
3504
|
-
setBooleanAttr(this,
|
|
4028
|
+
setBooleanAttr(this, Attributes4.NO_MUTED_PREF, value);
|
|
3505
4029
|
}
|
|
3506
4030
|
get noSubtitlesLangPref() {
|
|
3507
|
-
return getBooleanAttr(this,
|
|
4031
|
+
return getBooleanAttr(this, Attributes4.NO_SUBTITLES_LANG_PREF);
|
|
3508
4032
|
}
|
|
3509
4033
|
set noSubtitlesLangPref(value) {
|
|
3510
|
-
setBooleanAttr(this,
|
|
4034
|
+
setBooleanAttr(this, Attributes4.NO_SUBTITLES_LANG_PREF, value);
|
|
3511
4035
|
}
|
|
3512
4036
|
get noDefaultStore() {
|
|
3513
|
-
return getBooleanAttr(this,
|
|
4037
|
+
return getBooleanAttr(this, Attributes4.NO_DEFAULT_STORE);
|
|
3514
4038
|
}
|
|
3515
4039
|
set noDefaultStore(value) {
|
|
3516
|
-
setBooleanAttr(this,
|
|
4040
|
+
setBooleanAttr(this, Attributes4.NO_DEFAULT_STORE, value);
|
|
3517
4041
|
}
|
|
3518
4042
|
get resolvedLang() {
|
|
3519
4043
|
return getResolvedLanguage();
|
|
@@ -3521,9 +4045,9 @@ var MediaController = class extends MediaContainer {
|
|
|
3521
4045
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
3522
4046
|
var _a3, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
3523
4047
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
3524
|
-
if (attrName ===
|
|
4048
|
+
if (attrName === Attributes4.NO_HOTKEYS) {
|
|
3525
4049
|
if (newValue !== oldValue && newValue === "") {
|
|
3526
|
-
if (this.hasAttribute(
|
|
4050
|
+
if (this.hasAttribute(Attributes4.HOTKEYS)) {
|
|
3527
4051
|
console.warn(
|
|
3528
4052
|
"Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."
|
|
3529
4053
|
);
|
|
@@ -3532,78 +4056,80 @@ var MediaController = class extends MediaContainer {
|
|
|
3532
4056
|
} else if (newValue !== oldValue && newValue === null) {
|
|
3533
4057
|
this.enableHotkeys();
|
|
3534
4058
|
}
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
(
|
|
4059
|
+
__privateMethod3(this, _syncKeyboardShortcutsDialog, syncKeyboardShortcutsDialog_fn).call(this);
|
|
4060
|
+
} else if (attrName === Attributes4.HOTKEYS) {
|
|
4061
|
+
__privateGet6(this, _hotKeys).value = newValue;
|
|
4062
|
+
__privateMethod3(this, _syncKeyboardShortcutsDialog, syncKeyboardShortcutsDialog_fn).call(this);
|
|
4063
|
+
} else if (attrName === Attributes4.DEFAULT_SUBTITLES && newValue !== oldValue) {
|
|
4064
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3539
4065
|
type: "optionschangerequest",
|
|
3540
4066
|
detail: {
|
|
3541
|
-
defaultSubtitles: this.hasAttribute(
|
|
4067
|
+
defaultSubtitles: this.hasAttribute(Attributes4.DEFAULT_SUBTITLES)
|
|
3542
4068
|
}
|
|
3543
4069
|
});
|
|
3544
|
-
} else if (attrName ===
|
|
3545
|
-
(_c =
|
|
4070
|
+
} else if (attrName === Attributes4.DEFAULT_STREAM_TYPE) {
|
|
4071
|
+
(_c = __privateGet6(this, _mediaStore)) == null ? void 0 : _c.dispatch({
|
|
3546
4072
|
type: "optionschangerequest",
|
|
3547
4073
|
detail: {
|
|
3548
|
-
defaultStreamType: (_b2 = this.getAttribute(
|
|
4074
|
+
defaultStreamType: (_b2 = this.getAttribute(Attributes4.DEFAULT_STREAM_TYPE)) != null ? _b2 : void 0
|
|
3549
4075
|
}
|
|
3550
4076
|
});
|
|
3551
|
-
} else if (attrName ===
|
|
3552
|
-
(_d =
|
|
4077
|
+
} else if (attrName === Attributes4.LIVE_EDGE_OFFSET && newValue !== oldValue) {
|
|
4078
|
+
(_d = __privateGet6(this, _mediaStore)) == null ? void 0 : _d.dispatch({
|
|
3553
4079
|
type: "optionschangerequest",
|
|
3554
4080
|
detail: {
|
|
3555
|
-
liveEdgeOffset: this.hasAttribute(
|
|
3556
|
-
seekToLiveOffset: this.hasAttribute(
|
|
4081
|
+
liveEdgeOffset: this.hasAttribute(Attributes4.LIVE_EDGE_OFFSET) ? +this.getAttribute(Attributes4.LIVE_EDGE_OFFSET) : void 0,
|
|
4082
|
+
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
|
|
3557
4083
|
}
|
|
3558
4084
|
});
|
|
3559
|
-
} else if (attrName ===
|
|
3560
|
-
(_e =
|
|
4085
|
+
} else if (attrName === Attributes4.SEEK_TO_LIVE_OFFSET && newValue !== oldValue) {
|
|
4086
|
+
(_e = __privateGet6(this, _mediaStore)) == null ? void 0 : _e.dispatch({
|
|
3561
4087
|
type: "optionschangerequest",
|
|
3562
4088
|
detail: {
|
|
3563
4089
|
// Mirror #setupDefaultStore: prefer seektoliveoffset, fall back to
|
|
3564
4090
|
// liveedgeoffset, otherwise undefined.
|
|
3565
|
-
seekToLiveOffset: this.hasAttribute(
|
|
4091
|
+
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
|
|
3566
4092
|
}
|
|
3567
4093
|
});
|
|
3568
|
-
} else if (attrName ===
|
|
3569
|
-
(_f =
|
|
4094
|
+
} else if (attrName === Attributes4.NO_AUTO_SEEK_TO_LIVE) {
|
|
4095
|
+
(_f = __privateGet6(this, _mediaStore)) == null ? void 0 : _f.dispatch({
|
|
3570
4096
|
type: "optionschangerequest",
|
|
3571
4097
|
detail: {
|
|
3572
|
-
noAutoSeekToLive: this.hasAttribute(
|
|
4098
|
+
noAutoSeekToLive: this.hasAttribute(Attributes4.NO_AUTO_SEEK_TO_LIVE)
|
|
3573
4099
|
}
|
|
3574
4100
|
});
|
|
3575
|
-
} else if (attrName ===
|
|
4101
|
+
} else if (attrName === Attributes4.FULLSCREEN_ELEMENT) {
|
|
3576
4102
|
const el = newValue ? (_g = this.getRootNode()) == null ? void 0 : _g.getElementById(newValue) : void 0;
|
|
3577
|
-
|
|
3578
|
-
(_h =
|
|
4103
|
+
__privateSet5(this, _fullscreenElement, el);
|
|
4104
|
+
(_h = __privateGet6(this, _mediaStore)) == null ? void 0 : _h.dispatch({
|
|
3579
4105
|
type: "fullscreenelementchangerequest",
|
|
3580
4106
|
detail: this.fullscreenElement
|
|
3581
4107
|
});
|
|
3582
|
-
} else if (attrName ===
|
|
4108
|
+
} else if (attrName === Attributes4.LANG && newValue !== oldValue) {
|
|
3583
4109
|
setLanguage(newValue);
|
|
3584
|
-
(_i =
|
|
4110
|
+
(_i = __privateGet6(this, _mediaStore)) == null ? void 0 : _i.dispatch({
|
|
3585
4111
|
type: "optionschangerequest",
|
|
3586
4112
|
detail: {
|
|
3587
4113
|
mediaLang: newValue
|
|
3588
4114
|
}
|
|
3589
4115
|
});
|
|
3590
|
-
} else if (attrName ===
|
|
3591
|
-
(_j =
|
|
4116
|
+
} else if (attrName === Attributes4.LOOP && newValue !== oldValue) {
|
|
4117
|
+
(_j = __privateGet6(this, _mediaStore)) == null ? void 0 : _j.dispatch({
|
|
3592
4118
|
type: MediaUIEvents.MEDIA_LOOP_REQUEST,
|
|
3593
4119
|
detail: newValue != null
|
|
3594
4120
|
});
|
|
3595
|
-
} else if (attrName ===
|
|
3596
|
-
(_k =
|
|
4121
|
+
} else if (attrName === Attributes4.NO_VOLUME_PREF && newValue !== oldValue) {
|
|
4122
|
+
(_k = __privateGet6(this, _mediaStore)) == null ? void 0 : _k.dispatch({
|
|
3597
4123
|
type: "optionschangerequest",
|
|
3598
4124
|
detail: {
|
|
3599
|
-
noVolumePref: this.hasAttribute(
|
|
4125
|
+
noVolumePref: this.hasAttribute(Attributes4.NO_VOLUME_PREF)
|
|
3600
4126
|
}
|
|
3601
4127
|
});
|
|
3602
|
-
} else if (attrName ===
|
|
3603
|
-
(_l =
|
|
4128
|
+
} else if (attrName === Attributes4.NO_MUTED_PREF && newValue !== oldValue) {
|
|
4129
|
+
(_l = __privateGet6(this, _mediaStore)) == null ? void 0 : _l.dispatch({
|
|
3604
4130
|
type: "optionschangerequest",
|
|
3605
4131
|
detail: {
|
|
3606
|
-
noMutedPref: this.hasAttribute(
|
|
4132
|
+
noMutedPref: this.hasAttribute(Attributes4.NO_MUTED_PREF)
|
|
3607
4133
|
}
|
|
3608
4134
|
});
|
|
3609
4135
|
}
|
|
@@ -3611,64 +4137,64 @@ var MediaController = class extends MediaContainer {
|
|
|
3611
4137
|
connectedCallback() {
|
|
3612
4138
|
var _a3, _b2, _c;
|
|
3613
4139
|
this.associateElement(this);
|
|
3614
|
-
if (!
|
|
3615
|
-
|
|
4140
|
+
if (!__privateGet6(this, _mediaStore) && !this.hasAttribute(Attributes4.NO_DEFAULT_STORE)) {
|
|
4141
|
+
__privateMethod3(this, _setupDefaultStore, setupDefaultStore_fn).call(this);
|
|
3616
4142
|
}
|
|
3617
|
-
(_a3 =
|
|
4143
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3618
4144
|
type: "documentelementchangerequest",
|
|
3619
4145
|
detail: Document2
|
|
3620
4146
|
});
|
|
3621
|
-
(_b2 =
|
|
4147
|
+
(_b2 = __privateGet6(this, _mediaStore)) == null ? void 0 : _b2.dispatch({
|
|
3622
4148
|
type: "fullscreenelementchangerequest",
|
|
3623
4149
|
detail: this.fullscreenElement
|
|
3624
4150
|
});
|
|
3625
4151
|
super.connectedCallback();
|
|
3626
|
-
if (
|
|
3627
|
-
|
|
3628
|
-
|
|
4152
|
+
if (__privateGet6(this, _mediaStore) && !__privateGet6(this, _mediaStoreUnsubscribe)) {
|
|
4153
|
+
__privateSet5(this, _mediaStoreUnsubscribe, (_c = __privateGet6(this, _mediaStore)) == null ? void 0 : _c.subscribe(
|
|
4154
|
+
__privateGet6(this, _mediaStateCallback)
|
|
3629
4155
|
));
|
|
3630
4156
|
}
|
|
3631
|
-
if (
|
|
4157
|
+
if (__privateGet6(this, _subtitlesState) !== void 0 && __privateGet6(this, _mediaStore) && this.media) {
|
|
3632
4158
|
setTimeout(() => {
|
|
3633
4159
|
var _a22, _b22, _c2;
|
|
3634
4160
|
if ((_b22 = (_a22 = this.media) == null ? void 0 : _a22.textTracks) == null ? void 0 : _b22.length) {
|
|
3635
|
-
(_c2 =
|
|
4161
|
+
(_c2 = __privateGet6(this, _mediaStore)) == null ? void 0 : _c2.dispatch({
|
|
3636
4162
|
type: MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST,
|
|
3637
|
-
detail:
|
|
4163
|
+
detail: __privateGet6(this, _subtitlesState)
|
|
3638
4164
|
});
|
|
3639
4165
|
}
|
|
3640
4166
|
}, 0);
|
|
3641
4167
|
}
|
|
3642
|
-
this.hasAttribute(
|
|
4168
|
+
this.hasAttribute(Attributes4.NO_HOTKEYS) ? this.disableHotkeys() : this.enableHotkeys();
|
|
3643
4169
|
}
|
|
3644
4170
|
disconnectedCallback() {
|
|
3645
4171
|
var _a3, _b2, _c, _d, _e, _f;
|
|
3646
4172
|
(_a3 = super.disconnectedCallback) == null ? void 0 : _a3.call(this);
|
|
3647
4173
|
this.disableHotkeys();
|
|
3648
|
-
if (
|
|
3649
|
-
const currentState =
|
|
3650
|
-
|
|
3651
|
-
(_c =
|
|
4174
|
+
if (__privateGet6(this, _mediaStore)) {
|
|
4175
|
+
const currentState = __privateGet6(this, _mediaStore).getState();
|
|
4176
|
+
__privateSet5(this, _subtitlesState, !!((_b2 = currentState.mediaSubtitlesShowing) == null ? void 0 : _b2.length));
|
|
4177
|
+
(_c = __privateGet6(this, _mediaStore)) == null ? void 0 : _c.dispatch({
|
|
3652
4178
|
type: "fullscreenelementchangerequest",
|
|
3653
4179
|
detail: void 0
|
|
3654
4180
|
});
|
|
3655
|
-
(_d =
|
|
4181
|
+
(_d = __privateGet6(this, _mediaStore)) == null ? void 0 : _d.dispatch({
|
|
3656
4182
|
type: "documentelementchangerequest",
|
|
3657
4183
|
detail: void 0
|
|
3658
4184
|
});
|
|
3659
|
-
(_e =
|
|
4185
|
+
(_e = __privateGet6(this, _mediaStore)) == null ? void 0 : _e.dispatch({
|
|
3660
4186
|
type: MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST,
|
|
3661
4187
|
detail: false
|
|
3662
4188
|
});
|
|
3663
4189
|
}
|
|
3664
|
-
if (
|
|
3665
|
-
(_f =
|
|
3666
|
-
|
|
4190
|
+
if (__privateGet6(this, _mediaStoreUnsubscribe)) {
|
|
4191
|
+
(_f = __privateGet6(this, _mediaStoreUnsubscribe)) == null ? void 0 : _f.call(this);
|
|
4192
|
+
__privateSet5(this, _mediaStoreUnsubscribe, void 0);
|
|
3667
4193
|
}
|
|
3668
4194
|
this.unassociateElement(this);
|
|
3669
|
-
if (
|
|
3670
|
-
|
|
3671
|
-
|
|
4195
|
+
if (__privateGet6(this, _keyboardShortcutsDialog)) {
|
|
4196
|
+
__privateGet6(this, _keyboardShortcutsDialog).remove();
|
|
4197
|
+
__privateSet5(this, _keyboardShortcutsDialog, null);
|
|
3672
4198
|
}
|
|
3673
4199
|
}
|
|
3674
4200
|
/**
|
|
@@ -3678,7 +4204,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3678
4204
|
mediaSetCallback(media) {
|
|
3679
4205
|
var _a3;
|
|
3680
4206
|
super.mediaSetCallback(media);
|
|
3681
|
-
(_a3 =
|
|
4207
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3682
4208
|
type: "mediaelementchangerequest",
|
|
3683
4209
|
detail: media
|
|
3684
4210
|
});
|
|
@@ -3693,7 +4219,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3693
4219
|
mediaUnsetCallback(media) {
|
|
3694
4220
|
var _a3;
|
|
3695
4221
|
super.mediaUnsetCallback(media);
|
|
3696
|
-
(_a3 =
|
|
4222
|
+
(_a3 = __privateGet6(this, _mediaStore)) == null ? void 0 : _a3.dispatch({
|
|
3697
4223
|
type: "mediaelementchangerequest",
|
|
3698
4224
|
detail: void 0
|
|
3699
4225
|
});
|
|
@@ -3715,7 +4241,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3715
4241
|
unregisterMediaStateReceiver
|
|
3716
4242
|
);
|
|
3717
4243
|
Object.values(MediaUIEvents).forEach((eventName) => {
|
|
3718
|
-
element.addEventListener(eventName,
|
|
4244
|
+
element.addEventListener(eventName, __privateGet6(this, _mediaStateEventHandler));
|
|
3719
4245
|
});
|
|
3720
4246
|
associatedElementSubscriptions.set(element, unsubscribe);
|
|
3721
4247
|
}
|
|
@@ -3729,7 +4255,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3729
4255
|
unsubscribe();
|
|
3730
4256
|
associatedElementSubscriptions.delete(element);
|
|
3731
4257
|
Object.values(MediaUIEvents).forEach((eventName) => {
|
|
3732
|
-
element.removeEventListener(eventName,
|
|
4258
|
+
element.removeEventListener(eventName, __privateGet6(this, _mediaStateEventHandler));
|
|
3733
4259
|
});
|
|
3734
4260
|
}
|
|
3735
4261
|
registerMediaStateReceiver(el) {
|
|
@@ -3740,8 +4266,8 @@ var MediaController = class extends MediaContainer {
|
|
|
3740
4266
|
if (index > -1)
|
|
3741
4267
|
return;
|
|
3742
4268
|
els.push(el);
|
|
3743
|
-
if (
|
|
3744
|
-
Object.entries(
|
|
4269
|
+
if (__privateGet6(this, _mediaStore)) {
|
|
4270
|
+
Object.entries(__privateGet6(this, _mediaStore).getState()).forEach(
|
|
3745
4271
|
([stateName, stateValue]) => {
|
|
3746
4272
|
propagateMediaState([el], stateName, stateValue);
|
|
3747
4273
|
}
|
|
@@ -3756,38 +4282,36 @@ var MediaController = class extends MediaContainer {
|
|
|
3756
4282
|
els.splice(index, 1);
|
|
3757
4283
|
}
|
|
3758
4284
|
enableHotkeys() {
|
|
3759
|
-
this.addEventListener("keydown",
|
|
4285
|
+
this.addEventListener("keydown", __privateMethod3(this, _keyDownHandler2, keyDownHandler_fn));
|
|
3760
4286
|
}
|
|
3761
4287
|
disableHotkeys() {
|
|
3762
|
-
this.removeEventListener("keydown",
|
|
3763
|
-
this.removeEventListener("keyup",
|
|
4288
|
+
this.removeEventListener("keydown", __privateMethod3(this, _keyDownHandler2, keyDownHandler_fn));
|
|
4289
|
+
this.removeEventListener("keyup", __privateGet6(this, _keyUpHandler));
|
|
3764
4290
|
}
|
|
3765
4291
|
// Added string to support JSX compatibility
|
|
3766
4292
|
get hotkeys() {
|
|
3767
|
-
return
|
|
4293
|
+
return __privateGet6(this, _hotKeys);
|
|
3768
4294
|
}
|
|
3769
4295
|
set hotkeys(value) {
|
|
3770
|
-
setStringAttr(this,
|
|
4296
|
+
setStringAttr(this, Attributes4.HOTKEYS, value);
|
|
3771
4297
|
}
|
|
3772
4298
|
keyboardShortcutHandler(e) {
|
|
3773
4299
|
var _a3, _b2, _c, _d, _e, _f, _g, _h, _i;
|
|
3774
4300
|
const target = e.target;
|
|
3775
|
-
const keysUsed = ((_c = (_b2 = (_a3 = target.getAttribute(
|
|
4301
|
+
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);
|
|
3776
4302
|
if (keysUsed.includes(e.key)) {
|
|
3777
4303
|
return;
|
|
3778
4304
|
}
|
|
3779
4305
|
let eventName, detail, evt;
|
|
3780
|
-
if (
|
|
3781
|
-
return;
|
|
3782
|
-
if (e.key === " " && __privateGet4(this, _hotKeys).contains(`nospace`))
|
|
4306
|
+
if (__privateGet6(this, _hotKeys).contains(getHotkeyToken(e.key)))
|
|
3783
4307
|
return;
|
|
3784
4308
|
const isShiftSlash = e.shiftKey && (e.key === "/" || e.key === "?");
|
|
3785
|
-
if (isShiftSlash &&
|
|
4309
|
+
if (isShiftSlash && __privateGet6(this, _hotKeys).contains("noshift+/"))
|
|
3786
4310
|
return;
|
|
3787
4311
|
switch (e.key) {
|
|
3788
4312
|
case " ":
|
|
3789
4313
|
case "k":
|
|
3790
|
-
eventName =
|
|
4314
|
+
eventName = __privateGet6(this, _mediaStore).getState().mediaPaused ? MediaUIEvents.MEDIA_PLAY_REQUEST : MediaUIEvents.MEDIA_PAUSE_REQUEST;
|
|
3791
4315
|
this.dispatchEvent(
|
|
3792
4316
|
new GlobalThis.CustomEvent(eventName, {
|
|
3793
4317
|
composed: true,
|
|
@@ -3824,8 +4348,8 @@ var MediaController = class extends MediaContainer {
|
|
|
3824
4348
|
case "ArrowLeft":
|
|
3825
4349
|
case "j": {
|
|
3826
4350
|
const offsetValue = this.hasAttribute(
|
|
3827
|
-
|
|
3828
|
-
) ? +this.getAttribute(
|
|
4351
|
+
Attributes4.KEYBOARD_BACKWARD_SEEK_OFFSET
|
|
4352
|
+
) ? +this.getAttribute(Attributes4.KEYBOARD_BACKWARD_SEEK_OFFSET) : DEFAULT_SEEK_OFFSET;
|
|
3829
4353
|
detail = Math.max(
|
|
3830
4354
|
((_d = this.mediaStore.getState().mediaCurrentTime) != null ? _d : 0) - offsetValue,
|
|
3831
4355
|
0
|
|
@@ -3841,8 +4365,8 @@ var MediaController = class extends MediaContainer {
|
|
|
3841
4365
|
case "ArrowRight":
|
|
3842
4366
|
case "l": {
|
|
3843
4367
|
const offsetValue = this.hasAttribute(
|
|
3844
|
-
|
|
3845
|
-
) ? +this.getAttribute(
|
|
4368
|
+
Attributes4.KEYBOARD_FORWARD_SEEK_OFFSET
|
|
4369
|
+
) ? +this.getAttribute(Attributes4.KEYBOARD_FORWARD_SEEK_OFFSET) : DEFAULT_SEEK_OFFSET;
|
|
3846
4370
|
detail = Math.max(
|
|
3847
4371
|
((_e = this.mediaStore.getState().mediaCurrentTime) != null ? _e : 0) + offsetValue,
|
|
3848
4372
|
0
|
|
@@ -3856,7 +4380,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3856
4380
|
break;
|
|
3857
4381
|
}
|
|
3858
4382
|
case "ArrowUp": {
|
|
3859
|
-
const step = this.hasAttribute(
|
|
4383
|
+
const step = this.hasAttribute(Attributes4.KEYBOARD_UP_VOLUME_STEP) ? +this.getAttribute(Attributes4.KEYBOARD_UP_VOLUME_STEP) : DEFAULT_VOLUME_STEP;
|
|
3860
4384
|
detail = Math.min(
|
|
3861
4385
|
((_f = this.mediaStore.getState().mediaVolume) != null ? _f : 1) + step,
|
|
3862
4386
|
1
|
|
@@ -3870,7 +4394,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3870
4394
|
break;
|
|
3871
4395
|
}
|
|
3872
4396
|
case "ArrowDown": {
|
|
3873
|
-
const step = this.hasAttribute(
|
|
4397
|
+
const step = this.hasAttribute(Attributes4.KEYBOARD_DOWN_VOLUME_STEP) ? +this.getAttribute(Attributes4.KEYBOARD_DOWN_VOLUME_STEP) : DEFAULT_VOLUME_STEP;
|
|
3874
4398
|
detail = Math.max(
|
|
3875
4399
|
((_g = this.mediaStore.getState().mediaVolume) != null ? _g : 1) - step,
|
|
3876
4400
|
0
|
|
@@ -3914,7 +4438,7 @@ var MediaController = class extends MediaContainer {
|
|
|
3914
4438
|
case "/":
|
|
3915
4439
|
case "?": {
|
|
3916
4440
|
if (e.shiftKey) {
|
|
3917
|
-
|
|
4441
|
+
__privateMethod3(this, _showKeyboardShortcutsDialog, showKeyboardShortcutsDialog_fn).call(this);
|
|
3918
4442
|
}
|
|
3919
4443
|
break;
|
|
3920
4444
|
}
|
|
@@ -3947,56 +4471,66 @@ setupDefaultStore_fn = function() {
|
|
|
3947
4471
|
media: this.media,
|
|
3948
4472
|
fullscreenElement: this.fullscreenElement,
|
|
3949
4473
|
options: {
|
|
3950
|
-
defaultSubtitles: this.hasAttribute(
|
|
3951
|
-
defaultDuration: this.hasAttribute(
|
|
4474
|
+
defaultSubtitles: this.hasAttribute(Attributes4.DEFAULT_SUBTITLES),
|
|
4475
|
+
defaultDuration: this.hasAttribute(Attributes4.DEFAULT_DURATION) ? +this.getAttribute(Attributes4.DEFAULT_DURATION) : void 0,
|
|
3952
4476
|
defaultStreamType: (
|
|
3953
4477
|
/** @type {import('./media-store/state-mediator.js').StreamTypeValue} */
|
|
3954
4478
|
(_a3 = this.getAttribute(
|
|
3955
|
-
|
|
4479
|
+
Attributes4.DEFAULT_STREAM_TYPE
|
|
3956
4480
|
)) != null ? _a3 : void 0
|
|
3957
4481
|
),
|
|
3958
|
-
liveEdgeOffset: this.hasAttribute(
|
|
3959
|
-
seekToLiveOffset: this.hasAttribute(
|
|
3960
|
-
noAutoSeekToLive: this.hasAttribute(
|
|
4482
|
+
liveEdgeOffset: this.hasAttribute(Attributes4.LIVE_EDGE_OFFSET) ? +this.getAttribute(Attributes4.LIVE_EDGE_OFFSET) : void 0,
|
|
4483
|
+
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,
|
|
4484
|
+
noAutoSeekToLive: this.hasAttribute(Attributes4.NO_AUTO_SEEK_TO_LIVE),
|
|
3961
4485
|
// NOTE: This wasn't updated if it was changed later. Should it be? (CJP)
|
|
3962
|
-
noVolumePref: this.hasAttribute(
|
|
3963
|
-
noMutedPref: this.hasAttribute(
|
|
4486
|
+
noVolumePref: this.hasAttribute(Attributes4.NO_VOLUME_PREF),
|
|
4487
|
+
noMutedPref: this.hasAttribute(Attributes4.NO_MUTED_PREF),
|
|
3964
4488
|
noSubtitlesLangPref: this.hasAttribute(
|
|
3965
|
-
|
|
4489
|
+
Attributes4.NO_SUBTITLES_LANG_PREF
|
|
3966
4490
|
)
|
|
3967
4491
|
}
|
|
3968
4492
|
});
|
|
3969
4493
|
};
|
|
3970
4494
|
_keyUpHandler = /* @__PURE__ */ new WeakMap();
|
|
3971
|
-
|
|
4495
|
+
_keyDownHandler2 = /* @__PURE__ */ new WeakSet();
|
|
3972
4496
|
keyDownHandler_fn = function(e) {
|
|
3973
4497
|
var _a3;
|
|
3974
4498
|
const { metaKey, altKey, key, shiftKey } = e;
|
|
3975
4499
|
const isShiftSlash = shiftKey && (key === "/" || key === "?");
|
|
3976
|
-
if (isShiftSlash && ((_a3 =
|
|
3977
|
-
this.removeEventListener("keyup",
|
|
4500
|
+
if (isShiftSlash && ((_a3 = __privateGet6(this, _keyboardShortcutsDialog)) == null ? void 0 : _a3.open)) {
|
|
4501
|
+
this.removeEventListener("keyup", __privateGet6(this, _keyUpHandler));
|
|
3978
4502
|
return;
|
|
3979
4503
|
}
|
|
3980
4504
|
if (metaKey || altKey || !isShiftSlash && !ButtonPressedKeys.includes(key)) {
|
|
3981
|
-
this.removeEventListener("keyup",
|
|
4505
|
+
this.removeEventListener("keyup", __privateGet6(this, _keyUpHandler));
|
|
3982
4506
|
return;
|
|
3983
4507
|
}
|
|
3984
4508
|
const target = e.target;
|
|
3985
4509
|
const isRangeInput = target instanceof HTMLElement && (target.tagName.toLowerCase() === "media-volume-range" || target.tagName.toLowerCase() === "media-time-range");
|
|
3986
|
-
if ([" ", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(key) && !(
|
|
4510
|
+
if ([" ", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(key) && !__privateGet6(this, _hotKeys).contains(getHotkeyToken(key)) && !isRangeInput) {
|
|
3987
4511
|
e.preventDefault();
|
|
3988
4512
|
}
|
|
3989
|
-
this.addEventListener("keyup",
|
|
4513
|
+
this.addEventListener("keyup", __privateGet6(this, _keyUpHandler), { once: true });
|
|
4514
|
+
};
|
|
4515
|
+
_syncKeyboardShortcutsDialog = /* @__PURE__ */ new WeakSet();
|
|
4516
|
+
syncKeyboardShortcutsDialog_fn = function() {
|
|
4517
|
+
if (!__privateGet6(this, _keyboardShortcutsDialog))
|
|
4518
|
+
return;
|
|
4519
|
+
__privateGet6(this, _keyboardShortcutsDialog).hotkeys = __privateGet6(this, _hotKeys).value || void 0;
|
|
4520
|
+
if (this.noHotkeys || __privateGet6(this, _hotKeys).contains("noshift+/")) {
|
|
4521
|
+
__privateGet6(this, _keyboardShortcutsDialog).open = false;
|
|
4522
|
+
}
|
|
3990
4523
|
};
|
|
3991
4524
|
_showKeyboardShortcutsDialog = /* @__PURE__ */ new WeakSet();
|
|
3992
4525
|
showKeyboardShortcutsDialog_fn = function() {
|
|
3993
|
-
if (!
|
|
3994
|
-
|
|
4526
|
+
if (!__privateGet6(this, _keyboardShortcutsDialog)) {
|
|
4527
|
+
__privateSet5(this, _keyboardShortcutsDialog, Document2.createElement(
|
|
3995
4528
|
"media-keyboard-shortcuts-dialog"
|
|
3996
4529
|
));
|
|
3997
|
-
|
|
4530
|
+
__privateMethod3(this, _syncKeyboardShortcutsDialog, syncKeyboardShortcutsDialog_fn).call(this);
|
|
4531
|
+
this.appendChild(__privateGet6(this, _keyboardShortcutsDialog));
|
|
3998
4532
|
}
|
|
3999
|
-
|
|
4533
|
+
__privateGet6(this, _keyboardShortcutsDialog).open = true;
|
|
4000
4534
|
};
|
|
4001
4535
|
var MEDIA_UI_ATTRIBUTE_NAMES2 = Object.values(MediaUIAttributes);
|
|
4002
4536
|
var MEDIA_UI_PROP_NAMES = Object.values(MediaUIProps);
|
|
@@ -4203,11 +4737,11 @@ if (!GlobalThis.customElements.get("media-controller")) {
|
|
|
4203
4737
|
}
|
|
4204
4738
|
|
|
4205
4739
|
// ../../node_modules/media-chrome/dist/media-tooltip.js
|
|
4206
|
-
var
|
|
4740
|
+
var Attributes5 = {
|
|
4207
4741
|
PLACEMENT: "placement",
|
|
4208
4742
|
BOUNDS: "bounds"
|
|
4209
4743
|
};
|
|
4210
|
-
function
|
|
4744
|
+
function getTemplateHTML4(_attrs) {
|
|
4211
4745
|
return (
|
|
4212
4746
|
/*html*/
|
|
4213
4747
|
`
|
|
@@ -4375,71 +4909,73 @@ var MediaTooltip = class extends GlobalThis.HTMLElement {
|
|
|
4375
4909
|
}
|
|
4376
4910
|
}
|
|
4377
4911
|
static get observedAttributes() {
|
|
4378
|
-
return [
|
|
4912
|
+
return [Attributes5.PLACEMENT, Attributes5.BOUNDS];
|
|
4379
4913
|
}
|
|
4380
4914
|
/**
|
|
4381
4915
|
* Get or set tooltip placement
|
|
4382
4916
|
*/
|
|
4383
4917
|
get placement() {
|
|
4384
|
-
return getStringAttr(this,
|
|
4918
|
+
return getStringAttr(this, Attributes5.PLACEMENT);
|
|
4385
4919
|
}
|
|
4386
4920
|
set placement(value) {
|
|
4387
|
-
setStringAttr(this,
|
|
4921
|
+
setStringAttr(this, Attributes5.PLACEMENT, value);
|
|
4388
4922
|
}
|
|
4389
4923
|
/**
|
|
4390
4924
|
* Get or set tooltip container ID selector that will constrain the tooltips
|
|
4391
4925
|
* horizontal position.
|
|
4392
4926
|
*/
|
|
4393
4927
|
get bounds() {
|
|
4394
|
-
return getStringAttr(this,
|
|
4928
|
+
return getStringAttr(this, Attributes5.BOUNDS);
|
|
4395
4929
|
}
|
|
4396
4930
|
set bounds(value) {
|
|
4397
|
-
setStringAttr(this,
|
|
4931
|
+
setStringAttr(this, Attributes5.BOUNDS, value);
|
|
4398
4932
|
}
|
|
4399
4933
|
};
|
|
4400
4934
|
MediaTooltip.shadowRootOptions = { mode: "open" };
|
|
4401
|
-
MediaTooltip.getTemplateHTML =
|
|
4935
|
+
MediaTooltip.getTemplateHTML = getTemplateHTML4;
|
|
4402
4936
|
if (!GlobalThis.customElements.get("media-tooltip")) {
|
|
4403
4937
|
GlobalThis.customElements.define("media-tooltip", MediaTooltip);
|
|
4404
4938
|
}
|
|
4405
4939
|
var media_tooltip_default = MediaTooltip;
|
|
4406
4940
|
|
|
4407
4941
|
// ../../node_modules/media-chrome/dist/media-chrome-button.js
|
|
4408
|
-
var
|
|
4942
|
+
var __accessCheck7 = (obj, member, msg) => {
|
|
4409
4943
|
if (!member.has(obj))
|
|
4410
4944
|
throw TypeError("Cannot " + msg);
|
|
4411
4945
|
};
|
|
4412
|
-
var
|
|
4413
|
-
|
|
4946
|
+
var __privateGet7 = (obj, member, getter) => {
|
|
4947
|
+
__accessCheck7(obj, member, "read from private field");
|
|
4414
4948
|
return getter ? getter.call(obj) : member.get(obj);
|
|
4415
4949
|
};
|
|
4416
|
-
var
|
|
4950
|
+
var __privateAdd7 = (obj, member, value) => {
|
|
4417
4951
|
if (member.has(obj))
|
|
4418
4952
|
throw TypeError("Cannot add the same private member more than once");
|
|
4419
4953
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
4420
4954
|
};
|
|
4421
|
-
var
|
|
4422
|
-
|
|
4955
|
+
var __privateSet6 = (obj, member, value, setter) => {
|
|
4956
|
+
__accessCheck7(obj, member, "write to private field");
|
|
4423
4957
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
4424
4958
|
return value;
|
|
4425
4959
|
};
|
|
4426
|
-
var
|
|
4427
|
-
|
|
4960
|
+
var __privateMethod4 = (obj, member, method) => {
|
|
4961
|
+
__accessCheck7(obj, member, "access private method");
|
|
4428
4962
|
return method;
|
|
4429
4963
|
};
|
|
4430
4964
|
var _mediaController2;
|
|
4431
4965
|
var _clickListener;
|
|
4966
|
+
var _isTooltipShown;
|
|
4967
|
+
var isTooltipShown_fn;
|
|
4432
4968
|
var _positionTooltip;
|
|
4433
4969
|
var _keyupListener;
|
|
4434
4970
|
var _keydownListener;
|
|
4435
4971
|
var _setupTooltip;
|
|
4436
4972
|
var setupTooltip_fn;
|
|
4437
|
-
var
|
|
4973
|
+
var Attributes6 = {
|
|
4438
4974
|
TOOLTIP_PLACEMENT: "tooltipplacement",
|
|
4439
4975
|
DISABLED: "disabled",
|
|
4440
4976
|
NO_TOOLTIP: "notooltip"
|
|
4441
4977
|
};
|
|
4442
|
-
function
|
|
4978
|
+
function getTemplateHTML5(_attrs, _props = {}) {
|
|
4443
4979
|
return (
|
|
4444
4980
|
/*html*/
|
|
4445
4981
|
`
|
|
@@ -4540,7 +5076,7 @@ function getTemplateHTML4(_attrs, _props = {}) {
|
|
|
4540
5076
|
`
|
|
4541
5077
|
);
|
|
4542
5078
|
}
|
|
4543
|
-
function
|
|
5079
|
+
function getSlotTemplateHTML3(_attrs, _props) {
|
|
4544
5080
|
return (
|
|
4545
5081
|
/*html*/
|
|
4546
5082
|
`
|
|
@@ -4554,37 +5090,38 @@ function getTooltipContentHTML() {
|
|
|
4554
5090
|
var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
4555
5091
|
constructor() {
|
|
4556
5092
|
super();
|
|
4557
|
-
|
|
4558
|
-
|
|
5093
|
+
__privateAdd7(this, _isTooltipShown);
|
|
5094
|
+
__privateAdd7(this, _setupTooltip);
|
|
5095
|
+
__privateAdd7(this, _mediaController2, void 0);
|
|
4559
5096
|
this.preventClick = false;
|
|
4560
5097
|
this.tooltipEl = null;
|
|
4561
|
-
|
|
5098
|
+
__privateAdd7(this, _clickListener, (e) => {
|
|
4562
5099
|
if (!this.preventClick) {
|
|
4563
5100
|
this.handleClick(e);
|
|
4564
5101
|
}
|
|
4565
|
-
setTimeout(
|
|
5102
|
+
setTimeout(__privateGet7(this, _positionTooltip), 0);
|
|
4566
5103
|
});
|
|
4567
|
-
|
|
5104
|
+
__privateAdd7(this, _positionTooltip, () => {
|
|
4568
5105
|
var _a3, _b2;
|
|
4569
5106
|
(_b2 = (_a3 = this.tooltipEl) == null ? void 0 : _a3.updateXOffset) == null ? void 0 : _b2.call(_a3);
|
|
4570
5107
|
});
|
|
4571
|
-
|
|
5108
|
+
__privateAdd7(this, _keyupListener, (e) => {
|
|
4572
5109
|
const { key } = e;
|
|
4573
5110
|
if (!this.keysUsed.includes(key)) {
|
|
4574
|
-
this.removeEventListener("keyup",
|
|
5111
|
+
this.removeEventListener("keyup", __privateGet7(this, _keyupListener));
|
|
4575
5112
|
return;
|
|
4576
5113
|
}
|
|
4577
5114
|
if (!this.preventClick) {
|
|
4578
5115
|
this.handleClick(e);
|
|
4579
5116
|
}
|
|
4580
5117
|
});
|
|
4581
|
-
|
|
5118
|
+
__privateAdd7(this, _keydownListener, (e) => {
|
|
4582
5119
|
const { metaKey, altKey, key } = e;
|
|
4583
5120
|
if (metaKey || altKey || !this.keysUsed.includes(key)) {
|
|
4584
|
-
this.removeEventListener("keyup",
|
|
5121
|
+
this.removeEventListener("keyup", __privateGet7(this, _keyupListener));
|
|
4585
5122
|
return;
|
|
4586
5123
|
}
|
|
4587
|
-
this.addEventListener("keyup",
|
|
5124
|
+
this.addEventListener("keyup", __privateGet7(this, _keyupListener), { once: true });
|
|
4588
5125
|
});
|
|
4589
5126
|
if (!this.shadowRoot) {
|
|
4590
5127
|
this.attachShadow(this.constructor.shadowRootOptions);
|
|
@@ -4597,32 +5134,32 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4597
5134
|
static get observedAttributes() {
|
|
4598
5135
|
return [
|
|
4599
5136
|
"disabled",
|
|
4600
|
-
|
|
5137
|
+
Attributes6.TOOLTIP_PLACEMENT,
|
|
4601
5138
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER,
|
|
4602
5139
|
MediaUIAttributes.MEDIA_LANG
|
|
4603
5140
|
];
|
|
4604
5141
|
}
|
|
4605
5142
|
enable() {
|
|
4606
|
-
this.addEventListener("click",
|
|
4607
|
-
this.addEventListener("keydown",
|
|
5143
|
+
this.addEventListener("click", __privateGet7(this, _clickListener));
|
|
5144
|
+
this.addEventListener("keydown", __privateGet7(this, _keydownListener));
|
|
4608
5145
|
this.tabIndex = 0;
|
|
4609
5146
|
}
|
|
4610
5147
|
disable() {
|
|
4611
|
-
this.removeEventListener("click",
|
|
4612
|
-
this.removeEventListener("keydown",
|
|
4613
|
-
this.removeEventListener("keyup",
|
|
5148
|
+
this.removeEventListener("click", __privateGet7(this, _clickListener));
|
|
5149
|
+
this.removeEventListener("keydown", __privateGet7(this, _keydownListener));
|
|
5150
|
+
this.removeEventListener("keyup", __privateGet7(this, _keyupListener));
|
|
4614
5151
|
this.tabIndex = -1;
|
|
4615
5152
|
}
|
|
4616
5153
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
4617
5154
|
var _a3, _b2, _c, _d, _e;
|
|
4618
5155
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
4619
5156
|
if (oldValue) {
|
|
4620
|
-
(_b2 = (_a3 =
|
|
4621
|
-
|
|
5157
|
+
(_b2 = (_a3 = __privateGet7(this, _mediaController2)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5158
|
+
__privateSet6(this, _mediaController2, null);
|
|
4622
5159
|
}
|
|
4623
5160
|
if (newValue && this.isConnected) {
|
|
4624
|
-
|
|
4625
|
-
(_e = (_d =
|
|
5161
|
+
__privateSet6(this, _mediaController2, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
5162
|
+
(_e = (_d = __privateGet7(this, _mediaController2)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
4626
5163
|
}
|
|
4627
5164
|
} else if (attrName === "disabled" && newValue !== oldValue) {
|
|
4628
5165
|
if (newValue == null) {
|
|
@@ -4630,12 +5167,14 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4630
5167
|
} else {
|
|
4631
5168
|
this.disable();
|
|
4632
5169
|
}
|
|
4633
|
-
} else if (attrName ===
|
|
5170
|
+
} else if (attrName === Attributes6.TOOLTIP_PLACEMENT && this.tooltipEl && newValue !== oldValue) {
|
|
4634
5171
|
this.tooltipEl.placement = newValue;
|
|
4635
5172
|
} else if (attrName === MediaUIAttributes.MEDIA_LANG) {
|
|
4636
5173
|
this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML = this.constructor.getTooltipContentHTML();
|
|
4637
5174
|
}
|
|
4638
|
-
|
|
5175
|
+
if (__privateMethod4(this, _isTooltipShown, isTooltipShown_fn).call(this)) {
|
|
5176
|
+
__privateGet7(this, _positionTooltip).call(this);
|
|
5177
|
+
}
|
|
4639
5178
|
}
|
|
4640
5179
|
connectedCallback() {
|
|
4641
5180
|
var _a3, _b2, _c;
|
|
@@ -4654,24 +5193,24 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4654
5193
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER
|
|
4655
5194
|
);
|
|
4656
5195
|
if (mediaControllerId) {
|
|
4657
|
-
|
|
5196
|
+
__privateSet6(
|
|
4658
5197
|
this,
|
|
4659
5198
|
_mediaController2,
|
|
4660
5199
|
// @ts-ignore
|
|
4661
5200
|
(_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(mediaControllerId)
|
|
4662
5201
|
);
|
|
4663
|
-
(_c = (_b2 =
|
|
5202
|
+
(_c = (_b2 = __privateGet7(this, _mediaController2)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
4664
5203
|
}
|
|
4665
|
-
GlobalThis.customElements.whenDefined("media-tooltip").then(() =>
|
|
5204
|
+
GlobalThis.customElements.whenDefined("media-tooltip").then(() => __privateMethod4(this, _setupTooltip, setupTooltip_fn).call(this));
|
|
4666
5205
|
}
|
|
4667
5206
|
disconnectedCallback() {
|
|
4668
5207
|
var _a3, _b2;
|
|
4669
5208
|
this.disable();
|
|
4670
|
-
(_b2 = (_a3 =
|
|
4671
|
-
|
|
4672
|
-
this.removeEventListener("mouseenter",
|
|
4673
|
-
this.removeEventListener("focus",
|
|
4674
|
-
this.removeEventListener("click",
|
|
5209
|
+
(_b2 = (_a3 = __privateGet7(this, _mediaController2)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5210
|
+
__privateSet6(this, _mediaController2, null);
|
|
5211
|
+
this.removeEventListener("mouseenter", __privateGet7(this, _positionTooltip));
|
|
5212
|
+
this.removeEventListener("focus", __privateGet7(this, _positionTooltip));
|
|
5213
|
+
this.removeEventListener("click", __privateGet7(this, _clickListener));
|
|
4675
5214
|
}
|
|
4676
5215
|
get keysUsed() {
|
|
4677
5216
|
return ["Enter", " "];
|
|
@@ -4680,10 +5219,10 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4680
5219
|
* Get or set tooltip placement
|
|
4681
5220
|
*/
|
|
4682
5221
|
get tooltipPlacement() {
|
|
4683
|
-
return getStringAttr(this,
|
|
5222
|
+
return getStringAttr(this, Attributes6.TOOLTIP_PLACEMENT);
|
|
4684
5223
|
}
|
|
4685
5224
|
set tooltipPlacement(value) {
|
|
4686
|
-
setStringAttr(this,
|
|
5225
|
+
setStringAttr(this, Attributes6.TOOLTIP_PLACEMENT, value);
|
|
4687
5226
|
}
|
|
4688
5227
|
get mediaController() {
|
|
4689
5228
|
return getStringAttr(this, MediaStateReceiverAttributes.MEDIA_CONTROLLER);
|
|
@@ -4692,16 +5231,16 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4692
5231
|
setStringAttr(this, MediaStateReceiverAttributes.MEDIA_CONTROLLER, value);
|
|
4693
5232
|
}
|
|
4694
5233
|
get disabled() {
|
|
4695
|
-
return getBooleanAttr(this,
|
|
5234
|
+
return getBooleanAttr(this, Attributes6.DISABLED);
|
|
4696
5235
|
}
|
|
4697
5236
|
set disabled(value) {
|
|
4698
|
-
setBooleanAttr(this,
|
|
5237
|
+
setBooleanAttr(this, Attributes6.DISABLED, value);
|
|
4699
5238
|
}
|
|
4700
5239
|
get noTooltip() {
|
|
4701
|
-
return getBooleanAttr(this,
|
|
5240
|
+
return getBooleanAttr(this, Attributes6.NO_TOOLTIP);
|
|
4702
5241
|
}
|
|
4703
5242
|
set noTooltip(value) {
|
|
4704
|
-
setBooleanAttr(this,
|
|
5243
|
+
setBooleanAttr(this, Attributes6.NO_TOOLTIP, value);
|
|
4705
5244
|
}
|
|
4706
5245
|
/**
|
|
4707
5246
|
* @abstract
|
|
@@ -4711,22 +5250,30 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
|
|
|
4711
5250
|
};
|
|
4712
5251
|
_mediaController2 = /* @__PURE__ */ new WeakMap();
|
|
4713
5252
|
_clickListener = /* @__PURE__ */ new WeakMap();
|
|
5253
|
+
_isTooltipShown = /* @__PURE__ */ new WeakSet();
|
|
5254
|
+
isTooltipShown_fn = function() {
|
|
5255
|
+
try {
|
|
5256
|
+
return this.matches(":hover, :focus-visible");
|
|
5257
|
+
} catch {
|
|
5258
|
+
return this.matches(":hover, :focus");
|
|
5259
|
+
}
|
|
5260
|
+
};
|
|
4714
5261
|
_positionTooltip = /* @__PURE__ */ new WeakMap();
|
|
4715
5262
|
_keyupListener = /* @__PURE__ */ new WeakMap();
|
|
4716
5263
|
_keydownListener = /* @__PURE__ */ new WeakMap();
|
|
4717
5264
|
_setupTooltip = /* @__PURE__ */ new WeakSet();
|
|
4718
5265
|
setupTooltip_fn = function() {
|
|
4719
|
-
this.addEventListener("mouseenter",
|
|
4720
|
-
this.addEventListener("focus",
|
|
4721
|
-
this.addEventListener("click",
|
|
5266
|
+
this.addEventListener("mouseenter", __privateGet7(this, _positionTooltip));
|
|
5267
|
+
this.addEventListener("focus", __privateGet7(this, _positionTooltip));
|
|
5268
|
+
this.addEventListener("click", __privateGet7(this, _clickListener));
|
|
4722
5269
|
const initialPlacement = this.tooltipPlacement;
|
|
4723
5270
|
if (initialPlacement && this.tooltipEl) {
|
|
4724
5271
|
this.tooltipEl.placement = initialPlacement;
|
|
4725
5272
|
}
|
|
4726
5273
|
};
|
|
4727
5274
|
MediaChromeButton.shadowRootOptions = { mode: "open" };
|
|
4728
|
-
MediaChromeButton.getTemplateHTML =
|
|
4729
|
-
MediaChromeButton.getSlotTemplateHTML =
|
|
5275
|
+
MediaChromeButton.getTemplateHTML = getTemplateHTML5;
|
|
5276
|
+
MediaChromeButton.getSlotTemplateHTML = getSlotTemplateHTML3;
|
|
4730
5277
|
MediaChromeButton.getTooltipContentHTML = getTooltipContentHTML;
|
|
4731
5278
|
if (!GlobalThis.customElements.get("media-chrome-button")) {
|
|
4732
5279
|
GlobalThis.customElements.define("media-chrome-button", MediaChromeButton);
|
|
@@ -4737,7 +5284,7 @@ var airplayIcon = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
|
4737
5284
|
<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"/>
|
|
4738
5285
|
</svg>
|
|
4739
5286
|
`;
|
|
4740
|
-
function
|
|
5287
|
+
function getSlotTemplateHTML4(_attrs) {
|
|
4741
5288
|
return (
|
|
4742
5289
|
/*html*/
|
|
4743
5290
|
`
|
|
@@ -4825,7 +5372,7 @@ var MediaAirplayButton = class extends MediaChromeButton {
|
|
|
4825
5372
|
this.dispatchEvent(evt);
|
|
4826
5373
|
}
|
|
4827
5374
|
};
|
|
4828
|
-
MediaAirplayButton.getSlotTemplateHTML =
|
|
5375
|
+
MediaAirplayButton.getSlotTemplateHTML = getSlotTemplateHTML4;
|
|
4829
5376
|
MediaAirplayButton.getTooltipContentHTML = getTooltipContentHTML2;
|
|
4830
5377
|
if (!GlobalThis.customElements.get("media-airplay-button")) {
|
|
4831
5378
|
GlobalThis.customElements.define("media-airplay-button", MediaAirplayButton);
|
|
@@ -4838,7 +5385,7 @@ var ccIconOn = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
|
4838
5385
|
var ccIconOff = `<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
4839
5386
|
<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"/>
|
|
4840
5387
|
</svg>`;
|
|
4841
|
-
function
|
|
5388
|
+
function getSlotTemplateHTML5(_attrs) {
|
|
4842
5389
|
return (
|
|
4843
5390
|
/*html*/
|
|
4844
5391
|
`
|
|
@@ -4930,7 +5477,7 @@ var MediaCaptionsButton = class extends MediaChromeButton {
|
|
|
4930
5477
|
);
|
|
4931
5478
|
}
|
|
4932
5479
|
};
|
|
4933
|
-
MediaCaptionsButton.getSlotTemplateHTML =
|
|
5480
|
+
MediaCaptionsButton.getSlotTemplateHTML = getSlotTemplateHTML5;
|
|
4934
5481
|
MediaCaptionsButton.getTooltipContentHTML = getTooltipContentHTML3;
|
|
4935
5482
|
var getSubtitlesListAttr = (el, attrName) => {
|
|
4936
5483
|
const attrVal = el.getAttribute(attrName);
|
|
@@ -4957,7 +5504,7 @@ if (!GlobalThis.customElements.get("media-captions-button")) {
|
|
|
4957
5504
|
// ../../node_modules/media-chrome/dist/media-cast-button.js
|
|
4958
5505
|
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>`;
|
|
4959
5506
|
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>`;
|
|
4960
|
-
function
|
|
5507
|
+
function getSlotTemplateHTML6(_attrs) {
|
|
4961
5508
|
return (
|
|
4962
5509
|
/*html*/
|
|
4963
5510
|
`
|
|
@@ -5034,294 +5581,40 @@ var MediaCastButton = class extends MediaChromeButton {
|
|
|
5034
5581
|
set mediaCastUnavailable(value) {
|
|
5035
5582
|
setStringAttr(this, MediaUIAttributes.MEDIA_CAST_UNAVAILABLE, value);
|
|
5036
5583
|
}
|
|
5037
|
-
handleClick() {
|
|
5038
|
-
const eventName = this.mediaIsCasting ? MediaUIEvents.MEDIA_EXIT_CAST_REQUEST : MediaUIEvents.MEDIA_ENTER_CAST_REQUEST;
|
|
5039
|
-
this.dispatchEvent(
|
|
5040
|
-
new GlobalThis.CustomEvent(eventName, { composed: true, bubbles: true })
|
|
5041
|
-
);
|
|
5042
|
-
}
|
|
5043
|
-
};
|
|
5044
|
-
MediaCastButton.getSlotTemplateHTML = getSlotTemplateHTML4;
|
|
5045
|
-
MediaCastButton.getTooltipContentHTML = getTooltipContentHTML4;
|
|
5046
|
-
if (!GlobalThis.customElements.get("media-cast-button")) {
|
|
5047
|
-
GlobalThis.customElements.define("media-cast-button", MediaCastButton);
|
|
5048
|
-
}
|
|
5049
|
-
|
|
5050
|
-
// ../../node_modules/media-chrome/dist/media-chrome-dialog.js
|
|
5051
|
-
var __accessCheck6 = (obj, member, msg) => {
|
|
5052
|
-
if (!member.has(obj))
|
|
5053
|
-
throw TypeError("Cannot " + msg);
|
|
5054
|
-
};
|
|
5055
|
-
var __privateGet6 = (obj, member, getter) => {
|
|
5056
|
-
__accessCheck6(obj, member, "read from private field");
|
|
5057
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
5058
|
-
};
|
|
5059
|
-
var __privateAdd6 = (obj, member, value) => {
|
|
5060
|
-
if (member.has(obj))
|
|
5061
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
5062
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
5063
|
-
};
|
|
5064
|
-
var __privateSet6 = (obj, member, value, setter) => {
|
|
5065
|
-
__accessCheck6(obj, member, "write to private field");
|
|
5066
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
5067
|
-
return value;
|
|
5068
|
-
};
|
|
5069
|
-
var __privateMethod4 = (obj, member, method) => {
|
|
5070
|
-
__accessCheck6(obj, member, "access private method");
|
|
5071
|
-
return method;
|
|
5072
|
-
};
|
|
5073
|
-
var _isInit;
|
|
5074
|
-
var _previouslyFocused;
|
|
5075
|
-
var _invokerElement;
|
|
5076
|
-
var _init;
|
|
5077
|
-
var init_fn;
|
|
5078
|
-
var _handleOpen;
|
|
5079
|
-
var handleOpen_fn;
|
|
5080
|
-
var _handleClosed;
|
|
5081
|
-
var handleClosed_fn;
|
|
5082
|
-
var _handleInvoke;
|
|
5083
|
-
var handleInvoke_fn;
|
|
5084
|
-
var _handleFocusOut;
|
|
5085
|
-
var handleFocusOut_fn;
|
|
5086
|
-
var _handleKeyDown;
|
|
5087
|
-
var handleKeyDown_fn;
|
|
5088
|
-
function getTemplateHTML5(_attrs) {
|
|
5089
|
-
return (
|
|
5090
|
-
/*html*/
|
|
5091
|
-
`
|
|
5092
|
-
<style>
|
|
5093
|
-
:host {
|
|
5094
|
-
font: var(--media-font,
|
|
5095
|
-
var(--media-font-weight, normal)
|
|
5096
|
-
var(--media-font-size, 14px) /
|
|
5097
|
-
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
5098
|
-
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
5099
|
-
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
5100
|
-
display: var(--media-dialog-display, inline-flex);
|
|
5101
|
-
justify-content: center;
|
|
5102
|
-
align-items: center;
|
|
5103
|
-
${/** The hide transition is defined below after a short delay. */
|
|
5104
|
-
""}
|
|
5105
|
-
transition-behavior: allow-discrete;
|
|
5106
|
-
visibility: hidden;
|
|
5107
|
-
opacity: 0;
|
|
5108
|
-
transform: translateY(2px) scale(.99);
|
|
5109
|
-
pointer-events: none;
|
|
5110
|
-
}
|
|
5111
|
-
|
|
5112
|
-
:host([open]) {
|
|
5113
|
-
transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
|
|
5114
|
-
visibility: visible;
|
|
5115
|
-
opacity: 1;
|
|
5116
|
-
transform: translateY(0) scale(1);
|
|
5117
|
-
pointer-events: auto;
|
|
5118
|
-
}
|
|
5119
|
-
|
|
5120
|
-
#content {
|
|
5121
|
-
display: flex;
|
|
5122
|
-
position: relative;
|
|
5123
|
-
box-sizing: border-box;
|
|
5124
|
-
width: min(320px, 100%);
|
|
5125
|
-
word-wrap: break-word;
|
|
5126
|
-
max-height: 100%;
|
|
5127
|
-
overflow: auto;
|
|
5128
|
-
text-align: center;
|
|
5129
|
-
line-height: 1.4;
|
|
5130
|
-
}
|
|
5131
|
-
</style>
|
|
5132
|
-
${this.getSlotTemplateHTML(_attrs)}
|
|
5133
|
-
`
|
|
5134
|
-
);
|
|
5135
|
-
}
|
|
5136
|
-
function getSlotTemplateHTML5(_attrs) {
|
|
5137
|
-
return (
|
|
5138
|
-
/*html*/
|
|
5139
|
-
`
|
|
5140
|
-
<slot id="content"></slot>
|
|
5141
|
-
`
|
|
5142
|
-
);
|
|
5143
|
-
}
|
|
5144
|
-
var Attributes5 = {
|
|
5145
|
-
OPEN: "open",
|
|
5146
|
-
ANCHOR: "anchor"
|
|
5147
|
-
};
|
|
5148
|
-
var MediaChromeDialog = class extends GlobalThis.HTMLElement {
|
|
5149
|
-
constructor() {
|
|
5150
|
-
super();
|
|
5151
|
-
__privateAdd6(this, _init);
|
|
5152
|
-
__privateAdd6(this, _handleOpen);
|
|
5153
|
-
__privateAdd6(this, _handleClosed);
|
|
5154
|
-
__privateAdd6(this, _handleInvoke);
|
|
5155
|
-
__privateAdd6(this, _handleFocusOut);
|
|
5156
|
-
__privateAdd6(this, _handleKeyDown);
|
|
5157
|
-
__privateAdd6(this, _isInit, false);
|
|
5158
|
-
__privateAdd6(this, _previouslyFocused, null);
|
|
5159
|
-
__privateAdd6(this, _invokerElement, null);
|
|
5160
|
-
}
|
|
5161
|
-
static get observedAttributes() {
|
|
5162
|
-
return [Attributes5.OPEN, Attributes5.ANCHOR];
|
|
5163
|
-
}
|
|
5164
|
-
get open() {
|
|
5165
|
-
return getBooleanAttr(this, Attributes5.OPEN);
|
|
5166
|
-
}
|
|
5167
|
-
set open(value) {
|
|
5168
|
-
setBooleanAttr(this, Attributes5.OPEN, value);
|
|
5169
|
-
}
|
|
5170
|
-
handleEvent(event) {
|
|
5171
|
-
switch (event.type) {
|
|
5172
|
-
case "invoke":
|
|
5173
|
-
__privateMethod4(this, _handleInvoke, handleInvoke_fn).call(this, event);
|
|
5174
|
-
break;
|
|
5175
|
-
case "focusout":
|
|
5176
|
-
__privateMethod4(this, _handleFocusOut, handleFocusOut_fn).call(this, event);
|
|
5177
|
-
break;
|
|
5178
|
-
case "keydown":
|
|
5179
|
-
__privateMethod4(this, _handleKeyDown, handleKeyDown_fn).call(this, event);
|
|
5180
|
-
break;
|
|
5181
|
-
}
|
|
5182
|
-
}
|
|
5183
|
-
connectedCallback() {
|
|
5184
|
-
__privateMethod4(this, _init, init_fn).call(this);
|
|
5185
|
-
if (!this.role) {
|
|
5186
|
-
this.role = "dialog";
|
|
5187
|
-
}
|
|
5188
|
-
this.addEventListener("invoke", this);
|
|
5189
|
-
this.addEventListener("focusout", this);
|
|
5190
|
-
this.addEventListener("keydown", this);
|
|
5191
|
-
}
|
|
5192
|
-
disconnectedCallback() {
|
|
5193
|
-
this.removeEventListener("invoke", this);
|
|
5194
|
-
this.removeEventListener("focusout", this);
|
|
5195
|
-
this.removeEventListener("keydown", this);
|
|
5196
|
-
}
|
|
5197
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
5198
|
-
__privateMethod4(this, _init, init_fn).call(this);
|
|
5199
|
-
if (attrName === Attributes5.OPEN && newValue !== oldValue) {
|
|
5200
|
-
if (this.open) {
|
|
5201
|
-
__privateMethod4(this, _handleOpen, handleOpen_fn).call(this);
|
|
5202
|
-
} else {
|
|
5203
|
-
__privateMethod4(this, _handleClosed, handleClosed_fn).call(this);
|
|
5204
|
-
}
|
|
5205
|
-
}
|
|
5206
|
-
}
|
|
5207
|
-
focus() {
|
|
5208
|
-
__privateSet6(this, _previouslyFocused, getActiveElement());
|
|
5209
|
-
const focusCancelled = !this.dispatchEvent(new Event("focus", { composed: true, cancelable: true }));
|
|
5210
|
-
const focusInCancelled = !this.dispatchEvent(new Event("focusin", { composed: true, bubbles: true, cancelable: true }));
|
|
5211
|
-
if (focusCancelled || focusInCancelled)
|
|
5212
|
-
return;
|
|
5213
|
-
const focusable = this.querySelector(
|
|
5214
|
-
'[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]'
|
|
5215
|
-
);
|
|
5216
|
-
focusable == null ? void 0 : focusable.focus();
|
|
5217
|
-
}
|
|
5218
|
-
get keysUsed() {
|
|
5219
|
-
return ["Escape", "Tab"];
|
|
5220
|
-
}
|
|
5221
|
-
};
|
|
5222
|
-
_isInit = /* @__PURE__ */ new WeakMap();
|
|
5223
|
-
_previouslyFocused = /* @__PURE__ */ new WeakMap();
|
|
5224
|
-
_invokerElement = /* @__PURE__ */ new WeakMap();
|
|
5225
|
-
_init = /* @__PURE__ */ new WeakSet();
|
|
5226
|
-
init_fn = function() {
|
|
5227
|
-
if (__privateGet6(this, _isInit))
|
|
5228
|
-
return;
|
|
5229
|
-
__privateSet6(this, _isInit, true);
|
|
5230
|
-
if (!this.shadowRoot) {
|
|
5231
|
-
this.attachShadow(this.constructor.shadowRootOptions);
|
|
5232
|
-
const attrs = namedNodeMapToObject(this.attributes);
|
|
5233
|
-
this.shadowRoot.innerHTML = this.constructor.getTemplateHTML(attrs);
|
|
5234
|
-
queueMicrotask(() => {
|
|
5235
|
-
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
5236
|
-
style.setProperty(
|
|
5237
|
-
"transition",
|
|
5238
|
-
`display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in`
|
|
5239
|
-
);
|
|
5240
|
-
});
|
|
5241
|
-
}
|
|
5242
|
-
};
|
|
5243
|
-
_handleOpen = /* @__PURE__ */ new WeakSet();
|
|
5244
|
-
handleOpen_fn = function() {
|
|
5245
|
-
var _a3;
|
|
5246
|
-
(_a3 = __privateGet6(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "true");
|
|
5247
|
-
this.dispatchEvent(new Event("open", { composed: true, bubbles: true }));
|
|
5248
|
-
this.addEventListener("transitionend", () => this.focus(), { once: true });
|
|
5249
|
-
};
|
|
5250
|
-
_handleClosed = /* @__PURE__ */ new WeakSet();
|
|
5251
|
-
handleClosed_fn = function() {
|
|
5252
|
-
var _a3;
|
|
5253
|
-
(_a3 = __privateGet6(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "false");
|
|
5254
|
-
this.dispatchEvent(new Event("close", { composed: true, bubbles: true }));
|
|
5255
|
-
};
|
|
5256
|
-
_handleInvoke = /* @__PURE__ */ new WeakSet();
|
|
5257
|
-
handleInvoke_fn = function(event) {
|
|
5258
|
-
__privateSet6(this, _invokerElement, event.relatedTarget);
|
|
5259
|
-
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
5260
|
-
this.open = !this.open;
|
|
5261
|
-
}
|
|
5262
|
-
};
|
|
5263
|
-
_handleFocusOut = /* @__PURE__ */ new WeakSet();
|
|
5264
|
-
handleFocusOut_fn = function(event) {
|
|
5265
|
-
var _a3;
|
|
5266
|
-
if (!containsComposedNode(this, event.relatedTarget)) {
|
|
5267
|
-
(_a3 = __privateGet6(this, _previouslyFocused)) == null ? void 0 : _a3.focus();
|
|
5268
|
-
if (__privateGet6(this, _invokerElement) && __privateGet6(this, _invokerElement) !== event.relatedTarget && this.open) {
|
|
5269
|
-
this.open = false;
|
|
5270
|
-
}
|
|
5271
|
-
}
|
|
5272
|
-
};
|
|
5273
|
-
_handleKeyDown = /* @__PURE__ */ new WeakSet();
|
|
5274
|
-
handleKeyDown_fn = function(event) {
|
|
5275
|
-
var _a3, _b2, _c, _d, _e;
|
|
5276
|
-
const { key, ctrlKey, altKey, metaKey } = event;
|
|
5277
|
-
if (ctrlKey || altKey || metaKey) {
|
|
5278
|
-
return;
|
|
5279
|
-
}
|
|
5280
|
-
if (!this.keysUsed.includes(key)) {
|
|
5281
|
-
return;
|
|
5282
|
-
}
|
|
5283
|
-
event.preventDefault();
|
|
5284
|
-
event.stopPropagation();
|
|
5285
|
-
if (key === "Tab") {
|
|
5286
|
-
if (event.shiftKey) {
|
|
5287
|
-
(_b2 = (_a3 = this.previousElementSibling) == null ? void 0 : _a3.focus) == null ? void 0 : _b2.call(_a3);
|
|
5288
|
-
} else {
|
|
5289
|
-
(_d = (_c = this.nextElementSibling) == null ? void 0 : _c.focus) == null ? void 0 : _d.call(_c);
|
|
5290
|
-
}
|
|
5291
|
-
this.blur();
|
|
5292
|
-
} else if (key === "Escape") {
|
|
5293
|
-
(_e = __privateGet6(this, _previouslyFocused)) == null ? void 0 : _e.focus();
|
|
5294
|
-
this.open = false;
|
|
5295
|
-
}
|
|
5584
|
+
handleClick() {
|
|
5585
|
+
const eventName = this.mediaIsCasting ? MediaUIEvents.MEDIA_EXIT_CAST_REQUEST : MediaUIEvents.MEDIA_ENTER_CAST_REQUEST;
|
|
5586
|
+
this.dispatchEvent(
|
|
5587
|
+
new GlobalThis.CustomEvent(eventName, { composed: true, bubbles: true })
|
|
5588
|
+
);
|
|
5589
|
+
}
|
|
5296
5590
|
};
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
GlobalThis.customElements.define("media-chrome-dialog", MediaChromeDialog);
|
|
5591
|
+
MediaCastButton.getSlotTemplateHTML = getSlotTemplateHTML6;
|
|
5592
|
+
MediaCastButton.getTooltipContentHTML = getTooltipContentHTML4;
|
|
5593
|
+
if (!GlobalThis.customElements.get("media-cast-button")) {
|
|
5594
|
+
GlobalThis.customElements.define("media-cast-button", MediaCastButton);
|
|
5302
5595
|
}
|
|
5303
5596
|
|
|
5304
5597
|
// ../../node_modules/media-chrome/dist/media-chrome-range.js
|
|
5305
|
-
var
|
|
5598
|
+
var __accessCheck8 = (obj, member, msg) => {
|
|
5306
5599
|
if (!member.has(obj))
|
|
5307
5600
|
throw TypeError("Cannot " + msg);
|
|
5308
5601
|
};
|
|
5309
|
-
var
|
|
5310
|
-
|
|
5602
|
+
var __privateGet8 = (obj, member, getter) => {
|
|
5603
|
+
__accessCheck8(obj, member, "read from private field");
|
|
5311
5604
|
return getter ? getter.call(obj) : member.get(obj);
|
|
5312
5605
|
};
|
|
5313
|
-
var
|
|
5606
|
+
var __privateAdd8 = (obj, member, value) => {
|
|
5314
5607
|
if (member.has(obj))
|
|
5315
5608
|
throw TypeError("Cannot add the same private member more than once");
|
|
5316
5609
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
5317
5610
|
};
|
|
5318
5611
|
var __privateSet7 = (obj, member, value, setter) => {
|
|
5319
|
-
|
|
5612
|
+
__accessCheck8(obj, member, "write to private field");
|
|
5320
5613
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
5321
5614
|
return value;
|
|
5322
5615
|
};
|
|
5323
5616
|
var __privateMethod5 = (obj, member, method) => {
|
|
5324
|
-
|
|
5617
|
+
__accessCheck8(obj, member, "access private method");
|
|
5325
5618
|
return method;
|
|
5326
5619
|
};
|
|
5327
5620
|
var _mediaController3;
|
|
@@ -5611,21 +5904,21 @@ function getContainerTemplateHTML(_attrs) {
|
|
|
5611
5904
|
var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
5612
5905
|
constructor() {
|
|
5613
5906
|
super();
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5907
|
+
__privateAdd8(this, _updateActiveSegment);
|
|
5908
|
+
__privateAdd8(this, _enableUserEvents);
|
|
5909
|
+
__privateAdd8(this, _disableUserEvents);
|
|
5910
|
+
__privateAdd8(this, _handlePointerDown);
|
|
5911
|
+
__privateAdd8(this, _handlePointerEnter);
|
|
5912
|
+
__privateAdd8(this, _handlePointerUp2);
|
|
5913
|
+
__privateAdd8(this, _handlePointerLeave);
|
|
5914
|
+
__privateAdd8(this, _handlePointerMove2);
|
|
5915
|
+
__privateAdd8(this, _mediaController3, void 0);
|
|
5916
|
+
__privateAdd8(this, _isInputTarget, void 0);
|
|
5917
|
+
__privateAdd8(this, _startpoint, void 0);
|
|
5918
|
+
__privateAdd8(this, _endpoint, void 0);
|
|
5919
|
+
__privateAdd8(this, _cssRules, {});
|
|
5920
|
+
__privateAdd8(this, _segments, []);
|
|
5921
|
+
__privateAdd8(this, _onFocusIn, () => {
|
|
5629
5922
|
if (this.range.matches(":focus-visible")) {
|
|
5630
5923
|
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
5631
5924
|
style.setProperty(
|
|
@@ -5634,11 +5927,11 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5634
5927
|
);
|
|
5635
5928
|
}
|
|
5636
5929
|
});
|
|
5637
|
-
|
|
5930
|
+
__privateAdd8(this, _onFocusOut, () => {
|
|
5638
5931
|
const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
|
|
5639
5932
|
style.removeProperty("--_focus-visible-box-shadow");
|
|
5640
5933
|
});
|
|
5641
|
-
|
|
5934
|
+
__privateAdd8(this, _updateComputedStyles, () => {
|
|
5642
5935
|
const clipping = this.shadowRoot.querySelector("#segments-clipping");
|
|
5643
5936
|
if (clipping)
|
|
5644
5937
|
clipping.parentNode.append(clipping);
|
|
@@ -5666,12 +5959,12 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5666
5959
|
var _a3, _b2, _c, _d, _e;
|
|
5667
5960
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
5668
5961
|
if (oldValue) {
|
|
5669
|
-
(_b2 = (_a3 =
|
|
5962
|
+
(_b2 = (_a3 = __privateGet8(this, _mediaController3)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5670
5963
|
__privateSet7(this, _mediaController3, null);
|
|
5671
5964
|
}
|
|
5672
5965
|
if (newValue && this.isConnected) {
|
|
5673
5966
|
__privateSet7(this, _mediaController3, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
5674
|
-
(_e = (_d =
|
|
5967
|
+
(_e = (_d = __privateGet8(this, _mediaController3)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
5675
5968
|
}
|
|
5676
5969
|
} else if (attrName === "disabled" || attrName === "aria-disabled" && oldValue !== newValue) {
|
|
5677
5970
|
if (newValue == null) {
|
|
@@ -5690,13 +5983,13 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5690
5983
|
"display",
|
|
5691
5984
|
`var(--media-control-display, var(--${this.localName}-display, inline-flex))`
|
|
5692
5985
|
);
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5986
|
+
__privateGet8(this, _cssRules).pointer = getOrInsertCSSRule(this.shadowRoot, "#pointer");
|
|
5987
|
+
__privateGet8(this, _cssRules).progress = getOrInsertCSSRule(this.shadowRoot, "#progress");
|
|
5988
|
+
__privateGet8(this, _cssRules).thumb = getOrInsertCSSRule(
|
|
5696
5989
|
this.shadowRoot,
|
|
5697
5990
|
'#thumb, ::slotted([slot="thumb"])'
|
|
5698
5991
|
);
|
|
5699
|
-
|
|
5992
|
+
__privateGet8(this, _cssRules).activeSegment = getOrInsertCSSRule(
|
|
5700
5993
|
this.shadowRoot,
|
|
5701
5994
|
"#segments-clipping rect:nth-child(0)"
|
|
5702
5995
|
);
|
|
@@ -5707,26 +6000,26 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5707
6000
|
__privateSet7(this, _mediaController3, (_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(
|
|
5708
6001
|
mediaControllerId
|
|
5709
6002
|
));
|
|
5710
|
-
(_c = (_b2 =
|
|
6003
|
+
(_c = (_b2 = __privateGet8(this, _mediaController3)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
5711
6004
|
}
|
|
5712
6005
|
this.updateBar();
|
|
5713
|
-
this.shadowRoot.addEventListener("focusin",
|
|
5714
|
-
this.shadowRoot.addEventListener("focusout",
|
|
6006
|
+
this.shadowRoot.addEventListener("focusin", __privateGet8(this, _onFocusIn));
|
|
6007
|
+
this.shadowRoot.addEventListener("focusout", __privateGet8(this, _onFocusOut));
|
|
5715
6008
|
__privateMethod5(this, _enableUserEvents, enableUserEvents_fn).call(this);
|
|
5716
|
-
observeResize(this.container,
|
|
6009
|
+
observeResize(this.container, __privateGet8(this, _updateComputedStyles));
|
|
5717
6010
|
}
|
|
5718
6011
|
disconnectedCallback() {
|
|
5719
6012
|
var _a3, _b2;
|
|
5720
6013
|
__privateMethod5(this, _disableUserEvents, disableUserEvents_fn).call(this);
|
|
5721
|
-
(_b2 = (_a3 =
|
|
6014
|
+
(_b2 = (_a3 = __privateGet8(this, _mediaController3)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5722
6015
|
__privateSet7(this, _mediaController3, null);
|
|
5723
|
-
this.shadowRoot.removeEventListener("focusin",
|
|
5724
|
-
this.shadowRoot.removeEventListener("focusout",
|
|
5725
|
-
unobserveResize(this.container,
|
|
6016
|
+
this.shadowRoot.removeEventListener("focusin", __privateGet8(this, _onFocusIn));
|
|
6017
|
+
this.shadowRoot.removeEventListener("focusout", __privateGet8(this, _onFocusOut));
|
|
6018
|
+
unobserveResize(this.container, __privateGet8(this, _updateComputedStyles));
|
|
5726
6019
|
}
|
|
5727
6020
|
updatePointerBar(evt) {
|
|
5728
6021
|
var _a3;
|
|
5729
|
-
(_a3 =
|
|
6022
|
+
(_a3 = __privateGet8(this, _cssRules).pointer) == null ? void 0 : _a3.style.setProperty(
|
|
5730
6023
|
"width",
|
|
5731
6024
|
`${this.getPointerRatio(evt) * 100}%`
|
|
5732
6025
|
);
|
|
@@ -5734,8 +6027,8 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5734
6027
|
updateBar() {
|
|
5735
6028
|
var _a3, _b2;
|
|
5736
6029
|
const rangePercent = this.range.valueAsNumber * 100;
|
|
5737
|
-
(_a3 =
|
|
5738
|
-
(_b2 =
|
|
6030
|
+
(_a3 = __privateGet8(this, _cssRules).progress) == null ? void 0 : _a3.style.setProperty("width", `${rangePercent}%`);
|
|
6031
|
+
(_b2 = __privateGet8(this, _cssRules).thumb) == null ? void 0 : _b2.style.setProperty("left", `${rangePercent}%`);
|
|
5739
6032
|
}
|
|
5740
6033
|
updateSegments(segments) {
|
|
5741
6034
|
const clipping = this.shadowRoot.querySelector("#segments-clipping");
|
|
@@ -5774,8 +6067,8 @@ var MediaChromeRange = class extends GlobalThis.HTMLElement {
|
|
|
5774
6067
|
return getPointProgressOnLine(
|
|
5775
6068
|
evt.clientX,
|
|
5776
6069
|
evt.clientY,
|
|
5777
|
-
|
|
5778
|
-
|
|
6070
|
+
__privateGet8(this, _startpoint).getBoundingClientRect(),
|
|
6071
|
+
__privateGet8(this, _endpoint).getBoundingClientRect()
|
|
5779
6072
|
);
|
|
5780
6073
|
}
|
|
5781
6074
|
get dragging() {
|
|
@@ -5818,11 +6111,11 @@ _onFocusOut = /* @__PURE__ */ new WeakMap();
|
|
|
5818
6111
|
_updateComputedStyles = /* @__PURE__ */ new WeakMap();
|
|
5819
6112
|
_updateActiveSegment = /* @__PURE__ */ new WeakSet();
|
|
5820
6113
|
updateActiveSegment_fn = function(evt) {
|
|
5821
|
-
const rule =
|
|
6114
|
+
const rule = __privateGet8(this, _cssRules).activeSegment;
|
|
5822
6115
|
if (!rule)
|
|
5823
6116
|
return;
|
|
5824
6117
|
const pointerRatio = this.getPointerRatio(evt);
|
|
5825
|
-
const segmentIndex =
|
|
6118
|
+
const segmentIndex = __privateGet8(this, _segments).findIndex((start, i, arr) => {
|
|
5826
6119
|
const end = arr[i + 1];
|
|
5827
6120
|
return end != null && pointerRatio >= start && pointerRatio <= end;
|
|
5828
6121
|
});
|
|
@@ -5881,7 +6174,7 @@ handlePointerLeave_fn = function() {
|
|
|
5881
6174
|
(_a3 = GlobalThis.window) == null ? void 0 : _a3.removeEventListener("pointermove", this);
|
|
5882
6175
|
this.toggleAttribute("dragging", false);
|
|
5883
6176
|
this.range.disabled = this.hasAttribute("disabled");
|
|
5884
|
-
(_b2 =
|
|
6177
|
+
(_b2 = __privateGet8(this, _cssRules).activeSegment) == null ? void 0 : _b2.style.removeProperty("transform");
|
|
5885
6178
|
};
|
|
5886
6179
|
_handlePointerMove2 = /* @__PURE__ */ new WeakSet();
|
|
5887
6180
|
handlePointerMove_fn2 = function(evt) {
|
|
@@ -5894,7 +6187,7 @@ handlePointerMove_fn2 = function(evt) {
|
|
|
5894
6187
|
);
|
|
5895
6188
|
this.updatePointerBar(evt);
|
|
5896
6189
|
__privateMethod5(this, _updateActiveSegment, updateActiveSegment_fn).call(this, evt);
|
|
5897
|
-
if (this.dragging && (evt.pointerType !== "mouse" || !
|
|
6190
|
+
if (this.dragging && (evt.pointerType !== "mouse" || !__privateGet8(this, _isInputTarget))) {
|
|
5898
6191
|
this.range.disabled = true;
|
|
5899
6192
|
this.range.valueAsNumber = this.getPointerRatio(evt);
|
|
5900
6193
|
this.range.dispatchEvent(
|
|
@@ -5910,21 +6203,21 @@ if (!GlobalThis.customElements.get("media-chrome-range")) {
|
|
|
5910
6203
|
}
|
|
5911
6204
|
|
|
5912
6205
|
// ../../node_modules/media-chrome/dist/media-control-bar.js
|
|
5913
|
-
var
|
|
6206
|
+
var __accessCheck9 = (obj, member, msg) => {
|
|
5914
6207
|
if (!member.has(obj))
|
|
5915
6208
|
throw TypeError("Cannot " + msg);
|
|
5916
6209
|
};
|
|
5917
|
-
var
|
|
5918
|
-
|
|
6210
|
+
var __privateGet9 = (obj, member, getter) => {
|
|
6211
|
+
__accessCheck9(obj, member, "read from private field");
|
|
5919
6212
|
return getter ? getter.call(obj) : member.get(obj);
|
|
5920
6213
|
};
|
|
5921
|
-
var
|
|
6214
|
+
var __privateAdd9 = (obj, member, value) => {
|
|
5922
6215
|
if (member.has(obj))
|
|
5923
6216
|
throw TypeError("Cannot add the same private member more than once");
|
|
5924
6217
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
5925
6218
|
};
|
|
5926
6219
|
var __privateSet8 = (obj, member, value, setter) => {
|
|
5927
|
-
|
|
6220
|
+
__accessCheck9(obj, member, "write to private field");
|
|
5928
6221
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
5929
6222
|
return value;
|
|
5930
6223
|
};
|
|
@@ -5965,7 +6258,7 @@ function getTemplateHTML7(_attrs) {
|
|
|
5965
6258
|
var MediaControlBar = class extends GlobalThis.HTMLElement {
|
|
5966
6259
|
constructor() {
|
|
5967
6260
|
super();
|
|
5968
|
-
|
|
6261
|
+
__privateAdd9(this, _mediaController4, void 0);
|
|
5969
6262
|
if (!this.shadowRoot) {
|
|
5970
6263
|
this.attachShadow(this.constructor.shadowRootOptions);
|
|
5971
6264
|
const attrs = namedNodeMapToObject(this.attributes);
|
|
@@ -5979,12 +6272,12 @@ var MediaControlBar = class extends GlobalThis.HTMLElement {
|
|
|
5979
6272
|
var _a3, _b2, _c, _d, _e;
|
|
5980
6273
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
5981
6274
|
if (oldValue) {
|
|
5982
|
-
(_b2 = (_a3 =
|
|
6275
|
+
(_b2 = (_a3 = __privateGet9(this, _mediaController4)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
5983
6276
|
__privateSet8(this, _mediaController4, null);
|
|
5984
6277
|
}
|
|
5985
6278
|
if (newValue && this.isConnected) {
|
|
5986
6279
|
__privateSet8(this, _mediaController4, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
5987
|
-
(_e = (_d =
|
|
6280
|
+
(_e = (_d = __privateGet9(this, _mediaController4)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
5988
6281
|
}
|
|
5989
6282
|
}
|
|
5990
6283
|
}
|
|
@@ -5997,12 +6290,12 @@ var MediaControlBar = class extends GlobalThis.HTMLElement {
|
|
|
5997
6290
|
__privateSet8(this, _mediaController4, (_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(
|
|
5998
6291
|
mediaControllerId
|
|
5999
6292
|
));
|
|
6000
|
-
(_c = (_b2 =
|
|
6293
|
+
(_c = (_b2 = __privateGet9(this, _mediaController4)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
6001
6294
|
}
|
|
6002
6295
|
}
|
|
6003
6296
|
disconnectedCallback() {
|
|
6004
6297
|
var _a3, _b2;
|
|
6005
|
-
(_b2 = (_a3 =
|
|
6298
|
+
(_b2 = (_a3 = __privateGet9(this, _mediaController4)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
6006
6299
|
__privateSet8(this, _mediaController4, null);
|
|
6007
6300
|
}
|
|
6008
6301
|
};
|
|
@@ -6014,21 +6307,21 @@ if (!GlobalThis.customElements.get("media-control-bar")) {
|
|
|
6014
6307
|
}
|
|
6015
6308
|
|
|
6016
6309
|
// ../../node_modules/media-chrome/dist/media-text-display.js
|
|
6017
|
-
var
|
|
6310
|
+
var __accessCheck10 = (obj, member, msg) => {
|
|
6018
6311
|
if (!member.has(obj))
|
|
6019
6312
|
throw TypeError("Cannot " + msg);
|
|
6020
6313
|
};
|
|
6021
|
-
var
|
|
6022
|
-
|
|
6314
|
+
var __privateGet10 = (obj, member, getter) => {
|
|
6315
|
+
__accessCheck10(obj, member, "read from private field");
|
|
6023
6316
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6024
6317
|
};
|
|
6025
|
-
var
|
|
6318
|
+
var __privateAdd10 = (obj, member, value) => {
|
|
6026
6319
|
if (member.has(obj))
|
|
6027
6320
|
throw TypeError("Cannot add the same private member more than once");
|
|
6028
6321
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6029
6322
|
};
|
|
6030
6323
|
var __privateSet9 = (obj, member, value, setter) => {
|
|
6031
|
-
|
|
6324
|
+
__accessCheck10(obj, member, "write to private field");
|
|
6032
6325
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6033
6326
|
return value;
|
|
6034
6327
|
};
|
|
@@ -6080,7 +6373,7 @@ function getTemplateHTML8(_attrs, _props = {}) {
|
|
|
6080
6373
|
`
|
|
6081
6374
|
);
|
|
6082
6375
|
}
|
|
6083
|
-
function
|
|
6376
|
+
function getSlotTemplateHTML7(_attrs, _props) {
|
|
6084
6377
|
return (
|
|
6085
6378
|
/*html*/
|
|
6086
6379
|
`
|
|
@@ -6091,7 +6384,7 @@ function getSlotTemplateHTML6(_attrs, _props) {
|
|
|
6091
6384
|
var MediaTextDisplay = class extends GlobalThis.HTMLElement {
|
|
6092
6385
|
constructor() {
|
|
6093
6386
|
super();
|
|
6094
|
-
|
|
6387
|
+
__privateAdd10(this, _mediaController5, void 0);
|
|
6095
6388
|
if (!this.shadowRoot) {
|
|
6096
6389
|
this.attachShadow(this.constructor.shadowRootOptions);
|
|
6097
6390
|
const attrs = namedNodeMapToObject(this.attributes);
|
|
@@ -6105,12 +6398,12 @@ var MediaTextDisplay = class extends GlobalThis.HTMLElement {
|
|
|
6105
6398
|
var _a3, _b2, _c, _d, _e;
|
|
6106
6399
|
if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
6107
6400
|
if (oldValue) {
|
|
6108
|
-
(_b2 = (_a3 =
|
|
6401
|
+
(_b2 = (_a3 = __privateGet10(this, _mediaController5)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
6109
6402
|
__privateSet9(this, _mediaController5, null);
|
|
6110
6403
|
}
|
|
6111
6404
|
if (newValue && this.isConnected) {
|
|
6112
6405
|
__privateSet9(this, _mediaController5, (_c = this.getRootNode()) == null ? void 0 : _c.getElementById(newValue));
|
|
6113
|
-
(_e = (_d =
|
|
6406
|
+
(_e = (_d = __privateGet10(this, _mediaController5)) == null ? void 0 : _d.associateElement) == null ? void 0 : _e.call(_d, this);
|
|
6114
6407
|
}
|
|
6115
6408
|
}
|
|
6116
6409
|
}
|
|
@@ -6128,44 +6421,44 @@ var MediaTextDisplay = class extends GlobalThis.HTMLElement {
|
|
|
6128
6421
|
__privateSet9(this, _mediaController5, (_a3 = this.getRootNode()) == null ? void 0 : _a3.getElementById(
|
|
6129
6422
|
mediaControllerId
|
|
6130
6423
|
));
|
|
6131
|
-
(_c = (_b2 =
|
|
6424
|
+
(_c = (_b2 = __privateGet10(this, _mediaController5)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
|
|
6132
6425
|
}
|
|
6133
6426
|
}
|
|
6134
6427
|
disconnectedCallback() {
|
|
6135
6428
|
var _a3, _b2;
|
|
6136
|
-
(_b2 = (_a3 =
|
|
6429
|
+
(_b2 = (_a3 = __privateGet10(this, _mediaController5)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
|
|
6137
6430
|
__privateSet9(this, _mediaController5, null);
|
|
6138
6431
|
}
|
|
6139
6432
|
};
|
|
6140
6433
|
_mediaController5 = /* @__PURE__ */ new WeakMap();
|
|
6141
6434
|
MediaTextDisplay.shadowRootOptions = { mode: "open" };
|
|
6142
6435
|
MediaTextDisplay.getTemplateHTML = getTemplateHTML8;
|
|
6143
|
-
MediaTextDisplay.getSlotTemplateHTML =
|
|
6436
|
+
MediaTextDisplay.getSlotTemplateHTML = getSlotTemplateHTML7;
|
|
6144
6437
|
if (!GlobalThis.customElements.get("media-text-display")) {
|
|
6145
6438
|
GlobalThis.customElements.define("media-text-display", MediaTextDisplay);
|
|
6146
6439
|
}
|
|
6147
6440
|
|
|
6148
6441
|
// ../../node_modules/media-chrome/dist/media-duration-display.js
|
|
6149
|
-
var
|
|
6442
|
+
var __accessCheck11 = (obj, member, msg) => {
|
|
6150
6443
|
if (!member.has(obj))
|
|
6151
6444
|
throw TypeError("Cannot " + msg);
|
|
6152
6445
|
};
|
|
6153
|
-
var
|
|
6154
|
-
|
|
6446
|
+
var __privateGet11 = (obj, member, getter) => {
|
|
6447
|
+
__accessCheck11(obj, member, "read from private field");
|
|
6155
6448
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6156
6449
|
};
|
|
6157
|
-
var
|
|
6450
|
+
var __privateAdd11 = (obj, member, value) => {
|
|
6158
6451
|
if (member.has(obj))
|
|
6159
6452
|
throw TypeError("Cannot add the same private member more than once");
|
|
6160
6453
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6161
6454
|
};
|
|
6162
6455
|
var __privateSet10 = (obj, member, value, setter) => {
|
|
6163
|
-
|
|
6456
|
+
__accessCheck11(obj, member, "write to private field");
|
|
6164
6457
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6165
6458
|
return value;
|
|
6166
6459
|
};
|
|
6167
6460
|
var _slot;
|
|
6168
|
-
function
|
|
6461
|
+
function getSlotTemplateHTML8(_attrs, props) {
|
|
6169
6462
|
return (
|
|
6170
6463
|
/*html*/
|
|
6171
6464
|
`
|
|
@@ -6177,16 +6470,16 @@ var MediaDurationDisplay = class extends MediaTextDisplay {
|
|
|
6177
6470
|
constructor() {
|
|
6178
6471
|
var _a3;
|
|
6179
6472
|
super();
|
|
6180
|
-
|
|
6473
|
+
__privateAdd11(this, _slot, void 0);
|
|
6181
6474
|
__privateSet10(this, _slot, this.shadowRoot.querySelector("slot"));
|
|
6182
|
-
|
|
6475
|
+
__privateGet11(this, _slot).textContent = formatTime((_a3 = this.mediaDuration) != null ? _a3 : 0);
|
|
6183
6476
|
}
|
|
6184
6477
|
static get observedAttributes() {
|
|
6185
6478
|
return [...super.observedAttributes, MediaUIAttributes.MEDIA_DURATION];
|
|
6186
6479
|
}
|
|
6187
6480
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
6188
6481
|
if (attrName === MediaUIAttributes.MEDIA_DURATION) {
|
|
6189
|
-
|
|
6482
|
+
__privateGet11(this, _slot).textContent = formatTime(+newValue);
|
|
6190
6483
|
}
|
|
6191
6484
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
6192
6485
|
}
|
|
@@ -6201,7 +6494,7 @@ var MediaDurationDisplay = class extends MediaTextDisplay {
|
|
|
6201
6494
|
}
|
|
6202
6495
|
};
|
|
6203
6496
|
_slot = /* @__PURE__ */ new WeakMap();
|
|
6204
|
-
MediaDurationDisplay.getSlotTemplateHTML =
|
|
6497
|
+
MediaDurationDisplay.getSlotTemplateHTML = getSlotTemplateHTML8;
|
|
6205
6498
|
if (!GlobalThis.customElements.get("media-duration-display")) {
|
|
6206
6499
|
GlobalThis.customElements.define(
|
|
6207
6500
|
"media-duration-display",
|
|
@@ -6237,26 +6530,27 @@ var formatError = (error) => {
|
|
|
6237
6530
|
};
|
|
6238
6531
|
|
|
6239
6532
|
// ../../node_modules/media-chrome/dist/media-error-dialog.js
|
|
6240
|
-
var
|
|
6533
|
+
var __accessCheck12 = (obj, member, msg) => {
|
|
6241
6534
|
if (!member.has(obj))
|
|
6242
6535
|
throw TypeError("Cannot " + msg);
|
|
6243
6536
|
};
|
|
6244
|
-
var
|
|
6245
|
-
|
|
6537
|
+
var __privateGet12 = (obj, member, getter) => {
|
|
6538
|
+
__accessCheck12(obj, member, "read from private field");
|
|
6246
6539
|
return getter ? getter.call(obj) : member.get(obj);
|
|
6247
6540
|
};
|
|
6248
|
-
var
|
|
6541
|
+
var __privateAdd12 = (obj, member, value) => {
|
|
6249
6542
|
if (member.has(obj))
|
|
6250
6543
|
throw TypeError("Cannot add the same private member more than once");
|
|
6251
6544
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6252
6545
|
};
|
|
6253
6546
|
var __privateSet11 = (obj, member, value, setter) => {
|
|
6254
|
-
|
|
6547
|
+
__accessCheck12(obj, member, "write to private field");
|
|
6255
6548
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
6256
6549
|
return value;
|
|
6257
6550
|
};
|
|
6258
6551
|
var _mediaError;
|
|
6259
|
-
function
|
|
6552
|
+
function getSlotTemplateHTML9(attrs) {
|
|
6553
|
+
const code = +attrs.mediaerrorcode;
|
|
6260
6554
|
return (
|
|
6261
6555
|
/*html*/
|
|
6262
6556
|
`
|
|
@@ -6275,8 +6569,8 @@ function getSlotTemplateHTML8(attrs) {
|
|
|
6275
6569
|
margin-block: 0 .3em;
|
|
6276
6570
|
}
|
|
6277
6571
|
</style>
|
|
6278
|
-
<slot name="error-${
|
|
6279
|
-
${formatErrorMessage({ code
|
|
6572
|
+
<slot name="error-${code}" id="content">
|
|
6573
|
+
${formatErrorMessage({ code, message: attrs.mediaerrormessage })}
|
|
6280
6574
|
</slot>
|
|
6281
6575
|
`
|
|
6282
6576
|
);
|
|
@@ -6287,11 +6581,12 @@ function shouldOpenErrorDialog(error) {
|
|
|
6287
6581
|
function formatErrorMessage(error) {
|
|
6288
6582
|
var _a3;
|
|
6289
6583
|
const { title, message } = (_a3 = formatError(error)) != null ? _a3 : {};
|
|
6584
|
+
const code = escapeHTML(error.code);
|
|
6290
6585
|
let html = "";
|
|
6291
6586
|
if (title)
|
|
6292
|
-
html += `<slot name="error-${
|
|
6587
|
+
html += `<slot name="error-${code}-title"><h3>${escapeHTML(title)}</h3></slot>`;
|
|
6293
6588
|
if (message)
|
|
6294
|
-
html += `<slot name="error-${
|
|
6589
|
+
html += `<slot name="error-${code}-message"><p>${escapeHTML(message)}</p></slot>`;
|
|
6295
6590
|
return html;
|
|
6296
6591
|
}
|
|
6297
6592
|
var observedAttributes = [
|
|
@@ -6301,7 +6596,7 @@ var observedAttributes = [
|
|
|
6301
6596
|
var MediaErrorDialog = class extends MediaChromeDialog {
|
|
6302
6597
|
constructor() {
|
|
6303
6598
|
super(...arguments);
|
|
6304
|
-
|
|
6599
|
+
__privateAdd12(this, _mediaError, null);
|
|
6305
6600
|
}
|
|
6306
6601
|
static get observedAttributes() {
|
|
6307
6602
|
return [...super.observedAttributes, ...observedAttributes];
|
|
@@ -6330,7 +6625,7 @@ var MediaErrorDialog = class extends MediaChromeDialog {
|
|
|
6330
6625
|
}
|
|
6331
6626
|
}
|
|
6332
6627
|
get mediaError() {
|
|
6333
|
-
return
|
|
6628
|
+
return __privateGet12(this, _mediaError);
|
|
6334
6629
|
}
|
|
6335
6630
|
set mediaError(value) {
|
|
6336
6631
|
__privateSet11(this, _mediaError, value);
|
|
@@ -6349,212 +6644,12 @@ var MediaErrorDialog = class extends MediaChromeDialog {
|
|
|
6349
6644
|
}
|
|
6350
6645
|
};
|
|
6351
6646
|
_mediaError = /* @__PURE__ */ new WeakMap();
|
|
6352
|
-
MediaErrorDialog.getSlotTemplateHTML =
|
|
6647
|
+
MediaErrorDialog.getSlotTemplateHTML = getSlotTemplateHTML9;
|
|
6353
6648
|
MediaErrorDialog.formatErrorMessage = formatErrorMessage;
|
|
6354
6649
|
if (!GlobalThis.customElements.get("media-error-dialog")) {
|
|
6355
6650
|
GlobalThis.customElements.define("media-error-dialog", MediaErrorDialog);
|
|
6356
6651
|
}
|
|
6357
6652
|
|
|
6358
|
-
// ../../node_modules/media-chrome/dist/media-keyboard-shortcuts-dialog.js
|
|
6359
|
-
var __accessCheck12 = (obj, member, msg) => {
|
|
6360
|
-
if (!member.has(obj))
|
|
6361
|
-
throw TypeError("Cannot " + msg);
|
|
6362
|
-
};
|
|
6363
|
-
var __privateGet12 = (obj, member, getter) => {
|
|
6364
|
-
__accessCheck12(obj, member, "read from private field");
|
|
6365
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
6366
|
-
};
|
|
6367
|
-
var __privateAdd12 = (obj, member, value) => {
|
|
6368
|
-
if (member.has(obj))
|
|
6369
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
6370
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6371
|
-
};
|
|
6372
|
-
var _clickHandler;
|
|
6373
|
-
var _keyDownHandler2;
|
|
6374
|
-
function getSlotTemplateHTML9(_attrs) {
|
|
6375
|
-
return (
|
|
6376
|
-
/*html*/
|
|
6377
|
-
`
|
|
6378
|
-
<style>
|
|
6379
|
-
:host {
|
|
6380
|
-
position: fixed;
|
|
6381
|
-
top: 0;
|
|
6382
|
-
left: 0;
|
|
6383
|
-
z-index: 9999;
|
|
6384
|
-
background: rgb(20 20 30 / .8);
|
|
6385
|
-
backdrop-filter: blur(10px);
|
|
6386
|
-
}
|
|
6387
|
-
|
|
6388
|
-
#content {
|
|
6389
|
-
display: block;
|
|
6390
|
-
width: clamp(400px, 40vw, 700px);
|
|
6391
|
-
max-width: 90vw;
|
|
6392
|
-
text-align: left;
|
|
6393
|
-
}
|
|
6394
|
-
|
|
6395
|
-
h2 {
|
|
6396
|
-
margin: 0 0 1.5rem 0;
|
|
6397
|
-
font-size: 1.5rem;
|
|
6398
|
-
font-weight: 500;
|
|
6399
|
-
text-align: center;
|
|
6400
|
-
}
|
|
6401
|
-
|
|
6402
|
-
.shortcuts-table {
|
|
6403
|
-
width: 100%;
|
|
6404
|
-
border-collapse: collapse;
|
|
6405
|
-
}
|
|
6406
|
-
|
|
6407
|
-
.shortcuts-table tr {
|
|
6408
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
6409
|
-
}
|
|
6410
|
-
|
|
6411
|
-
.shortcuts-table tr:last-child {
|
|
6412
|
-
border-bottom: none;
|
|
6413
|
-
}
|
|
6414
|
-
|
|
6415
|
-
.shortcuts-table td {
|
|
6416
|
-
padding: 0.75rem 0.5rem;
|
|
6417
|
-
}
|
|
6418
|
-
|
|
6419
|
-
.shortcuts-table td:first-child {
|
|
6420
|
-
text-align: right;
|
|
6421
|
-
padding-right: 1rem;
|
|
6422
|
-
width: 40%;
|
|
6423
|
-
min-width: 120px;
|
|
6424
|
-
}
|
|
6425
|
-
|
|
6426
|
-
.shortcuts-table td:last-child {
|
|
6427
|
-
padding-left: 1rem;
|
|
6428
|
-
}
|
|
6429
|
-
|
|
6430
|
-
.key {
|
|
6431
|
-
display: inline-block;
|
|
6432
|
-
background: rgba(255, 255, 255, 0.15);
|
|
6433
|
-
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
6434
|
-
border-radius: 4px;
|
|
6435
|
-
padding: 0.25rem 0.5rem;
|
|
6436
|
-
font-family: 'Courier New', monospace;
|
|
6437
|
-
font-size: 0.9rem;
|
|
6438
|
-
font-weight: 500;
|
|
6439
|
-
min-width: 1.5rem;
|
|
6440
|
-
text-align: center;
|
|
6441
|
-
margin: 0 0.2rem;
|
|
6442
|
-
}
|
|
6443
|
-
|
|
6444
|
-
.description {
|
|
6445
|
-
color: rgba(255, 255, 255, 0.9);
|
|
6446
|
-
font-size: 0.95rem;
|
|
6447
|
-
}
|
|
6448
|
-
|
|
6449
|
-
.key-combo {
|
|
6450
|
-
display: flex;
|
|
6451
|
-
align-items: center;
|
|
6452
|
-
justify-content: flex-end;
|
|
6453
|
-
gap: 0.3rem;
|
|
6454
|
-
}
|
|
6455
|
-
|
|
6456
|
-
.key-separator {
|
|
6457
|
-
color: rgba(255, 255, 255, 0.5);
|
|
6458
|
-
font-size: 0.9rem;
|
|
6459
|
-
}
|
|
6460
|
-
</style>
|
|
6461
|
-
<slot id="content">
|
|
6462
|
-
${formatKeyboardShortcuts()}
|
|
6463
|
-
</slot>
|
|
6464
|
-
`
|
|
6465
|
-
);
|
|
6466
|
-
}
|
|
6467
|
-
function formatKeyboardShortcuts() {
|
|
6468
|
-
const shortcuts = [
|
|
6469
|
-
{ keys: ["Space", "k"], description: "Toggle Playback" },
|
|
6470
|
-
{ keys: ["m"], description: "Toggle mute" },
|
|
6471
|
-
{ keys: ["f"], description: "Toggle fullscreen" },
|
|
6472
|
-
{ keys: ["c"], description: "Toggle captions or subtitles, if available" },
|
|
6473
|
-
{ keys: ["p"], description: "Toggle Picture in Picture" },
|
|
6474
|
-
{ keys: ["\u2190", "j"], description: "Seek back 10s" },
|
|
6475
|
-
{ keys: ["\u2192", "l"], description: "Seek forward 10s" },
|
|
6476
|
-
{ keys: ["\u2191"], description: "Turn volume up" },
|
|
6477
|
-
{ keys: ["\u2193"], description: "Turn volume down" },
|
|
6478
|
-
{ keys: ["< (SHIFT+,)"], description: "Decrease playback rate" },
|
|
6479
|
-
{ keys: ["> (SHIFT+.)"], description: "Increase playback rate" }
|
|
6480
|
-
];
|
|
6481
|
-
const rows = shortcuts.map(({ keys, description }) => {
|
|
6482
|
-
const keyCombo = keys.map(
|
|
6483
|
-
(key, index) => index > 0 ? `<span class="key-separator">or</span><span class="key">${key}</span>` : `<span class="key">${key}</span>`
|
|
6484
|
-
).join("");
|
|
6485
|
-
return `
|
|
6486
|
-
<tr>
|
|
6487
|
-
<td>
|
|
6488
|
-
<div class="key-combo">${keyCombo}</div>
|
|
6489
|
-
</td>
|
|
6490
|
-
<td class="description">${description}</td>
|
|
6491
|
-
</tr>
|
|
6492
|
-
`;
|
|
6493
|
-
}).join("");
|
|
6494
|
-
return `
|
|
6495
|
-
<h2>Keyboard Shortcuts</h2>
|
|
6496
|
-
<table class="shortcuts-table">${rows}</table>
|
|
6497
|
-
`;
|
|
6498
|
-
}
|
|
6499
|
-
var MediaKeyboardShortcutsDialog = class extends MediaChromeDialog {
|
|
6500
|
-
constructor() {
|
|
6501
|
-
super(...arguments);
|
|
6502
|
-
__privateAdd12(this, _clickHandler, (e) => {
|
|
6503
|
-
var _a3;
|
|
6504
|
-
if (!this.open)
|
|
6505
|
-
return;
|
|
6506
|
-
const content = (_a3 = this.shadowRoot) == null ? void 0 : _a3.querySelector("#content");
|
|
6507
|
-
if (!content)
|
|
6508
|
-
return;
|
|
6509
|
-
const path = e.composedPath();
|
|
6510
|
-
const isClickOnHost = path[0] === this || path.includes(this);
|
|
6511
|
-
const isClickInsideContent = path.includes(content);
|
|
6512
|
-
if (isClickOnHost && !isClickInsideContent) {
|
|
6513
|
-
this.open = false;
|
|
6514
|
-
}
|
|
6515
|
-
});
|
|
6516
|
-
__privateAdd12(this, _keyDownHandler2, (e) => {
|
|
6517
|
-
if (!this.open)
|
|
6518
|
-
return;
|
|
6519
|
-
const isShiftSlash = e.shiftKey && (e.key === "/" || e.key === "?");
|
|
6520
|
-
if ((e.key === "Escape" || isShiftSlash) && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
|
6521
|
-
this.open = false;
|
|
6522
|
-
e.preventDefault();
|
|
6523
|
-
e.stopPropagation();
|
|
6524
|
-
}
|
|
6525
|
-
});
|
|
6526
|
-
}
|
|
6527
|
-
connectedCallback() {
|
|
6528
|
-
super.connectedCallback();
|
|
6529
|
-
if (this.open) {
|
|
6530
|
-
this.addEventListener("click", __privateGet12(this, _clickHandler));
|
|
6531
|
-
document.addEventListener("keydown", __privateGet12(this, _keyDownHandler2));
|
|
6532
|
-
}
|
|
6533
|
-
}
|
|
6534
|
-
disconnectedCallback() {
|
|
6535
|
-
this.removeEventListener("click", __privateGet12(this, _clickHandler));
|
|
6536
|
-
document.removeEventListener("keydown", __privateGet12(this, _keyDownHandler2));
|
|
6537
|
-
}
|
|
6538
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
6539
|
-
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
6540
|
-
if (attrName === "open") {
|
|
6541
|
-
if (this.open) {
|
|
6542
|
-
this.addEventListener("click", __privateGet12(this, _clickHandler));
|
|
6543
|
-
document.addEventListener("keydown", __privateGet12(this, _keyDownHandler2));
|
|
6544
|
-
} else {
|
|
6545
|
-
this.removeEventListener("click", __privateGet12(this, _clickHandler));
|
|
6546
|
-
document.removeEventListener("keydown", __privateGet12(this, _keyDownHandler2));
|
|
6547
|
-
}
|
|
6548
|
-
}
|
|
6549
|
-
}
|
|
6550
|
-
};
|
|
6551
|
-
_clickHandler = /* @__PURE__ */ new WeakMap();
|
|
6552
|
-
_keyDownHandler2 = /* @__PURE__ */ new WeakMap();
|
|
6553
|
-
MediaKeyboardShortcutsDialog.getSlotTemplateHTML = getSlotTemplateHTML9;
|
|
6554
|
-
if (!GlobalThis.customElements.get("media-keyboard-shortcuts-dialog")) {
|
|
6555
|
-
GlobalThis.customElements.define("media-keyboard-shortcuts-dialog", MediaKeyboardShortcutsDialog);
|
|
6556
|
-
}
|
|
6557
|
-
|
|
6558
6653
|
// ../../node_modules/media-chrome/dist/media-fullscreen-button.js
|
|
6559
6654
|
var __accessCheck13 = (obj, member, msg) => {
|
|
6560
6655
|
if (!member.has(obj))
|
|
@@ -6820,7 +6915,7 @@ var __privateSet13 = (obj, member, value, setter) => {
|
|
|
6820
6915
|
};
|
|
6821
6916
|
var _mediaController6;
|
|
6822
6917
|
var _delay;
|
|
6823
|
-
var
|
|
6918
|
+
var Attributes7 = {
|
|
6824
6919
|
LOADING_DELAY: "loadingdelay",
|
|
6825
6920
|
NO_AUTOHIDE: "noautohide"
|
|
6826
6921
|
};
|
|
@@ -6908,12 +7003,12 @@ var MediaLoadingIndicator = class extends GlobalThis.HTMLElement {
|
|
|
6908
7003
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER,
|
|
6909
7004
|
MediaUIAttributes.MEDIA_PAUSED,
|
|
6910
7005
|
MediaUIAttributes.MEDIA_LOADING,
|
|
6911
|
-
|
|
7006
|
+
Attributes7.LOADING_DELAY
|
|
6912
7007
|
];
|
|
6913
7008
|
}
|
|
6914
7009
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
6915
7010
|
var _a3, _b2, _c, _d, _e;
|
|
6916
|
-
if (attrName ===
|
|
7011
|
+
if (attrName === Attributes7.LOADING_DELAY && oldValue !== newValue) {
|
|
6917
7012
|
this.loadingDelay = Number(newValue);
|
|
6918
7013
|
} else if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
|
|
6919
7014
|
if (oldValue) {
|
|
@@ -6982,10 +7077,10 @@ var MediaLoadingIndicator = class extends GlobalThis.HTMLElement {
|
|
|
6982
7077
|
setStringAttr(this, MediaStateReceiverAttributes.MEDIA_CONTROLLER, value);
|
|
6983
7078
|
}
|
|
6984
7079
|
get noAutohide() {
|
|
6985
|
-
return getBooleanAttr(this,
|
|
7080
|
+
return getBooleanAttr(this, Attributes7.NO_AUTOHIDE);
|
|
6986
7081
|
}
|
|
6987
7082
|
set noAutohide(value) {
|
|
6988
|
-
setBooleanAttr(this,
|
|
7083
|
+
setBooleanAttr(this, Attributes7.NO_AUTOHIDE, value);
|
|
6989
7084
|
}
|
|
6990
7085
|
};
|
|
6991
7086
|
_mediaController6 = /* @__PURE__ */ new WeakMap();
|
|
@@ -7203,7 +7298,7 @@ var __privateAdd15 = (obj, member, value) => {
|
|
|
7203
7298
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
7204
7299
|
};
|
|
7205
7300
|
var _rates;
|
|
7206
|
-
var
|
|
7301
|
+
var Attributes8 = {
|
|
7207
7302
|
RATES: "rates"
|
|
7208
7303
|
};
|
|
7209
7304
|
var DEFAULT_RATES = [1, 1.2, 1.5, 1.7, 2];
|
|
@@ -7233,7 +7328,7 @@ var MediaPlaybackRateButton = class extends MediaChromeButton {
|
|
|
7233
7328
|
constructor() {
|
|
7234
7329
|
var _a3;
|
|
7235
7330
|
super();
|
|
7236
|
-
__privateAdd15(this, _rates, new AttributeTokenList(this,
|
|
7331
|
+
__privateAdd15(this, _rates, new AttributeTokenList(this, Attributes8.RATES, {
|
|
7237
7332
|
defaultValue: DEFAULT_RATES
|
|
7238
7333
|
}));
|
|
7239
7334
|
this.container = this.shadowRoot.querySelector('slot[name="icon"]');
|
|
@@ -7243,12 +7338,12 @@ var MediaPlaybackRateButton = class extends MediaChromeButton {
|
|
|
7243
7338
|
return [
|
|
7244
7339
|
...super.observedAttributes,
|
|
7245
7340
|
MediaUIAttributes.MEDIA_PLAYBACK_RATE,
|
|
7246
|
-
|
|
7341
|
+
Attributes8.RATES
|
|
7247
7342
|
];
|
|
7248
7343
|
}
|
|
7249
7344
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
7250
7345
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
7251
|
-
if (attrName ===
|
|
7346
|
+
if (attrName === Attributes8.RATES) {
|
|
7252
7347
|
__privateGet15(this, _rates).value = newValue;
|
|
7253
7348
|
}
|
|
7254
7349
|
if (attrName === MediaUIAttributes.MEDIA_PLAYBACK_RATE) {
|
|
@@ -7402,7 +7497,7 @@ if (!GlobalThis.customElements.get("media-play-button")) {
|
|
|
7402
7497
|
}
|
|
7403
7498
|
|
|
7404
7499
|
// ../../node_modules/media-chrome/dist/media-poster-image.js
|
|
7405
|
-
var
|
|
7500
|
+
var Attributes9 = {
|
|
7406
7501
|
PLACEHOLDER_SRC: "placeholdersrc",
|
|
7407
7502
|
SRC: "src"
|
|
7408
7503
|
};
|
|
@@ -7442,7 +7537,7 @@ var setBackgroundImage = (el, image) => {
|
|
|
7442
7537
|
};
|
|
7443
7538
|
var MediaPosterImage = class extends GlobalThis.HTMLElement {
|
|
7444
7539
|
static get observedAttributes() {
|
|
7445
|
-
return [
|
|
7540
|
+
return [Attributes9.PLACEHOLDER_SRC, Attributes9.SRC];
|
|
7446
7541
|
}
|
|
7447
7542
|
constructor() {
|
|
7448
7543
|
super();
|
|
@@ -7454,14 +7549,14 @@ var MediaPosterImage = class extends GlobalThis.HTMLElement {
|
|
|
7454
7549
|
this.image = this.shadowRoot.querySelector("#image");
|
|
7455
7550
|
}
|
|
7456
7551
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
7457
|
-
if (attrName ===
|
|
7552
|
+
if (attrName === Attributes9.SRC) {
|
|
7458
7553
|
if (newValue == null) {
|
|
7459
|
-
this.image.removeAttribute(
|
|
7554
|
+
this.image.removeAttribute(Attributes9.SRC);
|
|
7460
7555
|
} else {
|
|
7461
|
-
this.image.setAttribute(
|
|
7556
|
+
this.image.setAttribute(Attributes9.SRC, newValue);
|
|
7462
7557
|
}
|
|
7463
7558
|
}
|
|
7464
|
-
if (attrName ===
|
|
7559
|
+
if (attrName === Attributes9.PLACEHOLDER_SRC) {
|
|
7465
7560
|
if (newValue == null) {
|
|
7466
7561
|
unsetBackgroundImage(this.image);
|
|
7467
7562
|
} else {
|
|
@@ -7473,19 +7568,19 @@ var MediaPosterImage = class extends GlobalThis.HTMLElement {
|
|
|
7473
7568
|
*
|
|
7474
7569
|
*/
|
|
7475
7570
|
get placeholderSrc() {
|
|
7476
|
-
return getStringAttr(this,
|
|
7571
|
+
return getStringAttr(this, Attributes9.PLACEHOLDER_SRC);
|
|
7477
7572
|
}
|
|
7478
7573
|
set placeholderSrc(value) {
|
|
7479
|
-
setStringAttr(this,
|
|
7574
|
+
setStringAttr(this, Attributes9.SRC, value);
|
|
7480
7575
|
}
|
|
7481
7576
|
/**
|
|
7482
7577
|
*
|
|
7483
7578
|
*/
|
|
7484
7579
|
get src() {
|
|
7485
|
-
return getStringAttr(this,
|
|
7580
|
+
return getStringAttr(this, Attributes9.SRC);
|
|
7486
7581
|
}
|
|
7487
7582
|
set src(value) {
|
|
7488
|
-
setStringAttr(this,
|
|
7583
|
+
setStringAttr(this, Attributes9.SRC, value);
|
|
7489
7584
|
}
|
|
7490
7585
|
};
|
|
7491
7586
|
MediaPosterImage.shadowRootOptions = { mode: "open" };
|
|
@@ -7803,7 +7898,7 @@ if (!GlobalThis.customElements.get("media-preview-time-display")) {
|
|
|
7803
7898
|
}
|
|
7804
7899
|
|
|
7805
7900
|
// ../../node_modules/media-chrome/dist/media-seek-backward-button.js
|
|
7806
|
-
var
|
|
7901
|
+
var Attributes10 = {
|
|
7807
7902
|
SEEK_OFFSET: "seekoffset"
|
|
7808
7903
|
};
|
|
7809
7904
|
var DEFAULT_SEEK_OFFSET2 = 30;
|
|
@@ -7835,24 +7930,24 @@ var MediaSeekBackwardButton = class extends MediaChromeButton {
|
|
|
7835
7930
|
return [
|
|
7836
7931
|
...super.observedAttributes,
|
|
7837
7932
|
MediaUIAttributes.MEDIA_CURRENT_TIME,
|
|
7838
|
-
|
|
7933
|
+
Attributes10.SEEK_OFFSET
|
|
7839
7934
|
];
|
|
7840
7935
|
}
|
|
7841
7936
|
connectedCallback() {
|
|
7842
7937
|
super.connectedCallback();
|
|
7843
7938
|
this.seekOffset = getNumericAttr(
|
|
7844
7939
|
this,
|
|
7845
|
-
|
|
7940
|
+
Attributes10.SEEK_OFFSET,
|
|
7846
7941
|
DEFAULT_SEEK_OFFSET2
|
|
7847
7942
|
);
|
|
7848
7943
|
}
|
|
7849
7944
|
attributeChangedCallback(attrName, _oldValue, newValue) {
|
|
7850
7945
|
super.attributeChangedCallback(attrName, _oldValue, newValue);
|
|
7851
7946
|
updateAriaLabel7(this, this.seekOffset);
|
|
7852
|
-
if (attrName ===
|
|
7947
|
+
if (attrName === Attributes10.SEEK_OFFSET) {
|
|
7853
7948
|
this.seekOffset = getNumericAttr(
|
|
7854
7949
|
this,
|
|
7855
|
-
|
|
7950
|
+
Attributes10.SEEK_OFFSET,
|
|
7856
7951
|
DEFAULT_SEEK_OFFSET2
|
|
7857
7952
|
);
|
|
7858
7953
|
}
|
|
@@ -7862,10 +7957,10 @@ var MediaSeekBackwardButton = class extends MediaChromeButton {
|
|
|
7862
7957
|
* Seek amount in seconds
|
|
7863
7958
|
*/
|
|
7864
7959
|
get seekOffset() {
|
|
7865
|
-
return getNumericAttr(this,
|
|
7960
|
+
return getNumericAttr(this, Attributes10.SEEK_OFFSET, DEFAULT_SEEK_OFFSET2);
|
|
7866
7961
|
}
|
|
7867
7962
|
set seekOffset(value) {
|
|
7868
|
-
setNumericAttr(this,
|
|
7963
|
+
setNumericAttr(this, Attributes10.SEEK_OFFSET, value);
|
|
7869
7964
|
this.setAttribute(
|
|
7870
7965
|
"aria-label",
|
|
7871
7966
|
t("seek back {seekOffset} seconds", { seekOffset: this.seekOffset })
|
|
@@ -7906,7 +8001,7 @@ if (!GlobalThis.customElements.get("media-seek-backward-button")) {
|
|
|
7906
8001
|
}
|
|
7907
8002
|
|
|
7908
8003
|
// ../../node_modules/media-chrome/dist/media-seek-forward-button.js
|
|
7909
|
-
var
|
|
8004
|
+
var Attributes11 = {
|
|
7910
8005
|
SEEK_OFFSET: "seekoffset"
|
|
7911
8006
|
};
|
|
7912
8007
|
var DEFAULT_SEEK_OFFSET3 = 30;
|
|
@@ -7938,24 +8033,24 @@ var MediaSeekForwardButton = class extends MediaChromeButton {
|
|
|
7938
8033
|
return [
|
|
7939
8034
|
...super.observedAttributes,
|
|
7940
8035
|
MediaUIAttributes.MEDIA_CURRENT_TIME,
|
|
7941
|
-
|
|
8036
|
+
Attributes11.SEEK_OFFSET
|
|
7942
8037
|
];
|
|
7943
8038
|
}
|
|
7944
8039
|
connectedCallback() {
|
|
7945
8040
|
super.connectedCallback();
|
|
7946
8041
|
this.seekOffset = getNumericAttr(
|
|
7947
8042
|
this,
|
|
7948
|
-
|
|
8043
|
+
Attributes11.SEEK_OFFSET,
|
|
7949
8044
|
DEFAULT_SEEK_OFFSET3
|
|
7950
8045
|
);
|
|
7951
8046
|
}
|
|
7952
8047
|
attributeChangedCallback(attrName, _oldValue, newValue) {
|
|
7953
8048
|
super.attributeChangedCallback(attrName, _oldValue, newValue);
|
|
7954
8049
|
updateAriaLabel8(this, this.seekOffset);
|
|
7955
|
-
if (attrName ===
|
|
8050
|
+
if (attrName === Attributes11.SEEK_OFFSET) {
|
|
7956
8051
|
this.seekOffset = getNumericAttr(
|
|
7957
8052
|
this,
|
|
7958
|
-
|
|
8053
|
+
Attributes11.SEEK_OFFSET,
|
|
7959
8054
|
DEFAULT_SEEK_OFFSET3
|
|
7960
8055
|
);
|
|
7961
8056
|
}
|
|
@@ -7965,10 +8060,10 @@ var MediaSeekForwardButton = class extends MediaChromeButton {
|
|
|
7965
8060
|
* Seek amount in seconds
|
|
7966
8061
|
*/
|
|
7967
8062
|
get seekOffset() {
|
|
7968
|
-
return getNumericAttr(this,
|
|
8063
|
+
return getNumericAttr(this, Attributes11.SEEK_OFFSET, DEFAULT_SEEK_OFFSET3);
|
|
7969
8064
|
}
|
|
7970
8065
|
set seekOffset(value) {
|
|
7971
|
-
setNumericAttr(this,
|
|
8066
|
+
setNumericAttr(this, Attributes11.SEEK_OFFSET, value);
|
|
7972
8067
|
this.setAttribute(
|
|
7973
8068
|
"aria-label",
|
|
7974
8069
|
t("seek forward {seekOffset} seconds", { seekOffset: this.seekOffset })
|
|
@@ -8042,13 +8137,13 @@ var _makeInteractive;
|
|
|
8042
8137
|
var makeInteractive_fn;
|
|
8043
8138
|
var _makeNonInteractive;
|
|
8044
8139
|
var makeNonInteractive_fn;
|
|
8045
|
-
var
|
|
8140
|
+
var Attributes12 = {
|
|
8046
8141
|
REMAINING: "remaining",
|
|
8047
8142
|
SHOW_DURATION: "showduration",
|
|
8048
8143
|
NO_TOGGLE: "notoggle"
|
|
8049
8144
|
};
|
|
8050
8145
|
var CombinedAttributes = [
|
|
8051
|
-
...Object.values(
|
|
8146
|
+
...Object.values(Attributes12),
|
|
8052
8147
|
MediaUIAttributes.MEDIA_CURRENT_TIME,
|
|
8053
8148
|
MediaUIAttributes.MEDIA_DURATION,
|
|
8054
8149
|
MediaUIAttributes.MEDIA_SEEKABLE
|
|
@@ -8169,7 +8264,7 @@ var MediaTimeDisplay = class extends MediaTextDisplay {
|
|
|
8169
8264
|
} else {
|
|
8170
8265
|
__privateMethod6(this, _makeNonInteractive, makeNonInteractive_fn).call(this);
|
|
8171
8266
|
}
|
|
8172
|
-
} else if (attrName ===
|
|
8267
|
+
} else if (attrName === Attributes12.NO_TOGGLE && newValue !== oldValue) {
|
|
8173
8268
|
if (this.noToggle) {
|
|
8174
8269
|
__privateMethod6(this, _makeNonInteractive, makeNonInteractive_fn).call(this);
|
|
8175
8270
|
} else {
|
|
@@ -8191,28 +8286,28 @@ var MediaTimeDisplay = class extends MediaTextDisplay {
|
|
|
8191
8286
|
* Whether to show the remaining time
|
|
8192
8287
|
*/
|
|
8193
8288
|
get remaining() {
|
|
8194
|
-
return getBooleanAttr(this,
|
|
8289
|
+
return getBooleanAttr(this, Attributes12.REMAINING);
|
|
8195
8290
|
}
|
|
8196
8291
|
set remaining(show) {
|
|
8197
|
-
setBooleanAttr(this,
|
|
8292
|
+
setBooleanAttr(this, Attributes12.REMAINING, show);
|
|
8198
8293
|
}
|
|
8199
8294
|
/**
|
|
8200
8295
|
* Whether to show the duration
|
|
8201
8296
|
*/
|
|
8202
8297
|
get showDuration() {
|
|
8203
|
-
return getBooleanAttr(this,
|
|
8298
|
+
return getBooleanAttr(this, Attributes12.SHOW_DURATION);
|
|
8204
8299
|
}
|
|
8205
8300
|
set showDuration(show) {
|
|
8206
|
-
setBooleanAttr(this,
|
|
8301
|
+
setBooleanAttr(this, Attributes12.SHOW_DURATION, show);
|
|
8207
8302
|
}
|
|
8208
8303
|
/**
|
|
8209
8304
|
* Disable the default behavior that toggles between current and remaining time
|
|
8210
8305
|
*/
|
|
8211
8306
|
get noToggle() {
|
|
8212
|
-
return getBooleanAttr(this,
|
|
8307
|
+
return getBooleanAttr(this, Attributes12.NO_TOGGLE);
|
|
8213
8308
|
}
|
|
8214
8309
|
set noToggle(noToggle) {
|
|
8215
|
-
setBooleanAttr(this,
|
|
8310
|
+
setBooleanAttr(this, Attributes12.NO_TOGGLE, noToggle);
|
|
8216
8311
|
}
|
|
8217
8312
|
// Props derived from media UI attributes
|
|
8218
8313
|
/**
|
|
@@ -10551,7 +10646,7 @@ function getTemplateHTML12(_attrs) {
|
|
|
10551
10646
|
`
|
|
10552
10647
|
);
|
|
10553
10648
|
}
|
|
10554
|
-
var
|
|
10649
|
+
var Attributes13 = {
|
|
10555
10650
|
STYLE: "style",
|
|
10556
10651
|
HIDDEN: "hidden",
|
|
10557
10652
|
DISABLED: "disabled",
|
|
@@ -10620,10 +10715,10 @@ var MediaChromeMenu = class extends GlobalThis.HTMLElement {
|
|
|
10620
10715
|
}
|
|
10621
10716
|
static get observedAttributes() {
|
|
10622
10717
|
return [
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10718
|
+
Attributes13.DISABLED,
|
|
10719
|
+
Attributes13.HIDDEN,
|
|
10720
|
+
Attributes13.STYLE,
|
|
10721
|
+
Attributes13.ANCHOR,
|
|
10627
10722
|
MediaStateReceiverAttributes.MEDIA_CONTROLLER
|
|
10628
10723
|
];
|
|
10629
10724
|
}
|
|
@@ -10700,7 +10795,7 @@ var MediaChromeMenu = class extends GlobalThis.HTMLElement {
|
|
|
10700
10795
|
}
|
|
10701
10796
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
10702
10797
|
var _a3, _b2, _c, _d;
|
|
10703
|
-
if (attrName ===
|
|
10798
|
+
if (attrName === Attributes13.HIDDEN && newValue !== oldValue) {
|
|
10704
10799
|
if (!__privateGet25(this, _isPopover))
|
|
10705
10800
|
__privateSet22(this, _isPopover, true);
|
|
10706
10801
|
if (this.hidden) {
|
|
@@ -10724,13 +10819,13 @@ var MediaChromeMenu = class extends GlobalThis.HTMLElement {
|
|
|
10724
10819
|
__privateSet22(this, _mediaController8, getAttributeMediaController(this));
|
|
10725
10820
|
(_d = (_c = __privateGet25(this, _mediaController8)) == null ? void 0 : _c.associateElement) == null ? void 0 : _d.call(_c, this);
|
|
10726
10821
|
}
|
|
10727
|
-
} else if (attrName ===
|
|
10822
|
+
} else if (attrName === Attributes13.DISABLED && newValue !== oldValue) {
|
|
10728
10823
|
if (newValue == null) {
|
|
10729
10824
|
this.enable();
|
|
10730
10825
|
} else {
|
|
10731
10826
|
this.disable();
|
|
10732
10827
|
}
|
|
10733
|
-
} else if (attrName ===
|
|
10828
|
+
} else if (attrName === Attributes13.STYLE && newValue !== oldValue) {
|
|
10734
10829
|
__privateMethod9(this, _updateLayoutStyle, updateLayoutStyle_fn).call(this);
|
|
10735
10830
|
}
|
|
10736
10831
|
}
|
|
@@ -11271,7 +11366,7 @@ function getTemplateHTML13(_attrs) {
|
|
|
11271
11366
|
function getSuffixSlotInnerHTML(_attrs) {
|
|
11272
11367
|
return "";
|
|
11273
11368
|
}
|
|
11274
|
-
var
|
|
11369
|
+
var Attributes14 = {
|
|
11275
11370
|
TYPE: "type",
|
|
11276
11371
|
VALUE: "value",
|
|
11277
11372
|
CHECKED: "checked",
|
|
@@ -11324,10 +11419,10 @@ var MediaChromeMenuItem = class extends GlobalThis.HTMLElement {
|
|
|
11324
11419
|
}
|
|
11325
11420
|
static get observedAttributes() {
|
|
11326
11421
|
return [
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11422
|
+
Attributes14.TYPE,
|
|
11423
|
+
Attributes14.DISABLED,
|
|
11424
|
+
Attributes14.CHECKED,
|
|
11425
|
+
Attributes14.VALUE
|
|
11331
11426
|
];
|
|
11332
11427
|
}
|
|
11333
11428
|
enable() {
|
|
@@ -11363,11 +11458,11 @@ var MediaChromeMenuItem = class extends GlobalThis.HTMLElement {
|
|
|
11363
11458
|
}
|
|
11364
11459
|
}
|
|
11365
11460
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
11366
|
-
if (attrName ===
|
|
11461
|
+
if (attrName === Attributes14.CHECKED && isCheckable(this) && !__privateGet26(this, _dirty)) {
|
|
11367
11462
|
this.setAttribute("aria-checked", newValue != null ? "true" : "false");
|
|
11368
|
-
} else if (attrName ===
|
|
11463
|
+
} else if (attrName === Attributes14.TYPE && newValue !== oldValue) {
|
|
11369
11464
|
this.role = "menuitem" + newValue;
|
|
11370
|
-
} else if (attrName ===
|
|
11465
|
+
} else if (attrName === Attributes14.DISABLED && newValue !== oldValue) {
|
|
11371
11466
|
if (newValue == null) {
|
|
11372
11467
|
this.enable();
|
|
11373
11468
|
} else {
|
|
@@ -11376,7 +11471,7 @@ var MediaChromeMenuItem = class extends GlobalThis.HTMLElement {
|
|
|
11376
11471
|
}
|
|
11377
11472
|
}
|
|
11378
11473
|
connectedCallback() {
|
|
11379
|
-
if (!this.hasAttribute(
|
|
11474
|
+
if (!this.hasAttribute(Attributes14.DISABLED)) {
|
|
11380
11475
|
this.enable();
|
|
11381
11476
|
}
|
|
11382
11477
|
this.role = "menuitem" + this.type;
|
|
@@ -11425,17 +11520,17 @@ var MediaChromeMenuItem = class extends GlobalThis.HTMLElement {
|
|
|
11425
11520
|
}
|
|
11426
11521
|
get type() {
|
|
11427
11522
|
var _a3;
|
|
11428
|
-
return (_a3 = this.getAttribute(
|
|
11523
|
+
return (_a3 = this.getAttribute(Attributes14.TYPE)) != null ? _a3 : "";
|
|
11429
11524
|
}
|
|
11430
11525
|
set type(val) {
|
|
11431
|
-
this.setAttribute(
|
|
11526
|
+
this.setAttribute(Attributes14.TYPE, `${val}`);
|
|
11432
11527
|
}
|
|
11433
11528
|
get value() {
|
|
11434
11529
|
var _a3;
|
|
11435
|
-
return (_a3 = this.getAttribute(
|
|
11530
|
+
return (_a3 = this.getAttribute(Attributes14.VALUE)) != null ? _a3 : this.text;
|
|
11436
11531
|
}
|
|
11437
11532
|
set value(val) {
|
|
11438
|
-
this.setAttribute(
|
|
11533
|
+
this.setAttribute(Attributes14.VALUE, val);
|
|
11439
11534
|
}
|
|
11440
11535
|
get text() {
|
|
11441
11536
|
var _a3;
|
|
@@ -12297,7 +12392,7 @@ var _render3;
|
|
|
12297
12392
|
var render_fn3;
|
|
12298
12393
|
var _onChange3;
|
|
12299
12394
|
var onChange_fn3;
|
|
12300
|
-
var
|
|
12395
|
+
var Attributes15 = {
|
|
12301
12396
|
RATES: "rates"
|
|
12302
12397
|
};
|
|
12303
12398
|
var MediaPlaybackRateMenu = class extends MediaChromeMenu {
|
|
@@ -12305,7 +12400,7 @@ var MediaPlaybackRateMenu = class extends MediaChromeMenu {
|
|
|
12305
12400
|
super();
|
|
12306
12401
|
__privateAdd29(this, _render3);
|
|
12307
12402
|
__privateAdd29(this, _onChange3);
|
|
12308
|
-
__privateAdd29(this, _rates2, new AttributeTokenList(this,
|
|
12403
|
+
__privateAdd29(this, _rates2, new AttributeTokenList(this, Attributes15.RATES, {
|
|
12309
12404
|
defaultValue: DEFAULT_RATES
|
|
12310
12405
|
}));
|
|
12311
12406
|
__privateMethod13(this, _render3, render_fn3).call(this);
|
|
@@ -12314,7 +12409,7 @@ var MediaPlaybackRateMenu = class extends MediaChromeMenu {
|
|
|
12314
12409
|
return [
|
|
12315
12410
|
...super.observedAttributes,
|
|
12316
12411
|
MediaUIAttributes.MEDIA_PLAYBACK_RATE,
|
|
12317
|
-
|
|
12412
|
+
Attributes15.RATES
|
|
12318
12413
|
];
|
|
12319
12414
|
}
|
|
12320
12415
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
@@ -12322,7 +12417,7 @@ var MediaPlaybackRateMenu = class extends MediaChromeMenu {
|
|
|
12322
12417
|
if (attrName === MediaUIAttributes.MEDIA_PLAYBACK_RATE && oldValue != newValue) {
|
|
12323
12418
|
this.value = newValue;
|
|
12324
12419
|
__privateMethod13(this, _render3, render_fn3).call(this);
|
|
12325
|
-
} else if (attrName ===
|
|
12420
|
+
} else if (attrName === Attributes15.RATES && oldValue != newValue) {
|
|
12326
12421
|
__privateGet29(this, _rates2).value = newValue;
|
|
12327
12422
|
__privateMethod13(this, _render3, render_fn3).call(this);
|
|
12328
12423
|
}
|