View Single Post
Old 01-25-2017, 12:49 PM  
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,238
Quote:
Originally Posted by AnimeFevers View Post
Yep I am 100% sure.

Your code works it's just not doing what I need it to do on ios (auto play, loop)

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>


<script>
function vidloop() {
	bannervid.currentTime=0;
	bannervid.play();
} 

window.onload = function(){ 
	bannervid = document.getElementById("bannervid");
	bannervid.addEventListener("ended", vidloop, false);
	setTimeout(playitnow, 1300); 
}
function playitnow() {
	bannervid.volume=0;
	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