1import{fetchPageVideo as o}from"./page-video-B6_0QKxq.js";import{b as e}from"./own-player-DiRkYRik.js";import"./plyr.min-kN5icvqt.js";/* empty css */const h=()=>({player:null,playing:!1,isPlaying:!1,ready:!1,loading:!1,error:!1,loopA:null,loopB:null,loopActive:!1,loopEnabled:!1,loopADisplay:"",loopBDisplay:"",currentSpeed:1,vimeoId:null,postId:null,init(){this.vimeoId=this.$el.dataset.vimeoId||null,this.postId=this.$el.dataset.postId||null},async startPlayer(){if(this.playing)return;this.playing=!0,this.loading=!0,await this.$nextTick();const l=this.$refs.videoEl,i=await o(this.vimeoId,this.postId);if(!i||!l){this.loading=!1,this.error=!0;return}if(this.player=e(l,i),!this.player){this.loading=!1,this.error=!0;return}this.player.on("ready",()=>{this.ready=!0,this.loading=!1}),this.player.on("playing",()=>this.isPlaying=!0),this.player.on("pause",()=>this.isPlaying=!1),this.player.on("timeupdate",()=>{this.loopActive&&this.loopA!==null&&this.loopB!==null&&this.player.currentTime>=this.loopB&&(this.player.currentTime=this.loopA)}),this.player.once("canplay",()=>{const t=this.player.play?.();t&&typeof t.catch=="function"&&t.catch(()=>{})})},togglePlay(){this.player&&this.player.togglePlay()},setLoopA(){this.player&&(this.loopA=this.player.currentTime,this.loopADisplay=this._fmt(this.loopA),this.loopEnabled=this.loopA!==null&&this.loopB!==null&&this.loopB>this.loopA,this.loopEnabled||(this.loopActive=!1))},setLoopB(){this.player&&(this.loopB=this.player.currentTime,this.loopBDisplay=this._fmt(this.loopB),this.loopEnabled=this.loopA!==null&&this.loopB!==null&&this.loopB>this.loopA,this.loopEnabled||(this.loopActive=!1))},toggleLoop(){this.loopEnabled&&(this.loopActive=!this.loopActive,this.loopActive&&this.loopA!==null&&(this.player.currentTime=this.loopA))},clearLoop(){this.loopA=null,this.loopB=null,this.loopActive=!1,this.loopEnabled=!1,this.loopADisplay="",this.loopBDisplay=""},setSpeed(l){this.currentSpeed=+l,this.player&&(this.player.speed=+l)},_fmt(l){return l===null?"--:--":`${Math.floor(l/60)}:${String(Math.floor(l%60)).padStart(2,"0")}`},destroy(){this.player&&this.player.destroy()}});export{h as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.