Why can't JavaScript .play() audio files on iPhone safari?
iOS disables autoplay, instead requiring that play be initiated as part of a user interaction (e.g., you can start playback within a touchstart listener). There's a bit of documentation about this on Apple's developer documentation. There's also this article Overcoming iOS HTML5 audio limitations on IBM's developer site that has examples and more detail.
.play() function not working on safari browser with audio tag
try a different format. Wav files may not be supported.
Html 5 Audio is not working in iphone safari browser
Did like below code and solved problem
Added two lines before play
audio1.load();
audio2.load();
audio1.play();
audio1.on('ended' function(){
audio2.play();
});
HTML5 Audio object doesn't play in Safari
About iPhone Safari: It seems play() work when launched by an onclick event.
See http://groups.google.com/group/iphonewebdev/browse_thread/thread/91e31ba7ae25e6d4?hl=en
Related Topics
How to Render a Word Document (.Doc, .Docx) in the Browser Using JavaScript
How to Reset the Bootstrap Modal When It Gets Closed and Open It Fresh Again
Regular Expression for Not Allowing Spaces in the Input Field
How to Get Around .Push Is Not a Function in JavaScript
React: Do Children Always Rerender When the Parent Component Rerenders
Get List of Filenames in Folder With JavaScript
How to Display a Success Message After Redirecting the User Back to My Home Page
Filtering Multiple Items With Es6 Array Functions
React Js Error: Is Not Defined React/Jsx-No-Undef
Regex to Remove Certain Characters At the Beginning and End of a String
Trouble Converting Dates String to Yyyy-Mm-Ddthh:Mm:Ss-Hh:Mm Format
Moment Js Get First and Last Day of Current Month
How to Save Binary Buffer to Png File in Nodejs
How to Close Toggle Menu When Clicking Navigation Item Anchor Link
Clear an Input Field With Reactjs
Why Does My Function Return Undefined Whilst I Do Give It an Argument