Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-25-2017, 09:05 AM   #1
AnimeFevers
♫ ♪ ♫ ♪ ▄ █ ▄ █ ▄ ▄ █ ▄ █
 
AnimeFevers's Avatar
 
Industry Role:
Join Date: Apr 2009
Location: Tell your mom, money is on the fridge
Posts: 3,558
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>
__________________
icq - 556766871
email - animefevers(AT)hotmail(DOT)co(DOT)uk
AnimeFevers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 09:18 AM   #2
Konda
...
 
Konda's Avatar
 
Industry Role:
Join Date: Apr 2003
Posts: 2,280
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
Konda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 10:12 AM   #3
AnimeFevers
♫ ♪ ♫ ♪ ▄ █ ▄ █ ▄ ▄ █ ▄ █
 
AnimeFevers's Avatar
 
Industry Role:
Join Date: Apr 2009
Location: Tell your mom, money is on the fridge
Posts: 3,558
Quote:
Originally Posted by Konda View Post
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
Thanks, it auto plays on my iphone but it's not looping.
__________________
icq - 556766871
email - animefevers(AT)hotmail(DOT)co(DOT)uk
AnimeFevers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 10:49 AM   #4
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
Old 01-25-2017, 10:57 AM   #5
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
Old 01-25-2017, 11:10 AM   #6
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,227
Quote:
Originally Posted by RyuLion View Post
Nice man! I didn't know you knew HTML5, That's what I'm learning now..
Thanks.





__________________
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
Old 01-25-2017, 12:04 PM   #7
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,227
Quote:
Originally Posted by AnimeFevers View Post
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>
Well, did it work?

I'd be happy to get $10. (I have paypal not paxum)

__________________
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
Old 01-25-2017, 12:06 PM   #8
AnimeFevers
♫ ♪ ♫ ♪ ▄ █ ▄ █ ▄ ▄ █ ▄ █
 
AnimeFevers's Avatar
 
Industry Role:
Join Date: Apr 2009
Location: Tell your mom, money is on the fridge
Posts: 3,558
Quote:
Originally Posted by blackmonsters View Post
Well, did it work?

I'd be happy to get $10. (I have paypal not paxum)

Sorry just got back to the thread, I tried your code and it doesn't seem to work
__________________
icq - 556766871
email - animefevers(AT)hotmail(DOT)co(DOT)uk
AnimeFevers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 12:18 PM   #9
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,227
Quote:
Originally Posted by AnimeFevers View Post
Sorry just got back to the thread, I tried your code and it doesn't seem to work
What part doesn't work?

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.
__________________
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
Old 01-25-2017, 12:19 PM   #10
AnimeFevers
♫ ♪ ♫ ♪ ▄ █ ▄ █ ▄ ▄ █ ▄ █
 
AnimeFevers's Avatar
 
Industry Role:
Join Date: Apr 2009
Location: Tell your mom, money is on the fridge
Posts: 3,558
I think I may just have to use this for ios D: Video to animated GIF converter
__________________
icq - 556766871
email - animefevers(AT)hotmail(DOT)co(DOT)uk
AnimeFevers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 12:20 PM   #11
AnimeFevers
♫ ♪ ♫ ♪ ▄ █ ▄ █ ▄ ▄ █ ▄ █
 
AnimeFevers's Avatar
 
Industry Role:
Join Date: Apr 2009
Location: Tell your mom, money is on the fridge
Posts: 3,558
Quote:
Originally Posted by blackmonsters View Post
What part doesn't work?
The mp4 wasn't auto playing.
__________________
icq - 556766871
email - animefevers(AT)hotmail(DOT)co(DOT)uk
AnimeFevers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 12:25 PM   #12
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,224
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."
__________________
Join the BEST cam affiliate program on the internet!
I've referred over $1.7mil in spending this past year, you should join in.
I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 12:26 PM   #13
AnimeFevers
♫ ♪ ♫ ♪ ▄ █ ▄ █ ▄ ▄ █ ▄ █
 
AnimeFevers's Avatar
 
Industry Role:
Join Date: Apr 2009
Location: Tell your mom, money is on the fridge
Posts: 3,558
Quote:
Originally Posted by blackmonsters View Post
What part doesn't work?

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.
Yep I am 100% sure.

Your code works it's just not doing what I need it to do on ios (auto play, loop)
__________________
icq - 556766871
email - animefevers(AT)hotmail(DOT)co(DOT)uk
AnimeFevers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 12:49 PM   #14
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,227
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
Old 01-25-2017, 12:58 PM   #15
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,224
Which iOS version are you testing?
__________________
Join the BEST cam affiliate program on the internet!
I've referred over $1.7mil in spending this past year, you should join in.
I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 01:42 PM   #16
AnimeFevers
♫ ♪ ♫ ♪ ▄ █ ▄ █ ▄ ▄ █ ▄ █
 
AnimeFevers's Avatar
 
Industry Role:
Join Date: Apr 2009
Location: Tell your mom, money is on the fridge
Posts: 3,558
Quote:
Originally Posted by blackmonsters View Post
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>
The banner seems to be broken when I try this code

Quote:
Originally Posted by Colmike7 View Post
Which iOS version are you testing?
The latest version, I'm testing these codes with ios 10.2
__________________
icq - 556766871
email - animefevers(AT)hotmail(DOT)co(DOT)uk
AnimeFevers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2017, 01:45 PM   #17
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,227
Quote:
Originally Posted by AnimeFevers View Post
The banner seems to be broken when I try this code
Show me the webpage because the code works.

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.
__________________
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
Old 01-29-2017, 09:12 AM   #18
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,227


..
__________________
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
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
code, banner, html5, devices, autoplay, apple, paxum, $10, centre, pay, mp4, figure, quickly, url, button, changed, fine, basically, mobile, hey, .mp4, loop, desktop, play



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.