video 倍速功能的实现


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里面写的没有设置样式  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM