个人资料
弓尒 (热门博主)
  • 博客访问:
正文

【YouTube 油管 视频 新旧代码的转换和应用】

(2012-09-01 17:55:37) 下一个

 


YouTube 油管 视频 新旧代码的转换和应用


 




YouTube 油管 视频 是应用最广的网上视频平台和载体


以前 油管 用老式代码


现在用 新代码


不同的网站 接受和支持不同的代码


因此 两种代码都知晓 灵活变通 应手得心 为上


现 简介如下


 


其实 记住三个要素 就可以了:


1. 这个视频 video 的 核心


2. 置换到 新或旧的格式中去 即可


3. 这个基本 也适用于 优酷 56 新浪 腾讯 土豆 等其它网站来源的转换和应用


 


 



Using IFRAME Code to Embed YouTube Playlist


The new style YouTube playlist embed code begins with "<iframe...". 



 


<iframe width="560" height="315" src="http://www.youtube.com/embed/videoseries?list=PLAYLISTID&hl=en_US" frameborder="0" allowfullscreen></iframe>


=================



Using Old Code to Embed YouTube Playlist


While the IFRAME embed method is simple, some browsers and services don't support this tag. This case, you have to switch to the old embed code.   you could copy the code below and change the "PlaylistID" to your need. Also change the width and height parameters if necessary.


 



<object width="560" height="315">
 <param name="movie" value="http://www.youtube.com/p/PlaylistID"></param>
 <param name="allowFullScreen" value="true"></param>
 <param name="allowscriptaccess" value="always"></param>
 <embed src="http://www.youtube.com/p/PlaylistID" width="560" height="315"
<type="application/x-shockwave-flash" allowscriptaccess="always">
 <allowfullscreen="true"></embed></object>


 


=========================


 



<object width="500" height="360">


 <param name="movie" value="http://www.youtube.com/embed/videoseries?list=PLE5F16CEA65AB4BD9&amp;hl=en_US"></param>


 <param name="allowFullScreen" value="true"></param>


 <param name="allowscriptaccess" value="always"></param>


 <embed src="http://www.youtube.com/embed/videoseries?list=PLE5F16CEA65AB4BD9&amp;hl=en_US" width="500" height="360"


 <type="application/x-shockwave-flash"> <allowscriptaccess="always">


 <allowfullscreen="true"></embed></object>


 


===================


 



Tips: The Difference Between 2 Methods


The IFRAME embed code supports both Flash and HTML5 video, while the older style of embed code begins with "<object..." and only support Flash playback. By the way, the "<embed..." is for Internet Explorer.



 


 


[]


 


 


 


 


[ 打印 ]
阅读 ()评论 (0)
评论
目前还没有任何评论
登录后才可评论.