Embedding YouTube videos: some noteworthy facts

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 and (sometimes) offensive elements around them. NO ADS! (I wish I knew the safeshare-code for playing embedded videos without Flash, but I don't).

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!). Example here. Demo below (view the videos WITH IE) :

The video does not play with IE
(the url has /embed/; an iframe tag is used)

The video does not play with IE
(the url has /v/; an iframe tag is used)

The video does play with IE
(the url has /v/; an embed tag is used)

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 above, 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 this script on our page (Flash detection).

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 above. The video wouldn't even play in Firefox!