Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube iframe embed: force Flash?

Is it possible to enforce the flash version of an YouTube video when including it using the new iframe-embed mode?

I don't want the HTML5 version since it is to much hassle for average users (full screen e.g.).

Regards

like image 207
Jay Avatar asked Dec 07 '11 12:12

Jay


2 Answers

You can create youtube flash player embed code in any of the two ways given below.

Method 1

Here are the iframe code for both players.

HTML5 player

<iframe width="350" height="150" src="https://www.youtube.com/embed/ffiJNSy8CBA"><iframe>

Flash version

<iframe width="350" height="150" src="https://www.youtube.com/v/ffiJNSy8CBA"><iframe>

Notice the difference? Simply change the /embed/ to /v/

Here is a youtube embed code generator tool with which you can customize the youtube embed player.

Method 2

This is a far simple method to load flash player. You can use the &nohtml5=1 parameter to load flash version of that video.

Example url : https://www.youtube.com/watch?v=wAN77SmbKBY&nohtml5=1

like image 111
Shan Eapen Koshy Avatar answered Oct 01 '22 10:10

Shan Eapen Koshy


I'm fairly confident the iframe option does not include a parameter to select html5 or flash as iframe is to allow youtube to change their code in the future.

If you absolutely want flash, just use the old youtube embed code (instead of the new iframe): http://www.tools4noobs.com/online_tools/youtube_xhtml/

That will still work and deliver the flash version 100% of the time :)

And If you still want to use both, add in some simple browser detection. Serve the flash embed code to the problem clients, iframe to everyone else.

like image 34
sonicoliver Avatar answered Oct 01 '22 08:10

sonicoliver