上代码:
html:
<video id="myVideo" :src="url"></video>
js:
this.videoContext = uni.createVideoContext('myVideo');//创建视频实例指向video
使用:
this.videoContext.play(); 播放
this.videoContext.pause(); 暂停
上代码:
html:
<video id="myVideo" :src="url"></video>
js:
this.videoContext = uni.createVideoContext('myVideo');//创建视频实例指向video
使用:
this.videoContext.play(); 播放
this.videoContext.pause(); 暂停