"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[178],{178:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var a=r(66845),s=r(16295),i=r(68785),n=r(40864);const l=528;function d(e){let{element:t,width:r,endpoints:d}=e;const c=(0,a.useRef)(null),{type:o,url:u,startTime:m,subtitles:f}=t;(0,a.useEffect)((()=>{c.current&&(c.current.currentTime=m)}),[m]),(0,a.useEffect)((()=>{const e=c.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]);const h=e=>{const{startTime:r}=t;return r?"".concat(e,"?start=").concat(r):e};if(o===s.nk.Type.YOUTUBE_IFRAME){const e=0!==r?.75*r:l;return(0,n.jsx)("iframe",{"data-testid":"stVideo",title:u,src:h(u),width:r,height:e,style:{colorScheme:"light dark"},frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,n.jsx)("video",{"data-testid":"stVideo",ref:c,controls:!0,src:d.buildMediaURL(u),className:"stVideo",style:{width:r,height:0===r?l:void 0},crossOrigin:i.td&&f.length>0?"anonymous":void 0,children:f&&f.map(((e,t)=>(0,n.jsx)("track",{kind:"captions",src:d.buildMediaURL(e.url),label:e.label,default:0===t},t)))})}}}]);