Bug 54488
Summary: | <audio> tag doesn't report 'canplay' until 'played' altough autobuffer/preload | ||
---|---|---|---|
Product: | WebKit | Reporter: | StuFF mc <mc> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | eric.carlson |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac (Intel) | ||
OS: | Other |
StuFF mc
<!DOCTYPE html>
<html>
<body>
<h1>initializing...</h1>
<audio controls src="http://stream.radiocampusparis.org:8000/stream_rcp.mp3" preload="auto" autobuffer></audio>
<script type="text/javascript">
function log(text) {
document.getElementsByTagName("h1")[0].innerHTML = text;
}
log("loading...");
myAudio2 = document.getElementsByTagName("audio")[0];
myAudio2.addEventListener('canplay', function () {
log('Audio Ready to play!');
});
</script>
</body>
</html>
Try this code on iOS or Android OS, not working. Working fine on WebOS. There's a bug open for Chrome: http://code.google.com/p/chromium/issues/detail?id=68006 and Android: http://code.google.com/p/android/issues/detail?id=14753&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Carlson
This works correctly in desktop Safari. It does not work as written on iOS because audio and video data does not load until the user requests playback.