![]() |
HTML5 Mobile Banner ?
Hey, having some problems with my html5 banner code on apple devices, basically I want the .mp4 to autoplay and loop how it should, on desktop the code works fine but on apple devices it doesn't autoplay and shows a big play button in the centre.
Willing to pay $10 paxum if someone can figure this out quickly This is my code. <a href="%url0%" target="_blank"><video width="300" height="100" preload="auto" src="http://INSERT_YOUR_MP4.mp4" loop="loop" autoplay="autoplay" muted="muted"></video></a> |
need to use js to make it happen on iOS, not sure if it still works but try this one
https://www.easy-bits.com/iphone-inline-video-autostart |
Quote:
|
Quote:
Code:
<a href="http://somesite.com" target="_blank"><video id=bannervid width="300" height="100" preload="auto" src="somevideo.mp4" loop="loop" autoplay="autoplay" muted="muted" ></video></a> |
Quote:
|
Quote:
http://ci.memecdn.com/5566795.jpg :1orglaugh |
Quote:
I'd be happy to get $10. (I have paypal not paxum) :) |
Quote:
|
Quote:
Did you make sure the video tag has "id=bannervid"? That's required for it to work; if you didn't copy my entire code then that's the problem. |
I think I may just have to use this for ios D: Video to animated GIF converter
|
Quote:
|
iOS9 requires a gesture before <video> plays.
iOS10 is more lenient, but still has these requirements: "<video autoplay> elements will now honor the autoplay attribute, for elements which meet the following conditions: <video> elements will be allowed to autoplay without a user gesture if their source media contains no audio tracks. <video muted> elements will also be allowed to autoplay without a user gesture. If a <video> element gains an audio track or becomes un-muted without a user gesture, playback will pause. <video autoplay> elements will only begin playing when visible on-screen such as when they are scrolled into the viewport, made visible through CSS, and inserted into the DOM. <video autoplay> elements will pause if they become non-visible, such as by being scrolled out of the viewport." |
Quote:
Your code works it's just not doing what I need it to do on ios (auto play, loop) |
Quote:
OK, try this : Change the link and video url of course. Code:
<a href="http://google.com" target="_blank"><video id=bannervid preload="auto" width="300" height="100" preload="auto" src="soultrain.mp4" loop="loop" autoplay="autoplay" muted="muted"></video></a> |
Which iOS version are you testing?
|
Quote:
Quote:
|
Quote:
You're not helping us help you if you don't show us a webpage with the problem. You can send the link on private message if you have to. |
:uhoh
.. |
All times are GMT -7. The time now is 08:05 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc