View RSS Feed

molendijk

Embedding YouTube videos: some noteworthy facts

Rating: 13 votes, 5.00 average.
FACT #1
This video-url : src="http://s.ytimg.com/yts/swfbin/player-vfle5oFqK/watch_as3.swf?eurl=http://safeshare.tv&video_id=YOUTUBE-VIDEO-ID, which uses the safeshare.tv video service, shows YouTube videos without the distracting elements around them. NO ADS! (I wish I knew the safeshare-code for playing embedded videos without Flash, but I don't).

FACT #2
Internet Explorer (and, occasionally, Safari) may refuse to play certain videos outside the YouTube-environment. You will get a message telling you that the video can only be viewed on YouTube. (These are typically the videos that other browsers too refuse to play if the url is put directly in the address bar, but which don't present this behavior (with non-IE) in their embedded format). The workaround is to use the HTML5 compliant embed tag (or the object tag with params) for embedding the video, and to use a standard YouTube url having /v/ instead of /embed/ (no safeshare-url here, that won't work!).

FACT #3
This fact partially results from #2 above. If you are sure a certain video will always play in its standard embed format and if you don't want ads on your page, use the safeshare-url. Embedding can be done with an iframe or an embed tag. You won't see ads or other disturbing elements.
But if you are dealing with a video like the one mentioned in #2, use the embed tag together with a standard YouTube url having /v/ instead of /embed/: the video will play, even in IE.
I realize that both recommandations require the user to have Flash installed and / or enabled. If you think they are a disservice to people who don't have Flash, notice that we are (also) talking here about videos that don't play (in IE) without Flash in the first place. Anyhow, to serve people who don't have Flash, we could put a Flash-detection script on our page.

FINAL FACTS
With the safeshare-url, you can use all the standard YouTube parameters (rel=0, modestbranding=1, vq=large, start=..., end=..., playlist=... etc.).
The safeshare-url should not be used together with the embed tag for videos like the one mentioned in #2. The video wouldn't even play in Firefox!

Demos and additional explanations here.

Submit "Embedding YouTube videos: some noteworthy facts" to del.icio.us Submit "Embedding YouTube videos: some noteworthy facts" to StumbleUpon Submit "Embedding YouTube videos: some noteworthy facts" to Google Submit "Embedding YouTube videos: some noteworthy facts" to Digg

Updated 01-07-2014 at 04:30 PM by molendijk

Tags: None Add / Edit Tags
Categories
Uncategorized

Comments

  1. molendijk's Avatar
    http://s.ytimg.com/yts/swfbin/player-vfle5oFqK/watch_as3.swf?eurl=http://safeshare.tv&video_id=YOUTUBE-VIDEO-ID doesn't work anymore. You have to use this now:
    http://s.ytimg.com/yts/swfbin/player-vflyJCJXc/watch_as3.swf?eurl=http://safeshare.tv&video_id=YOUTUBE-VIDEO-ID.