View Single Post
Old 01-25-2017, 10:49 AM  
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,227
Quote:
Originally Posted by AnimeFevers View Post
Thanks, it auto plays on my iphone but it's not looping.
Try what I just wrote for you :

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>


<script>
function vidloop() {

	bannervid.currentTime=0;
	bannervid.play();
} 

(function() {
	document.addEventListener("DOMContentLoaded", bannervid, false); 
	bannervid = document.getElementById("bannervid");
	bannervid.addEventListener("ended", vidloop, false);
	function bannervid() {  
		if (bannervid.canPlayType) {  
			bannervid.play();

		}
	}
})();


</script>
__________________
Make Money with Porn
blackmonsters is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote