(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,348628,(e,t,r)=>{let s,o,a;var l=Object.create,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,u=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,c=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of p(t))h.call(e,o)||o===r||i(e,o,{get:()=>t[o],enumerable:!(s=n(t,o))||s.enumerable});return e},d=(e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?i(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r,r},y={},m={default:()=>O};for(var f in m)i(y,f,{get:m[f],enumerable:!0});t.exports=c(i({},"__esModule",{value:!0}),y);var b=(a=null!=(s=e.r(271645))?l(u(s)):{},c(!o&&s&&s.__esModule?a:i(a,"default",{value:s,enumerable:!0}),s)),P=e.r(762406),g=e.r(933066);class O extends b.Component{constructor(){super(...arguments),d(this,"callPlayer",P.callPlayer),d(this,"duration",null),d(this,"currentTime",null),d(this,"secondsLoaded",null),d(this,"mute",()=>{this.callPlayer("mute")}),d(this,"unmute",()=>{this.callPlayer("unmute")}),d(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,P.getSDK)("https://cdn.embed.ly/player-0.1.0.min.js","playerjs").then(e=>{this.iframe&&(this.player=new e.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({duration:e,seconds:t})=>{this.duration=e,this.currentTime=t}),this.player.on("buffered",({percent:e})=>{this.duration&&(this.secondsLoaded=this.duration*e)}),this.props.muted&&this.player.mute())},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",100*e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){let e=this.props.url.match(g.MATCH_URL_STREAMABLE)[1];return b.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allow:"encrypted-media; autoplay; fullscreen;"})}}d(O,"displayName","Streamable"),d(O,"canPlay",g.canPlay.streamable)}]);