export default 前 创建音频
const audio = uni.createInnerAudioContext(); //创建音频
audio.src = 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.mp3';
拖动进度条的HTML:
<slider class="basis-xl" v-model="current" @changing="changingSlider($event)" @change="changeSlider($event)" :max="duration" block-size="14" activeColor="#DD514C"></slider>
拖拽的方法
changeSlider(e){
console.log(e.detail.value)
audio.currentTime = e.detail.value
this.playing()
},
playing(){
//音频进度更新事件
audio.onTimeUpdate(() => {
this.current = audio.currentTime;
this.computedTime('startTime',this.current)
});
}
解决了 没事了
2 个回复
8***@qq.com
请问你是怎么解决的呢,遇到同样的问题
8***@qq.com
我草一年多了,傻逼官方还没解决