[Qt4-preview-feedback] HTML5 <audio> tag issue in WebKit

aron_rosenberg at logitech.com aron_rosenberg at logitech.com
Wed Feb 11 18:42:23 CET 2009



Testing with 4.5.0 rc1 on Windows XP, Vista or OSX 10.4, I am running into
a issue where the HTML5 <audio> tag is not properly sending javascript
events using the phonon backend. The following html snippet should display
a javascript alert when the file is done playing.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

<script language="javascript">
function myPlay()
{
  var audio = new Audio("audio.wav");

  audio.addEventListener('ended', function(){alert('audio ended');});

  audio.play();
  document.body.innerText ="Playing";
}
</script>
</head>
<body onLoad="myPlay();">
Audio

</body>
</html>

When loaded in Safari 4 beta on Mac (which also uses WebKit trunk), the
sound plays fine and then you see the alert, but with QtWebKit, the event
is never sent.

-Aron(See attached file: audio.wav)(See attached file: audio.html)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt4-feedback/attachments/20090211/b3f2e444/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: audio.wav
Type: audio/x-wav
Size: 352300 bytes
Desc: not available
Url : http://lists.qt.nokia.com/pipermail/qt4-feedback/attachments/20090211/b3f2e444/attachment.wav 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt4-feedback/attachments/20090211/b3f2e444/attachment-0001.html 


More information about the Qt4-feedback mailing list