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.
<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> |
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.