PageSourceSearch

https://www.nmdp.org/_next/static/chunks/reactPlayerDash.224b6eea4b259d35.js

js nmdp.org collected 2026-10-02 06:47:44 UTC 5,704 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8443],{71280:function(t,e,n){n.r(e),n.d(e,{default:function(){return m}});var i=n(67294),a=n(1979),o=n(14925);class s extends((0,o.lK)(a.zM)){static shadowRootOptions={...a.zM.shadowRootOptions};static getTemplateHTML=t=>{const{src:e,...n}=t;return a.zM.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=t.timescale||1,d=l/u/s;return{totalThumbnails:null!=r?Math.ceil(r/d):Math.ceil(l/d),thumbnailDuration:d}}(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(l){e(l)}}))}));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 a of t)e+=`${i(a.startTime)} --\x3e ${i(a.endTime)}\n`,e+=`${a.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(244).then(n.bind(n,22809));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");if(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),y={},g={},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")){y[t]=e;continue}const a=r(e);
1if(i&&null!=a&&(g[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 y){const n=y[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[e,n]of v.current)p(b.current,e,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(g,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)})}}]);
2//# sourceMappingURL=reactPlayerDash.224b6eea4b259d35.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.