Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macmadill/262d65ad1c02936fca4b to your computer and use it in GitHub Desktop.
Save macmadill/262d65ad1c02936fca4b to your computer and use it in GitHub Desktop.
iOS8 Standalone Mode + Audio + Submit = Crash
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="application-name" content="ios8 Audio Test" />
</head>
<body>
<h1>iOS8 Standalone Mode + Audio + Submit = Crash</h1>
<audio id="alertSound" autoplay controls>
<source src="http://www.w3schools.com/tags/horse.ogg" type="audio/ogg">
<source src="http://www.w3schools.com/tags/horse.mp3" type="audio/mpeg">
</audio>
<p>HTML5 Audio will not work in iOS8's standalone mode.</p>
<p>Clicking the submit button below will cause standalone mode to crash in iOS8.</p>
<form>
<button type="submit">Submit (Crash Standalone Mode)</button>
</form>
<p>In this example autoplay is enabled on the audio tag. If autoplay was disabled, you would have to try and play the sound before the submit button would crash standalone mode.</p>
<p>It is strange autoplay effects this bug because iOS has always disabled autoplay.</p>
</body>
</html>

iOS8 Standalone Mode + Audio + Submit = Crash

HTML5 Audio will fail to play in iOS8's standalone mode. Attempting to play the audio and submitting a form will cause iOS8's standalone mode to crash.

A Pen by Mac Mad Ill on CodePen.

License.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment