http://harttle.com/2017/02/12/embeding-video-sites.html?utm_source=tuicool&utm_medium=referral
来一篇水文,整理一下国内各大视频网站的视频嵌入方式,或许有一点用处。 爱奇艺、优酷、搜狐视频、腾讯视频、酷6、土豆、乐视。 这些视频站绝大多数都采用 Flash 的方式播放,很多也提供了 iframe 的播放方式。
根据最新标准应当使用
,可以添加
作为Fallback。
但目前正在逐步地支持 HTML5 的原生
标签,这需要大量的开发工作。 因为
会被绝大多数国内手机浏览器劫持产生各种出乎意料的渲染结果, 只有 iOS 可以完美地使用
。
2.5.6 Apps that browse the web must use the appropriate WebKit framework and WebKit Javascript. – App Store Review Guidelines
爱奇艺
【嵌入文档】http://open.iqiyi.com/lib/player.html
【嵌入方式】Flash(Object, Embed), Iframe
Flash 嵌入代码:
classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width= "680" height= "520" >
name= "movie" value= "http://dispatcher.video.qiyi.com/disp/shareplayer.swf?vid=ade484a7c87734eee38f7f77cd9f3159&tvId=250912700&coop=&cid=&bd=1" />
name= "quality" value= "high" />
name= "wmode" value= "transparent" />
value= "true" name= "allowFullScreen" />
src= "http://dispatcher.video.qiyi.com/disp/shareplayer.swf?vid=ade484a7c87734eee38f7f77cd9f3159&tvId=250912700&coop=&cid=&bd=1" wmode= "transparent" quality= "high" pluginspage= "http://www.macromedia.com/go/getflashplayer" type= "application/x-shockwave-flash" width= "680" height= "520" allowfullscreen= "true" />
Iframe 嵌入代码:
优酷
【嵌入文档】http://www.youku.com
【嵌入方式】Flash(Embed), Iframe
Flash 嵌入代码:
src= 'http://player.youku.com/player.php/sid/XMTc1OTEwNTEwOA==/v.swf' allowFullScreen= 'true' quality= 'high' width= '480' height= '400' align= 'middle' allowScriptAccess= 'always' type= 'application/x-shockwave-flash' >
Iframe 嵌入代码:
搜狐视频
【嵌入文档】http://lm.tv.sohu.com/union/open_platform.do
【嵌入方式】Flash(Embed),JS SDK (HTML5)
Flash 嵌入代码:
wmode= "Transparent" allowfullscreen= "true" allowscriptaccess= "always" quality= "high" src= "http://share.vrs.sohu.com/2316624/v.swf&topBar=1&autoplay=false&plid=8399917&pub_catecode=0&from=page" type= "application/x-shockwave-flash" />
搜狐视频的 JS SDK 需要创建应用并审核,需要经历一定的周期,不能立即使用。
腾讯视频
【嵌入文档】无
【嵌入方式】Flash(Embed),JS SDK (HTML5)
Flash 方式:
src= "http://static.video.qq.com/TPout.swf?vid=k0015trfczz&auto=0" allowFullScreen= "true" quality= "high" width= "480" height= "400" align= "middle" allowScriptAccess= "always" type= "application/x-shockwave-flash" >
Iframe 方式:
酷6
【嵌入文档】http://dev.ku6.com/
【嵌入方式】Flash(Object),JS SDK(Embed)
Flash 嵌入代码:
id= "video_player" type= "application/x-shockwave-flash" data= "http://player.ku6.com/refer/y5dVmbq9y8-q9cgAwLfczA../v.swf" height= "300" width= "400" >
name= "quality" value= "high" >
name= "allowScriptAccess" value= "always" >
name= "allowFullScreen" value= "true" >
name= "wMode" value= "transparent" >
name= "swLiveConnect" value= "true" >
name= "flashvars" value= "p=910" >
Javascript API 方式:
( function () {
var vid = "N9pqJprg6I2yqLId,joLz6gfDhGzCXEavYft7AQ.." ;
var img = "http://i2.ku6img.com/cms/military/201108/05/jian.jpg,http://gug.ku6cdn.com/201112/ku620111222155210859.jpg" ;
var thistitle = "歼10战斗机,何洁 音乐微电影《是不是爱情》预告片" ;
var thisurl = "http://v.ku6.com/show/N9pqJprg6I2yqLId.html,http://v.ku6.com/show/joLz6gfDhGzCXEavYft7AQ...html"
XEmbed ( vid , img , thistitle , thisurl , {
width : '300' ,
height : '250' ,
id : 'miniPlayer'
});
})();
土豆
【嵌入文档】http://api.tudou.com/wiki/index.php/%E7%AB%99%E5%A4%96%E6%92%AD%E6%94%BE%E5%99%A8%E8%AF%B4%E6%98%8E
【嵌入方式】Flash(object,embed)
Flash 嵌入代码:
src= "http://www.tudou.com/v/I7C_srs6TYo/&autoPlay=true/v.swf" type= "application/x-shockwave-flash" allowscriptaccess= "always" allowfullscreen= "true" wmode= "opaque" width= "480" height= "400" >
乐视视频
【嵌入文档】无
【嵌入方式】Flash(object,embed)
Flash 嵌入代码:
width= '541' height= '450' > name= 'allowFullScreen' value= 'true' > name= 'movie' value= 'http://img1.c0.letv.com/ptv/player/swfPlayer.swf?autoPlay=0&id=26849015' /> src= 'http://img1.c0.letv.com/ptv/player/swfPlayer.swf?autoPlay=0&id=26849015' width= '541' height= '450' allowFullScreen= 'true' type= 'application/x-shockwave-flash' />