Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
121
rated 0 times [  128] [ 7]  / answers: 1 / hits: 34465  / 9 Years ago, mon, october 5, 2015, 12:00:00

My team and I are tying to make a web application autoplay HTML5 video/audio tags on iPad. So far no luck after many attempts with CSS and JavaScript.




The question is: What other option is there to make it autoplay ?




I'm thinking native app with integrated browser with iOS API calls to simulate a touch/click and thus making the video/audio tags autoplay.



Is it possible and if yes, how and with which iOS version ?



Thanks


More From » ios

 Answers
103

you can't auto-play videos and audios on iOS in normal mode, you may use trick like simulate user input to auto-play videos and audios.



Safari HTML5 Audio and Video Guide




In Safari on iOS (for all devices, including iPad), where the user may be on a cellular network and be charged per data unit, preload and autoplay are disabled. No data is loaded until the user initiates it. This means the JavaScript play() and load() methods are also inactive until the user initiates playback, unless the play() or load() method is triggered by user action. In other words, a user-initiated Play button works, but an onLoad=play() event does not.




This plays the movie: <input type=button value=Play onclick=document.myMovie.play()>



This does nothing on iOS: <body onload=document.myMovie.play()>


[#64841] Thursday, October 1, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
stacie

Total Points: 476
Total Questions: 92
Total Answers: 102

Location: Bosnia and Herzegovina
Member since Tue, Mar 29, 2022
2 Years ago
stacie questions
Fri, Jun 26, 20, 00:00, 4 Years ago
Thu, Jan 23, 20, 00:00, 4 Years ago
Fri, Aug 30, 19, 00:00, 5 Years ago
Fri, Aug 2, 19, 00:00, 5 Years ago
;