Open mschange opened 5 years ago
为啥符合格式的issue 通过不了,不符合的反而可以通过,机器人管理逻辑坑爹
什么意思
就是他不是搞了个机器人专门检测issue的格式么,你去看看关闭的issue上面的,格式基本都是对的,但是没被打开,你这个issue格式按道理是不对的,反而打开了
我刚刚提交的,先解决问题啊
视频播放我没做过,等做过的大佬来帮你看吧。。祝顺利解决
是音频,原生的没有问题,mpvue出了问题,
@zxzhgk 试了下 没问题阿。。
@kailcc 有问题啊,我的那个事件在播放结束后点击播放不执行了,你的是?
@mschange 播放结束后,你有seek(0)吗
在哪里seek(0)啊,什么意思
@kailcc 你的意思是在播放结束后添加this.context.seek(0);就可以了?
@kailcc 在播放结束加了也不行啊
@mschange 额,背景音乐没使用过。
@kailcc 我在网上查了,好像都没遇到过,
代码:
<button @click='plays'>播放
export default { data () { return { motto: 'Hello World', userInfo: {}, pt: '', } },
onLoad() { this.pt = wx.getBackgroundAudioManager(); this.pt.title = '此时此刻' this.pt.epname = '此时此刻' this.pt.singer = '许巍' this.pt.src = 'https://cdn.audio.xxbmm.com/xxbmm/cloud/videos/1536910813abwWMtest.mp3'; this.pt.onPlay(() => { console.log('开始播放') }) this.pt.onTimeUpdate(() => { console.log('播放的时候触发'); }) }, methods: { plays() { console.log('jinglaile'); const audioStatus = this.pt.paused; if (audioStatus) this.pt.play(); else this.pt.pause(); this.audioStatus = (!audioStatus); } }, }
当播放结束后,点击播放,this.pt.onTimeUpdate(() => { console.log('播放的时候触发'); })不会被触发, 使用的是https://developers.weixin.qq.com/miniprogram/dev/api/media/background-audio/BackgroundAudioManager.html
来个大佬给我解决下啊
mpvue使用背景音乐播放,监听音频播放进度更新事件onTimeUpdate回调函数,在初始的时候可以正常调用,但是播放结束后,再次点击播放,不会执行该回调函数,有人遇到过吗