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