},
//全屏
fullScreenHandle(){
console.log(“全屏”);
if(!this.player.isFullscreen()){
this.player.requestFullscreen();
this.player.isFullscreen(true);
}else{
this.player.exitFullscreen();
this.player.isFullscreen(false);
}
},
当然,在vue-video-player中的播放器会在回调方法中监听状态的变化:
[html] view plain copy
<video-player class=”video-player-box”
ref=”videoPlayer”
:options=”playerOptions”
:playsinline=”true”
customEventName=”customstatechangedeventname”
@play=”onPlayerPlay($event)”
@pause=”onPlayerPause($event)”
@ended=”onPlayerEnded($event)”
@waiting=”onPlayerWaiting($event)”
@playing=”onPlayerPlaying($event)”
@loadeddata=”onPlayerLoadeddata($event)”
@timeupdate=”onPlayerTimeupdate($event)”
@statechanged=”playerStateChanged($event)”
@ready=”playerReadied”
>










