IE 9 and iframe embedding of youtube videos

I am using the Zend_GData library to obtain a list of users uploaded videos from youtube. The user can then select a video and insert it into a blog post.

This works perfectly with firefox using the new(er) iframe code to embed the video, but the same code in IE9 opens a dialog “What do you want to do with [youtube filename].swf - open, save, saveas”.

The embed url i am creating is:


$videoUrl = 'http://www.youtube.com/v/' . $videoEntry->getVideoId() . '&rel=0;';

which is inserted into the view as the following code:


<iframe src="http://www.youtube.com/v/[~video-id-here~]&rel=0;" width="320" height="240"></iframe>

What do i need to do differently to get it showing in ie9?

I think you’re using the wrong url to embed. the iframe source should be:

http://www.youtube.com/embed/[~video-id-here~]