Search code examples
javascripthtmlqthtml5-audioqtwebkit

Cannot play audio with qt webkit in Windows XP


I have a problem with playing audio in qt webkit via a script tag or html 5 aduio in Windows XP. I'm using visual studio 2013 and qt 5.5.1.

The following code in index.hpp is not working in Windows XP.

<script type="text/javascript">
    var audio = new Audio('c:\\test.wav');
    audio.play();
</script>

Or

<audio controls>
  <source src="'c:\\test.wav'" type="audio/wav">
  <source src="'c:\\test.mp3'" type="audio/mpeg">
  Your browser does not support the audio tag.
</audio> 

It works in Windows 7 but not XP and the funny thing is, I don't see "Your browser does not support the audio tag." message while running over Windows XP.

What's going on?


Solution

  • It's not supported on XP. The lack of support doesn't cause the contents of the <audio> tag to be displayed. That's all.