whoami7 - Manager
:
/
home
/
analuakl
/
somethingsmushy.com
/
wp-content
/
plugins
/
user-registration
/
chunks
/
Upload File:
files >> /home/analuakl/somethingsmushy.com/wp-content/plugins/user-registration/chunks/reactPlayerDash.js
"use strict";(globalThis.webpackChunkuser_registration=globalThis.webpackChunkuser_registration||[]).push([[395],{5542(t,e,n){n.r(e),n.d(e,{default:()=>m});var i=n(1609),a=n(5734),o=n(9651);class s extends((0,o.u6)(a.lB)){static shadowRootOptions={...a.lB.shadowRootOptions};static getTemplateHTML=t=>{const{src:e,...n}=t;return a.lB.getTemplateHTML(n)};#t;attributeChangedCallback(t,e,n){"src"!==t&&super.attributeChangedCallback(t,e,n),"src"===t&&e!=n&&this.load()}async _initThumbnails(t){const{totalThumbnails:e,thumbnailDuration:n}=function(t){var e,n;const i=t.essentialProperties[0],[a,o]=i.value.split("x").map(Number),s=a*o,r=(null==(n=null==(e=t.adaptation)?void 0:e.period)?void 0:n.duration)||null,l=t.segmentDuration,u=l/(t.timescale||1)/s;return{totalThumbnails:null!=r?Math.ceil(r/u):Math.ceil(l/u),thumbnailDuration:u}}(t),i=await(async(e,n)=>{const i=[],a=t.timescale||1,o=t.startNumber||1,s=t.presentationTimeOffset?t.presentationTimeOffset/a:0,l=t.segmentDuration;for(let t=0;t<e;t++){const a=r({thIndex:t,thduration:n,ttiles:e,tduration:l,startNumber:o,pto:s}),u=a+n,d=new Promise((t,e)=>{this.api.provideThumbnail(a,({url:n,width:i,height:o,x:s,y:r})=>{try{const e=new VTTCue(a,u,`${n}#xywh=${s},${r},${i},${o}`);t(e)}catch(t){e(t)}})});i.push(d)}return await Promise.all(i).catch(t=>console.error("Error processing thumbnails",t))})(e,n);let a=this.nativeEl.querySelector('track[label="thumbnails"]');if(!a){a=function(){const t=document.createElement("track");return t.kind="metadata",t.label="thumbnails",t.srclang="en",t.mode="hidden",t.default=!0,t}(),this.nativeEl.appendChild(a);const t=function(t){let e="WEBVTT\n\n";for(const n of t)e+=`${i(n.startTime)} --\x3e ${i(n.endTime)}\n`,e+=`${n.text}\n\n`;const n=new Blob([e],{type:"text/vtt"});return URL.createObjectURL(n);function i(t){return`${String(Math.floor(t/3600)).padStart(2,"0")}:${String(Math.floor(t%3600/60)).padStart(2,"0")}:${(t%60).toFixed(3).padStart(6,"0")}`}}(i);a.src=t,a.dispatchEvent(new Event("change"))}}async load(){if(this.#t)return void this.api.attachSource(this.src);this.#t=!0;const t=await n.e(370).then(n.bind(n,370));this.api=t.MediaPlayer().create(),this.api.initialize(this.nativeEl,this.src,this.autoplay),this.api.on(t.MediaPlayer.events.STREAM_INITIALIZED,()=>{const t=this.api.getRepresentationsByType("video");let e=this.videoTracks.getTrackById("main");e||(e=this.addVideoTrack("main"),e.id="main",e.selected=!0),t.forEach(t=>{const n=t.bandwidth??t.bitrate??(Number.isFinite(t.bitrateInKbit)?1e3*t.bitrateInKbit:void 0);e.addRendition(t.id,t.width,t.height,t.mimeType??t.codec,n).id=t.id}),this.videoRenditions.addEventListener("change",()=>{const t=this.videoRenditions[this.videoRenditions.selectedIndex];(null==t?void 0:t.id)?(this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),this.api.setRepresentationForTypeById("video",t.id,!0)):this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}})}),this.api.isDynamic()||this.api.getRepresentationsByType("image").forEach(async(t,e)=>{e>0||this._initThumbnails(t)})})}}function r({thIndex:t,tduration:e,thduration:n,ttiles:i,startNumber:a,pto:o}){return(Math.floor(t/i)+a-1)*e-o+(t%i+1-1)*n}globalThis.customElements&&!globalThis.customElements.get("dash-video")&&globalThis.customElements.define("dash-video",s);var l=s,u=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),d={className:"class",htmlFor:"for"};function c(t){return t.toLowerCase()}function h(t){return"boolean"==typeof t?t?"":void 0:"function"==typeof t||"object"==typeof t&&null!==t?void 0:t}function p(t,e,n){var i;t[e]=n,null==n&&e in((null==(i=globalThis.HTMLElement)?void 0:i.prototype)??{})&&t.removeAttribute(e)}var m=function({react:t,tagName:e,elementClass:n,events:i,displayName:a,defaultProps:o,toAttributeName:s=c,toAttributeValue:r=h}){const l=Number.parseInt(t.version)>=19,m=t.forwardRef((a,c)=>{var m,f;const b=t.useRef(null),v=t.useRef(new Map),g={},y={},T={},w={};for(const[t,e]of Object.entries(a)){if(u.has(t)){T[t]=e;continue}const i=s(d[t]??t);if(n.prototype&&t in n.prototype&&!(t in((null==(m=globalThis.HTMLElement)?void 0:m.prototype)??{}))&&!(null==(f=n.observedAttributes)?void 0:f.some(t=>t===i))){w[t]=e;continue}if(t.startsWith("on")){g[t]=e;continue}const a=r(e);if(i&&null!=a&&(y[i]=String(a),l||(T[i]=a)),i&&l){const t=h(e);T[i]=a!==t?a:e}}if("undefined"!=typeof window){for(const e in g){const n=g[e],a=e.endsWith("Capture"),o=((null==i?void 0:i[e])??e.slice(2).toLowerCase()).slice(0,a?-7:void 0);t.useLayoutEffect(()=>{const t=null==b?void 0:b.current;if(t&&"function"==typeof n)return t.addEventListener(o,n,a),()=>{t.removeEventListener(o,n,a)}},[null==b?void 0:b.current,n])}t.useLayoutEffect(()=>{if(null===b.current)return;const t=new Map;for(const e in w)p(b.current,e,w[e]),v.current.delete(e),t.set(e,w[e]);for(const[t,e]of v.current)p(b.current,t,void 0);v.current=t})}if("undefined"==typeof window&&(null==n?void 0:n.getTemplateHTML)&&(null==n?void 0:n.shadowRootOptions)){const{mode:e,delegatesFocus:i}=n.shadowRootOptions,o=t.createElement("template",{shadowrootmode:e,shadowrootdelegatesfocus:i,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(y,a)},key:"ce-la-react-ssr-template-shadow-root"});T.children=[o,T.children]}return t.createElement(e,{...o,...T,ref:t.useCallback(t=>{b.current=t,"function"==typeof c?c(t):null!==c&&(c.current=t)},[c])},T.children)});return m.displayName=a??n.name,m}({react:i,tagName:"dash-video",elementClass:l,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":c(t)})}}]);
Copyright ©2021 || Defacer Indonesia