Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to play a youtube video without iframes?

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?

like image 497
user2200638 Avatar asked Nov 29 '25 16:11

user2200638


1 Answers

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>
like image 94
Alec Sanger Avatar answered Dec 02 '25 07:12

Alec Sanger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!