We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No description provided.
The text was updated successfully, but these errors were encountered:
可能的原因:在Safari上,点击播放按钮后,音频不会自动加载。在play之前需要load函数。
Sorry, something went wrong.
在safari中,如果audio的preload属性是metadata,或者none,那么始终不会出发canplay事件。因此需要在play函数中加入下面这一段代码:
if (!this.canPlay) { this.audio.load() }
点击播放按钮后,如果这首歌不能播放,那么会先试着加载一下,加载会触发canplay事件了,然后把canPlay设为true,后面的逻辑就通顺了。
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: