开发者

How can I play a URL in an iframe?

I want to play a URL in an iframe. When I place any other URL in the following line, it works fine, but when I enter the YouTube URL I get a blank page. Can anyone tell me where I am going wrong, or suggest any other method by which I can play the YouTube URL in an iframe?

<iframe width="100%"   
  height="610px" 
  frameborder=0 
  marginwidth="0" 
  marginheight="0" 
  scrolling="yes"  
  name="frmTest" 
  src="http开发者_Go百科://www.youtube.com/watch?v=dG5irzonTXA">
</iframe>


Your code will open a normal YouTube page. If I'm correct you want to have an iframe with video in it.

Try this: https://developers.google.com/youtube/youtube_player_demo

There's lot's of documentation there too.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜