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文件