View Single Post
Old 01-25-2017, 10:57 AM  
RyuLion
 
RyuLion's Avatar
 
Industry Role:
Join Date: Mar 2003
Location: San Diego
Posts: 32,174
Quote:
Originally Posted by blackmonsters View Post
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>
Nice man! I didn't know you knew HTML5, That's what I'm learning now..
__________________

Adult Biz Consultant A tech head since 1995
RyuLion is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote