Clicky

Hi

Just wondering if I can do this better.

I've got a video embedded on a site, I've used the following code to remove the controls, make it autoplay & make it loop. (I've changed the video to a generic news item rather than the original in case anyone wants to play) but the effect's the same of course.

 <iframe width="400" height="233" src="http://www.youtube.com/embed/XN5fq7tA7qk?rel=0&autoplay=1&loop=1&playlist=XN5fq7tA7qk&modestbranding=1&controls=0" frameborder="0" showinfo="0"  allowfullscreen></iframe>                             
1: 

Select allOpen in new window



Now when I view it on a PC browser, it behaves exactly as I expect & want. It autoplays, it loops and the branding is hidden.

But when viewed on an iPad...
It doesn't autoplay. Nor does it start if you tap the play arrow in the middle of the screen, but tap anywhere else on the video (just not the centre!) and off it goes! Once running, it loops. There is some Youtube branding superimposed.

Can any kind & wise soul give me some guidance on how to get it to behave on an iPad the same as on a full browser. i.e, no branding & autorun?

Many Thanks.
 <iframe width="400" height="233" src="http://www.youtube.com/embed/XN5fq7tA7qk?rel=0&autoplay=1&loop=1&playlist=XN5fq7tA7qk&modestbranding=1&controls=0" frameborder="0" showinfo="0"  allowfullscreen></iframe>                             
1: 

Select allOpen in new window

asked 12/12/2011 10:28

sefton-computer-repairs's gravatar image

sefton-computer-repairs ♦♦


8 Answers:
Hello,

try to get the embeded code from here:

http://www.youtube.com/html5

This is HTML5 that should work fine on iPad.

Regarsd
link

answered

Chorch's gravatar image

Chorch

Hi

That looks like it gives me the same code as I'm using. It does already work in the iPad, it's just that some of the additional parameters don't seem to work in the same way. The Autoplay for instance.
link

answered 2011-12-13 at 07:14:25

sefton-computer-repairs's gravatar image

sefton-computer-repairs

Not sure if this will work, but, did you try replacing "&" by "&amp;" ?

1:
<iframe width="400" height="233" src="http://www.youtube.com/embed/XN5fq7tA7qk?rel=0&amp;autoplay=1&amp;loop=1&amp;playlist=XN5fq7tA7qk&amp;modestbranding=1&amp;controls=0" frameborder="0" showinfo="0"  allowfullscreen></iframe>
link

answered 2011-12-13 at 07:24:28

Chorch's gravatar image

Chorch


Try to change this:

&amp;autoplay=1

into

&amp;autoplay="true"


Nrisimha
link

answered 2011-12-13 at 07:35:41

Nrisimha's gravatar image

Nrisimha

Thanks for the suggestions, works fine on PC browsers with both & and &amp;  The "true" doesn't work at all.

But still can't get it to autoplay when viewed on iPad. It's been suggested to me that autoplay functionality has been crippled by Apple but I've heard conflicting views - any opinions?
link

answered 2011-12-13 at 08:08:39

sefton-computer-repairs's gravatar image

sefton-computer-repairs

>> It's been suggested to me that autoplay functionality has been crippled by Apple but I've heard conflicting views - any opinions?

It has been crippled to avoid excessive bandwidth charges when on the celluar data network as opposed to Wifi.  If videos autoplayed, you could easily blow through your contracted bandwidth allotment without knowing it.

Sorry...
link

answered 2011-12-13 at 12:05:27

jason1178's gravatar image

jason1178



You have to set a value to allowfullscreen command.

Instead:

allowfullscreen

set:

allowfullscreen="1"


Nrisimha
link

answered 2011-12-13 at 13:15:23

Nrisimha's gravatar image

Nrisimha

Thanks for the input everyone. The lack of autoplay on iOS was the main issue and it appears that it simply can't be done so that's as good a reason as any :)
link

answered 2011-12-13 at 13:37:17

sefton-computer-repairs's gravatar image

sefton-computer-repairs

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×28
×23
×4

Asked: 12/12/2011 10:28

Seen: 402 times

Last updated: 12/14/2011 06:32