(window["webpackJsonpstreamlit-browser"]=window["webpackJsonpstreamlit-browser"]||[]).push([[36],{2208:function(e,t,r){"use strict";r.r(t);var n=r(5),a=r(10),i=r(13),o=r(11),c=r(12),u=r(0),s=r.n(u),l=r(19),d=r(67),p=function(e){function t(){var e,r;Object(n.a)(this,t);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return(r=Object(i.a)(this,(e=Object(o.a)(t)).call.apply(e,[this].concat(c)))).videoRef=Object(u.createRef)(),r.componentDidMount=function(){r.updateTime()},r.componentDidUpdate=function(){r.updateTime()},r.updateTime=function(){if(r.videoRef.current){var e=r.props.element;r.videoRef.current.currentTime=e.get("startTime")}},r.getYoutubeSrc=function(){var e=r.props.element,t=e.get("startTime"),n=e.get("url");return t?"".concat(n,"?start=").concat(t):n},r.getVideoURI=function(){var e=r.props.element.get("url");return e.startsWith("/media")?Object(d.a)(Object(d.c)(),e):e},r}return Object(c.a)(t,e),Object(a.a)(t,[{key:"render",value:function(){var e=this.props,t=e.element,r=e.width,n=t.get("url");if(t.get("type")===l.m.Type.YOUTUBE_IFRAME){var a=.75*r;return s.a.createElement("iframe",{title:n,src:this.getYoutubeSrc(),width:r,height:a,frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return s.a.createElement("video",{ref:this.videoRef,controls:!0,src:this.getVideoURI(),className:"stVideo",style:{width:r}})}}]),t}(u.PureComponent);r.d(t,"default",function(){return p})}}]);
//# sourceMappingURL=36.fa117f95.chunk.js.map