content
content copied to clipboard
Specify that "canplay" event, not being fired by mobile Safari on Audio
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplay_event
What specific section or headline is this issue about?
No response
What information was incorrect, unhelpful, or incomplete?
canplay
event doesn't fire on iOS 17 mobile Safari for Audio
What did you expect to see?
Just add a note about the fact that, at least on iOS 17, Safari doesn't fire this event anymore, and it can't be used to check if we can play audio in the moment. As a workaround, you can use loadedmetadata
or add autoplay
to every single audio tag and pause it immediately - I think in that case Safari will actually fire this event.
Do you have any supporting links, references, or citations?
"HTMLAudioElement issues in iOS 17.4": https://forums.developer.apple.com/forums/thread/748001
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder:
en-us/web/api/htmlmediaelement/canplay_event
- MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplay_event
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/htmlmediaelement/canplay_event/index.md
- Last commit: https://github.com/mdn/content/commit/b71d118ffc6d72b77efad9661110fcc9ede464eb
- Document last modified: 2024-07-25T14:22:56.000Z