[Webkit-unassigned] [Bug 282053] New: "canplay" event is not fired on iOS 17.6.1, 18.0.1 in Safari
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 24 10:58:06 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=282053
Bug ID: 282053
Summary: "canplay" event is not fired on iOS 17.6.1, 18.0.1 in
Safari
Product: WebKit
Version: Safari 17
Hardware: iPhone / iPad
OS: iOS 17
Status: NEW
Severity: Normal
Priority: P2
Component: Media
Assignee: webkit-unassigned at lists.webkit.org
Reporter: webkit-bugzilla at mysh.dev
Created attachment 473034
--> https://bugs.webkit.org/attachment.cgi?id=473034&action=review
.MP3 test file
On iOS Safari (versions 17.6.1 and 18.0.1), the "canplay" event is not fired when attempting to load an audio element.
This issue does not occur on desktop Safari version 18.0.1 (20619.1.26.31.7, 621+) running macOS Sequoia 15.0.1.
Expected Behavior:
The "canplay" event should be fired after enough of the audio file is loaded to start playback.
Actual Behavior:
On iOS Safari (17.6.1 and 18.0.1), the "canplay" event is not fired.
As a workaround, I am currently using the "loadedmetadata" event instead.
Steps to Reproduce:
Open Safari on iOS version 17.6.1 or 18.0.1, load HTML Test Case (code below)
Observe the events triggered when the audio element is loaded.
HTML Test Case (wawa.mp3 in attachments):
```
<html>
<body>
<audio src="wawa.mp3"></audio>
</body>
<script>
const audio = document.getElementsByTagName('audio')[0];
audio.addEventListener("canplay", () => {
alert("canplay event fired"); // doesn't work on iOS 17/18 Safari
})
audio.addEventListener("loadedmetadata", () => {
alert("loadedmetadata event fired"); // works on iOS 17/18 Safari
})
</script>
</html>
```
p.s. Also this might be related - "HTMLAudioElement issues in iOS 17.4": https://forums.developer.apple.com/forums/thread/748001
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241024/e7bc0a8c/attachment.htm>
More information about the webkit-unassigned
mailing list