Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

动态更改音乐的src无效 #232

Open
vela666 opened this issue Mar 8, 2021 · 3 comments
Open

动态更改音乐的src无效 #232

vela666 opened this issue Mar 8, 2021 · 3 comments

Comments

@vela666
Copy link

vela666 commented Mar 8, 2021

就算更改src地址后 音乐不会自动播放

@hyperjlord
Copy link

我也遇到了,请问现在有解决办法了吗

就算更改src地址后 音乐不会自动播放

@vela666 vela666 closed this as completed Jun 3, 2021
@vela666 vela666 reopened this Jun 3, 2021
@vela666
Copy link
Author

vela666 commented Jun 3, 2021

我也遇到了,请问现在有解决办法了吗

就算更改src地址后 音乐不会自动播放

https://gitee.com/thousands-of-music/music-project/blob/master/src/App.vue 我之前写的 你可以试下,App.vue组件里

@hyperjlord
Copy link

hyperjlord commented Jun 11, 2021

我也遇到了,请问现在有解决办法了吗

就算更改src地址后 音乐不会自动播放

https://gitee.com/thousands-of-music/music-project/blob/master/src/App.vue 我之前写的 你可以试下,App.vue组件里

这个问题我现在解决了,在使用该组件时类似这样加上key绑定<aplayer :key=audio.src></aplayer>,使得每次src有变化时,重新渲染一遍该组件就可以了,还是感谢你提供的方法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants