1.0.0 • Published 9 years ago
fx.live v1.0.0
fx.live
繁星直播sdk
Installation
npm install fx.live
Usage
### <script>引入:
<script type="text/javascript" src="./src/fx.live.js"></script>
### AMD require:
require('fx.live');
Example
<div id="fxLivePlayer"></div>
<script type="text/javascript" src="../src/fx.live.js"></script>
<script type="text/javascript">
//初始直播参数
Fx.live.init({
id: 'fxLivePlayer', //播放器ID
src: '../swf/PlayPlayer.swf', //播放器swf路径
width: 480, //播放器宽度
height: 360, //播放器高度
roomId: '1069431', //房间号
platform: 'web', //平台(web:繁星web,embed:内嵌直播页)
liveName: 'fx_hifi_141436748', //流名字
liveClient: ["rtmp://edge.live.fanxing.com/live", "rtmp://edge.live.fanxing.com:80/live"], //流服务器地址
liveStatus: 1 // 直播状态
});
//插件用法:打开星星数量插件
Fx.live.flashReadyCallback(function() {
Fx.live.openPlugins([{
name: 'StarModule',
data: {
starNum: 222
}
}]);
});
</script>
Release History
1.0.0 Released
1.0.0
9 years ago