How to play a youtube video without iframes?

16,469

When you embed a video, you have the option to use the "Old Embed Code", which uses an object tag rather than an iframe. Here is an example:

<object width="560" height="315">
  <param name="movie" value="http://www.youtube.com/v/aBcDeFg?hl=en_US&amp;version=3"></param>
  <param name="allowFullScreen" value="true"></param>
  <param name="allowscriptaccess" value="always"></param>
  <embed src="http://www.youtube.com/v/aBcDeFg?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>
</object>
Share:
16,469

Related videos on Youtube

user2200638
Author by

user2200638

Updated on October 12, 2022

Comments

  • user2200638
    user2200638 over 1 year

    Looking for a way to display a youtube video in a video player powered by HTML, Javascript, PHP, or CSS. Probably CSS. I'm not against downloading the video and hosting it myself it need be but I would prefer to let google host it.

    Any Ideas?

  • user2200638
    user2200638 almost 11 years
    This is a pretty cool script thank you for sharing it. However I need the video to be displayed like it would be an iframe, but without an iframe. Iframes don't work well with mobile sites.
  • Shadowpat
    Shadowpat almost 11 years
    ohh i see what you mean. Yeah, Yahoo Player may be a bit weird on a mobile site. I'm guessing the reason you didn't want to use iframes was because they may not be displayed properly, or even supported, on mobile devices. Maybe there is a plugin to do this?
  • Eric Martindale
    Eric Martindale over 10 years
    These links are 404'ing... where's the source?
  • Carlos ABS
    Carlos ABS about 9 years
    Those links are no longer valid.
  • brauliobo
    brauliobo about 3 years
    it now converts into an iframe