开发者

Embedding a youtube player without javascript

Donw really know if this is a stupid question or not but can you embed a youtube player inside a website without the use of javascript开发者_运维百科? I'm making an alternative version of a website for when javascript isnt enabled and dont really know if you can emmbed a youtube player using only php


As far as I know, you don't need javascript. You are only embedding an object/applet so it's all really just HTML+Flash.

See the Youtube documentation for more info.


use iFrames? use PHP and set a MIME type in combo with cURL?


You can embed it normally using an iframe like so:

<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">

...and it will either use HTML5 (where it can) or Flash otherwise.

I don't think it needs Javascript with either of those methods?


<a href="http://www.youtube.com/watch?v=G50066Io-ow&list=PLF51D79F159020CC1"><img src="http://i.ytimg.com/vi/G50066Io-ow/hqdefault.jpg">Brian Eno - Sky Saw.wmv</a>

The only problem is that there is no arrow to remind the user they can click the image to watch a video.

Alas YouTube does not provide an "a*.jpg" version of images that could feature the arrow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜