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