HEX
Server: Apache/2.4.41
System: Linux mainweb 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: nationalmedicaregrp (1119)
PHP: 8.3.7
Disabled: exec,passthru,shell_exec,system,popen,proc_open,pcntl_exec
Upload Files
File: /home/dv-pro/public_html/wp-content/plugins/simply-static/src/admin/build/reactPlayerHls.js
"use strict";(globalThis.webpackChunksimplystatic_settings=globalThis.webpackChunksimplystatic_settings||[]).push([[262],{805:(t,e,i)=>{i.r(e),i.d(e,{default:()=>v});var s=i(609),a=i(121),n=i(530),o=i(945);const r=(l=(0,n.u6)(a.lB),class extends l{static shadowRootOptions={...l.shadowRootOptions};static getTemplateHTML=(t,e={})=>{const{src:i,...s}=t;return`\n        <script type="application/json" id="config">\n          ${JSON.stringify(e.config||{})}\n        <\/script>\n        ${l.getTemplateHTML(s)}\n      `};#t=null;#e=null;constructor(){super(),this.#i("config")}get config(){return this.#e}set config(t){this.#e=t}attributeChangedCallback(t,e,i){"src"!==t&&super.attributeChangedCallback(t,e,i),"src"===t&&e!=i&&this.load()}#s(){var t,e;null==(t=this.#t)||t.remove(),null==(e=this.nativeEl)||e.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#a),this.api&&(this.api.detachMedia(),this.api.destroy(),this.api=null)}async load(){var t,e;const i=!this.api;if(this.#s(),this.src)if(i&&!this.#e&&(this.#e=JSON.parse((null==(t=this.shadowRoot.getElementById("config"))?void 0:t.textContent)||"{}")),o.Ay.isSupported()){switch(this.api=new o.Ay({liveDurationInfinity:!0,autoStartLoad:!1,...this.config}),await Promise.resolve(),this.api.loadSource(this.src),this.api.attachMedia(this.nativeEl),this.nativeEl.preload){case"none":{const t=()=>this.api.startLoad();this.nativeEl.addEventListener("play",t,{once:!0}),this.api.on(o.Ay.Events.DESTROYING,(()=>{this.nativeEl.removeEventListener("play",t)}));break}case"metadata":{const t=this.api.config.maxBufferLength,e=this.api.config.maxBufferSize;this.api.config.maxBufferLength=1,this.api.config.maxBufferSize=1;const i=()=>{this.api.config.maxBufferLength=t,this.api.config.maxBufferSize=e};this.nativeEl.addEventListener("play",i,{once:!0}),this.api.on(o.Ay.Events.DESTROYING,(()=>{this.nativeEl.removeEventListener("play",i)})),this.api.startLoad();break}default:this.api.startLoad()}this.nativeEl.webkitCurrentPlaybackTargetIsWireless&&this.api.stopLoad(),this.nativeEl.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#a),this.#t=document.createElement("source"),this.#t.setAttribute("type","application/x-mpegURL"),this.#t.setAttribute("src",this.src),this.nativeEl.disableRemotePlayback=!1,this.nativeEl.append(this.#t);const t=new WeakMap;this.api.on(o.Ay.Events.MANIFEST_PARSED,((e,i)=>{this.nativeEl.autoplay&&this.nativeEl.paused&&this.nativeEl.play().catch((t=>{console.warn("Autoplay failed:",t)})),s();let a=this.videoTracks.getTrackById("main");a||(a=this.addVideoTrack("main"),a.id="main",a.selected=!0);for(const[e,s]of i.levels.entries()){const i=a.addRendition(s.url[0],s.width,s.height,s.videoCodec,s.bitrate);t.set(s,`${e}`),i.id=`${e}`}for(let[t,e]of i.audioTracks.entries()){const i=e.default?"main":"alternative",s=this.addAudioTrack(i,e.name,e.lang);s.id=`${t}`,e.default&&(s.enabled=!0)}})),this.audioTracks.addEventListener("change",(()=>{var t;const e=+(null==(t=[...this.audioTracks].find((t=>t.enabled)))?void 0:t.id),i=this.api.audioTracks.map((t=>t.id));e!=this.api.audioTrack&&i.includes(e)&&(this.api.audioTrack=e)})),this.api.on(o.Ay.Events.LEVELS_UPDATED,((e,i)=>{const s=this.videoTracks[this.videoTracks.selectedIndex??0];if(!s)return;const a=i.levels.map((e=>t.get(e)));for(const t of this.videoRenditions)t.id&&!a.includes(t.id)&&s.removeRendition(t)}));const i=t=>{const e=t.target.selectedIndex;e!=this.api.nextLevel&&(this.api.nextLevel=e)};null==(e=this.videoRenditions)||e.addEventListener("change",i);const s=()=>{for(const t of this.videoTracks)this.removeVideoTrack(t);for(const t of this.audioTracks)this.removeAudioTrack(t)};this.api.once(o.Ay.Events.DESTROYING,s)}else await Promise.resolve(),this.nativeEl.canPlayType("application/vnd.apple.mpegurl")&&(this.nativeEl.src=this.src)}#a=()=>{var t,e,i;(null==(t=this.nativeEl)?void 0:t.webkitCurrentPlaybackTargetIsWireless)?null==(e=this.api)||e.stopLoad():null==(i=this.api)||i.startLoad()};#i(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}}});var l;globalThis.customElements&&!globalThis.customElements.get("hls-video")&&globalThis.customElements.define("hls-video",r);var c=r,d=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),u={className:"class",htmlFor:"for"};function h(t){return t.toLowerCase()}function p(t){return"boolean"==typeof t?t?"":void 0:"function"==typeof t||"object"==typeof t&&null!==t?void 0:t}function f(t,e,i){var s;t[e]=i,null==i&&e in((null==(s=globalThis.HTMLElement)?void 0:s.prototype)??{})&&t.removeAttribute(e)}var v=function({react:t,tagName:e,elementClass:i,events:s,displayName:a,defaultProps:n,toAttributeName:o=h,toAttributeValue:r=p}){const l=Number.parseInt(t.version)>=19,c=t.forwardRef(((a,c)=>{var h,v;const g=t.useRef(null),m=t.useRef(new Map),y={},E={},b={},T={};for(const[t,e]of Object.entries(a)){if(d.has(t)){b[t]=e;continue}const s=o(u[t]??t);if(i.prototype&&t in i.prototype&&!(t in((null==(h=globalThis.HTMLElement)?void 0:h.prototype)??{}))&&!(null==(v=i.observedAttributes)?void 0:v.some((t=>t===s)))){T[t]=e;continue}if(t.startsWith("on")){y[t]=e;continue}const a=r(e);if(s&&null!=a&&(E[s]=String(a),l||(b[s]=a)),s&&l){const t=p(e);b[s]=a!==t?a:e}}if("undefined"!=typeof window){for(const e in y){const i=y[e],a=e.endsWith("Capture"),n=((null==s?void 0:s[e])??e.slice(2).toLowerCase()).slice(0,a?-7:void 0);t.useLayoutEffect((()=>{const t=null==g?void 0:g.current;if(t&&"function"==typeof i)return t.addEventListener(n,i,a),()=>{t.removeEventListener(n,i,a)}}),[null==g?void 0:g.current,i])}t.useLayoutEffect((()=>{if(null===g.current)return;const t=new Map;for(const e in T)f(g.current,e,T[e]),m.current.delete(e),t.set(e,T[e]);for(const[t,e]of m.current)f(g.current,t,void 0);m.current=t}))}if("undefined"==typeof window&&(null==i?void 0:i.getTemplateHTML)&&(null==i?void 0:i.shadowRootOptions)){const{mode:e,delegatesFocus:s}=i.shadowRootOptions,n=t.createElement("template",{shadowrootmode:e,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(E,a)}});b.children=[n,b.children]}return t.createElement(e,{...n,...b,ref:t.useCallback((t=>{g.current=t,"function"==typeof c?c(t):null!==c&&(c.current=t)}),[c])})}));return c.displayName=a??i.name,c}({react:s,tagName:"hls-video",elementClass:c,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":h(t)})}}]);