"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),g=require("nanoid"),P=["poster","autoplay","controls","loop","muted","src"],w=s.defineComponent({name:"zv-media-video"}),f=s.defineComponent({...w,props:{basicOption:{},sources:{},useEvents:{}},emits:["on-video-progress","on-video-play","on-video-pause","on-video-ended","on-video-playing","on-video-timeupdate","on-video-error","on-video-volumechange"],setup(t,{expose:d,emit:a}){const e=t,r=s.ref(g.nanoid()),i=s.ref(),o=a,v=()=>{o("on-video-progress"),window.SHJParseEvent(e.useEvents,"on-video-progress")},u=()=>{o("on-video-play"),window.SHJParseEvent(e.useEvents,"on-video-play")},p=()=>{o("on-video-pause"),window.SHJParseEvent(e.useEvents,"on-video-pause")},l=()=>{o("on-video-ended"),window.SHJParseEvent(e.useEvents,"on-video-ended")},c=()=>{o("on-video-playing"),window.SHJParseEvent(e.useEvents,"on-video-playing")},m=()=>{o("on-video-timeupdate"),window.SHJParseEvent(e.useEvents,"on-video-timeupdate")},E=()=>{o("on-video-error"),window.SHJParseEvent(e.useEvents,"on-video-error")},y=()=>{o("on-video-volumechange"),window.SHJParseEvent(e.useEvents,"on-video-volumechange")};return d({play:()=>{i.value&&i.value.play()},pause:()=>{i.value&&i.value.pause()}}),(n,S)=>(s.openBlock(),s.createElementBlock("video",{ref_key:"videoRef",ref:i,key:r.value,poster:n.basicOption.poster,autoplay:n.basicOption.autoplay,controls:n.basicOption.controls,loop:n.basicOption.loop,muted:n.basicOption.muted,class:"zerov-widget-video",src:n.basicOption.src,onProgress:v,onPlay:u,onEnded:l,onPlaying:c,onPause:p,onTimeupdate:m,onError:E,onVolumechange:y},null,40,P))}});exports.default=f;
