@mux/mux-player 0.1.0-beta.21
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/CHANGELOG.md +281 -0
- package/LICENSE +9 -0
- package/README.md +231 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/dialog.ts.html +247 -0
- package/coverage/lcov-report/src/errors.ts.html +574 -0
- package/coverage/lcov-report/src/helpers.ts.html +478 -0
- package/coverage/lcov-report/src/html.ts.html +580 -0
- package/coverage/lcov-report/src/index.html +251 -0
- package/coverage/lcov-report/src/index.ts.html +2941 -0
- package/coverage/lcov-report/src/logger.ts.html +163 -0
- package/coverage/lcov-report/src/media-chrome/dialog.ts.html +661 -0
- package/coverage/lcov-report/src/media-chrome/index.html +131 -0
- package/coverage/lcov-report/src/media-chrome/time-display.ts.html +295 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/airplay.svg.html +109 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/captions-off.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/captions-on.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/fullscreen-enter.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/fullscreen-exit.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/index.html +326 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/pause.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/pip-enter.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/pip-exit.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/play.svg.html +100 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/seek-backward.svg.html +124 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/seek-forward.svg.html +124 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-high.svg.html +103 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-low.svg.html +103 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-medium.svg.html +103 -0
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-off.svg.html +103 -0
- package/coverage/lcov-report/src/media-theme-mux/icons.ts.html +184 -0
- package/coverage/lcov-report/src/media-theme-mux/index.html +146 -0
- package/coverage/lcov-report/src/media-theme-mux/media-theme-mux.ts.html +1279 -0
- package/coverage/lcov-report/src/media-theme-mux/styles.css.html +586 -0
- package/coverage/lcov-report/src/styles.css.html +211 -0
- package/coverage/lcov-report/src/template.ts.html +463 -0
- package/coverage/lcov-report/src/utils.ts.html +385 -0
- package/coverage/lcov-report/src/video-api.ts.html +979 -0
- package/coverage/lcov.info +4058 -0
- package/dist/index.cjs.js +1432 -0
- package/dist/index.mjs +709 -0
- package/dist/mux-player.js +1478 -0
- package/dist/mux-player.mjs +1478 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/dialog.d.ts +6 -0
- package/dist/types/errors.d.ts +6 -0
- package/dist/types/helpers.d.ts +26 -0
- package/dist/types/html.d.ts +18 -0
- package/dist/types/index.d.ts +199 -0
- package/dist/types/logger.d.ts +5 -0
- package/dist/types/media-chrome/dialog.d.ts +12 -0
- package/dist/types/media-chrome/time-display.d.ts +9 -0
- package/dist/types/media-theme-mux/icons.d.ts +15 -0
- package/dist/types/media-theme-mux/media-theme-mux.d.ts +29 -0
- package/dist/types/template.d.ts +5 -0
- package/dist/types/utils.d.ts +10 -0
- package/dist/types/video-api.d.ts +64 -0
- package/dist/types-ts3.4/dialog.d.ts +6 -0
- package/dist/types-ts3.4/errors.d.ts +6 -0
- package/dist/types-ts3.4/helpers.d.ts +26 -0
- package/dist/types-ts3.4/html.d.ts +18 -0
- package/dist/types-ts3.4/index.d.ts +180 -0
- package/dist/types-ts3.4/logger.d.ts +5 -0
- package/dist/types-ts3.4/media-chrome/dialog.d.ts +12 -0
- package/dist/types-ts3.4/media-chrome/time-display.d.ts +9 -0
- package/dist/types-ts3.4/media-theme-mux/icons.d.ts +15 -0
- package/dist/types-ts3.4/media-theme-mux/media-theme-mux.d.ts +29 -0
- package/dist/types-ts3.4/template.d.ts +5 -0
- package/dist/types-ts3.4/utils.d.ts +10 -0
- package/dist/types-ts3.4/video-api.d.ts +53 -0
- package/lang/en.json +32 -0
- package/lang/nl.json +31 -0
- package/package.json +107 -0
- package/src/dialog.ts +54 -0
- package/src/errors.ts +163 -0
- package/src/helpers.ts +131 -0
- package/src/html.ts +165 -0
- package/src/index.ts +952 -0
- package/src/logger.ts +26 -0
- package/src/media-chrome/dialog.ts +192 -0
- package/src/media-chrome/time-display.ts +70 -0
- package/src/media-theme-mux/icons/airplay.svg +8 -0
- package/src/media-theme-mux/icons/captions-off.svg +5 -0
- package/src/media-theme-mux/icons/captions-on.svg +5 -0
- package/src/media-theme-mux/icons/fullscreen-enter.svg +5 -0
- package/src/media-theme-mux/icons/fullscreen-exit.svg +5 -0
- package/src/media-theme-mux/icons/pause.svg +5 -0
- package/src/media-theme-mux/icons/pip-enter.svg +5 -0
- package/src/media-theme-mux/icons/pip-exit.svg +5 -0
- package/src/media-theme-mux/icons/play.svg +5 -0
- package/src/media-theme-mux/icons/seek-backward.svg +13 -0
- package/src/media-theme-mux/icons/seek-forward.svg +13 -0
- package/src/media-theme-mux/icons/volume-high.svg +6 -0
- package/src/media-theme-mux/icons/volume-low.svg +6 -0
- package/src/media-theme-mux/icons/volume-medium.svg +6 -0
- package/src/media-theme-mux/icons/volume-off.svg +6 -0
- package/src/media-theme-mux/icons.ts +33 -0
- package/src/media-theme-mux/media-theme-mux.ts +398 -0
- package/src/media-theme-mux/styles.css +167 -0
- package/src/styles.css +42 -0
- package/src/template.ts +126 -0
- package/src/types.d.ts +52 -0
- package/src/utils.ts +100 -0
- package/src/video-api.ts +298 -0
- package/test/errors.test.js +169 -0
- package/test/helpers.test.js +78 -0
- package/test/player.test.js +696 -0
- package/test/template.test.js +70 -0
- package/test/utils.test.js +21 -0
- package/test/web-test-runner.config.mjs +29 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,1432 @@
|
|
|
1
|
+
var Gs=Object.create;var Qe=Object.defineProperty;var Qs=Object.getOwnPropertyDescriptor;var qs=Object.getOwnPropertyNames;var Zs=Object.getPrototypeOf,Xs=Object.prototype.hasOwnProperty;var ra=t=>Qe(t,"__esModule",{value:!0});var Js=(t,e)=>{ra(t);for(var a in e)Qe(t,a,{get:e[a],enumerable:!0})},eo=(t,e,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qs(e))!Xs.call(t,i)&&i!=="default"&&Qe(t,i,{get:()=>e[i],enumerable:!(a=Qs(e,i))||a.enumerable});return t},Z=t=>eo(ra(Qe(t!=null?Gs(Zs(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var St=(t,e,a)=>{if(!e.has(t))throw TypeError("Cannot "+a)};var R=(t,e,a)=>(St(t,e,"read from private field"),a?a.call(t):e.get(t)),L=(t,e,a)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,a)},se=(t,e,a,i)=>(St(t,e,"write to private field"),i?i.call(t,a):e.set(t,a),a);var I=(t,e,a)=>(St(t,e,"access private method"),a);Js(exports,{MediaError:()=>be.MediaError,default:()=>gr,getVideoAttribute:()=>_e});var ju=Z(require("@mux/playback-core"));var p={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_CAPTIONS_REQUEST:"mediashowcaptionsrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_CAPTIONS_REQUEST:"mediadisablecaptionsrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},ke={MEDIA_AIRPLAY_UNAVAILABLE:"mediaairplayunavailablechange",MEDIA_PIP_UNAVAILABLE:"mediapipunavailablechange",MEDIA_PAUSED:"mediapausedchange",MEDIA_HAS_PLAYED:"mediahasplayedchange",MEDIA_MUTED:"mediamutedchange",MEDIA_VOLUME_LEVEL:"mediavolumelevelchange",MEDIA_VOLUME:"mediavolumechange",MEDIA_VOLUME_UNAVAILABLE:"mediavolumeunavailablechange",MEDIA_IS_PIP:"mediaispipchange",MEDIA_IS_CASTING:"mediaiscastingchange",MEDIA_CAPTIONS_LIST:"mediacaptionslistchange",MEDIA_SUBTITLES_LIST:"mediasubtitleslistchange",MEDIA_CAPTIONS_SHOWING:"mediacaptionsshowingchange",MEDIA_SUBTITLES_SHOWING:"mediasubtitlesshowingchange",MEDIA_IS_FULLSCREEN:"mediaisfullscreenchange",MEDIA_PLAYBACK_RATE:"mediaplaybackratechange",MEDIA_CURRENT_TIME:"mediacurrenttimechange",MEDIA_DURATION:"mediadurationchange",MEDIA_SEEKABLE:"mediaseekablechange",MEDIA_PREVIEW_IMAGE:"mediapreviewimagechange",MEDIA_PREVIEW_COORDS:"mediapreviewcoordschange",MEDIA_LOADING:"medialoadingchange",USER_INACTIVE:"userinactivechange"},o={MEDIA_AIRPLAY_UNAVAILABLE:"media-airplay-unavailable",MEDIA_PIP_UNAVAILABLE:"media-pip-unavailable",MEDIA_CAST_UNAVAILABLE:"media-cast-unavailable",MEDIA_PAUSED:"media-paused",MEDIA_HAS_PLAYED:"media-has-played",MEDIA_MUTED:"media-muted",MEDIA_VOLUME_LEVEL:"media-volume-level",MEDIA_VOLUME:"media-volume",MEDIA_VOLUME_UNAVAILABLE:"media-volume-unavailable",MEDIA_IS_PIP:"media-is-pip",MEDIA_IS_CASTING:"media-is-casting",MEDIA_CAPTIONS_LIST:"media-captions-list",MEDIA_SUBTITLES_LIST:"media-subtitles-list",MEDIA_CAPTIONS_SHOWING:"media-captions-showing",MEDIA_SUBTITLES_SHOWING:"media-subtitles-showing",MEDIA_IS_FULLSCREEN:"media-is-fullscreen",MEDIA_PLAYBACK_RATE:"media-playback-rate",MEDIA_CURRENT_TIME:"media-current-time",MEDIA_DURATION:"media-duration",MEDIA_SEEKABLE:"media-seekable",MEDIA_PREVIEW_IMAGE:"media-preview-image",MEDIA_PREVIEW_COORDS:"media-preview-coords",MEDIA_CHROME_ATTRIBUTES:"media-chrome-attributes",MEDIA_CONTROLLER:"media-controller",MEDIA_LOADING:"media-loading",MEDIA_BUFFERED:"media-buffered"},vr=Object.entries(ke).reduce((t,[e,a])=>{let i=o[e];return i&&(t[a]=i),t},{userinactivechange:"user-inactive"}),la=Object.entries(o).reduce((t,[e,a])=>{let i=ke[e];return i&&(t[a]=i),t},{"user-inactive":"userinactivechange"}),ve={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},oe={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Ct={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},$={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"};var x={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:t=1}={})=>`current playback rate ${t}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading"},y={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",AIRPLAY:()=>"air play",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:t=30}={})=>`seek forward ${t} seconds`,SEEK_BACK_N_SECS:({seekOffset:t=30}={})=>`seek back ${t} seconds`},ao={...x,...y};var io=t=>typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t),da=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],so=(t,e)=>{let a=t===1?da[e].singular:da[e].plural;return`${t} ${a}`},ne=t=>{if(!io(t))return"";let e=Math.abs(t),a=e!==t,i=new Date(0,0,0,0,0,e,0);return`${[i.getHours(),i.getMinutes(),i.getSeconds()].map((s,n)=>s&&so(s,n)).filter(s=>s).join(", ")}${a?" remaining":""}`};function X(t,e){let a=!1;t<0&&(a=!0,t=0-t),t=t<0?0:t;let i=Math.floor(t%60),s=Math.floor(t/60%60),n=Math.floor(t/3600),r=Math.floor(e/60%60),l=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(n=s=i="-"),n=n>0||l>0?n+":":"",s=((n||r>=10)&&s<10?"0"+s:s)+":",i=i<10?"0"+i:i,(a?"-":"")+n+s+i}var ma={HTMLElement:function(){this.addEventListener=()=>{},this.removeEventListener=()=>{},this.dispatchEvent=()=>{}},customElements:{get:function(){},define:function(){},whenDefined:function(){}},CustomEvent:function(){}},no={createElement:function(){return new ma.HTMLElement}},ca=typeof window=="undefined"||typeof window.customElements=="undefined",m=ca?ma:window,d=ca?no:window.document;function u(t,e){m.customElements.get(t)||(m.customElements.define(t,e),m[e.name]=e)}var ua=d.createElement("template");ua.innerHTML=`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
width: auto;
|
|
6
|
+
height: auto;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
background: var(--media-control-background, rgba(20,20,30, 0.7));
|
|
10
|
+
|
|
11
|
+
padding: 10px;
|
|
12
|
+
|
|
13
|
+
/* Vertically center any text */
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
font-weight: bold;
|
|
16
|
+
color: #ffffff;
|
|
17
|
+
text-align: center;
|
|
18
|
+
|
|
19
|
+
transition: background 0.15s linear;
|
|
20
|
+
|
|
21
|
+
pointer-events: auto;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
font-family: Arial, sans-serif;
|
|
24
|
+
vertical-align: middle;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
Only show outline when keyboard focusing.
|
|
29
|
+
https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo
|
|
30
|
+
*/
|
|
31
|
+
:host(:focus-visible) {
|
|
32
|
+
box-shadow: inset 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
33
|
+
outline: 0;
|
|
34
|
+
}
|
|
35
|
+
/*
|
|
36
|
+
* hide default focus ring, particularly when using mouse
|
|
37
|
+
*/
|
|
38
|
+
:host(:where(:focus)) {
|
|
39
|
+
box-shadow: none;
|
|
40
|
+
outline: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host(:hover) {
|
|
44
|
+
background: var(--media-control-hover-background, rgba(50,50,70, 0.7));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
48
|
+
width: var(--media-button-icon-width, 24px);
|
|
49
|
+
height: var(--media-button-icon-height);
|
|
50
|
+
transform: var(--media-button-icon-transform);
|
|
51
|
+
transition: var(--media-button-icon-transition);
|
|
52
|
+
fill: var(--media-icon-color, #eee);
|
|
53
|
+
vertical-align: middle;
|
|
54
|
+
max-width: 100%;
|
|
55
|
+
max-height: 100%;
|
|
56
|
+
min-width: 100%;
|
|
57
|
+
min-height: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
::slotted(div), ::slotted(span) {
|
|
61
|
+
height: 24px;
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
64
|
+
`;var ha=["Enter"," "],Lt=class extends m.HTMLElement{static get observedAttributes(){return[o.MEDIA_CONTROLLER]}constructor(e={}){super();let a=this.attachShadow({mode:"open"}),i=ua.content.cloneNode(!0);this.nativeEl=i;let s=e.slotTemplate;s||(s=d.createElement("template"),s.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(s.content.cloneNode(!0)),a.appendChild(i),this.addEventListener("click",r=>{this.handleClick(r)});let n=r=>{let{key:l}=r;if(!ha.includes(l)){this.removeEventListener("keyup",n);return}this.handleClick(r)};this.addEventListener("keydown",r=>{let{metaKey:l,altKey:c,key:h}=r;if(l||c||!ha.includes(h)){this.removeEventListener("keyup",n);return}this.addEventListener("keyup",n)})}attributeChangedCallback(e,a,i){var s,n;if(e===o.MEDIA_CONTROLLER){if(a){let r=d.getElementById(a);(s=r==null?void 0:r.unassociateElement)==null||s.call(r,this)}if(i){let r=d.getElementById(i);(n=r==null?void 0:r.associateElement)==null||n.call(r,this)}}}connectedCallback(){var e;this.setAttribute("role","button"),this.setAttribute("tabindex",0);let a=this.getAttribute(o.MEDIA_CONTROLLER);if(a){let i=d.getElementById(a);(e=i==null?void 0:i.associateElement)==null||e.call(i,this)}}disconnectedCallback(){var e;if(this.getAttribute(o.MEDIA_CONTROLLER)){let a=d.getElementById(mediaControllerId);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}handleClick(){}};u("media-chrome-button",Lt);var M=Lt;var ro='<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 18"><defs><style>.cls-1{fill:var(--media-icon-color, #eee);}</style></defs><title>Mux Player SVG Icons_v2</title><path class="cls-1" d="M10.19,11.22a.25.25,0,0,0-.38,0L4.35,17.59a.25.25,0,0,0,.19.41H15.46a.25.25,0,0,0,.19-.41Z"/><path class="cls-1" d="M19,0H1A1,1,0,0,0,0,1V14a1,1,0,0,0,1,1H3.94L5,13.75H1.25V1.25h17.5v12.5H15L16.06,15H19a1,1,0,0,0,1-1V1A1,1,0,0,0,19,0Z"/></svg>',pa=d.createElement("template");pa.innerHTML=`
|
|
65
|
+
<style>
|
|
66
|
+
</style>
|
|
67
|
+
|
|
68
|
+
<slot name="airplay">${ro}</slot>
|
|
69
|
+
`;var Ea=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:pa,...e})}connectedCallback(){this.setAttribute("aria-label",y.AIRPLAY()),super.connectedCallback()}handleClick(e){let a=new m.CustomEvent(p.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(a)}};u("media-airplay-button",Ea);var lo='<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>',mo='<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>',ba=d.createElement("template");ba.innerHTML=`
|
|
70
|
+
<style>
|
|
71
|
+
:host([${o.MEDIA_IS_CASTING}]) slot:not([name=exit]) > *,
|
|
72
|
+
:host([${o.MEDIA_IS_CASTING}]) ::slotted(:not([slot=exit])) {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Double negative, but safer if display doesn't equal 'block' */
|
|
77
|
+
:host(:not([${o.MEDIA_IS_CASTING}])) slot:not([name=enter]) > *,
|
|
78
|
+
:host(:not([${o.MEDIA_IS_CASTING}])) ::slotted(:not([slot=enter])) {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
82
|
+
|
|
83
|
+
<slot name="enter">${lo}</slot>
|
|
84
|
+
<slot name="exit">${mo}</slot>
|
|
85
|
+
`;var ga=t=>{let e=t.getAttribute(o.MEDIA_IS_CASTING)!=null?y.EXIT_CAST():y.ENTER_CAST();t.setAttribute("aria-label",e)},fa=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_CASTING,o.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:ba,...e})}connectedCallback(){ga(this),super.connectedCallback()}attributeChangedCallback(e,a,i){e===o.MEDIA_IS_CASTING&&ga(this),super.attributeChangedCallback(e,a,i)}handleClick(e){let a=this.getAttribute(o.MEDIA_IS_CASTING)!=null?p.MEDIA_EXIT_CAST_REQUEST:p.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new m.CustomEvent(a,{composed:!0,bubbles:!0}))}};u("media-cast-button",fa);var va=d.createElement("template");va.innerHTML=`
|
|
86
|
+
<style>
|
|
87
|
+
:host {
|
|
88
|
+
display: inline-block;
|
|
89
|
+
width: auto;
|
|
90
|
+
height: auto;
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
|
|
93
|
+
pointer-events: auto;
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
96
|
+
`;var Aa=class extends m.HTMLElement{static get observedAttributes(){return[o.MEDIA_CONTROLLER,o.MEDIA_PAUSED]}constructor(e={}){super();let a=this.attachShadow({mode:"open"}),i=va.content.cloneNode(!0);this.nativeEl=i;let s=e.slotTemplate;s||(s=d.createElement("template"),s.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(s.content.cloneNode(!0)),a.appendChild(i),this._pointerType=void 0;let n=r=>{this._pointerType=r.pointerType};this.addEventListener("pointerdown",n),this.addEventListener("click",r=>{let{pointerType:l=this._pointerType}=r;if(this._pointerType=void 0,l===Ct.TOUCH){this.handleTap(r);return}else if(l===Ct.MOUSE){this.handleMouseClick(r);return}})}attributeChangedCallback(e,a,i){var s,n;if(e===o.MEDIA_CONTROLLER){if(a){let r=d.getElementById(a);(s=r==null?void 0:r.unassociateElement)==null||s.call(r,this)}if(i){let r=d.getElementById(i);(n=r==null?void 0:r.associateElement)==null||n.call(r,this)}}}connectedCallback(){var e;this.setAttribute("tabindex",-1),this.setAttribute("aria-hidden",!0);let a=this.getAttribute(o.MEDIA_CONTROLLER);if(a){let i=d.getElementById(a);(e=i==null?void 0:i.associateElement)==null||e.call(i,this)}}disconnectedCallback(){var e;if(this.getAttribute(o.MEDIA_CONTROLLER)){let a=d.getElementById(mediaControllerId);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}handleTap(e){}handleMouseClick(e){let a=this.getAttribute(o.MEDIA_PAUSED)!=null?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new m.CustomEvent(a,{composed:!0,bubbles:!0}))}};u("media-gesture-receiver",Aa);var qe=(t,e,a=".value")=>{let i=t.querySelector(a);!i||(i.textContent=e)},co=(t,e)=>{let a=`slot[name="${e}"]`,i=t.shadowRoot.querySelector(a);return i?i.children:[]},Ze=(t,e)=>co(t,e)[0],re=(t,e)=>!t||!e?!1:t.contains(e)?!0:re(t,e.getRootNode().host);var Ia=d.createElement("template");Ia.innerHTML=`
|
|
97
|
+
<style>
|
|
98
|
+
:host {
|
|
99
|
+
box-sizing: border-box;
|
|
100
|
+
position: relative;
|
|
101
|
+
display: inline-block;
|
|
102
|
+
line-height: 0;
|
|
103
|
+
background-color: #000;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host(:not([audio])) [part~=layer]:not([part~=media-layer]) {
|
|
107
|
+
position: absolute;
|
|
108
|
+
top: 0;
|
|
109
|
+
left: 0;
|
|
110
|
+
bottom: 0;
|
|
111
|
+
right: 0;
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-flow: column nowrap;
|
|
114
|
+
align-items: start;
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
background: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/*
|
|
120
|
+
* when in audio mode, hide the gesture-layer which causes media-controller to be taller than the control bar
|
|
121
|
+
*
|
|
122
|
+
*/
|
|
123
|
+
:host([audio]) [part~=layer][part~=gesture-layer] {
|
|
124
|
+
height: 0;
|
|
125
|
+
display: block;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/*
|
|
129
|
+
* if gestures are disabled, don't accept pointer-events
|
|
130
|
+
*/
|
|
131
|
+
:host(:not([audio])[gestures-disabled]) ::slotted([slot=gestures-chrome]),
|
|
132
|
+
:host(:not([audio])[gestures-disabled]) media-gesture-receiver[slot=gestures-chrome] {
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/*
|
|
137
|
+
* any slotted element that isn't a poster or media slot should be pointer-events auto
|
|
138
|
+
* we'll want to add here any slotted elements that shouldn't get pointer-events by default when slotted
|
|
139
|
+
*/
|
|
140
|
+
::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator)) {
|
|
141
|
+
pointer-events: auto;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host(:not([audio])) *[part~=layer][part~=centered-layer] {
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: center;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:host(:not([audio])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
|
|
150
|
+
:host(:not([audio])) media-gesture-receiver[slot=gestures-chrome] {
|
|
151
|
+
align-self: stretch;
|
|
152
|
+
flex-grow: 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.spacer {
|
|
156
|
+
pointer-events: none;
|
|
157
|
+
background: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Position the media and poster elements to fill the container */
|
|
161
|
+
::slotted([slot=media]),
|
|
162
|
+
::slotted([slot=poster]) {
|
|
163
|
+
width: 100%;
|
|
164
|
+
height: 100%;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Video specific styles */
|
|
168
|
+
:host(:not([audio])) .spacer {
|
|
169
|
+
flex-grow: 1;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Safari needs this to actually make the element fill the window */
|
|
173
|
+
:host(:-webkit-full-screen) {
|
|
174
|
+
/* Needs to use !important otherwise easy to break */
|
|
175
|
+
width: 100% !important;
|
|
176
|
+
height: 100% !important;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* Only add these if auto hide is not disabled */
|
|
180
|
+
::slotted(:not([slot=media]):not([no-auto-hide])) {
|
|
181
|
+
opacity: 1;
|
|
182
|
+
transition: opacity 0.25s;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Hide controls when inactive, not paused, not audio and auto hide not disabled */
|
|
186
|
+
:host([user-inactive]:not([${o.MEDIA_PAUSED}]):not([${o.MEDIA_IS_CASTING}]):not([audio])) ::slotted(:not([slot=media]):not([no-auto-hide])) {
|
|
187
|
+
opacity: 0;
|
|
188
|
+
transition: opacity 1s;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
::slotted(media-control-bar) {
|
|
192
|
+
align-self: stretch;
|
|
193
|
+
}
|
|
194
|
+
</style>
|
|
195
|
+
|
|
196
|
+
<span part="layer media-layer">
|
|
197
|
+
<slot name="media"></slot>
|
|
198
|
+
</span>
|
|
199
|
+
<span part="layer poster-layer">
|
|
200
|
+
<slot name="poster"></slot>
|
|
201
|
+
</span>
|
|
202
|
+
<span part="layer gesture-layer">
|
|
203
|
+
<slot name="gestures-chrome">
|
|
204
|
+
<media-gesture-receiver slot="gestures-chrome"></media-gesture-receiver>
|
|
205
|
+
</slot>
|
|
206
|
+
</span>
|
|
207
|
+
<span part="layer vertical-layer">
|
|
208
|
+
<slot name="top-chrome"></slot>
|
|
209
|
+
<span class="spacer"><slot name="middle-chrome"></slot></span>
|
|
210
|
+
<!-- default, effectively "bottom-chrome" -->
|
|
211
|
+
<slot></slot>
|
|
212
|
+
</span>
|
|
213
|
+
<span part="layer centered-layer">
|
|
214
|
+
<slot name="centered-chrome"></slot>
|
|
215
|
+
</span>
|
|
216
|
+
`;var uo=Object.values(o),kt=class extends m.HTMLElement{constructor(){super();let e=this.attachShadow({mode:"open"});this.shadowRoot.appendChild(Ia.content.cloneNode(!0));let a=(n,r)=>{let l=this.media;for(let c of n)c.type==="childList"&&(c.removedNodes.forEach(h=>{if(h.slot=="media"&&c.target==this){let E=c.previousSibling&&c.previousSibling.previousElementSibling;if(!E||!l)this.mediaUnsetCallback(h);else{let T=E.slot!=="media";for(;(E=E.previousSibling)!==null;)E.slot=="media"&&(T=!1);T&&this.mediaUnsetCallback(h)}}}),l&&c.addedNodes.forEach(h=>{h==l&&this.handleMediaUpdated(l).then(E=>this.mediaSetCallback(E))}))};new MutationObserver(a).observe(this,{childList:!0,subtree:!0});let i=this.media,s=this.querySelector(":scope > slot[slot=media]");s&&s.addEventListener("slotchange",()=>{if(!s.assignedElements({flatten:!0}).length){this.mediaUnsetCallback(i);return}this.media&&(i=this.media,this.handleMediaUpdated(this.media).then(n=>this.mediaSetCallback(n)))})}static get observedAttributes(){return["autohide","gestures-disabled"].concat(uo)}attributeChangedCallback(e,a,i){e.toLowerCase()=="autohide"&&(this.autohide=i)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}mediaSetCallback(e){this._mediaClickPlayToggle=a=>{let i=e.paused?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new m.CustomEvent(i,{composed:!0,bubbles:!0}))}}handleMediaUpdated(e){let a=n=>Promise.resolve(n),i=n=>(console.error('<media-chrome>: Media element set with slot="media" does not appear to be compatible.',n),Promise.reject(n));if(!e)return i(e);let s=e.nodeName.toLowerCase();return s.includes("-")?m.customElements.whenDefined(s).then(()=>a(e)):a(e)}mediaUnsetCallback(e){}connectedCallback(){let e=this.getAttribute("audio")!=null?x.AUDIO_PLAYER():x.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",e),this.media&&this.handleMediaUpdated(this.media).then(n=>this.mediaSetCallback(n)),this.setAttribute("user-inactive","user-inactive");let a=()=>{if(this.autohide<0)return;this.setAttribute("user-inactive","user-inactive");let n=new m.CustomEvent(ke.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(n)},i=()=>{this.removeAttribute("user-inactive");let n=new m.CustomEvent(ke.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(n)},s=()=>{i(),m.clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=m.setTimeout(()=>{a()},this.autohide*1e3))};this.addEventListener("keyup",n=>{s()}),this.addEventListener("pointerup",n=>{n.pointerType==="touch"&&([this,this.media].includes(n.target)&&!this.hasAttribute("user-inactive")?a():s())}),this.addEventListener("pointermove",n=>{n.pointerType==="mouse"&&(!re(this,n.target)||(i(),m.clearTimeout(this._inactiveTimeout),[this,this.media].includes(n.target)&&s()))}),this.addEventListener("mouseleave",n=>{a()}),this.addEventListener("keyup",n=>{this.setAttribute("media-keyboard-control","")}),this.addEventListener("mouseup",n=>{this.removeAttribute("media-keyboard-control")})}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return this._autohide===void 0?2:this._autohide}};u("media-container-temp",kt);var Ta=kt;var k={enter:"requestFullscreen",exit:"exitFullscreen",event:"fullscreenchange",element:"fullscreenElement",error:"fullscreenerror"};d.fullscreenElement===void 0&&(k.enter="webkitRequestFullScreen",k.exit=d.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",k.event="webkitfullscreenchange",k.element="webkitFullscreenElement",k.error="webkitfullscreenerror");function Xe(t,e=!1){return t.split("_").map(function(a,i){return(i||e?a[0].toUpperCase():a[0].toLowerCase())+a.slice(1).toLowerCase()}).join("")}var Je=(t="")=>t.split(/\s+/),ya=(t="")=>{let[e,a]=t.split(":"),i=a?decodeURIComponent(a):void 0;return{language:e,label:i}},ho=(t="",e={})=>Je(t).map(a=>{let i=ya(a);return{...e,...i}}),po=t=>Array.isArray(t)?t.map(e=>typeof e=="string"?ya(e):e):typeof t=="string"?ho(t):[t],Eo=({label:t,language:e}={})=>t?`${e}:${encodeURIComponent(t)}`:e,P=(t=[])=>Array.prototype.map.call(t,Eo).join(" "),bo=(t,e)=>a=>a[t]===e,_a=t=>{let e=Object.entries(t).map(([a,i])=>bo(a,i));return a=>e.every(i=>i(a))},xe=(t,e=[],a=[])=>{let i=po(a).map(_a),s=n=>i.some(r=>r(n));Array.from(e).filter(s).forEach(n=>{n.mode=t})},Ae=(t,e=()=>!0)=>{if(!(t==null?void 0:t.textTracks))return[];let a=typeof e=="function"?e:_a(e);return Array.from(t.textTracks).filter(a)};var xt=class extends Ta{constructor(){super();Mo||(this._airplayUnavailable=$.UNSUPPORTED),So||(this._castUnavailable=$.UNSUPPORTED),yo||(this._pipUnavailable=$.UNSUPPORTED),we!==void 0?we||(this._volumeUnavailable=$.UNSUPPORTED):_o.then(()=>{we||(this._volumeUnavailable=$.UNSUPPORTED,this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,this._volumeUnavailable))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associatedElements=[],this.associateElement(this);let e={MEDIA_PLAY_REQUEST:()=>this.media.play(),MEDIA_PAUSE_REQUEST:()=>this.media.pause(),MEDIA_MUTE_REQUEST:()=>this.media.muted=!0,MEDIA_UNMUTE_REQUEST:()=>{let a=this.media;a.muted=!1,a.volume===0&&(a.volume=.25)},MEDIA_VOLUME_REQUEST:a=>{let i=this.media,s=a.detail;i.volume=s,s>0&&i.muted&&(i.muted=!1);try{m.localStorage.setItem("media-chrome-pref-volume",s.toString())}catch{}},MEDIA_ENTER_FULLSCREEN_REQUEST:()=>{let a=this.media;d.pictureInPictureElement&&d.exitPictureInPicture(),super[k.enter]?super[k.enter]():a.webkitEnterFullscreen?a.webkitEnterFullscreen():a.requestFullscreen?a.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{d[k.exit]()},MEDIA_ENTER_PIP_REQUEST:()=>{let a=this.media;!d.pictureInPictureEnabled||(d[k.element]&&d[k.exit](),a.requestPictureInPicture())},MEDIA_EXIT_PIP_REQUEST:()=>{d.pictureInPictureElement&&d.exitPictureInPicture()},MEDIA_ENTER_CAST_REQUEST:()=>{var a;let i=this.media;!((a=globalThis.CastableVideoElement)==null?void 0:a.castEnabled)||(d[k.element]&&d[k.exit](),i.requestCast())},MEDIA_EXIT_CAST_REQUEST:async()=>{var a;((a=globalThis.CastableVideoElement)==null?void 0:a.castElement)&&globalThis.CastableVideoElement.exitCast()},MEDIA_SEEK_REQUEST:a=>{let i=this.media,s=a.detail;(i.readyState>0||i.readyState===void 0)&&(i.currentTime=s)},MEDIA_PLAYBACK_RATE_REQUEST:a=>{this.media.playbackRate=a.detail},MEDIA_PREVIEW_REQUEST:a=>{var i;let s=this.media;if(!s)return;let[n]=Ae(s,{kind:ve.METADATA,label:"thumbnails"});if(!(n&&n.cues))return;let r=a.detail;if(r===null){this.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),this.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}let l=Array.prototype.find.call(n.cues,T=>T.startTime>=r);if(!l)return;let c=/'^(?:[a-z]+:)?\/\//i.test(l.text)||(i=s.querySelector('track[label="thumbnails"]'))==null?void 0:i.src,h=new URL(l.text,c),E=new URLSearchParams(h.hash).get("#xywh");this.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,h.href),this.propagateMediaState(o.MEDIA_PREVIEW_COORDS,E.split(",").join(" "))},MEDIA_SHOW_CAPTIONS_REQUEST:a=>{let i=tt(this),{detail:s=[]}=a;xe(oe.SHOWING,i,s)},MEDIA_DISABLE_CAPTIONS_REQUEST:a=>{let i=tt(this),{detail:s=[]}=a;xe(oe.DISABLED,i,s)},MEDIA_SHOW_SUBTITLES_REQUEST:a=>{let i=et(this),{detail:s=[]}=a;xe(oe.SHOWING,i,s)},MEDIA_DISABLE_SUBTITLES_REQUEST:a=>{let i=et(this),{detail:s=[]}=a;xe(oe.DISABLED,i,s)},MEDIA_AIRPLAY_REQUEST:a=>{let{media:i}=this;if(i){if(!(i.webkitShowPlaybackTargetPicker&&m.WebKitPlaybackTargetAvailabilityEvent)){console.warn("received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}}};if(Object.keys(e).forEach(a=>{let i=`_handle${Xe(a,!0)}`;this[i]=s=>{if(s.stopPropagation(),!this.media){console.warn("MediaController: No media available.");return}e[a](s,this.media)},this.addEventListener(p[a],this[i])}),this._mediaStatePropagators={"play,pause,emptied":()=>{this.propagateMediaState(o.MEDIA_PAUSED,Ma(this))},"playing,emptied":()=>{var a;this.propagateMediaState(o.MEDIA_HAS_PLAYED,!((a=this.media)==null?void 0:a.paused))},volumechange:()=>{this.propagateMediaState(o.MEDIA_MUTED,Sa(this)),this.propagateMediaState(o.MEDIA_VOLUME,Ca(this)),this.propagateMediaState(o.MEDIA_VOLUME_LEVEL,La(this))},[k.event]:a=>{let i=!!d[k.element]&&(a==null?void 0:a.target),s=re(this,i);this.propagateMediaState(o.MEDIA_IS_FULLSCREEN,s)},"enterpictureinpicture,leavepictureinpicture":a=>{var i;let s;if(a)s=a.type=="enterpictureinpicture";else{let n=(i=this.getRootNode().pictureInPictureElement)!=null?i:d.pictureInPictureElement;s=this.media&&re(this.media,n)}this.propagateMediaState(o.MEDIA_IS_PIP,s)},"entercast,leavecast,castchange":a=>{var i;let s=(i=globalThis.CastableVideoElement)==null?void 0:i.castElement,n=this.media&&re(this.media,s);(a==null?void 0:a.type)==="castchange"&&(a==null?void 0:a.detail)==="CONNECTING"&&(n="connecting"),this.propagateMediaState(o.MEDIA_IS_CASTING,n)},"timeupdate,loadedmetadata":()=>{this.propagateMediaState(o.MEDIA_CURRENT_TIME,ka(this))},"durationchange,loadedmetadata,emptied":()=>{this.propagateMediaState(o.MEDIA_DURATION,xa(this))},"loadedmetadata,emptied,progress":()=>{var a;this.propagateMediaState(o.MEDIA_SEEKABLE,(a=Da(this))==null?void 0:a.join(":"))},"progress,emptied":()=>{var a;this.propagateMediaState(o.MEDIA_BUFFERED,Co((a=this.media)==null?void 0:a.buffered))},"ratechange,loadstart":()=>{this.propagateMediaState(o.MEDIA_PLAYBACK_RATE,wa(this))},"waiting,playing,emptied":()=>{var a;let i=((a=this.media)==null?void 0:a.readyState)<3;this.propagateMediaState(o.MEDIA_LOADING,i)}},this._airplayUnavailable!==$.UNSUPPORTED){let a=i=>{(i==null?void 0:i.availability)==="available"?this._airplayUnavailable=void 0:(i==null?void 0:i.availability)==="not-available"&&(this._airplayUnavailable=$.UNAVAILABLE),this.propagateMediaState(o.MEDIA_AIRPLAY_UNAVAILABLE,this._airplayUnavailable)};this._mediaStatePropagators.webkitplaybacktargetavailabilitychanged=a}if(this._castUnavailable!==$.UNSUPPORTED){let a=()=>{var i;let s=(i=globalThis.CastableVideoElement)==null?void 0:i.castState;(s==null?void 0:s.includes("CONNECT"))?this._castUnavailable=void 0:this._castUnavailable=$.UNAVAILABLE,this.propagateMediaState(o.MEDIA_CAST_UNAVAILABLE,this._castUnavailable)};this._mediaStatePropagators.castchange=a}this._textTrackMediaStatePropagators={"addtrack,removetrack,loadstart":()=>{this.propagateMediaState(o.MEDIA_CAPTIONS_LIST,P(tt(this))||void 0),this.propagateMediaState(o.MEDIA_SUBTITLES_LIST,P(et(this))||void 0),this.propagateMediaState(o.MEDIA_CAPTIONS_SHOWING,P(wt(this))||void 0),this.propagateMediaState(o.MEDIA_SUBTITLES_SHOWING,P(Dt(this))||void 0)},change:()=>{this.propagateMediaState(o.MEDIA_CAPTIONS_SHOWING,P(wt(this))||void 0),this.propagateMediaState(o.MEDIA_SUBTITLES_SHOWING,P(Dt(this))||void 0)}}}mediaSetCallback(e){super.mediaSetCallback(e),Object.keys(this._mediaStatePropagators).forEach(a=>{let i=a.split(","),s=this._mediaStatePropagators[a];i.forEach(n=>{(n==k.event?this.getRootNode():e).addEventListener(n,s)}),s()}),Object.entries(this._textTrackMediaStatePropagators).forEach(([a,i])=>{a.split(",").forEach(s=>{e.textTracks&&e.textTracks.addEventListener(s,i)}),i()});try{let a=m.localStorage.getItem("media-chrome-pref-volume");a!==null&&(e.volume=a)}catch(a){console.debug("Error getting volume pref",a)}}mediaUnsetCallback(e){super.mediaUnsetCallback(e),Object.keys(this._mediaStatePropagators).forEach(a=>{let i=a.split(","),s=this._mediaStatePropagators[a];i.forEach(n=>{(n==k.event?this.getRootNode():e).removeEventListener(n,s)})}),Object.entries(this._textTrackMediaStatePropagators).forEach(([a,i])=>{a.split(",").forEach(s=>{e.textTracks&&e.textTracks.removeEventListener(s,i)}),i()}),this.propagateMediaState(o.MEDIA_PAUSED,!0)}propagateMediaState(e,a){C(this.mediaStateReceivers,e,a);let i=new m.CustomEvent(la[e],{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(i)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:a}=this;if(a.has(e))return;let i=this.registerMediaStateReceiver.bind(this),s=this.unregisterMediaStateReceiver.bind(this),n=Ao(e,i,s);Object.keys(p).forEach(r=>{e.addEventListener(p[r],this[`_handle${Xe(r,!0)}`])}),a.set(e,n)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:a}=this;!a.has(e)||(a.get(e)(),a.delete(e),Object.keys(p).forEach(i=>{e.removeEventListener(p[i],this[`_handle${Xe(i,!0)}`])}))}registerMediaStateReceiver(e){var a;if(!e)return;let i=this.mediaStateReceivers;i.indexOf(e)>-1||(i.push(e),C([e],o.MEDIA_VOLUME_UNAVAILABLE,this._volumeUnavailable),C([e],o.MEDIA_AIRPLAY_UNAVAILABLE,this._airplayUnavailable),C([e],o.MEDIA_CAST_UNAVAILABLE,this._castUnavailable),C([e],o.MEDIA_PIP_UNAVAILABLE,this._pipUnavailable),this.media&&(C([e],o.MEDIA_CAPTIONS_LIST,P(tt(this))||void 0),C([e],o.MEDIA_SUBTITLES_LIST,P(et(this))||void 0),C([e],o.MEDIA_CAPTIONS_SHOWING,P(wt(this))||void 0),C([e],o.MEDIA_SUBTITLES_SHOWING,P(Dt(this))||void 0),C([e],o.MEDIA_PAUSED,Ma(this)),C([e],o.MEDIA_MUTED,Sa(this)),C([e],o.MEDIA_VOLUME,Ca(this)),C([e],o.MEDIA_VOLUME_LEVEL,La(this)),C([e],o.MEDIA_IS_FULLSCREEN,this.hasAttribute(o.MEDIA_IS_FULLSCREEN)),C([e],o.MEDIA_IS_CASTING,this.hasAttribute(o.MEDIA_IS_CASTING)),C([e],o.MEDIA_CURRENT_TIME,ka(this)),C([e],o.MEDIA_DURATION,xa(this)),C([e],o.MEDIA_SEEKABLE,(a=Da(this))==null?void 0:a.join(":")),C([e],o.MEDIA_PLAYBACK_RATE,wa(this))))}unregisterMediaStateReceiver(e){let a=this.mediaStateReceivers,i=a.indexOf(e);i<0||a.splice(i,1)}},Ma=t=>t.media?t.media.paused:!0,Sa=t=>!!(t.media&&t.media.muted),Ca=t=>{let e=t.media;return e?e.volume:1},La=t=>{let e="high";if(!t.media)return e;let{muted:a,volume:i}=t.media;return i===0||a?e="off":i<.5?e="low":i<.75&&(e="medium"),e},ka=t=>{let e=t.media;return e?e.currentTime:0},xa=t=>{let e=t==null?void 0:t.media;return Number.isFinite(e==null?void 0:e.duration)?e.duration:NaN},Da=t=>{var e;let a=t==null?void 0:t.media;if(!((e=a==null?void 0:a.seekable)==null?void 0:e.length))return;let i=a.seekable.start(0),s=a.seekable.end(a.seekable.length-1);if(!(!i&&!s))return[Number(i.toFixed(3)),Number(s.toFixed(3))]},wa=t=>{let e=t.media;return e?e.playbackRate:1},et=t=>Ae(t.media,{kind:ve.SUBTITLES}),tt=t=>Ae(t.media,{kind:ve.CAPTIONS}),Dt=t=>Ae(t.media,{kind:ve.SUBTITLES,mode:oe.SHOWING}),wt=t=>Ae(t.media,{kind:ve.CAPTIONS,mode:oe.SHOWING}),go=Object.values(o),Ra=t=>{var e,a,i,s;let{observedAttributes:n}=t.constructor;!n&&((e=t.nodeName)==null?void 0:e.includes("-"))&&(m.customElements.upgrade(t),{observedAttributes:n}=t.constructor);let r=(s=(i=(a=t==null?void 0:t.getAttribute)==null?void 0:a.call(t,o.MEDIA_CHROME_ATTRIBUTES))==null?void 0:i.split)==null?void 0:s.call(i,/\s+/);return Array.isArray(n||r)?(n||r).filter(l=>go.includes(l)):[]},Rt=t=>!!Ra(t).length,fo=async(t,e,a)=>(t.isConnected||await Na(0),a==null?t.removeAttribute(e):typeof a=="boolean"?a?t.setAttribute(e,""):t.removeAttribute(e):Number.isNaN(a)?t.removeAttribute(e):t.setAttribute(e,a)),vo=t=>{var e;return!!((e=t.closest)==null?void 0:e.call(t,'*[slot="media"]'))},De=(t,e)=>{if(vo(t))return;let a=(s,n)=>{var r,l;Rt(s)&&n(s);let{children:c=[]}=s!=null?s:{},h=(l=(r=s==null?void 0:s.shadowRoot)==null?void 0:r.children)!=null?l:[];[...c,...h].forEach(E=>De(E,n))},i=t==null?void 0:t.nodeName.toLowerCase();if(i.includes("-")&&!Rt(t)){m.customElements.whenDefined(i).then(()=>{a(t,e)});return}a(t,e)},C=(t,e,a)=>{t.forEach(i=>{!Ra(i).includes(e)||fo(i,e,a)})},Ao=(t,e,a)=>{De(t,e);let i=l=>{var c;let h=(c=l==null?void 0:l.composedPath()[0])!=null?c:l.target;e(h)},s=l=>{var c;let h=(c=l==null?void 0:l.composedPath()[0])!=null?c:l.target;a(h)};t.addEventListener(p.REGISTER_MEDIA_STATE_RECEIVER,i),t.addEventListener(p.UNREGISTER_MEDIA_STATE_RECEIVER,s);let n=(l,c)=>{l.forEach(h=>{let{addedNodes:E=[],removedNodes:T=[],type:S,target:w,attributeName:U}=h;S==="childList"?(Array.prototype.forEach.call(E,A=>De(A,e)),Array.prototype.forEach.call(T,A=>De(A,a))):S==="attributes"&&U===o.MEDIA_CHROME_ATTRIBUTES&&(Rt(w)?e(w):a(w))})},r=new MutationObserver(n);return r.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{De(t,a),r.disconnect(),t.removeEventListener(p.REGISTER_MEDIA_STATE_RECEIVER,i),t.removeEventListener(p.UNREGISTER_MEDIA_STATE_RECEIVER,s)}},Ut,Ua=()=>{var t,e;return Ut||(Ut=(e=(t=d)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),Ut)},Io=async(t=Ua())=>{if(!t)return!1;let e=t.volume;return t.volume=e/2+.1,await Na(0),t.volume!==e},Na=t=>new Promise((e,a)=>setTimeout(e,t)),To=(t=Ua())=>typeof(t==null?void 0:t.requestPictureInPicture)=="function",yo=To(),we,_o=Io().then(t=>(we=t,we)),Mo=!!m.WebKitPlaybackTargetAvailabilityEvent,So=!!m.chrome;function Co(t=[]){return Array.from(t).map((e,a)=>[Number(t.start(a).toFixed(3)),Number(t.end(a).toFixed(3))].join(":")).join(" ")}u("media-controller",xt);var Re=xt;var Oa=d.createElement("template"),Pa=`
|
|
217
|
+
height: var(--thumb-height);
|
|
218
|
+
width: var(--media-range-thumb-width, 10px);
|
|
219
|
+
border: var(--media-range-thumb-border, none);
|
|
220
|
+
border-radius: var(--media-range-thumb-border-radius, 10px);
|
|
221
|
+
background: var(--media-range-thumb-background, #fff);
|
|
222
|
+
box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
transition: var(--media-range-thumb-transition, none);
|
|
225
|
+
transform: var(--media-range-thumb-transform, none);
|
|
226
|
+
opacity: var(--media-range-thumb-opacity, 1);
|
|
227
|
+
`,Nt=`
|
|
228
|
+
width: var(--media-range-track-width, 100%);
|
|
229
|
+
min-width: 40px;
|
|
230
|
+
height: var(--track-height);
|
|
231
|
+
border: var(--media-range-track-border, none);
|
|
232
|
+
border-radius: var(--media-range-track-border-radius, 0);
|
|
233
|
+
background: var(--media-range-track-background-internal, var(--media-range-track-background, #eee));
|
|
234
|
+
|
|
235
|
+
box-shadow: var(--media-range-track-box-shadow, none);
|
|
236
|
+
transition: var(--media-range-track-transition, none);
|
|
237
|
+
transform: translate(var(--media-range-track-translate-x, 0), var(--media-range-track-translate-y, 0));
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
`;Oa.innerHTML=`
|
|
240
|
+
<style>
|
|
241
|
+
:host {
|
|
242
|
+
--thumb-height: var(--media-range-thumb-height, 10px);
|
|
243
|
+
--track-height: var(--media-range-track-height, 4px);
|
|
244
|
+
|
|
245
|
+
position: relative;
|
|
246
|
+
display: inline-block;
|
|
247
|
+
vertical-align: middle;
|
|
248
|
+
box-sizing: border-box;
|
|
249
|
+
background: var(--media-control-background, rgba(20,20,30, 0.7));
|
|
250
|
+
transition: background 0.15s linear;
|
|
251
|
+
height: 44px;
|
|
252
|
+
width: 100px;
|
|
253
|
+
padding: 0 10px;
|
|
254
|
+
|
|
255
|
+
pointer-events: auto;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
:host(:hover) {
|
|
259
|
+
background: var(--media-control-hover-background, rgba(50,50,60, 0.7));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
input[type=range] {
|
|
263
|
+
/* Reset */
|
|
264
|
+
-webkit-appearance: none; /* Hides the slider so that custom slider can be made */
|
|
265
|
+
background: transparent; /* Otherwise white in Chrome */
|
|
266
|
+
|
|
267
|
+
/* Fill host with the range */
|
|
268
|
+
min-height: 100%;
|
|
269
|
+
width: var(--media-range-track-width, 100%); /* Specific width is required for Firefox. */
|
|
270
|
+
|
|
271
|
+
box-sizing: border-box;
|
|
272
|
+
padding: 0;
|
|
273
|
+
margin: 0;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Special styling for WebKit/Blink */
|
|
277
|
+
input[type=range]::-webkit-slider-thumb {
|
|
278
|
+
-webkit-appearance: none;
|
|
279
|
+
${Pa}
|
|
280
|
+
/* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
|
|
281
|
+
margin-top: calc(calc(0px - var(--thumb-height) + var(--track-height)) / 2);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* The thumb is not positioned relative to the track in Firefox */
|
|
285
|
+
input[type=range]::-moz-range-thumb {
|
|
286
|
+
${Pa}
|
|
287
|
+
translate: var(--media-range-track-translate-x, 0) var(--media-range-track-translate-y, 0);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
input[type=range]::-webkit-slider-runnable-track { ${Nt} }
|
|
291
|
+
input[type=range]::-moz-range-track { ${Nt} }
|
|
292
|
+
input[type=range]::-ms-track {
|
|
293
|
+
/* Reset */
|
|
294
|
+
width: 100%;
|
|
295
|
+
cursor: pointer;
|
|
296
|
+
/* Hides the slider so custom styles can be added */
|
|
297
|
+
background: transparent;
|
|
298
|
+
border-color: transparent;
|
|
299
|
+
color: transparent;
|
|
300
|
+
|
|
301
|
+
${Nt}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/*
|
|
305
|
+
* set input to focus-visible, unless host-context is available (in chrome)
|
|
306
|
+
* in which case we can have the focus ring be on the host itself
|
|
307
|
+
*/
|
|
308
|
+
:host-context([media-keyboard-control]):host(:focus),
|
|
309
|
+
:host-context([media-keyboard-control]):host(:focus-within) {
|
|
310
|
+
box-shadow: inset 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
311
|
+
}
|
|
312
|
+
:host-context([media-keyboard-control]) input[type=range]:focus-visible {
|
|
313
|
+
box-shadow: none;
|
|
314
|
+
}
|
|
315
|
+
input[type=range]:focus-visible {
|
|
316
|
+
box-shadow: inset 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
317
|
+
}
|
|
318
|
+
input[type=range]:focus {
|
|
319
|
+
outline: 0;
|
|
320
|
+
}
|
|
321
|
+
input[type=range]:focus::-webkit-slider-runnable-track {
|
|
322
|
+
outline: 0;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
input[type=range]:disabled::-webkit-slider-thumb {
|
|
326
|
+
background-color: #777;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
input[type=range]:disabled::-webkit-slider-runnable-track {
|
|
330
|
+
background-color: #777;
|
|
331
|
+
}
|
|
332
|
+
</style>
|
|
333
|
+
<input id="range" type="range" min="0" max="1000" step="1" value="0">
|
|
334
|
+
`;var Ot=class extends m.HTMLElement{static get observedAttributes(){return[o.MEDIA_CONTROLLER]}constructor(){super();this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Oa.content.cloneNode(!0)),this.range=this.shadowRoot.querySelector("#range"),this.range.addEventListener("input",this.updateBar.bind(this))}attributeChangedCallback(e,a,i){var s,n;if(e===o.MEDIA_CONTROLLER){if(a){let r=d.getElementById(a);(s=r==null?void 0:r.unassociateElement)==null||s.call(r,this)}if(i){let r=d.getElementById(i);(n=r==null?void 0:r.associateElement)==null||n.call(r,this)}}}connectedCallback(){var e;let a=this.getAttribute(o.MEDIA_CONTROLLER);if(a){let i=d.getElementById(a);(e=i==null?void 0:i.associateElement)==null||e.call(i,this)}this.updateBar()}disconnectedCallback(){var e;if(this.getAttribute(o.MEDIA_CONTROLLER)){let a=d.getElementById(mediaControllerId);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}updateBar(){let e=this.getBarColors(),a="linear-gradient(to right, ",i=0;e.forEach(s=>{s[1]<i||(a=a+`${s[0]} ${i}%, ${s[0]} ${s[1]}%,`,i=s[1])}),a=a.slice(0,a.length-1)+")",this.style.setProperty("--media-range-track-background-internal",a)}getBarColors(){let e=this.range,a=e.value-e.min,i=e.max-e.min,s=a/i*100;return[["var(--media-range-bar-color, #fff)",s],["var(--media-range-track-background, #333)",100]]}};u("media-chrome-range",Ot);var Ue=Ot;var Va=d.createElement("template");Va.innerHTML=`
|
|
335
|
+
<style>
|
|
336
|
+
:host {
|
|
337
|
+
/* Need position to display above video for some reason */
|
|
338
|
+
box-sizing: border-box;
|
|
339
|
+
display: inline-flex;
|
|
340
|
+
color: var(--media-icon-color, #eee);
|
|
341
|
+
--media-loading-icon-width: 44px;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
media-time-range,
|
|
345
|
+
::slotted(media-time-range),
|
|
346
|
+
::slotted(media-progress-range),
|
|
347
|
+
::slotted(media-clip-selector) {
|
|
348
|
+
flex-grow: 1;
|
|
349
|
+
}
|
|
350
|
+
</style>
|
|
351
|
+
|
|
352
|
+
<slot></slot>
|
|
353
|
+
`;var $a=class extends m.HTMLElement{static get observedAttributes(){return[o.MEDIA_CONTROLLER]}constructor(){super();this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Va.content.cloneNode(!0))}attributeChangedCallback(e,a,i){var s,n;if(e===o.MEDIA_CONTROLLER){if(a){let r=d.getElementById(a);(s=r==null?void 0:r.unassociateElement)==null||s.call(r,this)}if(i){let r=d.getElementById(i);(n=r==null?void 0:r.associateElement)==null||n.call(r,this)}}}connectedCallback(){var e;let a=this.getAttribute(o.MEDIA_CONTROLLER);if(a){let i=d.getElementById(a);(e=i==null?void 0:i.associateElement)==null||e.call(i,this)}}disconnectedCallback(){var e;if(this.getAttribute(o.MEDIA_CONTROLLER)){let a=d.getElementById(mediaControllerId);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}};u("media-control-bar",$a);var Ba=d.createElement("template");Ba.innerHTML=`
|
|
354
|
+
<style>
|
|
355
|
+
:host {
|
|
356
|
+
display: inline-flex;
|
|
357
|
+
justify-content: center;
|
|
358
|
+
align-items: center;
|
|
359
|
+
box-sizing: border-box;
|
|
360
|
+
background: var(--media-control-background, rgba(20,20,30, 0.7));
|
|
361
|
+
|
|
362
|
+
padding: 10px;
|
|
363
|
+
|
|
364
|
+
font-size: 14px;
|
|
365
|
+
line-height: 24px;
|
|
366
|
+
font-family: Arial, sans-serif;
|
|
367
|
+
text-align: center;
|
|
368
|
+
color: #ffffff;
|
|
369
|
+
pointer-events: auto;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/*
|
|
373
|
+
Only show outline when keyboard focusing.
|
|
374
|
+
https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo
|
|
375
|
+
*/
|
|
376
|
+
:host(:focus-visible) {
|
|
377
|
+
box-shadow: inset 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
378
|
+
outline: 0;
|
|
379
|
+
}
|
|
380
|
+
/*
|
|
381
|
+
* hide default focus ring, particularly when using mouse
|
|
382
|
+
*/
|
|
383
|
+
:host(:where(:focus)) {
|
|
384
|
+
box-shadow: none;
|
|
385
|
+
outline: 0;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
#container {
|
|
389
|
+
/* NOTE: We don't currently have more generic sizing vars */
|
|
390
|
+
height: var(--media-text-content-height, auto);
|
|
391
|
+
}
|
|
392
|
+
</style>
|
|
393
|
+
<span id="container">
|
|
394
|
+
<slot></slot>
|
|
395
|
+
</span>
|
|
396
|
+
`;var Pt=class extends m.HTMLElement{static get observedAttributes(){return[o.MEDIA_CONTROLLER]}constructor(){super();this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ba.content.cloneNode(!0)),this.container=this.shadowRoot.querySelector("#container")}attributeChangedCallback(e,a,i){var s,n;if(e===o.MEDIA_CONTROLLER){if(a){let r=d.getElementById(a);(s=r==null?void 0:r.unassociateElement)==null||s.call(r,this)}if(i){let r=d.getElementById(i);(n=r==null?void 0:r.associateElement)==null||n.call(r,this)}}}connectedCallback(){var e;let a=this.getAttribute(o.MEDIA_CONTROLLER);if(a){let i=d.getElementById(a);(e=i==null?void 0:i.associateElement)==null||e.call(i,this)}}disconnectedCallback(){var e;if(this.getAttribute(o.MEDIA_CONTROLLER)){let a=d.getElementById(mediaControllerId);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}};u("media-text-display",Pt);var Ie=Pt;var ja=class extends Ie{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME]}attributeChangedCallback(e,a,i){e===o.MEDIA_CURRENT_TIME&&(this.container.innerHTML=X(i)),super.attributeChangedCallback(e,a,i)}};u("media-current-time-display",ja);var Ha=class extends Ie{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_DURATION]}attributeChangedCallback(e,a,i){e===o.MEDIA_DURATION&&(this.container.innerHTML=X(i)),super.attributeChangedCallback(e,a,i)}};u("media-duration-display",Ha);var Lo=" / ",ko=(t,{timesSep:e=Lo}={})=>{var a,i,s;let n=t.getAttribute("remaining")!=null,r=t.getAttribute("show-duration")!=null,l=(a=t.mediaCurrentTime)!=null?a:0,c=(s=(i=t.mediaDuration)!=null?i:t.mediaSeekableEnd)!=null?s:0,h=n?X(0-(c-l)):X(l);return r?`${h}${e}${X(c)}`:h},xo="video not loaded, unknown time.",Do=t=>{let e=t.mediaCurrentTime,a=t.mediaDuration||t.mediaSeekableEnd;if(e==null||a==null){t.setAttribute("aria-valuetext",xo);return}let i=t.hasAttribute("remaining"),s=t.hasAttribute("show-duration"),n=i?ne(0-(a-e)):ne(e);if(!s){t.setAttribute("aria-valuetext",n);return}let r=ne(a),l=`${n} of ${r}`;t.setAttribute("aria-valuetext",l)},Wa=class extends Ie{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,"remaining","show-duration"]}connectedCallback(){this.setAttribute("role","progressbar"),this.setAttribute("aria-label",x.PLAYBACK_TIME()),this.setAttribute("tabindex",0),super.connectedCallback()}attributeChangedCallback(e,a,i){if([o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,"remaining","show-duration"].includes(e)){let s=ko(this);Do(this),this.container.innerHTML=s}super.attributeChangedCallback(e,a,i)}get mediaDuration(){let e=this.getAttribute(o.MEDIA_DURATION);return e!=null?+e:void 0}get mediaCurrentTime(){let e=this.getAttribute(o.MEDIA_CURRENT_TIME);return e!=null?+e:void 0}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(e)return e.split(":").map(a=>+a)}get mediaSeekableEnd(){var e;let[,a]=(e=this.mediaSeekable)!=null?e:[];return a}get mediaSeekableStart(){var e;let[a]=(e=this.mediaSeekable)!=null?e:[];return a}};u("media-time-display",Wa);var wo=`
|
|
397
|
+
<svg
|
|
398
|
+
aria-hidden="true"
|
|
399
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
400
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
401
|
+
version="1.0"
|
|
402
|
+
viewbox="0 0 153 125.71389"
|
|
403
|
+
width="auto"
|
|
404
|
+
height="24">
|
|
405
|
+
<g
|
|
406
|
+
transform="scale(6.3080558,6.3080558)"
|
|
407
|
+
id="g12">
|
|
408
|
+
<path
|
|
409
|
+
class="icon"
|
|
410
|
+
d="M 21.9806,9.0135 C 21.9505,5.8358 21.8299,4.4502 21.077,3.4712 C 20.9415,3.2605 20.6854,3.14 20.4746,2.9895 C 19.7366,2.4472 16.2577,2.2515 12.2215,2.2515 C 8.1853,2.2515 4.54077,2.4472 3.81787,2.9895 C 3.59192,3.14 3.33581,3.2605 3.1853,3.4712 C 2.44726,4.4502 2.34192,5.8358 2.29675,9.0135 C 2.34192,12.1914 2.44726,13.5769 3.1853,14.5558 C 3.33581,14.7817 3.59192,14.8871 3.81787,15.0377 C 4.54077,15.595 8.1853,15.7757 12.2215,15.8058 C 16.2577,15.7757 19.7366,15.595 20.4746,15.0377 C 20.6854,14.8871 20.9415,14.7817 21.077,14.5558 C 21.8299,13.5769 21.9505,12.1914 21.9806,9.0135 z "
|
|
411
|
+
style="fill-rule:evenodd;stroke:none"
|
|
412
|
+
id="path16" />
|
|
413
|
+
<path
|
|
414
|
+
class="icon"
|
|
415
|
+
d="M 11.6896,8.1906 C 11.4853,5.704 10.1628,4.239 7.79723,4.239 C 5.63596,4.239 3.93706,6.1879 3.93706,9.31964 C 3.93706,12.4648 5.48544,14.4271 8.04452,14.4271 C 10.0875,14.4271 11.5176,12.9218 11.7434,10.4217 L 9.30256,10.4217 C 9.20579,11.3492 8.81871,12.0616 8.00151,12.0616 C 6.71121,12.0616 6.47467,10.7847 6.47467,9.42716 C 6.47467,7.5588 7.0123,6.6046 7.90474,6.6046 C 8.70045,6.6046 9.20579,7.1825 9.28106,8.1906 L 11.6896,8.1906 z "
|
|
416
|
+
style="fill:#000000;fill-rule:evenodd;stroke:none"
|
|
417
|
+
id="path20" />
|
|
418
|
+
<path
|
|
419
|
+
class="icon"
|
|
420
|
+
d="M 20.1199,8.1906 C 19.9156,5.704 18.5931,4.239 16.2275,4.239 C 14.0662,4.239 12.3674,6.1879 12.3674,9.31964 C 12.3674,12.4648 13.9157,14.4271 16.4748,14.4271 C 18.5178,14.4271 19.9479,12.9218 20.1736,10.4217 L 17.7328,10.4217 C 17.6361,11.3492 17.249,12.0616 16.4318,12.0616 C 15.1415,12.0616 14.9049,10.7847 14.9049,9.42716 C 14.9049,7.5588 15.4426,6.6046 16.335,6.6046 C 17.1307,6.6046 17.6361,7.1825 17.7113,8.1906 L 20.1199,8.1906 z "
|
|
421
|
+
style="fill:#000000;fill-rule:evenodd;stroke:none"
|
|
422
|
+
id="path22" />
|
|
423
|
+
<path class="icon" d="M 2,20 L 22,20" stroke-width="4" stroke="var(--media-icon-color, #eee)" id="path24"/>
|
|
424
|
+
</g>
|
|
425
|
+
</svg>
|
|
426
|
+
`,Ro=`
|
|
427
|
+
<svg
|
|
428
|
+
aria-hidden="true"
|
|
429
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
430
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
431
|
+
version="1.0"
|
|
432
|
+
viewbox="0 0 153 125.71389"
|
|
433
|
+
width="auto"
|
|
434
|
+
height="24">
|
|
435
|
+
<g
|
|
436
|
+
transform="scale(6.3080558,6.3080558)"
|
|
437
|
+
id="g12">
|
|
438
|
+
<path
|
|
439
|
+
class="icon"
|
|
440
|
+
d="M 21.9806,9.0135 C 21.9505,5.8358 21.8299,4.4502 21.077,3.4712 C 20.9415,3.2605 20.6854,3.14 20.4746,2.9895 C 19.7366,2.4472 16.2577,2.2515 12.2215,2.2515 C 8.1853,2.2515 4.54077,2.4472 3.81787,2.9895 C 3.59192,3.14 3.33581,3.2605 3.1853,3.4712 C 2.44726,4.4502 2.34192,5.8358 2.29675,9.0135 C 2.34192,12.1914 2.44726,13.5769 3.1853,14.5558 C 3.33581,14.7817 3.59192,14.8871 3.81787,15.0377 C 4.54077,15.595 8.1853,15.7757 12.2215,15.8058 C 16.2577,15.7757 19.7366,15.595 20.4746,15.0377 C 20.6854,14.8871 20.9415,14.7817 21.077,14.5558 C 21.8299,13.5769 21.9505,12.1914 21.9806,9.0135 z "
|
|
441
|
+
style="fill-rule:evenodd;stroke:none"
|
|
442
|
+
id="path16" />
|
|
443
|
+
<path
|
|
444
|
+
class="icon"
|
|
445
|
+
d="M 11.6896,8.1906 C 11.4853,5.704 10.1628,4.239 7.79723,4.239 C 5.63596,4.239 3.93706,6.1879 3.93706,9.31964 C 3.93706,12.4648 5.48544,14.4271 8.04452,14.4271 C 10.0875,14.4271 11.5176,12.9218 11.7434,10.4217 L 9.30256,10.4217 C 9.20579,11.3492 8.81871,12.0616 8.00151,12.0616 C 6.71121,12.0616 6.47467,10.7847 6.47467,9.42716 C 6.47467,7.5588 7.0123,6.6046 7.90474,6.6046 C 8.70045,6.6046 9.20579,7.1825 9.28106,8.1906 L 11.6896,8.1906 z "
|
|
446
|
+
style="fill:#000000;fill-rule:evenodd;stroke:none"
|
|
447
|
+
id="path20" />
|
|
448
|
+
<path
|
|
449
|
+
class="icon"
|
|
450
|
+
d="M 20.1199,8.1906 C 19.9156,5.704 18.5931,4.239 16.2275,4.239 C 14.0662,4.239 12.3674,6.1879 12.3674,9.31964 C 12.3674,12.4648 13.9157,14.4271 16.4748,14.4271 C 18.5178,14.4271 19.9479,12.9218 20.1736,10.4217 L 17.7328,10.4217 C 17.6361,11.3492 17.249,12.0616 16.4318,12.0616 C 15.1415,12.0616 14.9049,10.7847 14.9049,9.42716 C 14.9049,7.5588 15.4426,6.6046 16.335,6.6046 C 17.1307,6.6046 17.6361,7.1825 17.7113,8.1906 L 20.1199,8.1906 z "
|
|
451
|
+
style="fill:#000000;fill-rule:evenodd;stroke:none"
|
|
452
|
+
id="path22" />
|
|
453
|
+
</g>
|
|
454
|
+
</svg>
|
|
455
|
+
`,Fa=d.createElement("template");Fa.innerHTML=`
|
|
456
|
+
<style>
|
|
457
|
+
:host([aria-checked="true"]) slot:not([name=on]) > *,
|
|
458
|
+
:host([aria-checked="true"]) ::slotted(:not([slot=on])) {
|
|
459
|
+
display: none;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/* Double negative, but safer if display doesn't equal 'block' */
|
|
463
|
+
:host(:not([aria-checked="true"])) slot:not([name=off]) > *,
|
|
464
|
+
:host(:not([aria-checked="true"])) ::slotted(:not([slot=off])) {
|
|
465
|
+
display: none;
|
|
466
|
+
}
|
|
467
|
+
</style>
|
|
468
|
+
|
|
469
|
+
<slot name="on">${wo}</slot>
|
|
470
|
+
<slot name="off">${Ro}</slot>
|
|
471
|
+
`;var Ka=t=>{t.setAttribute("aria-checked",za(t))},za=t=>{let e=!!t.getAttribute(o.MEDIA_CAPTIONS_SHOWING),a=!t.hasAttribute("no-subtitles-fallback")&&!!t.getAttribute(o.MEDIA_SUBTITLES_SHOWING);return e||a},Ya=class extends M{static get observedAttributes(){return[...super.observedAttributes,"no-subtitles-fallback","default-showing",o.MEDIA_CAPTIONS_LIST,o.MEDIA_CAPTIONS_SHOWING,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:Fa,...e});this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",x.CLOSED_CAPTIONS()),Ka(this)}attributeChangedCallback(e,a,i){if([o.MEDIA_CAPTIONS_SHOWING,o.MEDIA_SUBTITLES_SHOWING].includes(e)&&Ka(this),this.hasAttribute("default-showing")&&this.getAttribute("aria-checked")!=="true"){let s=!this.hasAttribute("no-subtitles-fallback");if((s?[o.MEDIA_CAPTIONS_LIST,o.MEDIA_SUBTITLES_LIST]:[o.MEDIA_CAPTIONS_LIST]).includes(e)){let n=!!this.getAttribute(o.MEDIA_CAPTIONS_LIST)||!!(s&&this.getAttribute(o.MEDIA_SUBTITLES_LIST));this._captionsReady!==n&&(this._captionsReady=n,this._captionsReady&&this.handleClick())}}super.attributeChangedCallback(e,a,i)}handleClick(e){var a,i,s,n;if(za(this)){let r=this.getAttribute(o.MEDIA_CAPTIONS_SHOWING);if(r){let c=new m.CustomEvent(p.MEDIA_DISABLE_CAPTIONS_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(c)}let l=this.getAttribute(o.MEDIA_SUBTITLES_SHOWING);if(l&&!this.hasAttribute("no-subtitles-fallback")){let c=new m.CustomEvent(p.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:l});this.dispatchEvent(c)}}else{let[r]=(i=Je((a=this.getAttribute(o.MEDIA_CAPTIONS_LIST))!=null?a:""))!=null?i:[];if(r){let l=new m.CustomEvent(p.MEDIA_SHOW_CAPTIONS_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(l)}else if(this.hasAttribute("no-subtitles-fallback"))console.error("Attempting to enable closed captions but none are available! Please verify your media content if this is unexpected.");else{let[l]=(n=Je((s=this.getAttribute(o.MEDIA_SUBTITLES_LIST))!=null?s:""))!=null?n:[];if(l){let c=new m.CustomEvent(p.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:l});this.dispatchEvent(c)}}}}};u("media-captions-button",Ya);var Vt=30,Uo=`<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="-3 -3 24 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(7.4 17.6)">${Vt}</text><path d="M8.52,3V0l5.61,4-5.61,4V5A5.54,5.54,0,0,0,6.6,15.48V17.6A7.5,7.5,0,0,1,8.52,3Z"/></svg>`,Ga=d.createElement("template");Ga.innerHTML=`
|
|
472
|
+
<slot name="forward">${Uo}</slot>
|
|
473
|
+
`;var No=0,Qa=t=>{let e=Math.abs(+t.getAttribute("seek-offset")),a=y.SEEK_FORWARD_N_SECS({seekOffset:e});t.setAttribute("aria-label",a)},qa=t=>{let e=Ze(t,"forward"),a=t.getAttribute("seek-offset");qe(e,a)},Za=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,"seek-offset"]}constructor(e={}){super({slotTemplate:Ga,...e})}connectedCallback(){this.hasAttribute("seek-offset")||this.setAttribute("seek-offset",Vt),Qa(this),qa(this),super.connectedCallback()}attributeChangedCallback(e,a,i){e==="seek-offset"&&(i==null&&this.setAttribute("seek-offset",Vt),qa(this),Qa(this))}handleClick(){let e=this.getAttribute(o.MEDIA_CURRENT_TIME),a=+this.getAttribute("seek-offset"),i=(e&&!Number.isNaN(+e)?+e:No)+a,s=new m.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:i});this.dispatchEvent(s)}};u("media-seek-forward-button",Za);var Oo=`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
474
|
+
<path d="M0 0h24v24H0z" fill="none"/>
|
|
475
|
+
<path class="icon" d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/>
|
|
476
|
+
</svg>`,Po=`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
477
|
+
<path d="M0 0h24v24H0z" fill="none"/>
|
|
478
|
+
<path class="icon" d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/>
|
|
479
|
+
</svg>`,Xa=d.createElement("template");Xa.innerHTML=`
|
|
480
|
+
<style>
|
|
481
|
+
:host([${o.MEDIA_IS_FULLSCREEN}]) slot:not([name=exit]) > *,
|
|
482
|
+
:host([${o.MEDIA_IS_FULLSCREEN}]) ::slotted(:not([slot=exit])) {
|
|
483
|
+
display: none;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/* Double negative, but safer if display doesn't equal 'block' */
|
|
487
|
+
:host(:not([${o.MEDIA_IS_FULLSCREEN}])) slot:not([name=enter]) > *,
|
|
488
|
+
:host(:not([${o.MEDIA_IS_FULLSCREEN}])) ::slotted(:not([slot=enter])) {
|
|
489
|
+
display: none;
|
|
490
|
+
}
|
|
491
|
+
</style>
|
|
492
|
+
|
|
493
|
+
<slot name="enter">${Oo}</slot>
|
|
494
|
+
<slot name="exit">${Po}</slot>
|
|
495
|
+
`;var Ja=t=>{let e=t.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?y.EXIT_FULLSCREEN():y.ENTER_FULLSCREEN();t.setAttribute("aria-label",e)},ei=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_FULLSCREEN]}constructor(e={}){super({slotTemplate:Xa,...e})}connectedCallback(){Ja(this),super.connectedCallback()}attributeChangedCallback(e,a,i){e===o.MEDIA_IS_FULLSCREEN&&Ja(this),super.attributeChangedCallback(e,a,i)}handleClick(e){let a=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?p.MEDIA_EXIT_FULLSCREEN_REQUEST:p.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new m.CustomEvent(a,{composed:!0,bubbles:!0}))}};u("media-fullscreen-button",ei);var Vo='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path class="icon" d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"/><path d="M0 0h24v24H0z" fill="none"/></svg>',ti='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path class="icon" d="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>',$o='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path class="icon" d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/><path d="M0 0h24v24H0z" fill="none"/></svg>',ai=d.createElement("template");ai.innerHTML=`
|
|
496
|
+
<style>
|
|
497
|
+
/* Default to High slot/icon. */
|
|
498
|
+
:host(:not([${o.MEDIA_VOLUME_LEVEL}])) slot:not([name=high]) > *,
|
|
499
|
+
:host(:not([${o.MEDIA_VOLUME_LEVEL}])) ::slotted(:not([slot=high])),
|
|
500
|
+
:host([${o.MEDIA_VOLUME_LEVEL}=high]) slot:not([name=high]) > *,
|
|
501
|
+
:host([${o.MEDIA_VOLUME_LEVEL}=high]) ::slotted(:not([slot=high])) {
|
|
502
|
+
display: none;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
:host([${o.MEDIA_VOLUME_LEVEL}=off]) slot:not([name=off]) > *,
|
|
506
|
+
:host([${o.MEDIA_VOLUME_LEVEL}=off]) ::slotted(:not([slot=off])) {
|
|
507
|
+
display: none;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
:host([${o.MEDIA_VOLUME_LEVEL}=low]) slot:not([name=low]) > *,
|
|
511
|
+
:host([${o.MEDIA_VOLUME_LEVEL}=low]) ::slotted(:not([slot=low])) {
|
|
512
|
+
display: none;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
:host([${o.MEDIA_VOLUME_LEVEL}=medium]) slot:not([name=medium]) > *,
|
|
516
|
+
:host([${o.MEDIA_VOLUME_LEVEL}=medium]) ::slotted(:not([slot=medium])) {
|
|
517
|
+
display: none;
|
|
518
|
+
}
|
|
519
|
+
</style>
|
|
520
|
+
|
|
521
|
+
<slot name="off">${Vo}</slot>
|
|
522
|
+
<slot name="low">${ti}</slot>
|
|
523
|
+
<slot name="medium">${ti}</slot>
|
|
524
|
+
<slot name="high">${$o}</slot>
|
|
525
|
+
`;var ii=t=>{let e=t.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?y.UNMUTE():y.MUTE();t.setAttribute("aria-label",e)},si=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:ai,...e})}connectedCallback(){ii(this),super.connectedCallback()}attributeChangedCallback(e,a,i){e===o.MEDIA_VOLUME_LEVEL&&ii(this),super.attributeChangedCallback(e,a,i)}handleClick(e){let a=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?p.MEDIA_UNMUTE_REQUEST:p.MEDIA_MUTE_REQUEST;this.dispatchEvent(new m.CustomEvent(a,{composed:!0,bubbles:!0}))}};u("media-mute-button",si);var oi='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path class="icon" d="M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z"/><path d="M0 0h24v24H0z" fill="none"/></svg>',ni=d.createElement("template");ni.innerHTML=`
|
|
526
|
+
<style>
|
|
527
|
+
:host([${o.MEDIA_IS_PIP}]) slot:not([name=exit]) > *,
|
|
528
|
+
:host([${o.MEDIA_IS_PIP}]) ::slotted(:not([slot=exit])) {
|
|
529
|
+
display: none;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* Double negative, but safer if display doesn't equal 'block' */
|
|
533
|
+
:host(:not([${o.MEDIA_IS_PIP}])) slot:not([name=enter]) > *,
|
|
534
|
+
:host(:not([${o.MEDIA_IS_PIP}])) ::slotted(:not([slot=enter])) {
|
|
535
|
+
display: none;
|
|
536
|
+
}
|
|
537
|
+
</style>
|
|
538
|
+
|
|
539
|
+
<slot name="enter">${oi}</slot>
|
|
540
|
+
<slot name="exit">${oi}</slot>
|
|
541
|
+
`;var ri=t=>{let e=t.getAttribute(o.MEDIA_IS_PIP)!=null?y.EXIT_PIP():y.ENTER_PIP();t.setAttribute("aria-label",e)},li=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_PIP,o.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:ni,...e})}connectedCallback(){ri(this),super.connectedCallback()}attributeChangedCallback(e,a,i){e===o.MEDIA_IS_PIP&&ri(this),super.attributeChangedCallback(e,a,i)}handleClick(e){let a=this.getAttribute(o.MEDIA_IS_PIP)!=null?p.MEDIA_EXIT_PIP_REQUEST:p.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new m.CustomEvent(a,{composed:!0,bubbles:!0}))}};u("media-pip-button",li);var Bo='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path class="icon" d="M8 5v14l11-7z"/><path d="M0 0h24v24H0z" fill="none"/></svg>',jo='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path class="icon" d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/><path d="M0 0h24v24H0z" fill="none"/></svg>',di=d.createElement("template");di.innerHTML=`
|
|
542
|
+
<style>
|
|
543
|
+
:host([${o.MEDIA_PAUSED}]) slot[name=pause] > *,
|
|
544
|
+
:host([${o.MEDIA_PAUSED}]) ::slotted([slot=pause]) {
|
|
545
|
+
display: none;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
:host(:not([${o.MEDIA_PAUSED}])) slot[name=play] > *,
|
|
549
|
+
:host(:not([${o.MEDIA_PAUSED}])) ::slotted([slot=play]) {
|
|
550
|
+
display: none;
|
|
551
|
+
}
|
|
552
|
+
</style>
|
|
553
|
+
|
|
554
|
+
<slot name="play">${Bo}</slot>
|
|
555
|
+
<slot name="pause">${jo}</slot>
|
|
556
|
+
`;var mi=t=>{let e=t.getAttribute(o.MEDIA_PAUSED)!=null?y.PLAY():y.PAUSE();t.setAttribute("aria-label",e)},ci=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED]}constructor(e={}){super({slotTemplate:di,...e})}connectedCallback(){mi(this),super.connectedCallback()}attributeChangedCallback(e,a,i){e===o.MEDIA_PAUSED&&mi(this),super.attributeChangedCallback(e,a,i)}handleClick(e){let a=this.getAttribute(o.MEDIA_PAUSED)!=null?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new m.CustomEvent(a,{composed:!0,bubbles:!0}))}};u("media-play-button",ci);var ui=[1,1.25,1.5,1.75,2],at=1,hi=d.createElement("template");hi.innerHTML=`
|
|
557
|
+
<style>
|
|
558
|
+
:host {
|
|
559
|
+
font-size: 14px;
|
|
560
|
+
line-height: 24px;
|
|
561
|
+
font-weight: bold;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
#container {
|
|
565
|
+
height: var(--media-text-content-height, 24px);
|
|
566
|
+
}
|
|
567
|
+
</style>
|
|
568
|
+
|
|
569
|
+
<span id="container"></span>
|
|
570
|
+
`;var pi=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,"rates"]}constructor(e={}){super({slotTemplate:hi,...e});this._rates=ui,this.container=this.shadowRoot.querySelector("#container"),this.container.innerHTML=`${at}x`}attributeChangedCallback(e,a,i){if(e==="rates"){let s=(i!=null?i:"").trim().split(/\s*,?\s+/).map(n=>Number(n)).filter(n=>!Number.isNaN(n)).sort((n,r)=>n-r);this._rates=s.length?s:ui;return}if(e===o.MEDIA_PLAYBACK_RATE){let s=i?+i:Number.NaN,n=Number.isNaN(s)?at:s;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",x.PLAYBACK_RATE({playbackRate:n}));return}super.attributeChangedCallback(e,a,i)}handleClick(e){var a,i;let s=+this.getAttribute(o.MEDIA_PLAYBACK_RATE)||at,n=(i=(a=this._rates.find(l=>l>s))!=null?a:this._rates[0])!=null?i:at,r=new m.CustomEvent(p.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:n});this.dispatchEvent(r)}};u("media-playback-rate-button",pi);var Ei=d.createElement("template");Ei.innerHTML=`
|
|
571
|
+
<style>
|
|
572
|
+
:host {
|
|
573
|
+
pointer-events: none;
|
|
574
|
+
display: inline-block;
|
|
575
|
+
box-sizing: border-box;
|
|
576
|
+
|
|
577
|
+
width: auto;
|
|
578
|
+
height: auto;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
img {
|
|
582
|
+
max-width: 100%;
|
|
583
|
+
max-height: 100%;
|
|
584
|
+
min-width: 100%;
|
|
585
|
+
min-height: 100%;
|
|
586
|
+
background-size: cover;
|
|
587
|
+
background-repeat: no-repeat;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
:host([${o.MEDIA_HAS_PLAYED}]) img {
|
|
591
|
+
display: none;
|
|
592
|
+
}
|
|
593
|
+
</style>
|
|
594
|
+
|
|
595
|
+
<img aria-hidden="true" id="image"/>
|
|
596
|
+
`;var Ho=(t,e)=>{t.style["background-image"]=`url('${e}')`},bi=class extends m.HTMLElement{static get observedAttributes(){return[o.MEDIA_HAS_PLAYED,"placeholder-src","src"]}constructor(){super();this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ei.content.cloneNode(!0)),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,a,i){e==="src"&&this.image.setAttribute("src",i),e==="placeholder-src"&&Ho(this.image,i)}};u("media-poster-image",bi);var Wo="video not loaded, unknown time.",$t=t=>{let e=t.range,a=ne(+e.value),i=ne(+e.max),s=a&&i?`${a} of ${i}`:Wo;e.setAttribute("aria-valuetext",s)},gi=d.createElement("template");gi.innerHTML=`
|
|
597
|
+
<style>
|
|
598
|
+
#thumbnailContainer {
|
|
599
|
+
position: absolute;
|
|
600
|
+
left: 0;
|
|
601
|
+
top: 0;
|
|
602
|
+
transition: visibility .25s, opacity .25s;
|
|
603
|
+
visibility: hidden;
|
|
604
|
+
opacity: 0;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
media-thumbnail-preview {
|
|
608
|
+
--thumb-preview-min-width: var(--media-thumbnail-preview-min-width, 120px);
|
|
609
|
+
--thumb-preview-max-width: var(--media-thumbnail-preview-max-width, 180px);
|
|
610
|
+
--thumb-preview-min-height: var(--media-thumbnail-preview-min-height, 80px);
|
|
611
|
+
--thumb-preview-max-height: var(--media-thumbnail-preview-max-height, 160px);
|
|
612
|
+
--thumb-preview-border: 2px solid #fff;
|
|
613
|
+
transform-origin: 50% 100%;
|
|
614
|
+
position: absolute;
|
|
615
|
+
bottom: calc(100% + 5px);
|
|
616
|
+
border: var(--media-thumbnail-preview-border, var(--thumb-preview-border, 2px solid #fff));
|
|
617
|
+
border-radius: var(--media-thumbnail-preview-border-radius, 2px);
|
|
618
|
+
background-color: #000;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/*
|
|
622
|
+
This is a downward triangle. Commented out for now because it would also
|
|
623
|
+
require scaling the px properties below in JS; bottom and border-width.
|
|
624
|
+
*/
|
|
625
|
+
/* media-thumbnail-preview::after {
|
|
626
|
+
content: "";
|
|
627
|
+
display: block;
|
|
628
|
+
width: 0;
|
|
629
|
+
height: 0;
|
|
630
|
+
position: absolute;
|
|
631
|
+
left: 50%;
|
|
632
|
+
transform: translateX(-50%);
|
|
633
|
+
bottom: -10px;
|
|
634
|
+
border-left: 10px solid transparent;
|
|
635
|
+
border-right: 10px solid transparent;
|
|
636
|
+
border-top: 10px solid #fff;
|
|
637
|
+
} */
|
|
638
|
+
|
|
639
|
+
:host([${o.MEDIA_PREVIEW_IMAGE}]:hover) #thumbnailContainer {
|
|
640
|
+
transition: visibility .5s, opacity .5s;
|
|
641
|
+
visibility: visible;
|
|
642
|
+
opacity: 1;
|
|
643
|
+
}
|
|
644
|
+
</style>
|
|
645
|
+
<div id="thumbnailContainer">
|
|
646
|
+
<media-thumbnail-preview></media-thumbnail-preview>
|
|
647
|
+
</div>
|
|
648
|
+
`;var Bt=class extends Ue{static get observedAttributes(){return[...super.observedAttributes,"thumbnails",o.MEDIA_DURATION,o.MEDIA_SEEKABLE,o.MEDIA_CURRENT_TIME,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_BUFFERED]}constructor(){super();this.shadowRoot.appendChild(gi.content.cloneNode(!0)),this.range.addEventListener("input",()=>{let e=this.range.value,a=new m.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(a)}),this.enableThumbnails()}connectedCallback(){this.range.setAttribute("aria-label",x.SEEK()),super.connectedCallback()}attributeChangedCallback(e,a,i){var s,n,r,l,c;e===o.MEDIA_CURRENT_TIME&&(this.range.value=this.mediaCurrentTime,$t(this),this.updateBar()),e===o.MEDIA_DURATION&&(this.range.max=Math.floor((n=(s=this.mediaSeekableEnd)!=null?s:this.mediaDuration)!=null?n:1e3),$t(this),this.updateBar()),e===o.MEDIA_SEEKABLE&&(this.range.min=(r=this.mediaSeekableStart)!=null?r:0,this.range.max=Math.floor((c=(l=this.mediaSeekableEnd)!=null?l:this.mediaDuration)!=null?c:1e3),$t(this),this.updateBar()),e===o.MEDIA_BUFFERED&&this.updateBar(),super.attributeChangedCallback(e,a,i)}get mediaDuration(){let e=this.getAttribute(o.MEDIA_DURATION);return e!=null?+e:void 0}get mediaCurrentTime(){let e=this.getAttribute(o.MEDIA_CURRENT_TIME);return e!=null?+e:void 0}get mediaBuffered(){let e=this.getAttribute(o.MEDIA_BUFFERED);return e?e.split(" ").map(a=>a.split(":").map(i=>+i)):[]}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(e)return e.split(":").map(a=>+a)}get mediaSeekableEnd(){var e;let[,a]=(e=this.mediaSeekable)!=null?e:[];return a}get mediaSeekableStart(){var e;let[a]=(e=this.mediaSeekable)!=null?e:[];return a}getBarColors(){var e;let a=super.getBarColors(),{range:i}=this,s=this.mediaCurrentTime,n=i.max-i.min,r=this.mediaBuffered;if(!r.length||!Number.isFinite(n)||n<=0)return a;let[,l=i.min]=(e=r.find(([h,E])=>h<=s&&s<=E))!=null?e:[],c=(l-i.min)/n*100;return a.splice(1,0,["var(--media-time-buffered-color, #777)",c]),a}enableThumbnails(){this.thumbnailPreview=this.shadowRoot.querySelector("media-thumbnail-preview"),this.shadowRoot.querySelector("#thumbnailContainer").classList.add("enabled");let e,a=()=>{e=r=>{let l=+this.getAttribute(o.MEDIA_DURATION);if(!l)return;let c=this.range.getBoundingClientRect(),h=(r.clientX-c.left)/c.width;h=Math.max(0,Math.min(1,h));let E=c.left-this.getBoundingClientRect().left+h*c.width,T=getComputedStyle(this.thumbnailPreview),S=parseInt(T.getPropertyValue("--thumb-preview-min-width")),w=parseInt(T.getPropertyValue("--thumb-preview-max-width")),U=parseInt(T.getPropertyValue("--thumb-preview-min-height")),A=parseInt(T.getPropertyValue("--thumb-preview-max-height")),{clientWidth:O,clientHeight:Q}=this.thumbnailPreview,q=Math.min(w/O,A/Q),Le=Math.max(S/O,U/Q),ze=E-O/2,fe=q<1?q:Le>1?Le:1;this.thumbnailPreview.style.transform=`translateX(${ze}px) scale(${fe})`;let ie=parseInt(T.getPropertyValue("--media-thumbnail-preview-border"));Number.isNaN(ie)&&(ie=parseInt(T.getPropertyValue("--thumb-preview-border"))),this.thumbnailPreview.style.borderWidth=`${Math.round(ie/fe)}px`,this.thumbnailPreview.style.borderRadius=`${Math.round(ie/fe)}px`;let Ye=h*l,Ge=new m.CustomEvent(p.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:Ye});this.dispatchEvent(Ge)},m.addEventListener("pointermove",e,!1)},i=()=>{m.removeEventListener("pointermove",e);let r=new m.CustomEvent(p.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:null});this.dispatchEvent(r)},s=!1,n=r=>{let l=this.getAttribute(o.MEDIA_DURATION);if(!s&&l){s=!0,a();let c=h=>{h.composedPath().includes(this)||(m.removeEventListener("pointermove",c),s=!1,i())};m.addEventListener("pointermove",c,!1)}};this.addEventListener("pointermove",n,!1)}};u("media-time-range",Bt);var jt=Bt;var fi=class extends jt{constructor(){super();console.warn("MediaChrome: <media-progress-range> is deprecated. Use <media-time-range> instead.")}};u("media-progress-range",fi);var Ht=30,Fo=`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 24 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(1.68 17.6)">${Ht}</text><path d="M9.48,3V0L3.87,4l5.61,4V5a5.54,5.54,0,0,1,1.92,10.5V17.6A7.5,7.5,0,0,0,9.48,3Z"/></svg>`,vi=d.createElement("template");vi.innerHTML=`
|
|
649
|
+
<slot name="backward">${Fo}</slot>
|
|
650
|
+
`;var Ko=0,Ai=t=>{let e=Math.abs(+t.getAttribute("seek-offset")),a=y.SEEK_BACK_N_SECS({seekOffset:e});t.setAttribute("aria-label",a)},Ii=t=>{let e=Ze(t,"backward"),a=t.getAttribute("seek-offset");qe(e,a)},Ti=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME]}constructor(e={}){super({slotTemplate:vi,...e})}connectedCallback(){this.hasAttribute("seek-offset")||this.setAttribute("seek-offset",Ht),Ai(this),Ii(this),super.connectedCallback()}attributeChangedCallback(e,a,i){e==="seek-offset"&&(i==null&&this.setAttribute("seek-offset",Ht),Ii(this),Ai(this))}handleClick(){let e=this.getAttribute(o.MEDIA_CURRENT_TIME),a=+this.getAttribute("seek-offset"),i=e&&!Number.isNaN(+e)?+e:Ko,s=Math.max(i-a,0),n=new m.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:s});this.dispatchEvent(n)}};u("media-seek-backward-button",Ti);var yi=d.createElement("template");yi.innerHTML=`
|
|
651
|
+
<style>
|
|
652
|
+
:host {
|
|
653
|
+
background-color: #000;
|
|
654
|
+
height: auto;
|
|
655
|
+
width: auto;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
img {
|
|
659
|
+
display: block;
|
|
660
|
+
object-fit: none;
|
|
661
|
+
}
|
|
662
|
+
</style>
|
|
663
|
+
<img crossorigin loading="eager" decoding="async" />
|
|
664
|
+
`;var _i=class extends m.HTMLElement{static get observedAttributes(){return[o.MEDIA_CONTROLLER,"time",o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS]}constructor(){super();this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(yi.content.cloneNode(!0))}connectedCallback(){var e;let a=this.getAttribute(o.MEDIA_CONTROLLER);if(a){let i=d.getElementById(a);(e=i==null?void 0:i.associateElement)==null||e.call(i,this)}}disconnectedCallback(){var e;if(this.getAttribute(o.MEDIA_CONTROLLER)){let a=d.getElementById(mediaControllerId);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}attributeChangedCallback(e,a,i){var s,n;if(["time",o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===o.MEDIA_CONTROLLER){if(a){let r=d.getElementById(a);(s=r==null?void 0:r.unassociateElement)==null||s.call(r,this)}if(i){let r=d.getElementById(i);(n=r==null?void 0:r.associateElement)==null||n.call(r,this)}}}update(){let e=this.getAttribute(o.MEDIA_PREVIEW_COORDS),a=this.getAttribute(o.MEDIA_PREVIEW_IMAGE);if(!(e&&a))return;let i=this.shadowRoot.querySelector("img"),[s,n,r,l]=e.split(/\s+/).map(E=>+E),c=a,h=()=>{i.style.height=`${l}px`,i.style["aspect-ratio"]=`${r} / ${l}`};i.src!==c&&(i.onload=h,i.src=c,h()),h(),i.style["object-position"]=`-${s}px -${n}px`}};u("media-thumbnail-preview",_i);var Mi=d.createElement("template"),zo=`
|
|
665
|
+
<svg aria-hidden="true" viewBox="0 0 100 100">
|
|
666
|
+
<path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
|
|
667
|
+
<animateTransform
|
|
668
|
+
attributeName="transform"
|
|
669
|
+
attributeType="XML"
|
|
670
|
+
type="rotate"
|
|
671
|
+
dur="1s"
|
|
672
|
+
from="0 50 50"
|
|
673
|
+
to="360 50 50"
|
|
674
|
+
repeatCount="indefinite" />
|
|
675
|
+
</path>
|
|
676
|
+
</svg>
|
|
677
|
+
`;Mi.innerHTML=`
|
|
678
|
+
<style>
|
|
679
|
+
:host {
|
|
680
|
+
display: inline-block;
|
|
681
|
+
vertical-align: middle;
|
|
682
|
+
box-sizing: border-box;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
#status {
|
|
686
|
+
color: rgba(0,0,0,0);
|
|
687
|
+
width: 0px;
|
|
688
|
+
height: 0px;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
:host slot[name=loading] > *,
|
|
692
|
+
:host ::slotted([slot=loading]) {
|
|
693
|
+
opacity: 1;
|
|
694
|
+
transition: opacity 0.15s;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
:host(:not([is-loading])) slot[name=loading] > *,
|
|
698
|
+
:host(:not([is-loading])) ::slotted([slot=loading]) {
|
|
699
|
+
opacity: 0;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
:host(:not([is-loading])) #status {
|
|
703
|
+
display: none;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
707
|
+
width: var(--media-loading-icon-width, 100px);
|
|
708
|
+
height: var(--media-loading-icon-height);
|
|
709
|
+
fill: var(--media-icon-color, #fff);
|
|
710
|
+
vertical-align: middle;
|
|
711
|
+
}
|
|
712
|
+
</style>
|
|
713
|
+
|
|
714
|
+
<slot name="loading">${zo}</slot>
|
|
715
|
+
<div id="status" role="status" aria-live="polite">${x.MEDIA_LOADING()}</div>
|
|
716
|
+
`;var Yo=500,Si=class extends m.HTMLElement{static get observedAttributes(){return[o.MEDIA_CONTROLLER,o.MEDIA_PAUSED,o.MEDIA_LOADING,"loading-delay"]}constructor(){super();let e=this.attachShadow({mode:"open"}),a=Mi.content.cloneNode(!0);e.appendChild(a)}attributeChangedCallback(e,a,i){var s,n,r;if(e===o.MEDIA_LOADING||e===o.MEDIA_PAUSED){let l=this.getAttribute(o.MEDIA_PAUSED)!=null,c=this.getAttribute(o.MEDIA_LOADING)!=null,h=!l&&c;if(!h)this.loadingDelayHandle&&(clearTimeout(this.loadingDelayHandle),this.loadingDelayHandle=void 0),this.removeAttribute("is-loading");else if(!this.loadingDelayHandle&&h){let E=+((s=this.getAttribute("loading-delay"))!=null?s:Yo);this.loadingDelayHandle=setTimeout(()=>{this.setAttribute("is-loading",""),this.loadingDelayHandle=void 0},E)}}else if(e===o.MEDIA_CONTROLLER){if(a){let l=d.getElementById(a);(n=l==null?void 0:l.unassociateElement)==null||n.call(l,this)}if(i){let l=d.getElementById(i);(r=l==null?void 0:l.associateElement)==null||r.call(l,this)}}}connectedCallback(){var e;let a=this.getAttribute(o.MEDIA_CONTROLLER);if(a){let i=d.getElementById(a);(e=i==null?void 0:i.associateElement)==null||e.call(i,this)}}disconnectedCallback(){var e;if(this.loadingDelayHandle&&(clearTimeout(this.loadingDelayHandle),this.loadingDelayHandle=void 0),this.getAttribute(o.MEDIA_CONTROLLER)){let a=d.getElementById(mediaControllerId);(e=a==null?void 0:a.unassociateElement)==null||e.call(a,this)}}};u("media-loading-indicator",Si);var Ci=d.createElement("template");Ci.innerHTML=`
|
|
717
|
+
<style>
|
|
718
|
+
:host {
|
|
719
|
+
|
|
720
|
+
}
|
|
721
|
+
</style>
|
|
722
|
+
|
|
723
|
+
<slot></slot>
|
|
724
|
+
`;var Li=class extends m.HTMLElement{constructor(){super();this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ci.content.cloneNode(!0))}};u("media-title-bar",Li);var Go=100,Qo=t=>{var e;if(t.getAttribute(o.MEDIA_MUTED)!=null)return 0;let a=+((e=t.getAttribute(o.MEDIA_VOLUME))!=null?e:1);return Math.round(a*t.range.max)},qo=({value:t,max:e})=>`${Math.round(t/e*100)}%`,ki=class extends Ue{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super();this.range.max=Go,this.range.addEventListener("input",()=>{let e=this.range.value/this.range.max,a=new m.CustomEvent(p.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(a)})}connectedCallback(){this.range.setAttribute("aria-label",x.VOLUME()),super.connectedCallback()}attributeChangedCallback(e,a,i){if(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED){let s=Qo(this);this.range.value=s,this.range.setAttribute("aria-valuetext",qo(this.range)),this.updateBar()}super.attributeChangedCallback(e,a,i)}};u("media-volume-range",ki);var Zo=Object.defineProperty,Xo=(t,e,a)=>e in t?Zo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,Jo=(t,e,a)=>(Xo(t,typeof e!="symbol"?e+"":e,a),a),Wt=class extends m.HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){this.render()}render(){this.shadowRoot.textContent="";let e=d.createElement("template");e.innerHTML=this.constructor.template,this.shadowRoot.append(e.content.cloneNode(!0))}get mediaController(){return this.shadowRoot.querySelector("media-controller")}};Jo(Wt,"template",""),u("media-theme",Wt);var xi=class extends Re{};m.customElements.get("media-chrome")||m.customElements.define("media-chrome",xi);var Di=class extends Re{constructor(){super();console.warn("MediaChrome: <media-container> is deprecated. Use <media-controller>.")}};m.customElements.get("media-container")||m.customElements.define("media-container",Di);var it=new Map;function st(t){if(it.has(t))return it.get(t);let e=t.length,a=0,i=0,s=0,n=[];for(let r=0;r<e;r+=1){let l=t[r],c=t[r+1],h=t[r-1];l==="{"&&c==="{"&&h!=="\\"?(s+=1,s===1&&(i=r),r+=1):l==="}"&&c==="}"&&h!=="\\"&&s&&(s-=1,s===0&&(i>a&&(n.push(Object.freeze({type:"string",start:a,end:i,value:t.slice(a,i)})),a=i),n.push(Object.freeze({type:"part",start:i,end:r+2,value:t.slice(a+2,r).trim()})),r+=1,a=r+1))}return a<e&&n.push(Object.freeze({type:"string",start:a,end:e,value:t.slice(a,e)})),it.set(t,Object.freeze(n)),it.get(t)}var le=new WeakMap,wi=new WeakMap,B=class{constructor(e,a){this.expression=a,le.set(this,e),e.updateParent("")}get attributeName(){return le.get(this).attr.name}get attributeNamespace(){return le.get(this).attr.namespaceURI}get value(){return wi.get(this)}set value(e){wi.set(this,e||""),le.get(this).updateParent(e)}get element(){return le.get(this).element}get booleanValue(){return le.get(this).booleanValue}set booleanValue(e){le.get(this).booleanValue=e}},ot=class{constructor(e,a){this.element=e,this.attr=a,this.partList=[]}get booleanValue(){return this.element.hasAttributeNS(this.attr.namespaceURI,this.attr.name)}set booleanValue(e){if(this.partList.length!==1)throw new DOMException("Operation not supported","NotSupportedError");this.partList[0].value=e?"":null}append(e){this.partList.push(e)}updateParent(e){if(this.partList.length===1&&e===null)this.element.removeAttributeNS(this.attr.namespaceURI,this.attr.name);else{let a=this.partList.map(i=>typeof i=="string"?i:i.value).join("");this.element.setAttributeNS(this.attr.namespaceURI,this.attr.name,a)}}};var J=new WeakMap,Y=class{constructor(e,a){this.expression=a,J.set(this,[e]),e.textContent=""}get value(){return J.get(this).map(e=>e.textContent).join("")}set value(e){this.replace(e)}get previousSibling(){return J.get(this)[0].previousSibling}get nextSibling(){return J.get(this)[J.get(this).length-1].nextSibling}replace(...e){let a=e.map(i=>typeof i=="string"?new Text(i):i);a.length||a.push(new Text("")),J.get(this)[0].before(...a);for(let i of J.get(this))i.remove();J.set(this,a)}};function Ne(t){return{processCallback(e,a,i){var s;if(!(typeof i!="object"||!i)){for(let n of a)if(n.expression in i){let r=(s=i[n.expression])!==null&&s!==void 0?s:"";t(n,r)}}}}}function Ft(t,e){t.value=String(e)}function Ri(t,e){return typeof e=="boolean"&&t instanceof B&&typeof t.element[t.attributeName]=="boolean"?(t.booleanValue=e,!0):!1}var Kt=Ne(Ft),en=Ne((t,e)=>{Ri(t,e)||Ft(t,e)});function*tn(t){let e=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null,!1),a;for(;a=e.nextNode();)if(a instanceof Element&&a.hasAttributes())for(let i=0;i<a.attributes.length;i+=1){let s=a.attributes.item(i);if(s&&s.value.includes("{{")){let n=new ot(a,s);for(let r of st(s.value))if(r.type==="string")n.append(r.value);else{let l=new B(n,r.value);n.append(l),yield l}}}else if(a instanceof Text&&a.textContent&&a.textContent.includes("{{")){let i=st(a.textContent);for(let s=0;s<i.length;s+=1){let n=i[s];n.end<a.textContent.length&&a.splitText(n.end),n.type==="part"&&(yield new Y(a,n.value));break}}}var nt=new WeakMap,rt=new WeakMap,ee=class extends DocumentFragment{constructor(e,a,i=Kt){var s,n;super();Object.getPrototypeOf(this)!==ee.prototype&&Object.setPrototypeOf(this,ee.prototype),this.appendChild(e.content.cloneNode(!0)),rt.set(this,Array.from(tn(this))),nt.set(this,i),(n=(s=nt.get(this)).createCallback)===null||n===void 0||n.call(s,this,rt.get(this),a),nt.get(this).processCallback(this,rt.get(this),a)}update(e){nt.get(this).processCallback(this,rt.get(this),e)}};var Oe=new WeakMap,lt=class{constructor(e,a){this.element=e;this.type=a;this.element.addEventListener(this.type,this);let i=Oe.get(this.element);i&&i.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let a=Oe.get(this.element);a&&a.delete(this.type)}}static for(e){Oe.has(e.element)||Oe.set(e.element,new Map);let a=e.attributeName.slice(2),i=Oe.get(e.element);return i&&i.has(a)?i.get(a):new lt(e.element,a)}};function an(t,e){return t instanceof B&&t.attributeName.startsWith("on")?(lt.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function sn(t,e){return e instanceof Yt&&t instanceof Y?(e.renderInto(t),!0):!1}function on(t,e){return e instanceof DocumentFragment&&t instanceof Y?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function nn(t,e){if(t instanceof B){let a=t.attributeNamespace,i=t.element.getAttributeNS(a,t.attributeName);return String(e)!==i&&(t.value=String(e)),!0}return t.value=String(e),!0}function rn(t,e){if(typeof e=="boolean"&&t instanceof B){let a=t.attributeNamespace,i=t.element.hasAttributeNS(a,t.attributeName);return e!==i&&(t.booleanValue=e),!0}return!1}function ln(t,e){return e===!1&&t instanceof Y?(t.replace(""),!0):!1}function dn(t,e){rn(t,e)||an(t,e)||ln(t,e)||sn(t,e)||on(t,e)||nn(t,e)}var zt=new WeakMap,Ui=new WeakMap,Ni=new WeakMap,Yt=class{constructor(e,a,i){this.strings=e;this.values=a;this.processor=i}get template(){if(zt.has(this.strings))return zt.get(this.strings);{let e=document.createElement("template"),a=this.strings.length-1;return e.innerHTML=this.strings.reduce((i,s,n)=>i+s+(n<a?`{{ ${n} }}`:""),""),zt.set(this.strings,e),e}}renderInto(e){let a=this.template;if(Ui.get(e)!==a){Ui.set(e,a);let s=new ee(a,this.values,this.processor);Ni.set(e,s),e instanceof Y?e.replace(...s.children):e.appendChild(s);return}let i=Ni.get(e);i&&i.update(this.values)}},mn=Ne(dn);function b(t,...e){return new Yt(t,e,mn)}function Pe(t,e){t.renderInto(e)}function D(t,e){let a=document.createElement("template");return a.innerHTML=t,new ee(a,e)}var Oi=`
|
|
725
|
+
:host {
|
|
726
|
+
cursor: pointer;
|
|
727
|
+
}
|
|
728
|
+
media-time-display {
|
|
729
|
+
color: inherit;
|
|
730
|
+
}
|
|
731
|
+
`,Pi=document.createElement("template");Pi.innerHTML=`
|
|
732
|
+
<style>
|
|
733
|
+
${Oi}
|
|
734
|
+
</style>
|
|
735
|
+
<media-time-display show-duration></media-time-display>
|
|
736
|
+
`;var Vi=["Enter"," "],Ve=class extends HTMLElement{constructor(){super();var e,a;this.attachShadow({mode:"open"}),(e=this.shadowRoot)==null||e.appendChild(this.constructor.template.content.cloneNode(!0)),this.timeDisplayEl=(a=this.shadowRoot)==null?void 0:a.querySelector("media-time-display")}toggleTimeDisplay(){var e,a,i;((e=this.timeDisplayEl)==null?void 0:e.hasAttribute("remaining"))?(a=this.timeDisplayEl)==null||a.removeAttribute("remaining"):(i=this.timeDisplayEl)==null||i.setAttribute("remaining","")}connectedCallback(){let e=a=>{let{key:i}=a;if(!Vi.includes(i)){this.removeEventListener("keyup",e);return}this.toggleTimeDisplay()};this.addEventListener("keydown",a=>{let{metaKey:i,altKey:s,key:n}=a;if(i||s||!Vi.includes(n)){this.removeEventListener("keyup",e);return}this.addEventListener("keyup",e)}),this.addEventListener("click",this.toggleTimeDisplay)}};Ve.styles=Oi,Ve.template=Pi;globalThis.customElements.get("mxp-time-display")||(globalThis.customElements.define("mxp-time-display",Ve),globalThis.MxpTimeDisplay=Ve);var $i=`:host(:not([audio])) {
|
|
737
|
+
--secondary-color: transparent;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
:host {
|
|
741
|
+
color: var(--primary-color);
|
|
742
|
+
--media-icon-color: var(--primary-color);
|
|
743
|
+
--media-range-thumb-background: var(--primary-color);
|
|
744
|
+
--media-range-bar-color: var(--primary-color);
|
|
745
|
+
--media-control-background: var(--secondary-color);
|
|
746
|
+
--media-control-hover-background: var(--secondary-color);
|
|
747
|
+
--media-time-buffered-color: rgba(255, 255, 255, 0.7);
|
|
748
|
+
--media-range-track-background: rgba(255, 255, 255, 0.5);
|
|
749
|
+
--media-range-track-border-radius: 3px;
|
|
750
|
+
display: inline-block;
|
|
751
|
+
width: 100%;
|
|
752
|
+
height: 100%;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
:host([audio]) ::slotted([slot='media']) {
|
|
756
|
+
height: 0px;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
:host([audio]) media-controller {
|
|
760
|
+
background: transparent;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
:host([audio]) media-controller::part(vertical-layer) {
|
|
764
|
+
background: transparent;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
:host([audio]) media-control-bar {
|
|
768
|
+
width: 100%;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
media-airplay-button[media-airplay-unavailable],
|
|
772
|
+
media-cast-button[media-cast-unavailable],
|
|
773
|
+
media-volume-range[media-volume-unavailable],
|
|
774
|
+
media-airplay-button[media-airplay-unavailable] {
|
|
775
|
+
display: none;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
media-volume-range[media-volume-unavailable] {
|
|
779
|
+
display: none;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
media-pip-button[media-pip-unavailable] {
|
|
783
|
+
display: none;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
media-controller {
|
|
787
|
+
width: 100%;
|
|
788
|
+
height: 100%;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
:host(:not([audio])) media-time-range {
|
|
792
|
+
padding: var(--mux-time-range-padding, 0 10px);
|
|
793
|
+
z-index: 10;
|
|
794
|
+
width: 100%;
|
|
795
|
+
height: 22px;
|
|
796
|
+
--media-range-track-translate-y: 6px;
|
|
797
|
+
background: linear-gradient(180deg, transparent, transparent 15px, var(--media-control-background) 15px);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
media-control-bar {
|
|
801
|
+
--media-button-icon-width: 18px;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
media-control-bar :is([role='button'], [role='switch'], button) {
|
|
805
|
+
height: 44px;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
media-cast-button {
|
|
809
|
+
width: 40px;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
.size-extra-small media-control-bar [role='button'],
|
|
813
|
+
.size-extra-small media-control-bar [role='switch'] {
|
|
814
|
+
height: auto;
|
|
815
|
+
padding: 4.4% 3.2%;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.mxp-spacer {
|
|
819
|
+
flex-grow: 1;
|
|
820
|
+
height: 100%;
|
|
821
|
+
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
/* Add a small space on the right to have the play button and
|
|
825
|
+
* fullscreen button aligned in relation to the progress bar. */
|
|
826
|
+
.size-large .mxp-padding-2 {
|
|
827
|
+
width: 2px;
|
|
828
|
+
height: 100%;
|
|
829
|
+
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
media-controller::part(vertical-layer) {
|
|
833
|
+
transition: background-color 1s;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
media-controller:is([media-paused], :not([user-inactive]))::part(vertical-layer) {
|
|
837
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
838
|
+
transition: background-color 0.25s;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.mxp-center-controls {
|
|
842
|
+
--media-button-icon-width: 100%;
|
|
843
|
+
--media-button-icon-height: auto;
|
|
844
|
+
pointer-events: none;
|
|
845
|
+
width: 100%;
|
|
846
|
+
display: flex;
|
|
847
|
+
flex-flow: row;
|
|
848
|
+
align-items: center;
|
|
849
|
+
justify-content: center;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.mxp-center-controls media-play-button {
|
|
853
|
+
--media-control-background: transparent;
|
|
854
|
+
--media-control-hover-background: transparent;
|
|
855
|
+
padding: 0;
|
|
856
|
+
width: max(27px, min(9%, 90px));
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.mxp-center-controls media-seek-backward-button,
|
|
860
|
+
.mxp-center-controls media-seek-forward-button {
|
|
861
|
+
--media-control-background: transparent;
|
|
862
|
+
--media-control-hover-background: transparent;
|
|
863
|
+
padding: 0;
|
|
864
|
+
margin: 0 10%;
|
|
865
|
+
width: min(7%, 70px);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
media-loading-indicator {
|
|
869
|
+
--media-loading-icon-width: 100%;
|
|
870
|
+
--media-button-icon-height: auto;
|
|
871
|
+
pointer-events: none;
|
|
872
|
+
position: absolute;
|
|
873
|
+
width: min(15%, 150px);
|
|
874
|
+
display: flex;
|
|
875
|
+
flex-flow: row;
|
|
876
|
+
align-items: center;
|
|
877
|
+
justify-content: center;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/* Intentionally don't target the div for transition but the children
|
|
881
|
+
of the div. Prevents messing with media-chrome's autohide feature. */
|
|
882
|
+
media-loading-indicator + div * {
|
|
883
|
+
transition: opacity 0.15s;
|
|
884
|
+
opacity: 1;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
media-loading-indicator[media-loading]:not([media-paused]) ~ div > * {
|
|
888
|
+
opacity: 0;
|
|
889
|
+
transition-delay: 400ms;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
media-volume-range {
|
|
893
|
+
width: min(100%, 100px);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
media-time-display {
|
|
897
|
+
white-space: nowrap;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
:is(media-time-display, media-text-display, media-playback-rate-button) {
|
|
901
|
+
color: inherit;
|
|
902
|
+
}
|
|
903
|
+
`;var Bi=`<svg aria-hidden="true" viewBox="0 0 20 18" slot="airplay">
|
|
904
|
+
<path
|
|
905
|
+
d="M10.19 11.22a.25.25 0 0 0-.38 0l-5.46 6.37a.25.25 0 0 0 .19.41h10.92a.25.25 0 0 0 .19-.41Z"
|
|
906
|
+
/>
|
|
907
|
+
<path
|
|
908
|
+
d="M19 0H1a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h2.94L5 13.75H1.25V1.25h17.5v12.5H15L16.06 15H19a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1Z"
|
|
909
|
+
/>
|
|
910
|
+
</svg>
|
|
911
|
+
`;var ji=`<svg aria-hidden="true" viewBox="0 0 20 18" slot="off">
|
|
912
|
+
<path
|
|
913
|
+
d="M19.83 2.68a2.58 2.58 0 0 0-2.3-2.5C15.72.06 12.86 0 10 0S4.28.06 2.47.18a2.58 2.58 0 0 0-2.3 2.5 115.86 115.86 0 0 0 0 12.64 2.58 2.58 0 0 0 2.3 2.5c1.81.12 4.67.18 7.53.18s5.72-.06 7.53-.18a2.58 2.58 0 0 0 2.3-2.5 115.86 115.86 0 0 0 0-12.64Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18s-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11 122.5 122.5 0 0 1 0-12.42 1.11 1.11 0 0 1 .91-1.11C4.24 1.57 7 1.5 10 1.5s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11 122.5 122.5 0 0 1 0 12.42ZM7.84 11a1.55 1.55 0 0 1-.76.18 1.57 1.57 0 0 1-.71-.18 1.69 1.69 0 0 1-.57-.42 2.1 2.1 0 0 1-.38-.58 2.47 2.47 0 0 1 0-1.64 2 2 0 0 1 .39-.66 1.73 1.73 0 0 1 .58-.42 1.81 1.81 0 0 1 .73-.16 1.68 1.68 0 0 1 .7.14 1.39 1.39 0 0 1 .51.39l1.08-.89a2.18 2.18 0 0 0-.47-.44A2.81 2.81 0 0 0 8.4 6a2.91 2.91 0 0 0-.58-.15 2.71 2.71 0 0 0-.56 0A4.08 4.08 0 0 0 5.88 6a3.27 3.27 0 0 0-1.09.67 3.14 3.14 0 0 0-.71 1.06 3.62 3.62 0 0 0-.26 1.39 3.57 3.57 0 0 0 .26 1.38 3 3 0 0 0 .71 1.06 3.27 3.27 0 0 0 1.09.67 3.85 3.85 0 0 0 1.38.23 3.2 3.2 0 0 0 1.28-.27 2.49 2.49 0 0 0 1-.83l-1.17-.88a1.42 1.42 0 0 1-.53.52Zm6.62 0a1.58 1.58 0 0 1-.76.18A1.54 1.54 0 0 1 13 11a1.69 1.69 0 0 1-.57-.42A2.12 2.12 0 0 1 12 10a2.29 2.29 0 0 1 .39-2.3 1.84 1.84 0 0 1 1.32-.58 1.71 1.71 0 0 1 .7.14 1.39 1.39 0 0 1 .51.39L16 6.73a2.43 2.43 0 0 0-.47-.44A3.22 3.22 0 0 0 15 6a3 3 0 0 0-.57-.15 2.87 2.87 0 0 0-.57 0A4.06 4.06 0 0 0 12.5 6a3.17 3.17 0 0 0-1.09.67 3 3 0 0 0-.72 1.06 3.62 3.62 0 0 0-.25 1.39 3.57 3.57 0 0 0 .25 1.38 2.93 2.93 0 0 0 .72 1.06 3.17 3.17 0 0 0 1.09.67 3.83 3.83 0 0 0 1.37.23 3.16 3.16 0 0 0 1.28-.27 2.45 2.45 0 0 0 1-.83L15 10.51a1.49 1.49 0 0 1-.54.49Z"
|
|
914
|
+
/>
|
|
915
|
+
</svg>
|
|
916
|
+
`;var Hi=`<svg aria-hidden="true" viewBox="0 0 20 18" slot="on">
|
|
917
|
+
<path
|
|
918
|
+
d="M19.83 2.68a2.58 2.58 0 0 0-2.3-2.5C13.91-.06 6.09-.06 2.47.18a2.58 2.58 0 0 0-2.3 2.5 115.86 115.86 0 0 0 0 12.64 2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5 115.86 115.86 0 0 0 0-12.64ZM8.42 12.78a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27A4 4 0 0 1 4 12a3.67 3.67 0 0 1-.84-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64A3.53 3.53 0 0 1 4 6.26a3.89 3.89 0 0 1 1.29-.8 4.76 4.76 0 0 1 1.63-.27 4.06 4.06 0 0 1 .67.06 4.57 4.57 0 0 1 .68.18 3.59 3.59 0 0 1 .64.34 2.7 2.7 0 0 1 .55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.35 2.35 0 0 0-.46.77 2.78 2.78 0 0 0-.16 1 2.74 2.74 0 0 0 .16 1 2.39 2.39 0 0 0 .46.77 2.07 2.07 0 0 0 .67.5 2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.88 2.88 0 0 1-1.22 1.01Zm7.52 0a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 3.89 3.89 0 0 1-1.28-.83 3.55 3.55 0 0 1-.85-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.43 3.43 0 0 1 .85-1.25 3.75 3.75 0 0 1 1.28-.8 4.76 4.76 0 0 1 1.63-.27 4 4 0 0 1 .67.06 4.27 4.27 0 0 1 .68.18 3.59 3.59 0 0 1 .64.34 2.46 2.46 0 0 1 .55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.35 2.35 0 0 0-.46.77 3 3 0 0 0-.16 1 3 3 0 0 0 .16 1 2.58 2.58 0 0 0 .46.77 2.07 2.07 0 0 0 .67.5 2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.82 2.82 0 0 1-1.21 1.05Z"
|
|
919
|
+
/>
|
|
920
|
+
</svg>
|
|
921
|
+
`;var Wi=`<svg aria-hidden="true" viewBox="0 0 18 18" slot="enter">
|
|
922
|
+
<path
|
|
923
|
+
d="M17.25 11.5a.76.76 0 0 0-.75.75v4.25h-4.25a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5a.76.76 0 0 0-.75-.75Zm0-11.5h-5a.76.76 0 0 0-.75.75.76.76 0 0 0 .75.75h4.25v4.25a.75.75 0 0 0 1.5 0v-5a.76.76 0 0 0-.75-.75ZM5.75 16.5H1.5v-4.25a.76.76 0 0 0-.75-.75.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75h5a.75.75 0 0 0 0-1.5Zm0-16.5h-5A.76.76 0 0 0 0 .75v5a.76.76 0 0 0 .75.75.76.76 0 0 0 .75-.75V1.5h4.25A.76.76 0 0 0 6.5.75.76.76 0 0 0 5.75 0Z"
|
|
924
|
+
/>
|
|
925
|
+
</svg>
|
|
926
|
+
`;var Fi=`<svg aria-hidden="true" viewBox="0 0 18 18" slot="exit">
|
|
927
|
+
<path
|
|
928
|
+
d="M17.25 11.5h-5a.76.76 0 0 0-.75.75v5a.75.75 0 0 0 1.5 0V13h4.25a.75.75 0 0 0 0-1.5Zm-5-5h5a.75.75 0 0 0 0-1.5H13V.75a.75.75 0 0 0-1.5 0v5a.76.76 0 0 0 .75.75Zm-6.5 5h-5a.75.75 0 0 0 0 1.5H5v4.25a.75.75 0 0 0 1.5 0v-5a.76.76 0 0 0-.75-.75Zm0-11.5A.76.76 0 0 0 5 .75V5H.75a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5A.76.76 0 0 0 5.75 0Z"
|
|
929
|
+
/>
|
|
930
|
+
</svg>
|
|
931
|
+
`;var Ki=`<svg aria-hidden="true" viewBox="0 0 18 18" slot="pause">
|
|
932
|
+
<path
|
|
933
|
+
d="M3 16.5a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v15ZM11.5 1a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3Z"
|
|
934
|
+
/>
|
|
935
|
+
</svg>
|
|
936
|
+
`;var zi=`<svg aria-hidden="true" viewBox="0 0 20 18" slot="enter">
|
|
937
|
+
<path
|
|
938
|
+
d="M19 0H1a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V1.25h17.5v6.5H20V1a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7Z"
|
|
939
|
+
/>
|
|
940
|
+
</svg>
|
|
941
|
+
`;var Yi=`<svg aria-hidden="true" viewBox="0 0 20 18" slot="exit">
|
|
942
|
+
<path
|
|
943
|
+
d="M19 0H1a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V1.25h17.5v6.5H20V1a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7Z"
|
|
944
|
+
/>
|
|
945
|
+
</svg>
|
|
946
|
+
`;var Gi=`<svg aria-hidden="true" viewBox="0 0 18 18" slot="play">
|
|
947
|
+
<path
|
|
948
|
+
d="m3.73 17.93 14.05-8.54a.46.46 0 0 0 0-.78L3.73.07A.48.48 0 0 0 3 .46v17.07a.48.48 0 0 0 .73.4Z"
|
|
949
|
+
/>
|
|
950
|
+
</svg>
|
|
951
|
+
`;var Qi=`<svg aria-hidden="true" viewBox="0 0 16 18" slot="backward">
|
|
952
|
+
<path
|
|
953
|
+
d="M8.75 3.42H4.68l2.14-2.14A.75.75 0 0 0 5.76.22L2.22 3.75a.77.77 0 0 0 0 1.07l3.54 3.53a.75.75 0 0 0 1.06 0 .75.75 0 0 0 0-1.06L4.45 4.92h4.3A5.75 5.75 0 0 1 11 16a.75.75 0 0 0 .29 1.44.72.72 0 0 0 .29-.06A7.25 7.25 0 0 0 8.75 3.42Z"
|
|
954
|
+
/>
|
|
955
|
+
<text
|
|
956
|
+
class="value"
|
|
957
|
+
transform="translate(.6 17.8)"
|
|
958
|
+
style="font-size: 8px; font-family: 'ArialMT', 'Arial'"
|
|
959
|
+
>
|
|
960
|
+
{{value}}
|
|
961
|
+
</text>
|
|
962
|
+
<path style="fill: none" d="M0 0h16v18H0z" />
|
|
963
|
+
</svg>
|
|
964
|
+
`;var qi=`<svg aria-hidden="true" viewBox="0 0 16 18" slot="forward">
|
|
965
|
+
<path
|
|
966
|
+
d="M7.25 3.42h4.07L9.18 1.28A.75.75 0 0 1 10.24.22l3.54 3.53a.77.77 0 0 1 0 1.07l-3.54 3.53a.75.75 0 0 1-1.06 0 .75.75 0 0 1 0-1.06l2.37-2.37h-4.3A5.75 5.75 0 0 0 5 16a.75.75 0 0 1-.29 1.44.72.72 0 0 1-.29-.06A7.25 7.25 0 0 1 7.25 3.42Z"
|
|
967
|
+
/>
|
|
968
|
+
<text
|
|
969
|
+
class="value"
|
|
970
|
+
transform="translate(6.5 17.8)"
|
|
971
|
+
style="font-size: 8px; font-family: 'ArialMT', 'Arial'"
|
|
972
|
+
>
|
|
973
|
+
{{value}}
|
|
974
|
+
</text>
|
|
975
|
+
<path style="fill: none" d="M0 0h16v18H0z" />
|
|
976
|
+
</svg>
|
|
977
|
+
`;var Zi=`<svg aria-hidden="true" viewBox="0 0 18 18" slot="high">
|
|
978
|
+
<path
|
|
979
|
+
d="m8.14 1.86-4 4a.49.49 0 0 1-.35.14H.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V2.21a.5.5 0 0 0-.86-.35ZM10.88.3v1.52A7.52 7.52 0 0 1 16.47 9a7.52 7.52 0 0 1-5.59 7.18v1.52A9 9 0 0 0 18 9 9 9 0 0 0 10.88.3ZM14.44 9a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66A5.49 5.49 0 0 0 14.44 9Z"
|
|
980
|
+
/>
|
|
981
|
+
<path style="fill: none" d="M0 0h18v18H0z" />
|
|
982
|
+
</svg>
|
|
983
|
+
`;var Xi=`<svg aria-hidden="true" viewBox="0 0 18 18" slot="low">
|
|
984
|
+
<path
|
|
985
|
+
d="m8.14 1.86-4 4a.49.49 0 0 1-.35.14H.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V2.21a.5.5 0 0 0-.86-.35ZM14.44 9a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66A5.49 5.49 0 0 0 14.44 9Z"
|
|
986
|
+
/>
|
|
987
|
+
<path style="fill: none" d="M0 0h18v18H0z" />
|
|
988
|
+
</svg>
|
|
989
|
+
`;var Ji=`<svg aria-hidden="true" viewBox="0 0 18 18" slot="medium">
|
|
990
|
+
<path
|
|
991
|
+
d="m8.14 1.86-4 4a.49.49 0 0 1-.35.14H.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V2.21a.5.5 0 0 0-.86-.35ZM14.44 9a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66A5.49 5.49 0 0 0 14.44 9Z"
|
|
992
|
+
/>
|
|
993
|
+
<path style="fill: none" d="M0 0h18v18H0z" />
|
|
994
|
+
</svg>
|
|
995
|
+
`;var es=`<svg aria-hidden="true" viewBox="0 0 18 18" slot="off">
|
|
996
|
+
<path
|
|
997
|
+
d="m0 1.05 4.48 4.47-.33.33a.49.49 0 0 1-.36.15H.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.48.48 0 0 0 .36.15.5.5 0 0 0 .5-.5v-5.75l4.67 4.66a7.71 7.71 0 0 1-2.79 1.47v1.52a9.32 9.32 0 0 0 3.87-1.91L17 18l1-1L1.06 0Zm5.36 5.36L7.75 8.8V14L5 11.26a1.74 1.74 0 0 0-1.24-.51H1.25v-3.5h2.54A1.74 1.74 0 0 0 5 6.74ZM16.47 9a7.19 7.19 0 0 1-.89 3.47l1.11 1.1A8.64 8.64 0 0 0 18 9 9 9 0 0 0 10.88.3v1.52A7.52 7.52 0 0 1 16.47 9ZM9 5.88V2.21a.5.5 0 0 0-.5-.5.48.48 0 0 0-.36.15L6.56 3.44ZM12.91 9a4.28 4.28 0 0 1-.07.72l1.22 1.22A5.2 5.2 0 0 0 14.44 9a5.49 5.49 0 0 0-3.56-5.1v1.66A4 4 0 0 1 12.91 9Z"
|
|
998
|
+
/>
|
|
999
|
+
<path style="fill: none" d="M0 0h18v18H0z" />
|
|
1000
|
+
</svg>
|
|
1001
|
+
`;var ts=()=>D(Bi),as=()=>D(ji),is=()=>D(Hi),ss=()=>D(Wi),os=()=>D(Fi),ns=()=>D(Ki),rs=()=>D(zi),ls=()=>D(Yi),ds=()=>D(Gi),ms=t=>D(Qi,t),cs=t=>D(qi,t),us=()=>D(Zi),hs=()=>D(Xi),ps=()=>D(Ji),Es=()=>D(es);var V=Z(require("@mux/playback-core")),G={LG:"large",SM:"small",XS:"extra-small"},bs=t=>b`
|
|
1002
|
+
<style>
|
|
1003
|
+
${$i}
|
|
1004
|
+
</style>
|
|
1005
|
+
|
|
1006
|
+
<media-controller audio="${t.audio||!1}" class="size-${t.playerSize}">
|
|
1007
|
+
<slot name="media" slot="media"></slot>
|
|
1008
|
+
<media-loading-indicator slot="centered-chrome" no-auto-hide></media-loading-indicator>
|
|
1009
|
+
${Cn(t)}
|
|
1010
|
+
<slot></slot>
|
|
1011
|
+
</media-controller>
|
|
1012
|
+
`,Cn=t=>{let{streamType:e,playerSize:a,audio:i}=t;if(i)switch(e){case V.StreamTypes.LIVE:case V.StreamTypes.LL_LIVE:return xn(t);case V.StreamTypes.DVR:case V.StreamTypes.LL_DVR:return kn(t);case V.StreamTypes.ON_DEMAND:default:return Ln(t)}switch(e){case V.StreamTypes.LIVE:case V.StreamTypes.LL_LIVE:switch(a){case G.LG:return Nn(t);case G.SM:return Un(t);case G.XS:return Rn(t)}case V.StreamTypes.DVR:case V.StreamTypes.LL_DVR:switch(a){case G.LG:return Vn(t);case G.SM:return Pn(t);case G.XS:return On(t)}case V.StreamTypes.ON_DEMAND:default:switch(a){case G.LG:return wn(t);case G.SM:return Dn(t);case G.XS:return Gt(t)}}},N=()=>b`
|
|
1013
|
+
<media-play-button>
|
|
1014
|
+
${ds()}
|
|
1015
|
+
${ns()}
|
|
1016
|
+
</media-play-button>
|
|
1017
|
+
`,Te=t=>b`
|
|
1018
|
+
<media-seek-backward-button seek-offset="${t.backwardSeekOffset}">
|
|
1019
|
+
${ms({value:t.backwardSeekOffset})}
|
|
1020
|
+
</media-seek-backward-button>
|
|
1021
|
+
`,ye=t=>b`
|
|
1022
|
+
<media-seek-forward-button seek-offset="${t.forwardSeekOffset}">
|
|
1023
|
+
${cs({value:t.forwardSeekOffset})}
|
|
1024
|
+
</media-seek-forward-button>
|
|
1025
|
+
`,j=()=>b`
|
|
1026
|
+
<media-mute-button>
|
|
1027
|
+
${us()}
|
|
1028
|
+
${ps()}
|
|
1029
|
+
${hs()}
|
|
1030
|
+
${Es()}
|
|
1031
|
+
</media-mute-button>
|
|
1032
|
+
`,de=t=>b`
|
|
1033
|
+
<media-captions-button default-showing="${!t.defaultHiddenCaptions}" >
|
|
1034
|
+
${as()}
|
|
1035
|
+
${is()}
|
|
1036
|
+
</media-captions-button>`,H=()=>b`
|
|
1037
|
+
<media-airplay-button>
|
|
1038
|
+
${ts()}
|
|
1039
|
+
</media-airplay-button>`,me=()=>b`
|
|
1040
|
+
<media-pip-button>
|
|
1041
|
+
${rs()}
|
|
1042
|
+
${ls()}
|
|
1043
|
+
</media-pip-button>`,ce=()=>b`
|
|
1044
|
+
<media-fullscreen-button>
|
|
1045
|
+
${ss()}
|
|
1046
|
+
${os()}
|
|
1047
|
+
</media-fullscreen-button>`,Ln=t=>b`
|
|
1048
|
+
<media-control-bar>
|
|
1049
|
+
${N()} ${Te(t)} ${ye(t)}
|
|
1050
|
+
<mxp-time-display></mxp-time-display>
|
|
1051
|
+
<media-time-range></media-time-range>
|
|
1052
|
+
${j()}
|
|
1053
|
+
<media-volume-range></media-volume-range>
|
|
1054
|
+
<media-playback-rate-button></media-playback-rate-button>
|
|
1055
|
+
${H()}
|
|
1056
|
+
<media-cast-button></media-cast-button>
|
|
1057
|
+
</media-control-bar>
|
|
1058
|
+
`,kn=t=>b`
|
|
1059
|
+
<media-control-bar>
|
|
1060
|
+
${N()}
|
|
1061
|
+
<slot name="seek-to-live-button"></slot>
|
|
1062
|
+
${Te(t)} ${ye(t)}
|
|
1063
|
+
<mxp-time-display></mxp-time-display>
|
|
1064
|
+
<media-time-range></media-time-range>
|
|
1065
|
+
${j()}
|
|
1066
|
+
<media-volume-range></media-volume-range>
|
|
1067
|
+
<media-playback-rate-button></media-playback-rate-button>
|
|
1068
|
+
${H()}
|
|
1069
|
+
<media-cast-button></media-cast-button>
|
|
1070
|
+
</media-control-bar>
|
|
1071
|
+
`,xn=t=>b`
|
|
1072
|
+
<media-control-bar>
|
|
1073
|
+
${N()}
|
|
1074
|
+
<slot name="seek-to-live-button"></slot>
|
|
1075
|
+
${j()}
|
|
1076
|
+
<media-volume-range></media-volume-range>
|
|
1077
|
+
${H()}
|
|
1078
|
+
<media-cast-button></media-cast-button>
|
|
1079
|
+
</media-control-bar>
|
|
1080
|
+
`,Gt=t=>b`
|
|
1081
|
+
<media-control-bar slot="top-chrome">
|
|
1082
|
+
${t.hasCaptions?de(t):b``}
|
|
1083
|
+
<div class="mxp-spacer"></div>
|
|
1084
|
+
${H()}
|
|
1085
|
+
<media-cast-button></media-cast-button>
|
|
1086
|
+
${me()}
|
|
1087
|
+
</media-control-bar>
|
|
1088
|
+
<div slot="centered-chrome" class="mxp-center-controls">
|
|
1089
|
+
${N()}
|
|
1090
|
+
</div>
|
|
1091
|
+
<media-control-bar>
|
|
1092
|
+
${j()}
|
|
1093
|
+
<div class="mxp-spacer"></div>
|
|
1094
|
+
${ce()}
|
|
1095
|
+
</media-control-bar>
|
|
1096
|
+
`,Dn=t=>b`
|
|
1097
|
+
<media-control-bar slot="top-chrome" style="justify-content: flex-end;">
|
|
1098
|
+
${t.hasCaptions?de(t):b``}
|
|
1099
|
+
${H()}
|
|
1100
|
+
<media-cast-button></media-cast-button>
|
|
1101
|
+
${me()}
|
|
1102
|
+
</media-control-bar>
|
|
1103
|
+
<div slot="centered-chrome" class="mxp-center-controls">
|
|
1104
|
+
${Te(t)}
|
|
1105
|
+
${N()}
|
|
1106
|
+
${ye(t)}
|
|
1107
|
+
</div>
|
|
1108
|
+
<media-time-range></media-time-range>
|
|
1109
|
+
<media-control-bar>
|
|
1110
|
+
<mxp-time-display></mxp-time-display>
|
|
1111
|
+
${j()}
|
|
1112
|
+
<media-volume-range></media-volume-range>
|
|
1113
|
+
<div class="mxp-spacer"></div>
|
|
1114
|
+
<media-playback-rate-button></media-playback-rate-button>
|
|
1115
|
+
${ce()}
|
|
1116
|
+
<div class="mxp-padding-2"></div>
|
|
1117
|
+
</media-control-bar>
|
|
1118
|
+
`,wn=t=>b`
|
|
1119
|
+
<div slot="centered-chrome" class="mxp-center-controls">
|
|
1120
|
+
${N()}
|
|
1121
|
+
</div>
|
|
1122
|
+
<media-time-range></media-time-range>
|
|
1123
|
+
<media-control-bar>
|
|
1124
|
+
${N()}
|
|
1125
|
+
${Te(t)}
|
|
1126
|
+
${ye(t)}
|
|
1127
|
+
<mxp-time-display></mxp-time-display>
|
|
1128
|
+
${j()}
|
|
1129
|
+
<media-volume-range></media-volume-range>
|
|
1130
|
+
<div class="mxp-spacer"></div>
|
|
1131
|
+
<media-playback-rate-button></media-playback-rate-button>
|
|
1132
|
+
${t.hasCaptions?de(t):b``}
|
|
1133
|
+
${H()}
|
|
1134
|
+
<media-cast-button></media-cast-button>
|
|
1135
|
+
${me()}
|
|
1136
|
+
${ce()}
|
|
1137
|
+
<div class="mxp-padding-2"></div>
|
|
1138
|
+
</media-control-bar>
|
|
1139
|
+
`,Rn=Gt,Un=t=>b`
|
|
1140
|
+
<media-control-bar slot="top-chrome">
|
|
1141
|
+
<slot name="seek-to-live-button"></slot>
|
|
1142
|
+
<div class="mxp-spacer"></div>
|
|
1143
|
+
${t.hasCaptions?de(t):b``}
|
|
1144
|
+
${H()}
|
|
1145
|
+
<media-cast-button></media-cast-button>
|
|
1146
|
+
${me()}
|
|
1147
|
+
</media-control-bar>
|
|
1148
|
+
<div slot="centered-chrome" class="mxp-center-controls">
|
|
1149
|
+
${N()}
|
|
1150
|
+
</div>
|
|
1151
|
+
<media-control-bar>
|
|
1152
|
+
${j()}
|
|
1153
|
+
<media-volume-range></media-volume-range>
|
|
1154
|
+
<div class="mxp-spacer"></div>
|
|
1155
|
+
${ce()}
|
|
1156
|
+
</media-control-bar>
|
|
1157
|
+
`,Nn=t=>b`
|
|
1158
|
+
<media-control-bar slot="top-chrome">
|
|
1159
|
+
<slot name="seek-to-live-button"></slot>
|
|
1160
|
+
</media-control-bar>
|
|
1161
|
+
<div slot="centered-chrome" class="mxp-center-controls">
|
|
1162
|
+
${N()}
|
|
1163
|
+
</div>
|
|
1164
|
+
<media-control-bar>
|
|
1165
|
+
${j()}
|
|
1166
|
+
<media-volume-range></media-volume-range>
|
|
1167
|
+
<div class="mxp-spacer"></div>
|
|
1168
|
+
${t.hasCaptions?de(t):b``}
|
|
1169
|
+
${H()}
|
|
1170
|
+
<media-cast-button></media-cast-button>
|
|
1171
|
+
${me()}
|
|
1172
|
+
${ce()}
|
|
1173
|
+
</media-control-bar>
|
|
1174
|
+
`,On=Gt,Pn=t=>b`
|
|
1175
|
+
<media-control-bar slot="top-chrome" style="justify-content: flex-end;">
|
|
1176
|
+
${t.hasCaptions?de(t):b``}
|
|
1177
|
+
${H()}
|
|
1178
|
+
<media-cast-button></media-cast-button>
|
|
1179
|
+
${me()}
|
|
1180
|
+
</media-control-bar>
|
|
1181
|
+
<div slot="centered-chrome" class="mxp-center-controls">
|
|
1182
|
+
${Te(t)}
|
|
1183
|
+
${N()}
|
|
1184
|
+
${ye(t)}
|
|
1185
|
+
</div>
|
|
1186
|
+
<media-time-range></media-time-range>
|
|
1187
|
+
<media-control-bar>
|
|
1188
|
+
${j()}
|
|
1189
|
+
<media-volume-range></media-volume-range>
|
|
1190
|
+
<slot name="seek-to-live-button"></slot>
|
|
1191
|
+
<div class="mxp-spacer"></div>
|
|
1192
|
+
${ce()}
|
|
1193
|
+
<div class="mxp-padding-2"></div>
|
|
1194
|
+
</media-control-bar>
|
|
1195
|
+
`,Vn=t=>b`
|
|
1196
|
+
<div slot="centered-chrome" class="mxp-center-controls">
|
|
1197
|
+
${N()}
|
|
1198
|
+
</div>
|
|
1199
|
+
<media-time-range></media-time-range>
|
|
1200
|
+
<media-control-bar>
|
|
1201
|
+
${N()}
|
|
1202
|
+
${Te(t)}
|
|
1203
|
+
${ye(t)}
|
|
1204
|
+
${j()}
|
|
1205
|
+
<media-volume-range></media-volume-range>
|
|
1206
|
+
<slot name="seek-to-live-button"></slot>
|
|
1207
|
+
<div class="mxp-spacer"></div>
|
|
1208
|
+
${t.hasCaptions?de(t):b``}
|
|
1209
|
+
${H()}
|
|
1210
|
+
<media-cast-button></media-cast-button>
|
|
1211
|
+
${me()}
|
|
1212
|
+
${ce()}
|
|
1213
|
+
<div class="mxp-padding-2"></div>
|
|
1214
|
+
</media-control-bar>
|
|
1215
|
+
`;function gs(t,e){return{audio:t.hasAttribute("audio"),streamType:t.getAttribute("stream-type"),playerSize:t.getAttribute("player-size"),defaultHiddenCaptions:t.hasAttribute("default-hidden-captions"),hasCaptions:t.hasAttribute("has-captions"),forwardSeekOffset:t.getAttribute("forward-seek-offset"),backwardSeekOffset:t.getAttribute("backward-seek-offset"),...e}}var Qt=class extends HTMLElement{static get observedAttributes(){return["audio","stream-type","player-size","default-hidden-captions","has-captions","forward-seek-offset","backward-seek-offset"]}constructor(){super();this.attachShadow({mode:"open"}),Pe(bs(gs(this)),this.shadowRoot)}attributeChangedCallback(){Pe(bs(gs(this)),this.shadowRoot)}};customElements.get("media-theme-mux")||customElements.define("media-theme-mux",Qt);var fs=Qt;var be=Z(require("@mux/mux-video")),F=Z(require("@mux/playback-core"));var Rs=Z(require("@mux/mux-video"));var $n="en",ue={code:$n};var vs="en";function g(t,e=!0){var s,n;let a=e&&(n=(s=ue)==null?void 0:s[t])!=null?n:t,i=e?ue.code:vs;return new As(a,i)}var As=class{constructor(e,a=(i=>(i=ue.code)!=null?i:vs)()){this.message=e,this.locale=a}format(e){return this.message.replace(/\{(\w+)\}/g,(a,i)=>{var s;return(s=e[i])!=null?s:""})}toString(){return this.message}};function Is(t){let e="";return Object.entries(t).forEach(([a,i])=>{i!=null&&(e+=`${Bn(a)}: ${i}; `)}),e?e.trim():void 0}function Bn(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ts(t){return t.replace(/[-_]([a-z])/g,(e,a)=>a.toUpperCase())}function $e(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function dt(t){let e=jn(t).toString();return e?"?"+e:""}function jn(t){let e={};for(let a in t)t[a]!=null&&(e[a]=t[a]);return new URLSearchParams(e)}function Be(t){let a=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(a).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}var qt=(t,e)=>!t||!e?!1:t.contains(e)?!0:qt(t,e.getRootNode().host);var je=Z(require("@mux/playback-core")),Zt="mux.com",Hn=()=>{try{return"0.1.0-beta.21"}catch{}return"UNKNOWN"},Wn=Hn(),mt=()=>Wn,Xt=(t,{token:e,domain:a=Zt}={})=>`https://stream.${a}/${t}.m3u8${dt(!!e?{token:e}:{redundant_streams:!0})}`,ys=(t,{token:e,thumbnailTime:a,domain:i=Zt}={})=>{let s=e==null?a:void 0;return`https://image.${i}/${t}/thumbnail.jpg${dt({token:e,time:s})}`},_s=(t,{token:e,domain:a=Zt}={})=>`https://image.${a}/${t}/storyboard.vtt${dt({token:e})}`,Fn={crossorigin:"crossOrigin",playsinline:"playsInline"};function Ms(t){var e;return(e=Fn[t])!=null?e:Ts(t)}var ct,Kn=(t="video")=>ct||(typeof window!="undefined"&&(ct=document.createElement(t)),ct),Ss=async(t=Kn())=>{if(!t)return!1;let e=t.volume;return t.volume=e/2+.1,new Promise((a,i)=>{setTimeout(()=>{a(t.volume!==e)},0)})};function Cs(t){var e,a;return Array.from((a=(e=t.media)==null?void 0:e.textTracks)!=null?a:[]).filter(({kind:i})=>i==="subtitles"||i==="captions")}var Ls=t=>{var a,i;let{media:e}=t;return(i=(a=e==null?void 0:e._hls)==null?void 0:a.liveSyncPosition)!=null?i:(e==null?void 0:e.seekable.length)?e==null?void 0:e.seekable.end(e.seekable.length-1):void 0},Jt=t=>{let e=Ls(t);if(e==null){console.warn("attempting to seek to live but cannot determine live edge time!");return}t.currentTime=e},zn=1,Yn=5,ks=3,xs=.5,Ds=t=>{var n;let{streamType:e}=t,a=Ls(t),i=(n=t.media)==null?void 0:n.currentTime;if(a==null||i==null)return!1;let s=a-i;return e===je.StreamTypes.LL_LIVE||e===je.StreamTypes.LL_DVR?s<=zn*(ks+xs):e===je.StreamTypes.LIVE||e===je.StreamTypes.DVR?s<=Yn*(ks+xs):!1};var ws=`[mux-player ${mt()}]`;function W(...t){console.warn(ws,...t)}function he(...t){console.error(ws,...t)}function ut(t){var a;let e=(a=t.message)!=null?a:"";if(t.file){let i="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${g("Read more: ")}
|
|
1216
|
+
${i}${t.file}`}W(e)}var _={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",SRC:"src",POSTER:"poster",PRELOAD:"preload"},ht={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Gn=Rs.VideoEvents.filter(t=>t!=="error"),Qn=Object.values(_),qn=Object.values(ht);function Us(t){t.querySelectorAll(":scope > track").forEach(e=>{var a;(a=t.media)==null||a.append(e.cloneNode())}),Gn.forEach(e=>{var a;(a=t.media)==null||a.addEventListener(e,i=>{t.dispatchEvent(new Event(i.type))})})}var Ns=class extends HTMLElement{static get observedAttributes(){return[...Qn,...qn]}constructor(){super();this.querySelectorAll(":scope > track").forEach(i=>{var s;(s=this.media)==null||s.append(i.cloneNode())});let e=i=>{for(let s of i)s.type==="childList"&&(s.removedNodes.forEach(n=>{var l,c;let r=(l=this.media)==null?void 0:l.querySelector(`track[src="${n.src}"]`);r&&((c=this.media)==null||c.removeChild(r))}),s.addedNodes.forEach(n=>{var r;(r=this.media)==null||r.append(n.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,a,i){switch(e){case ht.MUTED:{this.media&&(this.media.muted=i!=null);return}case ht.VOLUME:{let s=+i;this.media&&!Number.isNaN(s)&&(this.media.volume=s);return}case ht.PLAYBACKRATE:{let s=+i;this.media&&!Number.isNaN(s)&&(this.media.playbackRate=s);return}}}play(){var e;return(e=this.media)==null?void 0:e.play()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var a;return(a=this.media)==null?void 0:a.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get video(){return W("<mux-player>.video is deprecated, please use .media instead"),this.media}get paused(){var e,a;return(a=(e=this.media)==null?void 0:e.paused)!=null?a:!0}get duration(){var e,a;return(a=(e=this.media)==null?void 0:e.duration)!=null?a:NaN}get ended(){var e,a;return(a=(e=this.media)==null?void 0:e.ended)!=null?a:!1}get buffered(){var e;return(e=this.media)==null?void 0:e.buffered}get readyState(){var e,a;return(a=(e=this.media)==null?void 0:e.readyState)!=null?a:0}get videoWidth(){var e;return(e=this.media)==null?void 0:e.videoWidth}get videoHeight(){var e;return(e=this.media)==null?void 0:e.videoHeight}get currentTime(){var e,a;return(a=(e=this.media)==null?void 0:e.currentTime)!=null?a:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,a;return(a=(e=this.media)==null?void 0:e.volume)!=null?a:1}set volume(e){this.media&&(this.media.volume=Number(e))}get src(){return te(this,_.SRC)}set src(e){this.setAttribute(_.SRC,`${e}`)}get poster(){var e;return(e=te(this,_.POSTER))!=null?e:""}set poster(e){this.setAttribute(_.POSTER,`${e}`)}get playbackRate(){var e,a;return(a=(e=this.media)==null?void 0:e.playbackRate)!=null?a:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get crossOrigin(){return te(this,_.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(_.CROSSORIGIN,`${e}`)}get autoplay(){return te(this,_.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(_.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(_.AUTOPLAY)}get loop(){return te(this,_.LOOP)!=null}set loop(e){e?this.setAttribute(_.LOOP,""):this.removeAttribute(_.LOOP)}get muted(){return te(this,_.MUTED)!=null}set muted(e){e?this.setAttribute(_.MUTED,""):this.removeAttribute(_.MUTED)}get playsInline(){return te(this,_.PLAYSINLINE)!=null}set playsInline(e){e?this.setAttribute(_.PLAYSINLINE,""):this.removeAttribute(_.PLAYSINLINE)}get preload(){return te(this,_.PRELOAD)}set preload(e){e?this.setAttribute(_.PRELOAD,e):this.removeAttribute(_.PRELOAD)}};function te(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var ea=Ns;var Os=`
|
|
1217
|
+
:host {
|
|
1218
|
+
z-index: 100;
|
|
1219
|
+
display: flex;
|
|
1220
|
+
justify-content: center;
|
|
1221
|
+
align-items: center;
|
|
1222
|
+
width: 100%;
|
|
1223
|
+
height: 100%;
|
|
1224
|
+
position: absolute;
|
|
1225
|
+
top: 0;
|
|
1226
|
+
left: 0;
|
|
1227
|
+
box-sizing: border-box;
|
|
1228
|
+
color: #fff;
|
|
1229
|
+
line-height: 18px;
|
|
1230
|
+
font-family: Arial, sans-serif;
|
|
1231
|
+
padding: var(--media-dialog-backdrop-padding, 0);
|
|
1232
|
+
background: var(--media-dialog-backdrop-background,
|
|
1233
|
+
linear-gradient(to bottom, rgba(20, 20, 30, 0.7) 50%, rgba(20, 20, 30, 0.9))
|
|
1234
|
+
);
|
|
1235
|
+
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1236
|
+
transition: var(--media-dialog-transition-open, visibility .2s, opacity .2s) !important;
|
|
1237
|
+
transform: var(--media-dialog-transform-open, none) !important;
|
|
1238
|
+
visibility: visible !important;
|
|
1239
|
+
opacity: 1 !important;
|
|
1240
|
+
pointer-events: auto !important;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
:host(:not([open])) {
|
|
1244
|
+
/* Needs to use !important to prevent overwrite of media-chrome */
|
|
1245
|
+
transition: var(--media-dialog-transition-close, visibility .1s, opacity .1s) !important;
|
|
1246
|
+
transform: var(--media-dialog-transform-close, none) !important;
|
|
1247
|
+
visibility: hidden !important;
|
|
1248
|
+
opacity: 0 !important;
|
|
1249
|
+
pointer-events: none !important;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
/*
|
|
1253
|
+
Only show outline when keyboard focusing.
|
|
1254
|
+
https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo
|
|
1255
|
+
:host-context support is bad https://caniuse.com/mdn-css_selectors_host-context
|
|
1256
|
+
*/
|
|
1257
|
+
:host-context([media-keyboard-control]) ::slotted(:focus),
|
|
1258
|
+
:host-context([media-keyboard-control]) :focus {
|
|
1259
|
+
box-shadow: 0 0 0 2px rgba(27, 127, 204, 0.9);
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
.dialog {
|
|
1263
|
+
position: relative;
|
|
1264
|
+
box-sizing: border-box;
|
|
1265
|
+
background: var(--media-dialog-background, none);
|
|
1266
|
+
padding: var(--media-dialog-padding, 10px);
|
|
1267
|
+
width: min(320px, 100%);
|
|
1268
|
+
word-wrap: break-word;
|
|
1269
|
+
max-height: 100%;
|
|
1270
|
+
overflow: auto;
|
|
1271
|
+
text-align: center;
|
|
1272
|
+
line-height: 1.4;
|
|
1273
|
+
}
|
|
1274
|
+
`,Ps=document.createElement("template");Ps.innerHTML=`
|
|
1275
|
+
<style>
|
|
1276
|
+
${Os}
|
|
1277
|
+
</style>
|
|
1278
|
+
|
|
1279
|
+
<div class="dialog">
|
|
1280
|
+
<slot></slot>
|
|
1281
|
+
</div>
|
|
1282
|
+
`;var pe=class extends HTMLElement{constructor(){super();var e;this.attachShadow({mode:"open"}),(e=this.shadowRoot)==null||e.appendChild(this.constructor.template.content.cloneNode(!0))}show(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("open",{composed:!0,bubbles:!0})),Vs(this)}close(){!this.hasAttribute("open")||(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),Zn(this))}attributeChangedCallback(e,a,i){e==="open"&&a!==i&&(i!=null?this.show():this.close())}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("open")&&Vs(this)}};pe.styles=Os,pe.template=Ps,pe.observedAttributes=["open"];function Vs(t){let e=new CustomEvent("initfocus",{composed:!0,bubbles:!0,cancelable:!0});if(t.dispatchEvent(e),e.defaultPrevented)return;let a=t.querySelector("[autofocus]:not([disabled])");!a&&t.tabIndex>=0&&(a=t),a||(a=$s(t.shadowRoot)),t._previouslyFocusedElement=document.activeElement,document.activeElement instanceof HTMLElement&&document.activeElement.blur(),t.addEventListener("transitionend",()=>{a instanceof HTMLElement&&a.focus({preventScroll:!0})},{once:!0})}function $s(t){let a=["button","input","keygen","select","textarea"].map(function(s){return s+":not([disabled])"});a.push('[tabindex]:not([disabled]):not([tabindex=""])');let i=t==null?void 0:t.querySelector(a.join(", "));if(!i&&"attachShadow"in Element.prototype){let s=(t==null?void 0:t.querySelectorAll("*"))||[];for(let n=0;n<s.length&&!(s[n].tagName&&s[n].shadowRoot&&(i=$s(s[n].shadowRoot),i));n++);}return i}function Zn(t){t._previouslyFocusedElement instanceof HTMLElement&&t._previouslyFocusedElement.focus()}globalThis.customElements.get("media-dialog")||(globalThis.customElements.define("media-dialog",pe),globalThis.MediaDialog=pe);var ta=pe;var Bs=document.createElement("template");Bs.innerHTML=`
|
|
1283
|
+
<style>
|
|
1284
|
+
${ta.styles}
|
|
1285
|
+
|
|
1286
|
+
.close {
|
|
1287
|
+
background: none;
|
|
1288
|
+
color: inherit;
|
|
1289
|
+
border: none;
|
|
1290
|
+
padding: 0;
|
|
1291
|
+
font: inherit;
|
|
1292
|
+
cursor: pointer;
|
|
1293
|
+
outline: inherit;
|
|
1294
|
+
width: 28px;
|
|
1295
|
+
height: 28px;
|
|
1296
|
+
position: absolute;
|
|
1297
|
+
top: 1rem;
|
|
1298
|
+
right: 1rem;
|
|
1299
|
+
}
|
|
1300
|
+
</style>
|
|
1301
|
+
|
|
1302
|
+
<div class="dialog">
|
|
1303
|
+
<slot></slot>
|
|
1304
|
+
</div>
|
|
1305
|
+
|
|
1306
|
+
<slot name="close">
|
|
1307
|
+
<button class="close" tabindex="0">
|
|
1308
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1309
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
1310
|
+
</svg>
|
|
1311
|
+
</button>
|
|
1312
|
+
</slot>
|
|
1313
|
+
`;var pt=class extends ta{constructor(){super();var e,a;(a=(e=this.shadowRoot)==null?void 0:e.querySelector(".close"))==null||a.addEventListener("click",()=>{this.close()})}};pt.template=Bs;globalThis.customElements.get("mxp-dialog")||(globalThis.customElements.define("mxp-dialog",pt),globalThis.MxpDialog=pt);var js=`:host {
|
|
1314
|
+
display: inline-block;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
/* Hide custom elements that are not defined yet */
|
|
1318
|
+
:not(:defined) {
|
|
1319
|
+
display: none;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
a {
|
|
1323
|
+
color: #fff;
|
|
1324
|
+
font-size: 0.9em;
|
|
1325
|
+
text-decoration: underline;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
media-controller {
|
|
1329
|
+
width: 100%;
|
|
1330
|
+
height: 100%;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
.mxp-seek-to-live-button {
|
|
1334
|
+
height: 44px;
|
|
1335
|
+
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
1336
|
+
color: white;
|
|
1337
|
+
border: none;
|
|
1338
|
+
cursor: pointer;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
.mxp-seek-to-live-button[aria-disabled] {
|
|
1342
|
+
cursor: default;
|
|
1343
|
+
pointer-events: none;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
.mxp-seek-to-live-button::before {
|
|
1347
|
+
content: '\u25CF ';
|
|
1348
|
+
color: rgb(118, 118, 118);
|
|
1349
|
+
padding-right: 5px;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
.mxp-seek-to-live-button[aria-disabled]::before {
|
|
1353
|
+
color: #fb3c4d;
|
|
1354
|
+
}
|
|
1355
|
+
`;var Ee=Z(require("@mux/playback-core")),Hs=t=>b`
|
|
1356
|
+
<style>
|
|
1357
|
+
${js}
|
|
1358
|
+
</style>
|
|
1359
|
+
${Jn(t)}
|
|
1360
|
+
`,Jn=t=>{var e,a,i,s,n,r,l,c,h,E,T,S,w,U,A,O,Q,q,Le,ze,fe,ie,Ye,Ge,sa,oa;return b`
|
|
1361
|
+
<media-theme-mux
|
|
1362
|
+
audio="${t.audio||!1}"
|
|
1363
|
+
style="${(e=Is({"--primary-color":t.primaryColor,"--secondary-color":t.secondaryColor,"--mux-time-range-padding":t.secondaryColor?"0":null,"--media-range-track-border-radius":t.secondaryColor?"0":null}))!=null?e:!1}"
|
|
1364
|
+
class="size-${t.playerSize}"
|
|
1365
|
+
stream-type="${t.streamType}"
|
|
1366
|
+
player-size="${t.playerSize}"
|
|
1367
|
+
has-captions="${t.hasCaptions}"
|
|
1368
|
+
default-hidden-captions="${t.defaultHiddenCaptions}"
|
|
1369
|
+
forward-seek-offset="${t.forwardSeekOffset}"
|
|
1370
|
+
backward-seek-offset="${t.backwardSeekOffset}"
|
|
1371
|
+
>
|
|
1372
|
+
<mux-video
|
|
1373
|
+
slot="media"
|
|
1374
|
+
crossorigin
|
|
1375
|
+
playsinline
|
|
1376
|
+
autoplay="${(a=t.autoplay)!=null?a:!1}"
|
|
1377
|
+
muted="${(i=t.muted)!=null?i:!1}"
|
|
1378
|
+
loop="${(s=t.loop)!=null?s:!1}"
|
|
1379
|
+
preload="${(n=t.preload)!=null?n:!1}"
|
|
1380
|
+
debug="${(r=t.debug)!=null?r:!1}"
|
|
1381
|
+
prefer-mse="${(l=t.preferMse)!=null?l:!1}"
|
|
1382
|
+
start-time="${t.startTime!=null?t.startTime:!1}"
|
|
1383
|
+
metadata-video-id="${(E=(h=t.metadataVideoId)!=null?h:(c=t.metadata)==null?void 0:c.video_id)!=null?E:!1}"
|
|
1384
|
+
metadata-video-title="${(w=(S=t.metadataVideoTitle)!=null?S:(T=t.metadata)==null?void 0:T.video_title)!=null?w:!1}"
|
|
1385
|
+
metadata-viewer-user-id="${(O=(A=t.metadataViewerUserId)!=null?A:(U=t.metadata)==null?void 0:U.viewer_user_id)!=null?O:!1}"
|
|
1386
|
+
beacon-collection-domain="${(Q=t.beaconCollectionDomain)!=null?Q:!1}"
|
|
1387
|
+
player-software-name="${t.playerSoftwareName}"
|
|
1388
|
+
player-software-version="${t.playerSoftwareVersion}"
|
|
1389
|
+
env-key="${(q=t.envKey)!=null?q:!1}"
|
|
1390
|
+
stream-type="${(Le=t.streamType)!=null?Le:!1}"
|
|
1391
|
+
custom-domain="${(ze=t.customDomain)!=null?ze:!1}"
|
|
1392
|
+
src="${t.src?t.src:t.playbackId?Xt(t.playbackId,{domain:t.customDomain,token:t.tokens.playback}):!1}"
|
|
1393
|
+
poster="${t.poster?t.poster:t.playbackId&&!t.audio?ys(t.playbackId,{domain:t.customDomain,thumbnailTime:(fe=t.thumbnailTime)!=null?fe:t.startTime,token:t.tokens.thumbnail}):!1}"
|
|
1394
|
+
cast-src="${t.src?t.src:t.playbackId?Xt(t.playbackId,{domain:t.customDomain,token:t.tokens.playback}):!1}"
|
|
1395
|
+
cast-stream-type="${[Ee.StreamTypes.LIVE,Ee.StreamTypes.LL_LIVE].includes(t.streamType)?"live":!1}"
|
|
1396
|
+
>
|
|
1397
|
+
${t.playbackId&&!t.audio&&![Ee.StreamTypes.LIVE,Ee.StreamTypes.LL_LIVE,Ee.StreamTypes.DVR,Ee.StreamTypes.LL_DVR].includes(t.streamType)?b`<track
|
|
1398
|
+
label="thumbnails"
|
|
1399
|
+
default
|
|
1400
|
+
kind="metadata"
|
|
1401
|
+
src="${_s(t.playbackId,{domain:t.customDomain,token:t.tokens.storyboard})}"
|
|
1402
|
+
/>`:b``}
|
|
1403
|
+
</mux-video>
|
|
1404
|
+
<button
|
|
1405
|
+
slot="seek-to-live-button"
|
|
1406
|
+
aria-disabled="${t.inLiveWindow}"
|
|
1407
|
+
onclick="${function(zs){var na;if((na=t.onSeekToLive)==null||na.call(t,zs),t.paused){let Ys=new CustomEvent("mediaplayrequest",{composed:!0,bubbles:!0});this.dispatchEvent(Ys)}}}"
|
|
1408
|
+
class="mxp-seek-to-live-button"
|
|
1409
|
+
>
|
|
1410
|
+
Live
|
|
1411
|
+
</button>
|
|
1412
|
+
<mxp-dialog
|
|
1413
|
+
no-auto-hide
|
|
1414
|
+
open="${t.isDialogOpen}"
|
|
1415
|
+
onclose="${t.onCloseErrorDialog}"
|
|
1416
|
+
oninitfocus="${t.onInitFocusDialog}"
|
|
1417
|
+
>
|
|
1418
|
+
${((ie=t.dialog)==null?void 0:ie.title)?b`<h3>${t.dialog.title}</h3>`:b``}
|
|
1419
|
+
<p>
|
|
1420
|
+
${(Ye=t.dialog)==null?void 0:Ye.message}
|
|
1421
|
+
${((Ge=t.dialog)==null?void 0:Ge.linkUrl)?b`<a
|
|
1422
|
+
href="${t.dialog.linkUrl}"
|
|
1423
|
+
target="_blank"
|
|
1424
|
+
rel="external noopener"
|
|
1425
|
+
aria-label="${(sa=t.dialog.linkText)!=null?sa:""} ${g("(opens in a new window)")}"
|
|
1426
|
+
>${(oa=t.dialog.linkText)!=null?oa:t.dialog.linkUrl}</a
|
|
1427
|
+
>`:b``}
|
|
1428
|
+
</p>
|
|
1429
|
+
</mxp-dialog>
|
|
1430
|
+
</media-theme-mux>
|
|
1431
|
+
`};var He=Z(require("@mux/mux-video"));function Et(t,e,a,i,s){var l,c,h;let n={},r={};switch(t.code){case He.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=g("Network Error",s),n.message=t.message,(l=t.data)==null?void 0:l.response.code){case 412:{n.title=g("Video is not currently available",s),n.message=g("The live stream or video file are not yet ready.",s),r.message=g("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",s),r.file="412-not-playable.md";break}case 404:{n.title=g("Video does not exist",s),n.message="",r.message=g("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",s),r.file="404-not-found.md";break}case 403:{if(n.title=g("Invalid playback URL",s),n.message=g("The video URL or playback-token are formatted with incorrect or incomplete information.",s),r.message=g("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",s),r.file="missing-signed-tokens.md",!i)break;let{exp:E,aud:T,sub:S}=Be(i),w=Date.now()>E*1e3,U=S!==a,A=T!=="v",O={timeStyle:"medium",dateStyle:"medium"};if(w){n.title=g("Video URL has expired",s),n.message=g("The video\u2019s secured playback-token has expired.",s),r.message=g("This playback is using signed URLs and the playback-token has expired. Expired at: {expiredDate}. Current time: {currentDate}.",s).format({expiredDate:new Intl.DateTimeFormat(ue.code,O).format(E*1e3),currentDate:new Intl.DateTimeFormat(ue.code,O).format(Date.now())}),r.file="403-expired-token.md";break}if(U){n.title=g("Video URL is formatted incorrectly",s),n.message=g("The video\u2019s playback ID does not match the one encoded in the playback-token.",s),r.message=g("The specified playback ID {playbackId} and the playback ID encoded in the playback-token {tokenPlaybackId} do not match.",s).format({playbackId:a,tokenPlaybackId:S}),r.file="403-playback-id-mismatch.md";break}if(A){n.title=g("Video URL is formatted incorrectly",s),n.message=g("The playback-token is formatted with incorrect information.",s),r.message=g("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",s).format({tokenType:T}),r.file="403-incorrect-aud-value.md";break}r.message=g("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",s),r.file="403-malformatted-token.md";break}}break}case He.MediaError.MEDIA_ERR_DECODE:{let{message:E}=t;n={title:g("Media Error",s),message:E},r.file="media-decode-error.md";break}case He.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let E=(h=(c=t.data)==null?void 0:c.response)==null?void 0:h.code;if(E>=400&&E<500){t.code=He.MediaError.MEDIA_ERR_NETWORK,t.data={response:{code:E}},{dialog:n,devlog:r}=Et(t,e,a,i);break}n={title:g("Source Not Supported",s),message:t.message},r.file="media-src-not-supported.md";break}default:n={title:g("Error",s),message:t.message};break}return e&&(n={title:g("Your device appears to be offline",s),message:g("Check your internet connection and try reloading this video.",s)}),{dialog:n,devlog:r}}var er=Object.values(F.StreamTypes),tr=700,ar=300,aa={LG:"large",SM:"small",XS:"extra-small"};function bt(t){let e=t.getBoundingClientRect();return e.width<ar?aa.XS:e.width<tr?aa.SM:aa.LG}var ir={SRC:"src"},f={ENV_KEY:"env-key",DEBUG:"debug",PLAYBACK_ID:"playback-id",METADATA_URL:"metadata-url",PREFER_MSE:"prefer-mse",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_SOFTWARE_NAME:"player-software-name",METADATA_VIDEO_ID:"metadata-video-id",METADATA_VIDEO_TITLE:"metadata-video-title",METADATA_VIEWER_USER_ID:"metadata-viewer-user-id",BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",TYPE:"type",STREAM_TYPE:"stream-type",START_TIME:"start-time"},v={DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio"};function sr(t,e){var a,i;return{src:!t.playbackId&&t.src,poster:t.getAttribute("poster"),thumbnailTime:!t.tokens.thumbnail&&t.thumbnailTime,autoplay:t.autoplay,crossOrigin:t.crossOrigin,loop:t.loop,muted:t.muted,paused:t.paused,playsInline:t.playsInline,preload:t.preload,playbackId:t.playbackId,envKey:t.envKey,debug:t.debug,tokens:t.tokens,beaconCollectionDomain:t.beaconCollectionDomain,metadata:t.metadata,playerSoftwareName:t.playerSoftwareName,playerSoftwareVersion:t.playerSoftwareVersion,startTime:t.startTime,preferMse:t.preferMse,audio:t.audio,streamType:t.streamType,primaryColor:t.primaryColor,secondaryColor:t.secondaryColor,forwardSeekOffset:t.forwardSeekOffset,backwardSeekOffset:t.backwardSeekOffset,defaultHiddenCaptions:t.defaultHiddenCaptions,customDomain:(a=t.getAttribute(f.CUSTOM_DOMAIN))!=null?a:void 0,playerSize:bt((i=t.mediaController)!=null?i:t),hasCaptions:!!Cs(t).length,metadataVideoId:t.getAttribute(f.METADATA_VIDEO_ID),metadataVideoTitle:t.getAttribute(f.METADATA_VIDEO_TITLE),metadataViewerUserId:t.getAttribute(f.METADATA_VIEWER_USER_ID),...e}}var or=Object.values(f),nr=Object.values(v),rr=mt(),lr="mux-player",Ws={dialog:void 0,isDialogOpen:!1,inLiveWindow:!1},Me,We,ae,Se,K,Fe,Fs,z,ge,Ce,ia,Ke,Ks,ft,dr,vt,mr,At,cr,It,ur,Tt,hr,yt,pr,_t,Er,Mt,br,gt=class extends ea{constructor(){super();L(this,Fe);L(this,z);L(this,Ce);L(this,Ke);L(this,ft);L(this,vt);L(this,At);L(this,It);L(this,Tt);L(this,yt);L(this,_t);L(this,Mt);L(this,Me,!1);L(this,We,{});L(this,ae,!0);L(this,Se,void 0);L(this,K,{...Ws,supportsAirPlay:!1,supportsVolume:!1,onCloseErrorDialog:()=>I(this,z,ge).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:e=>{qt(this,document.activeElement)||e.preventDefault()},onSeekToLive:()=>Jt(this)});this.attachShadow({mode:"open"}),this.isConnected&&I(this,Fe,Fs).call(this)}static get observedAttributes(){var e;return[...(e=ea.observedAttributes)!=null?e:[],...or,...nr]}get theme(){var e,a;return Array.from((a=(e=this.shadowRoot)==null?void 0:e.children)!=null?a:[]).find(({localName:i})=>i.startsWith("media-theme-"))}get mediaController(){var e,a;return(a=(e=this.theme)==null?void 0:e.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){I(this,Ke,Ks).call(this),I(this,ft,dr).call(this)}disconnectedCallback(){I(this,vt,mr).call(this)}attributeChangedCallback(e,a,i){switch(R(this,Me)||I(this,Fe,Fs).call(this),super.attributeChangedCallback(e,a,i),[f.PLAYBACK_ID,ir.SRC,v.PLAYBACK_TOKEN].includes(e)&&a!==i&&se(this,K,{...R(this,K),...Ws}),I(this,Ce,ia).call(this,{[Ms(e)]:i}),e){case v.THUMBNAIL_TIME:{i!=null&&this.tokens.thumbnail&&W(g("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case v.THUMBNAIL_TOKEN:{let{aud:n}=Be(i);i&&n!=="t"&&W(g("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:n}));break}case v.STORYBOARD_TOKEN:{let{aud:n}=Be(i);i&&n!=="s"&&W(g("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:n}));break}case f.PLAYBACK_ID:{i.includes("?token")&&he(g("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i})),this.streamType?this.streamType!=null&&!er.includes(this.streamType)&&ut({file:"invalid-stream-type.md",message:g("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand`, `live` or `ll-live`").format({streamType:this.streamType})}):ut({file:"invalid-stream-type.md",message:String(g("No stream-type value supplied. Defaulting to `on-demand`. Please provide stream-type as either: `on-demand`, `live` or `ll-live`"))});break}}}get hasPlayed(){var e,a;return(a=(e=this.mediaController)==null?void 0:e.hasAttribute("media-has-played"))!=null?a:!1}get inLiveWindow(){return R(this,K).inLiveWindow}get hls(){return W("<mux-player>.hls is deprecated, please use ._hls instead"),this._hls}get _hls(){var e;return(e=this.media)==null?void 0:e._hls}get mux(){var e;return(e=this.media)==null?void 0:e.mux}get audio(){return this.hasAttribute(v.AUDIO)}set audio(e){e||this.removeAttribute(v.AUDIO),this.setAttribute(v.AUDIO,"")}get thumbnailTime(){return $e(this.getAttribute(v.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(v.THUMBNAIL_TIME,`${e}`)}get primaryColor(){var e;return(e=this.getAttribute(v.PRIMARY_COLOR))!=null?e:void 0}set primaryColor(e){this.setAttribute(v.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e;return(e=this.getAttribute(v.SECONDARY_COLOR))!=null?e:void 0}set secondaryColor(e){this.setAttribute(v.SECONDARY_COLOR,`${e}`)}get forwardSeekOffset(){var e;return(e=$e(this.getAttribute(v.FORWARD_SEEK_OFFSET)))!=null?e:10}set forwardSeekOffset(e){this.setAttribute(v.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return(e=$e(this.getAttribute(v.BACKWARD_SEEK_OFFSET)))!=null?e:10}set backwardSeekOffset(e){this.setAttribute(v.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(v.DEFAULT_HIDDEN_CAPTIONS)}get playerSoftwareName(){var e;return(e=this.getAttribute(f.PLAYER_SOFTWARE_NAME))!=null?e:lr}get playerSoftwareVersion(){var e;return(e=this.getAttribute(f.PLAYER_SOFTWARE_VERSION))!=null?e:rr}get beaconCollectionDomain(){var e;return(e=this.getAttribute(f.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(f.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(f.BEACON_COLLECTION_DOMAIN))}get playbackId(){var e;return(e=this.getAttribute(f.PLAYBACK_ID))!=null?e:void 0}set playbackId(e){this.setAttribute(f.PLAYBACK_ID,`${e}`)}get customDomain(){var e;return(e=this.getAttribute(f.CUSTOM_DOMAIN))!=null?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(f.CUSTOM_DOMAIN,e):this.removeAttribute(f.CUSTOM_DOMAIN))}get envKey(){var e;return(e=_e(this,f.ENV_KEY))!=null?e:void 0}set envKey(e){this.setAttribute(f.ENV_KEY,`${e}`)}get debug(){return _e(this,f.DEBUG)!=null}set debug(e){e?this.setAttribute(f.DEBUG,""):this.removeAttribute(f.DEBUG)}get streamType(){return _e(this,f.STREAM_TYPE)}set streamType(e){this.setAttribute(f.STREAM_TYPE,`${e}`)}get startTime(){return $e(_e(this,f.START_TIME))}set startTime(e){this.setAttribute(f.START_TIME,`${e}`)}get preferMse(){return _e(this,f.PREFER_MSE)!=null}set preferMse(e){e?this.setAttribute(f.PREFER_MSE,""):this.removeAttribute(f.PREFER_MSE)}get metadata(){var e;return(e=this.media)==null?void 0:e.metadata}set metadata(e){this.media&&(this.media.metadata=e)}get tokens(){let e=this.getAttribute(v.PLAYBACK_TOKEN),a=this.getAttribute(v.THUMBNAIL_TOKEN),i=this.getAttribute(v.STORYBOARD_TOKEN);return{...R(this,We),...e!=null?{playback:e}:{},...a!=null?{thumbnail:a}:{},...i!=null?{storyboard:i}:{}}}set tokens(e){se(this,We,e!=null?e:{})}get playbackToken(){var e;return(e=this.getAttribute(v.PLAYBACK_TOKEN))!=null?e:void 0}set playbackToken(e){this.setAttribute(v.PLAYBACK_TOKEN,`${e}`)}get thumbnailToken(){var e;return(e=this.getAttribute(v.THUMBNAIL_TOKEN))!=null?e:void 0}set thumbnailToken(e){this.setAttribute(v.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return(e=this.getAttribute(v.STORYBOARD_TOKEN))!=null?e:void 0}set storyboardToken(e){this.setAttribute(v.STORYBOARD_TOKEN,`${e}`)}};Me=new WeakMap,We=new WeakMap,ae=new WeakMap,Se=new WeakMap,K=new WeakMap,Fe=new WeakSet,Fs=function(){var e,a;R(this,Me)||(se(this,Me,!0),I(this,z,ge).call(this,{playerSize:bt(this)}),customElements.upgrade(this.theme),this.theme instanceof fs||he("<media-theme-mux> failed to upgrade!"),customElements.upgrade(this.media),this.media instanceof be.default||he("<mux-video> failed to upgrade!"),customElements.upgrade(this.mediaController),this.mediaController instanceof Re||he("<media-controller> failed to upgrade!"),Us(this),I(this,It,ur).call(this),I(this,Tt,hr).call(this),I(this,_t,Er).call(this),I(this,Mt,br).call(this),I(this,At,cr).call(this),se(this,ae,(a=(e=this.mediaController)==null?void 0:e.hasAttribute("user-inactive"))!=null?a:!0),I(this,yt,pr).call(this))},z=new WeakSet,ge=function(e){Object.assign(R(this,K),e),I(this,Ce,ia).call(this)},Ce=new WeakSet,ia=function(e={}){Pe(Hs(sr(this,{...R(this,K),...e})),this.shadowRoot)},Ke=new WeakSet,Ks=function(){var e,a;R(this,K).playerSize!=bt((e=this.mediaController)!=null?e:this)&&I(this,z,ge).call(this,{playerSize:bt((a=this.mediaController)!=null?a:this)})},ft=new WeakSet,dr=function(){var e;se(this,Se,new ResizeObserver(()=>I(this,Ke,Ks).call(this))),R(this,Se).observe((e=this.mediaController)!=null?e:this)},vt=new WeakSet,mr=function(){var e;(e=R(this,Se))==null||e.disconnect()},At=new WeakSet,cr=function(){var a,i,s,n,r;(a=this.mediaController)==null||a.addEventListener("mediaplayrequest",l=>{var c;((c=l.target)==null?void 0:c.localName)==="media-play-button"&&this.streamType&&[F.StreamTypes.LIVE,F.StreamTypes.LL_LIVE,F.StreamTypes.DVR,F.StreamTypes.LL_DVR].includes(this.streamType)&&this.hasPlayed&&Jt(this)});let e=()=>{let l=Ds(this),c=R(this,K).inLiveWindow;l!==c&&(I(this,z,ge).call(this,{inLiveWindow:l}),this.dispatchEvent(new CustomEvent("inlivewindowchange",{composed:!0,bubbles:!0,detail:this.inLiveWindow})))};(i=this.media)==null||i.addEventListener("progress",e),(s=this.media)==null||s.addEventListener("waiting",e),(n=this.media)==null||n.addEventListener("timeupdate",e),(r=this.media)==null||r.addEventListener("emptied",e)},It=new WeakSet,ur=function(){var a;let e=i=>{let{detail:s}=i;if(s instanceof be.MediaError||(s=new be.MediaError(s.message,s.code,s.fatal)),!(s==null?void 0:s.fatal)){W(s),s.data&&W(`${s.name} data:`,s.data);return}let{dialog:n,devlog:r}=Et(s,!window.navigator.onLine,this.playbackId,this.playbackToken);r.message&&ut(r),he(s),s.data&&he(`${s.name} data:`,s.data),I(this,z,ge).call(this,{isDialogOpen:!0,dialog:n})};this.addEventListener("error",e),this.media&&(this.media.errorTranslator=(i={})=>{var n,r,l;if(!((n=this.media)==null?void 0:n.error))return i;let{devlog:s}=Et((r=this.media)==null?void 0:r.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:(l=this.media)==null?void 0:l.error.code,player_error_message:s.message?String(s.message):i.player_error_message}}),(a=this.media)==null||a.addEventListener("error",i=>{var n,r;let{detail:s}=i;if(!s){let{message:l,code:c}=(r=(n=this.media)==null?void 0:n.error)!=null?r:{};s=new be.MediaError(l,c)}!(s==null?void 0:s.fatal)||this.dispatchEvent(new CustomEvent("error",{detail:s}))})},Tt=new WeakSet,hr=function(){var a,i,s,n;let e=()=>I(this,Ce,ia).call(this);(i=(a=this.media)==null?void 0:a.textTracks)==null||i.addEventListener("addtrack",e),(n=(s=this.media)==null?void 0:s.textTracks)==null||n.addEventListener("removetrack",e)},yt=new WeakSet,pr=function(){var E,T;let e=this.mediaController,a=/.*Version\/.*Safari\/.*/.test(navigator.userAgent);if(/.*iPhone.*/.test(navigator.userAgent))return;let s,n=new WeakMap,r=()=>this.streamType&&[F.StreamTypes.LIVE,F.StreamTypes.LL_LIVE].includes(this.streamType)&&!this.secondaryColor&&this.offsetWidth>=800,l=(S,w)=>{if(r())return;Array.from(S&&S.activeCues||[]).forEach(A=>{if(!(!A.snapToLines||A.line<-5||A.line>=0&&A.line<10))if(!w||this.paused){let O=A.text.split(`
|
|
1432
|
+
`).length,Q=a?-2:-3;this.streamType&&[F.StreamTypes.LIVE,F.StreamTypes.LL_LIVE].includes(this.streamType)&&(Q=a?-1:-2);let q=Q-O;if(A.line===q)return;n.has(A)||n.set(A,A.line),A.line=0,A.line=q}else setTimeout(()=>{A.line=n.get(A)||"auto"},500)})},c=()=>{var S;l(s,(S=e==null?void 0:e.hasAttribute("user-inactive"))!=null?S:!1)},h=()=>{var U;let w=Array.from(((U=e==null?void 0:e.media)==null?void 0:U.textTracks)||[]).filter(A=>["subtitles","captions"].includes(A.kind)&&A.mode==="showing")[0];w!==s&&(s==null||s.removeEventListener("cuechange",c)),s=w,s==null||s.addEventListener("cuechange",c),l(s,R(this,ae))};h(),(E=e==null?void 0:e.media)==null||E.textTracks.addEventListener("change",h),(T=e==null?void 0:e.media)==null||T.textTracks.addEventListener("addtrack",h),e==null||e.addEventListener("userinactivechange",()=>{let S=e==null?void 0:e.hasAttribute("user-inactive");R(this,ae)!==S&&(se(this,ae,S),l(s,R(this,ae)))})},_t=new WeakSet,Er=function(){var e;if(globalThis.WebKitPlaybackTargetAvailabilityEvent){let a=i=>{let s=i.availability==="available";I(this,z,ge).call(this,{supportsAirPlay:s})};(e=this.media)==null||e.addEventListener("webkitplaybacktargetavailabilitychanged",a)}},Mt=new WeakSet,br=async function(){let e=await Ss();I(this,z,ge).call(this,{supportsVolume:e})};function _e(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}globalThis.customElements.get("mux-player")||(globalThis.customElements.define("mux-player",gt),globalThis.MuxPlayerElement=gt);var gr=gt;
|