video設置倍速 this.videoContext.playbackRate()
<view class=""> <button @tap="bindButtonRate" data-rate='1'>倍速1</button> <button @tap="bindButtonRate" data-rate='1.5'>倍速1.5</button> <button @tap="bindButtonRate" data-rate='2'>倍速2</button> </view>
bindButtonRate (e) { // 設置倍速播放
let rate = e.currentTarget.dataset.rate
this.videoContext.playbackRate(Number(rate))
},
簡單的幾行代碼就可實現 我是在uniapp里面寫的沒有設置樣式
