@mux/mux-player 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1075,12 +1075,12 @@ function getOrInsertCSSRule(styleParent, selectorText) {
1075
1075
  return insertCSSRule(styleParent, selectorText);
1076
1076
  }
1077
1077
  function getCSSRule(styleParent, predicate) {
1078
- var _a3;
1078
+ var _a3, _b2;
1079
1079
  let style;
1080
- for (style of styleParent.querySelectorAll("style")) {
1080
+ for (style of (_a3 = styleParent.querySelectorAll("style:not([media])")) != null ? _a3 : []) {
1081
1081
  let cssRules;
1082
1082
  try {
1083
- cssRules = (_a3 = style.sheet) == null ? void 0 : _a3.cssRules;
1083
+ cssRules = (_b2 = style.sheet) == null ? void 0 : _b2.cssRules;
1084
1084
  } catch {
1085
1085
  continue;
1086
1086
  }
@@ -1092,7 +1092,7 @@ function getCSSRule(styleParent, predicate) {
1092
1092
  }
1093
1093
  function insertCSSRule(styleParent, selectorText) {
1094
1094
  var _a3, _b2;
1095
- const styles = (_a3 = styleParent.querySelectorAll("style")) != null ? _a3 : [];
1095
+ const styles = (_a3 = styleParent.querySelectorAll("style:not([media])")) != null ? _a3 : [];
1096
1096
  const style = styles == null ? void 0 : styles[styles.length - 1];
1097
1097
  if (!(style == null ? void 0 : style.sheet)) {
1098
1098
  console.warn(
@@ -2032,9 +2032,11 @@ var MediaThemeElement = class extends GlobalThis.HTMLElement {
2032
2032
  render() {
2033
2033
  var _a3;
2034
2034
  (_a3 = this.renderer) == null ? void 0 : _a3.update(this.props);
2035
- const { style } = getOrInsertCSSRule(this.renderRoot, ":host");
2036
- if (style.visibility === "hidden") {
2037
- style.removeProperty("visibility");
2035
+ if (this.renderRoot.isConnected) {
2036
+ const { style } = getOrInsertCSSRule(this.renderRoot, ":host");
2037
+ if (style.visibility === "hidden") {
2038
+ style.removeProperty("visibility");
2039
+ }
2038
2040
  }
2039
2041
  }
2040
2042
  };
@@ -2124,8 +2126,9 @@ function getElementRects({
2124
2126
  };
2125
2127
  }
2126
2128
  function getRectRelativeToOffsetParent(element, offsetParent) {
2129
+ var _a3;
2127
2130
  const rect = element.getBoundingClientRect();
2128
- const offsetRect = offsetParent.getBoundingClientRect();
2131
+ const offsetRect = (_a3 = offsetParent == null ? void 0 : offsetParent.getBoundingClientRect()) != null ? _a3 : { x: 0, y: 0 };
2129
2132
  return {
2130
2133
  x: rect.x - offsetRect.x,
2131
2134
  y: rect.y - offsetRect.y,
@@ -2254,6 +2257,7 @@ var _invokerElement;
2254
2257
  var _previousItems;
2255
2258
  var _mutationObserver;
2256
2259
  var _isPopover;
2260
+ var _cssRule;
2257
2261
  var _handleSlotChange;
2258
2262
  var handleSlotChange_fn;
2259
2263
  var _handleMenuItems;
@@ -2361,6 +2365,7 @@ template.innerHTML = /*html*/
2361
2365
  ""}
2362
2366
  min-height: 0;
2363
2367
  position: relative;
2368
+ bottom: var(--_menu-bottom);
2364
2369
  box-sizing: border-box;
2365
2370
  }
2366
2371
 
@@ -2400,27 +2405,30 @@ template.innerHTML = /*html*/
2400
2405
  transform: translate(-100%, 0);
2401
2406
  }
2402
2407
 
2403
- slot[name="header"] {
2404
- display: flex;
2405
- padding: .4em .7em;
2406
- border-bottom: 1px solid rgb(255 255 255 / .25);
2407
- cursor: default;
2408
- }
2409
-
2410
- slot[name="header"][hidden] {
2411
- display: none;
2412
- }
2413
-
2414
- button[part~="back"] {
2408
+ button {
2415
2409
  background: none;
2416
2410
  color: inherit;
2417
2411
  border: none;
2418
2412
  padding: 0;
2419
2413
  font: inherit;
2420
- cursor: pointer;
2421
2414
  outline: inherit;
2422
2415
  display: inline-flex;
2423
2416
  align-items: center;
2417
+ }
2418
+
2419
+ slot[name="header"][hidden] {
2420
+ display: none;
2421
+ }
2422
+
2423
+ slot[name="header"] > *,
2424
+ slot[name="header"]::slotted(*) {
2425
+ padding: .4em .7em;
2426
+ border-bottom: 1px solid rgb(255 255 255 / .25);
2427
+ cursor: default;
2428
+ }
2429
+
2430
+ slot[name="header"] > button[part~="back"],
2431
+ slot[name="header"]::slotted(button[part~="back"]) {
2424
2432
  cursor: pointer;
2425
2433
  }
2426
2434
 
@@ -2456,7 +2464,8 @@ template.innerHTML = /*html*/
2456
2464
  </style>
2457
2465
  <style id="layout-row" media="width:0">
2458
2466
 
2459
- slot[name="header"] {
2467
+ slot[name="header"] > *,
2468
+ slot[name="header"]::slotted(*) {
2460
2469
  padding: .4em .5em;
2461
2470
  }
2462
2471
 
@@ -2527,6 +2536,7 @@ var MediaChromeMenu = class extends GlobalThis.HTMLElement {
2527
2536
  __privateAdd4(this, _previousItems, /* @__PURE__ */ new Set());
2528
2537
  __privateAdd4(this, _mutationObserver, void 0);
2529
2538
  __privateAdd4(this, _isPopover, false);
2539
+ __privateAdd4(this, _cssRule, null);
2530
2540
  __privateAdd4(this, _handleMenuItems, () => {
2531
2541
  const previousItems = __privateGet4(this, _previousItems);
2532
2542
  const currentItems = new Set(this.items);
@@ -2543,11 +2553,11 @@ var MediaChromeMenu = class extends GlobalThis.HTMLElement {
2543
2553
  __privateSet4(this, _previousItems, currentItems);
2544
2554
  });
2545
2555
  __privateAdd4(this, _handleBoundsResize, () => {
2546
- __privateMethod2(this, _positionMenu, positionMenu_fn).call(this, false);
2556
+ __privateMethod2(this, _positionMenu, positionMenu_fn).call(this);
2547
2557
  __privateMethod2(this, _resizeMenu, resizeMenu_fn).call(this, false);
2548
2558
  });
2549
2559
  __privateAdd4(this, _handleMenuResize, () => {
2550
- __privateMethod2(this, _positionMenu, positionMenu_fn).call(this, false);
2560
+ __privateMethod2(this, _positionMenu, positionMenu_fn).call(this);
2551
2561
  });
2552
2562
  if (!this.shadowRoot) {
2553
2563
  this.attachShadow({ mode: "open" });
@@ -2612,6 +2622,7 @@ var MediaChromeMenu = class extends GlobalThis.HTMLElement {
2612
2622
  }
2613
2623
  connectedCallback() {
2614
2624
  var _a3, _b2;
2625
+ __privateSet4(this, _cssRule, insertCSSRule(this.shadowRoot, ":host"));
2615
2626
  __privateMethod2(this, _updateLayoutStyle, updateLayoutStyle_fn).call(this);
2616
2627
  if (!this.hasAttribute("disabled")) {
2617
2628
  this.enable();
@@ -2778,6 +2789,7 @@ _invokerElement = /* @__PURE__ */ new WeakMap();
2778
2789
  _previousItems = /* @__PURE__ */ new WeakMap();
2779
2790
  _mutationObserver = /* @__PURE__ */ new WeakMap();
2780
2791
  _isPopover = /* @__PURE__ */ new WeakMap();
2792
+ _cssRule = /* @__PURE__ */ new WeakMap();
2781
2793
  _handleSlotChange = /* @__PURE__ */ new WeakSet();
2782
2794
  handleSlotChange_fn = function(event) {
2783
2795
  const slot = event.target;
@@ -2815,7 +2827,6 @@ _handleOpen = /* @__PURE__ */ new WeakSet();
2815
2827
  handleOpen_fn = function() {
2816
2828
  var _a3;
2817
2829
  (_a3 = __privateGet4(this, _invokerElement)) == null ? void 0 : _a3.setAttribute("aria-expanded", "true");
2818
- requestAnimationFrame(() => __privateMethod2(this, _positionMenu, positionMenu_fn).call(this, false));
2819
2830
  this.addEventListener("transitionend", () => this.focus(), { once: true });
2820
2831
  observeResize(getBoundsElement(this), __privateGet4(this, _handleBoundsResize));
2821
2832
  observeResize(this, __privateGet4(this, _handleMenuResize));
@@ -2830,7 +2841,7 @@ handleClosed_fn = function() {
2830
2841
  _handleBoundsResize = /* @__PURE__ */ new WeakMap();
2831
2842
  _handleMenuResize = /* @__PURE__ */ new WeakMap();
2832
2843
  _positionMenu = /* @__PURE__ */ new WeakSet();
2833
- positionMenu_fn = function(animate, menuWidth) {
2844
+ positionMenu_fn = function(menuWidth) {
2834
2845
  if (this.hasAttribute("mediacontroller") && !this.anchor)
2835
2846
  return;
2836
2847
  if (this.hidden || !this.anchorElement)
@@ -2843,19 +2854,17 @@ positionMenu_fn = function(animate, menuWidth) {
2843
2854
  menuWidth != null ? menuWidth : menuWidth = this.offsetWidth;
2844
2855
  const bounds = getBoundsElement(this);
2845
2856
  const boundsRect = bounds.getBoundingClientRect();
2846
- const anchorRect = this.anchorElement.getBoundingClientRect();
2847
2857
  const right = boundsRect.width - x - menuWidth;
2848
2858
  const bottom = boundsRect.height - y - this.offsetHeight;
2849
- const maxHeight = boundsRect.height - anchorRect.height;
2850
- const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
2851
- if (!animate) {
2852
- style.setProperty("--media-menu-transition-in", "none");
2853
- }
2859
+ const { style } = __privateGet4(this, _cssRule);
2854
2860
  style.setProperty("position", "absolute");
2855
2861
  style.setProperty("right", `${Math.max(0, right)}px`);
2856
- style.setProperty("bottom", `${bottom}px`);
2857
- style.setProperty("--_menu-max-height", `${maxHeight}px`);
2858
- style.removeProperty("--media-menu-transition-in");
2862
+ style.setProperty("--_menu-bottom", `${bottom}px`);
2863
+ const computedStyle = getComputedStyle(this);
2864
+ const isBottomCalc = style.getPropertyValue("--_menu-bottom") === computedStyle.bottom;
2865
+ const realBottom = isBottomCalc ? bottom : parseFloat(computedStyle.bottom);
2866
+ const maxHeight = boundsRect.height - realBottom - parseFloat(computedStyle.marginBottom);
2867
+ this.style.setProperty("--_menu-max-height", `${maxHeight}px`);
2859
2868
  };
2860
2869
  _resizeMenu = /* @__PURE__ */ new WeakSet();
2861
2870
  resizeMenu_fn = function(animate) {
@@ -2865,7 +2874,7 @@ resizeMenu_fn = function(animate) {
2865
2874
  const expandedSubmenu = expandedMenuItem == null ? void 0 : expandedMenuItem.querySelector(
2866
2875
  '[role="menu"]'
2867
2876
  );
2868
- const { style } = getOrInsertCSSRule(this.shadowRoot, ":host");
2877
+ const { style } = __privateGet4(this, _cssRule);
2869
2878
  if (!animate) {
2870
2879
  style.setProperty("--media-menu-transition-in", "none");
2871
2880
  }
@@ -2877,11 +2886,11 @@ resizeMenu_fn = function(animate) {
2877
2886
  );
2878
2887
  this.style.setProperty("min-width", `${width}px`);
2879
2888
  this.style.setProperty("min-height", `${height}px`);
2880
- __privateMethod2(this, _positionMenu, positionMenu_fn).call(this, animate, width);
2889
+ __privateMethod2(this, _positionMenu, positionMenu_fn).call(this, width);
2881
2890
  } else {
2882
2891
  this.style.removeProperty("min-width");
2883
2892
  this.style.removeProperty("min-height");
2884
- __privateMethod2(this, _positionMenu, positionMenu_fn).call(this, animate);
2893
+ __privateMethod2(this, _positionMenu, positionMenu_fn).call(this);
2885
2894
  }
2886
2895
  style.removeProperty("--media-menu-transition-in");
2887
2896
  };
@@ -2907,7 +2916,7 @@ backButtonElement_get = function() {
2907
2916
  'slot[name="header"]'
2908
2917
  );
2909
2918
  return (_a3 = headerSlot.assignedElements({ flatten: true })) == null ? void 0 : _a3.find(
2910
- (el) => el.part.contains("back") && el.part.contains("button")
2919
+ (el) => el.matches('button[part~="back"]')
2911
2920
  );
2912
2921
  };
2913
2922
  _handleToggle = /* @__PURE__ */ new WeakSet();
@@ -3571,10 +3580,17 @@ var __privateSet6 = (obj, member, value, setter) => {
3571
3580
  setter ? setter.call(obj, value) : member.set(obj, value);
3572
3581
  return value;
3573
3582
  };
3583
+ var __privateMethod4 = (obj, member, method) => {
3584
+ __accessCheck6(obj, member, "access private method");
3585
+ return method;
3586
+ };
3574
3587
  var _mediaController2;
3575
3588
  var _clickListener;
3589
+ var _positionTooltip;
3576
3590
  var _keyupListener;
3577
3591
  var _keydownListener;
3592
+ var _setupTooltip;
3593
+ var setupTooltip_fn;
3578
3594
  var Attributes3 = {
3579
3595
  TOOLTIP_PLACEMENT: "tooltipplacement"
3580
3596
  };
@@ -3638,13 +3654,19 @@ template5.innerHTML = /*html*/
3638
3654
  }
3639
3655
 
3640
3656
  media-tooltip {
3657
+ ${/** Make sure unpositioned tooltip doesn't cause page overflow (scroll). */
3658
+ ""}
3659
+ max-width: 0;
3660
+ overflow-x: clip;
3641
3661
  opacity: 0;
3642
- transition: opacity .3s;
3662
+ transition: opacity .3s, max-width 0s 9s;
3643
3663
  }
3644
3664
 
3645
3665
  :host(:hover) media-tooltip,
3646
3666
  :host(:focus-visible) media-tooltip {
3667
+ max-width: 100vw;
3647
3668
  opacity: 1;
3669
+ transition: opacity .3s;
3648
3670
  }
3649
3671
 
3650
3672
  :host([notooltip]) slot[name="tooltip"] {
@@ -3653,7 +3675,7 @@ template5.innerHTML = /*html*/
3653
3675
  </style>
3654
3676
 
3655
3677
  <slot name="tooltip">
3656
- <media-tooltip>
3678
+ <media-tooltip part="tooltip" aria-hidden="true">
3657
3679
  <slot name="tooltip-content"></slot>
3658
3680
  </media-tooltip>
3659
3681
  </slot>
@@ -3662,6 +3684,7 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
3662
3684
  constructor(options = {}) {
3663
3685
  var _a3;
3664
3686
  super();
3687
+ __privateAdd6(this, _setupTooltip);
3665
3688
  __privateAdd6(this, _mediaController2, void 0);
3666
3689
  this.preventClick = false;
3667
3690
  this.tooltipEl = null;
@@ -3670,7 +3693,11 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
3670
3693
  if (!this.preventClick) {
3671
3694
  this.handleClick(e);
3672
3695
  }
3673
- setTimeout(this.tooltipEl.updateXOffset, 0);
3696
+ setTimeout(__privateGet6(this, _positionTooltip), 0);
3697
+ });
3698
+ __privateAdd6(this, _positionTooltip, () => {
3699
+ var _a4, _b2;
3700
+ (_b2 = (_a4 = this.tooltipEl) == null ? void 0 : _a4.updateXOffset) == null ? void 0 : _b2.call(_a4);
3674
3701
  });
3675
3702
  __privateAdd6(this, _keyupListener, (e) => {
3676
3703
  const { key } = e;
@@ -3705,8 +3732,8 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
3705
3732
  }
3706
3733
  this.nativeEl.appendChild(slotTemplate7.content.cloneNode(true));
3707
3734
  this.shadowRoot.appendChild(buttonHTML);
3708
- this.tooltipEl = this.shadowRoot.querySelector("media-tooltip");
3709
3735
  }
3736
+ this.tooltipEl = this.shadowRoot.querySelector("media-tooltip");
3710
3737
  }
3711
3738
  static get observedAttributes() {
3712
3739
  return [
@@ -3727,7 +3754,7 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
3727
3754
  this.tabIndex = -1;
3728
3755
  }
3729
3756
  attributeChangedCallback(attrName, oldValue, newValue) {
3730
- var _a3, _b2, _c, _d, _e, _f, _g;
3757
+ var _a3, _b2, _c, _d, _e;
3731
3758
  if (attrName === MediaStateReceiverAttributes.MEDIA_CONTROLLER) {
3732
3759
  if (oldValue) {
3733
3760
  (_b2 = (_a3 = __privateGet6(this, _mediaController2)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
@@ -3746,9 +3773,7 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
3746
3773
  } else if (attrName === Attributes3.TOOLTIP_PLACEMENT && this.tooltipEl && newValue !== oldValue) {
3747
3774
  this.tooltipEl.placement = newValue;
3748
3775
  }
3749
- if (this.tooltipEl) {
3750
- (_g = (_f = this.tooltipEl) == null ? void 0 : _f.updateXOffset) == null ? void 0 : _g.call(_f);
3751
- }
3776
+ __privateGet6(this, _positionTooltip).call(this);
3752
3777
  }
3753
3778
  connectedCallback() {
3754
3779
  var _a3, _b2, _c;
@@ -3773,17 +3798,16 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
3773
3798
  );
3774
3799
  (_c = (_b2 = __privateGet6(this, _mediaController2)) == null ? void 0 : _b2.associateElement) == null ? void 0 : _c.call(_b2, this);
3775
3800
  }
3776
- GlobalThis.customElements.whenDefined("media-tooltip").then(this.setupTooltip.bind(this));
3801
+ GlobalThis.customElements.whenDefined("media-tooltip").then(() => __privateMethod4(this, _setupTooltip, setupTooltip_fn).call(this));
3777
3802
  }
3778
3803
  disconnectedCallback() {
3779
- var _a3, _b2, _c, _d;
3804
+ var _a3, _b2;
3780
3805
  this.disable();
3781
3806
  (_b2 = (_a3 = __privateGet6(this, _mediaController2)) == null ? void 0 : _a3.unassociateElement) == null ? void 0 : _b2.call(_a3, this);
3782
3807
  __privateSet6(this, _mediaController2, null);
3783
- this.removeEventListener("mouseenter", (_c = this.tooltipEl) == null ? void 0 : _c.updateXOffset);
3784
- this.removeEventListener("focus", (_d = this.tooltipEl) == null ? void 0 : _d.updateXOffset);
3808
+ this.removeEventListener("mouseenter", __privateGet6(this, _positionTooltip));
3809
+ this.removeEventListener("focus", __privateGet6(this, _positionTooltip));
3785
3810
  this.removeEventListener("click", __privateGet6(this, _clickListener));
3786
- this.tooltipEl = null;
3787
3811
  }
3788
3812
  get keysUsed() {
3789
3813
  return ["Enter", " "];
@@ -3804,20 +3828,22 @@ var MediaChromeButton = class extends GlobalThis.HTMLElement {
3804
3828
  handleClick(e) {
3805
3829
  }
3806
3830
  // eslint-disable-line
3807
- // Called when we know the tooltip is ready / defined
3808
- setupTooltip() {
3809
- this.addEventListener("mouseenter", this.tooltipEl.updateXOffset);
3810
- this.addEventListener("focus", this.tooltipEl.updateXOffset);
3811
- this.addEventListener("click", __privateGet6(this, _clickListener));
3812
- const initialPlacement = this.tooltipPlacement;
3813
- if (initialPlacement)
3814
- this.tooltipEl.placement = initialPlacement;
3815
- }
3816
3831
  };
3817
3832
  _mediaController2 = /* @__PURE__ */ new WeakMap();
3818
3833
  _clickListener = /* @__PURE__ */ new WeakMap();
3834
+ _positionTooltip = /* @__PURE__ */ new WeakMap();
3819
3835
  _keyupListener = /* @__PURE__ */ new WeakMap();
3820
3836
  _keydownListener = /* @__PURE__ */ new WeakMap();
3837
+ _setupTooltip = /* @__PURE__ */ new WeakSet();
3838
+ setupTooltip_fn = function() {
3839
+ this.addEventListener("mouseenter", __privateGet6(this, _positionTooltip));
3840
+ this.addEventListener("focus", __privateGet6(this, _positionTooltip));
3841
+ this.addEventListener("click", __privateGet6(this, _clickListener));
3842
+ const initialPlacement = this.tooltipPlacement;
3843
+ if (initialPlacement && this.tooltipEl) {
3844
+ this.tooltipEl.placement = initialPlacement;
3845
+ }
3846
+ };
3821
3847
  if (!GlobalThis.customElements.get("media-chrome-button")) {
3822
3848
  GlobalThis.customElements.define("media-chrome-button", MediaChromeButton);
3823
3849
  }
@@ -3985,7 +4011,7 @@ var __privateSet7 = (obj, member, value, setter) => {
3985
4011
  setter ? setter.call(obj, value) : member.set(obj, value);
3986
4012
  return value;
3987
4013
  };
3988
- var __privateMethod4 = (obj, member, method) => {
4014
+ var __privateMethod5 = (obj, member, method) => {
3989
4015
  __accessCheck7(obj, member, "access private method");
3990
4016
  return method;
3991
4017
  };
@@ -4017,16 +4043,16 @@ var MediaAudioTrackMenu = class extends MediaChromeMenu {
4017
4043
  this.value = newValue;
4018
4044
  } else if (attrName === MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST && oldValue !== newValue) {
4019
4045
  __privateSet7(this, _audioTrackList, parseAudioTrackList(newValue != null ? newValue : ""));
4020
- __privateMethod4(this, _render, render_fn).call(this);
4046
+ __privateMethod5(this, _render, render_fn).call(this);
4021
4047
  }
4022
4048
  }
4023
4049
  connectedCallback() {
4024
4050
  super.connectedCallback();
4025
- this.addEventListener("change", __privateMethod4(this, _onChange, onChange_fn));
4051
+ this.addEventListener("change", __privateMethod5(this, _onChange, onChange_fn));
4026
4052
  }
4027
4053
  disconnectedCallback() {
4028
4054
  super.disconnectedCallback();
4029
- this.removeEventListener("change", __privateMethod4(this, _onChange, onChange_fn));
4055
+ this.removeEventListener("change", __privateMethod5(this, _onChange, onChange_fn));
4030
4056
  }
4031
4057
  /**
4032
4058
  * Returns the anchor element when it is a floating menu.
@@ -4044,7 +4070,7 @@ var MediaAudioTrackMenu = class extends MediaChromeMenu {
4044
4070
  }
4045
4071
  set mediaAudioTrackList(list) {
4046
4072
  __privateSet7(this, _audioTrackList, list);
4047
- __privateMethod4(this, _render, render_fn).call(this);
4073
+ __privateMethod5(this, _render, render_fn).call(this);
4048
4074
  }
4049
4075
  /**
4050
4076
  * Get enabled audio track id.
@@ -4219,7 +4245,7 @@ var __privateSet8 = (obj, member, value, setter) => {
4219
4245
  setter ? setter.call(obj, value) : member.set(obj, value);
4220
4246
  return value;
4221
4247
  };
4222
- var __privateMethod5 = (obj, member, method) => {
4248
+ var __privateMethod6 = (obj, member, method) => {
4223
4249
  __accessCheck8(obj, member, "access private method");
4224
4250
  return method;
4225
4251
  };
@@ -4256,18 +4282,18 @@ var MediaCaptionsMenu = class extends MediaChromeMenu {
4256
4282
  attributeChangedCallback(attrName, oldValue, newValue) {
4257
4283
  super.attributeChangedCallback(attrName, oldValue, newValue);
4258
4284
  if (attrName === MediaUIAttributes.MEDIA_SUBTITLES_LIST && oldValue !== newValue) {
4259
- __privateMethod5(this, _render2, render_fn2).call(this);
4285
+ __privateMethod6(this, _render2, render_fn2).call(this);
4260
4286
  } else if (attrName === MediaUIAttributes.MEDIA_SUBTITLES_SHOWING && oldValue !== newValue) {
4261
4287
  this.value = newValue;
4262
4288
  }
4263
4289
  }
4264
4290
  connectedCallback() {
4265
4291
  super.connectedCallback();
4266
- this.addEventListener("change", __privateMethod5(this, _onChange2, onChange_fn2));
4292
+ this.addEventListener("change", __privateMethod6(this, _onChange2, onChange_fn2));
4267
4293
  }
4268
4294
  disconnectedCallback() {
4269
4295
  super.disconnectedCallback();
4270
- this.removeEventListener("change", __privateMethod5(this, _onChange2, onChange_fn2));
4296
+ this.removeEventListener("change", __privateMethod6(this, _onChange2, onChange_fn2));
4271
4297
  }
4272
4298
  /**
4273
4299
  * Returns the anchor element when it is a floating menu.
@@ -4753,7 +4779,7 @@ var __privateAdd12 = (obj, member, value) => {
4753
4779
  throw TypeError("Cannot add the same private member more than once");
4754
4780
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
4755
4781
  };
4756
- var __privateMethod6 = (obj, member, method) => {
4782
+ var __privateMethod7 = (obj, member, method) => {
4757
4783
  __accessCheck12(obj, member, "access private method");
4758
4784
  return method;
4759
4785
  };
@@ -4773,7 +4799,7 @@ var MediaPlaybackRateMenu = class extends MediaChromeMenu {
4773
4799
  __privateAdd12(this, _rates2, new AttributeTokenList(this, Attributes5.RATES, {
4774
4800
  defaultValue: DEFAULT_RATES
4775
4801
  }));
4776
- __privateMethod6(this, _render3, render_fn3).call(this);
4802
+ __privateMethod7(this, _render3, render_fn3).call(this);
4777
4803
  }
4778
4804
  static get observedAttributes() {
4779
4805
  return [
@@ -4788,16 +4814,16 @@ var MediaPlaybackRateMenu = class extends MediaChromeMenu {
4788
4814
  this.value = newValue;
4789
4815
  } else if (attrName === Attributes5.RATES && oldValue != newValue) {
4790
4816
  __privateGet11(this, _rates2).value = newValue;
4791
- __privateMethod6(this, _render3, render_fn3).call(this);
4817
+ __privateMethod7(this, _render3, render_fn3).call(this);
4792
4818
  }
4793
4819
  }
4794
4820
  connectedCallback() {
4795
4821
  super.connectedCallback();
4796
- this.addEventListener("change", __privateMethod6(this, _onChange3, onChange_fn3));
4822
+ this.addEventListener("change", __privateMethod7(this, _onChange3, onChange_fn3));
4797
4823
  }
4798
4824
  disconnectedCallback() {
4799
4825
  super.disconnectedCallback();
4800
- this.removeEventListener("change", __privateMethod6(this, _onChange3, onChange_fn3));
4826
+ this.removeEventListener("change", __privateMethod7(this, _onChange3, onChange_fn3));
4801
4827
  }
4802
4828
  /**
4803
4829
  * Returns the anchor element when it is a floating menu.
@@ -4822,7 +4848,7 @@ var MediaPlaybackRateMenu = class extends MediaChromeMenu {
4822
4848
  } else if (Array.isArray(value)) {
4823
4849
  __privateGet11(this, _rates2).value = value.join(" ");
4824
4850
  }
4825
- __privateMethod6(this, _render3, render_fn3).call(this);
4851
+ __privateMethod7(this, _render3, render_fn3).call(this);
4826
4852
  }
4827
4853
  /**
4828
4854
  * The current playback rate
@@ -5004,7 +5030,7 @@ var __privateSet11 = (obj, member, value, setter) => {
5004
5030
  setter ? setter.call(obj, value) : member.set(obj, value);
5005
5031
  return value;
5006
5032
  };
5007
- var __privateMethod7 = (obj, member, method) => {
5033
+ var __privateMethod8 = (obj, member, method) => {
5008
5034
  __accessCheck14(obj, member, "access private method");
5009
5035
  return method;
5010
5036
  };
@@ -5037,18 +5063,18 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
5037
5063
  this.value = newValue != null ? newValue : "auto";
5038
5064
  } else if (attrName === MediaUIAttributes.MEDIA_RENDITION_LIST && oldValue !== newValue) {
5039
5065
  __privateSet11(this, _renditionList, parseRenditionList(newValue));
5040
- __privateMethod7(this, _render4, render_fn4).call(this);
5066
+ __privateMethod8(this, _render4, render_fn4).call(this);
5041
5067
  } else if (attrName === MediaUIAttributes.MEDIA_HEIGHT && oldValue !== newValue) {
5042
- __privateMethod7(this, _render4, render_fn4).call(this);
5068
+ __privateMethod8(this, _render4, render_fn4).call(this);
5043
5069
  }
5044
5070
  }
5045
5071
  connectedCallback() {
5046
5072
  super.connectedCallback();
5047
- this.addEventListener("change", __privateMethod7(this, _onChange4, onChange_fn4));
5073
+ this.addEventListener("change", __privateMethod8(this, _onChange4, onChange_fn4));
5048
5074
  }
5049
5075
  disconnectedCallback() {
5050
5076
  super.disconnectedCallback();
5051
- this.removeEventListener("change", __privateMethod7(this, _onChange4, onChange_fn4));
5077
+ this.removeEventListener("change", __privateMethod8(this, _onChange4, onChange_fn4));
5052
5078
  }
5053
5079
  /**
5054
5080
  * Returns the anchor element when it is a floating menu.
@@ -5065,7 +5091,7 @@ var MediaRenditionMenu = class extends MediaChromeMenu {
5065
5091
  }
5066
5092
  set mediaRenditionList(list) {
5067
5093
  __privateSet11(this, _renditionList, list);
5068
- __privateMethod7(this, _render4, render_fn4).call(this);
5094
+ __privateMethod8(this, _render4, render_fn4).call(this);
5069
5095
  }
5070
5096
  /**
5071
5097
  * Get selected rendition id.