使用flowplayer播放Flash Video

http://flowplayer.org/index.html

1:在網頁中需要引入flashembed.min.js這個文件
2:聲明一個帶id的div
3: 添加js代碼
[code]
window.onload = function() {
/*
use flashembed to place flowplayer into HTML element
whose id is "example" (below this script tag)
*/
flashembed("example",

/*
first argument supplies standard Flash parameters. See full list:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701
*/
{
src:'$ServerURL/FlowPlayerDark.swf',
width: 468,
height: 350
},

/*
second argument is Flowplayer specific configuration. See full list:
http://flowplayer.org/player/configuration.html
*/
{config: {
videoFile: '$ServerURL/$name.flv'
}}
);
}
<div id="example"></div>
[/code]

注意flv跟swf格式的播放器要放在同一個域名裏,跨域有security問題,請求不到flv文件
發佈了14 篇原創文章 · 獲贊 1 · 訪問量 5514
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章