1import{i as u}from"./isSafari.0QK988BX.js";import{L as f,N as d,O as l,R as i,U as n,ba as c,bb as h}from"./entry.BARHI1zD.js";const p={name:"VideoPlayer",mixins:[u],props:{contentType:{type:String,required:!0},url:{type:String,required:!0},showControls:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1,default:!0},fullScreen:{type:Boolean,required:!1,default:!1},altText:{type:String,required:!1,default:""}},data(){return{controlsVisible:!1,firstDataLoaded:!1,playStarted:!1,pauseOnDataLoad:!1}},computed:{isVideo(){return this.contentType.startsWith("video")},pauseOnDataLoadTrigger(){return this.playStarted&&this.firstDataLoaded&&this.pauseOnDataLoad}},watch:{active(e){e||this.$refs?.video?.pause()},pauseOnDataLoadTrigger(e){e&&(this.pauseOnDataLoad=!1,setTimeout(()=>{this.$refs.video.pause(),this.$refs.video.muted=this.originalMuted,delete this.originalMuted},1))}},async mounted(){if((this.isSafari||this.isIOS)&&!this.firstDataLoaded){const e=async()=>{if(this.$refs.video){this.originalMuted=this.$refs.video.muted,this.$refs.video.muted=!0,this.pauseOnDataLoad=!0;try{await this.$refs.video.play(),this.playStarted=!0}catch{}}};"requestIdleCallback"in window?window.requestIdleCallback(()=>e()):setTimeout(()=>e(),200)}},methods:{handleDataLoaded(){this.firstDataLoaded=!0},play(){if(this.$refs.video){if(this.fullScreen){this.$refs.video.requestFullscreen?this.$refs.video.requestFullscreen():this.$refs.video.webkitRequestFullscreen?this.$refs.video.webkitRequestFullscreen():this.$refs.video.msRequestFullScreen&&this.$refs.video.msRequestFullScreen(),this.$refs.video.play();return}this.$refs.video.play(),this.controlsVisible=!0}},stop(){this.$refs.video&&this.fullScreen&&window.innerWidth-this.$refs.video.clientWidth>20&&this.$refs.video.pause()}}},v=e=>(c("data-v-c5777a6a"),e=e(),h(),e),_={key:0,class:"c-video","data-abstract-init":"Video"},y={key:0,class:"c-video__overlay"},m=["aria-label"],b=v(()=>i("span",{class:"c-video__overlay__play__triangle"},null,-1)),S=[b],w=["controls","aria-label"],D=["src"];function L(e,t,r,q,o,s){return s.isVideo?(d(),l("div",_,[r.showControls&&!o.controlsVisible?(d(),l("div",y,[i("button",{class:"c-video__overlay__play","aria-label":e.$t("media.play"),type:"button",onClick:t[0]||(t[0]=(...a)=>s.play&&s.play(...a))},S,8,m)])):n("",!0),i("video",{ref:"video",controls:o.controlsVisible,preload:"metadata",class:"c-video__item","aria-label":r.altText,playsinline:"",onFullscreenchange:t[1]||(t[1]=(...a)=>s.stop&&s.stop(...a)),onLoadeddata:t[2]||(t[2]=(...a)=>s.handleDataLoaded&&s.handleDataLoaded(...a))},[i("source",{src:r.url},null,8,D)],40,w)])):n("",!0)}const V=f(p,[["render",L],["__scopeId","data-v-c5777a6a"]]);export{V 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.