RESOLVED WONTFIX 28439
Audio object created by JavaScript codes doesn't play.
https://bugs.webkit.org/show_bug.cgi?id=28439
Summary Audio object created by JavaScript codes doesn't play.
Lyon Chen
Reported 2009-08-18 15:40:44 PDT
In website http://www.benjoffe.com/code/demos/canvascape/, an audio object is created with following code: var audio = window.Audio && new Audio("shoot.wav"); And when "audio.play();" is executed, it won't play with WebKit based browser, like Chromium, Safari. The reason is probably that this Audio object is not attached to the DOM tree.
Attachments
Eric Carlson
Comment 1 2009-08-18 17:16:18 PDT
An audio element should play whether or not it is in the DOM, and I hear the shoot sound when I press the "B" key on both OSX and XP. Can you play the sound file (http://www.benjoffe.com/code/demos/canvascape/shoot.wav) when you load it directly?
Lyon Chen
Comment 2 2009-08-18 19:20:33 PDT
Yeah, I can hear the shoot sound when using the direct link, and I can hear the shoot sound in FireFox when press "B" key too.
Eric Carlson
Comment 3 2009-08-19 07:45:17 PDT
> Yeah, I can hear the shoot sound when using the direct link Does the sound play when you load the file directly in Safari? How about in the current WebKit nightly? If not, what version of QuickTime do you have installed?
Lyon Chen
Comment 4 2009-08-19 08:03:31 PDT
Hi, Eric Yeah I can hear the shooting sound when open the WAV file directly with Safari (and whatever browser I tried), but I can't hear the sound when press "B" key for the page. I have tried official WebKit nightly build r47288 for Windows and newest Chromium build, both didn't play the sound.
Alexey Proskuryakov
Comment 5 2022-07-01 11:35:48 PDT
Mass closing plug-in bugs, as plug-in support has been removed from WebKit. Please comment and/or reopen if this still affects WebKit in some way.
Note You need to log in before you can comment on or make changes to this bug.