1"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[178],{178:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var n=r(66845),a=r(16295),s=r(68785),i=r(40864);const d=528;function o(e){let{element:t,width:r,endpoints:o}=e;const c=(0,n.useRef)(null),{type:l,url:u,startTime:p,subtitles:m,endTime:f,loop:h}=t;(0,n.useEffect)((()=>{c.current&&(c.current.currentTime=p)}),[p]),(0,n.useEffect)((()=>{const e=c.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,n.useEffect)((()=>{const e=c.current;if(!e)return;let t=!1;const r=()=>{f>0&&e.currentTime>=f&&(h?(e.currentTime=p||0,e.play()):t||(t=!0,e.pause()))};return f>0&&e.addEventListener("timeupdate",r),()=>{e&&f>0&&e.removeEventListener("timeupdate",r)}}),[f,h,p]),(0,n.useEffect)((()=>{const e=c.current;if(!e)return;const t=()=>{h&&(e.currentTime=p||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[h,p]);const v=e=>{const{startTime:r,endTime:n,loop:a}=t,s=new URL(e);if(r&&!isNaN(r)&&s.searchParams.append("start",r.toString()),n&&!isNaN(n)&&s.searchParams.append("end",n.toString()),a){s.searchParams.append("loop","1");const e=s.pathname.split("/").pop();e&&s.searchParams.append("playlist",e)}return s.toString()};if(l===a.nk.Type.YOUTUBE_IFRAME){const e=0!==r?.75*r:d;return(0,i.jsx)("iframe",{"data-testid":"stVideo",title:u,src:v(u),width:r,height:e,style:{colorScheme:"normal"},frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,i.jsx)("video",{"data-testid":"stVideo",ref:c,controls:!0,src:o.buildMediaURL(u),className:"stVideo",style:{width:r,height:0===r?d:void 0},crossOrigin:s.td&&m.length>0?"anonymous":void 0,children:m&&m.map(((e,t)=>(0,i.jsx)("track",{kind:"captions",src:o.buildMediaURL(e.url),label:e.label,default:0===t},t)))})}}}]);
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.