One Embed code to display YouTube Video in HTML 5, Flash or Mobile Devices

Many mobile devices or browsers like BlackBerry Native browser which do not support flash or browser which do not support HTML 5 have problems playing the YouTube videos. Many webmasters have to do some coding to find out which browser they are coming and then display a link or the video for them to see. In short you can easily embed  the YouTube Videos both in flash & HTML5 and let YouTube worry about it.

Thanks to YouTube team this is easy now. They have come up with one embed code which is actually an iframe to embed YouTube video and depending from where your users or visitors are coming they will handle it.

If you use the new embed code style, your viewers will be able to view your embedded video in one of our Flash or HTML5 players, depending on their viewing environment and preferences. Environments that support the HTML5 video player are listed here on our HTML5 settings page. In instances where HTML5 isn’t supported (e.g. our HTML5 player can’t play videos with ads), we use Flash.

Below is the new code which you need to use :

<iframe type=”text/html” width=”640″ height=”385″ src=”” frameborder=”0″>


Please enter your comment!
Please enter your name here