发现直接修改播放器配置不生效,加载的还是初始化时的播放配置
直接修改dom
<div class="video-player-box vjs-big-play-centered"
ref="videoPlayer" <!--绑定ref-->
:playsinline="playsinline"
@play="onPlayerPlay($event)"
@pause="onPlayerPause($event)"
@ended="onPlayerEnded($event)"
@loadeddata="onPlayerLoadeddata($event)"
@waiting="onPlayerWaiting($event)"
@playing="onPlayerPlaying($event)"
@timeupdate="onPlayerTimeupdate($event)"
@canplay="onPlayerCanplay($event)"
@canplaythrough="onPlayerCanplaythrough($event)"
@ready="playerReadied"
@statechanged="playerStateChanged($event)"
v-video-player:myVideoPlayer="playerOptions"
>
</div>
let myPlayer = this.$refs.videoPlayer.firstChild.firstChild
myPlayer.src = '1.mp4' //播放地址