Bug 134200

Summary: HTML5 audio does not play in iOS 8 web view
Product: WebKit Reporter: Ashley Gullen <ashley>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, eric.carlson, jeremyj-wk, jer.noble, jonlee
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: Other   

Description Ashley Gullen 2014-06-23 11:20:48 PDT
In the iOS 8 web view, HTML5 audio does not play, even in a user input event. (Safari on iOS requires a user gesture for HTML5 audio playback to begin; this does not work in the web view.)

The Web Audio API works, but HTML5 audio does not, even if routed through the Web Audio API with createMediaElementSource().

This is important so apps using PhoneGap can play audio.
Comment 1 Jon Lee 2014-06-23 15:35:31 PDT
Do you have a sample test page that shows the issue?
Comment 2 Eric Carlson 2014-06-23 15:46:52 PDT
This may have been fixed by http://trac.webkit.org/changeset/169867, but we need an example app to make certain.
Comment 3 Ashley Gullen 2014-06-24 05:44:25 PDT
To repro, point a web view at this URL: http://www.scirra.com/labs/spaceblaster/

In Safari, it should play music on both the title screen and in-game (after a touch).

In the web view on iOS 8 beta 2, I never hear any music, although I hear sound effects (which are played with the Web Audio API instead of HTML5 audio).
Comment 4 Ashley Gullen 2014-06-24 06:55:37 PDT
Additional minimal repro: https://dl.dropboxusercontent.com/u/15217362/webviewaudiotest.zip

That should be directly uploadable to PhoneGap Build.

iOS doesn't show the buttons properly: the top button plays HTML5 audio with a local (package) source, and the bottom with a HTTP server source. Neither works.
Comment 5 Ashley Gullen 2014-07-15 07:14:42 PDT
Appears fixed in iOS 8 beta 3. Thanks!