Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-07-12 20:56:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0707c24b547117114a5d3bb0d0a630582fbdeeb4
0707c24b
1 parent
2ff88b9b
refine the js library for bandwidth test.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
20 行增加
和
1 行删除
trunk/research/players/srs_bwt/src/srs.bandwidth.js
trunk/research/players/srs_bwt/src/srs.bandwidth.js
查看文件 @
0707c24
/**
* the SrsBandwidth
objec
t.
* the SrsBandwidth
library for js to do bandwidth tes
t.
* @param container the html container id.
* @param width a float value specifies the width of bandwidth.
* @param height a float value specifies the height of bandwidth.
* @param private_object [optional] an object that used as private object,
* for example, the logic chat object which owner this bandwidth.
* Usage:
var bandwidth = new SrsBandwidth("player_id", 100, 1);
bandwidth.on_bandwidth_ready = function() {
// auto start check bandwidth when tool is ready.
this.check_bandwidth(url);
}
bandwidth.on_update_progress = function(percent) {
// console.log(percent + "%");
}
bandwidth.on_update_status = function(status) {
// console.log(status);
}
bandwidth.on_srs_info = function(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip) {
// console.log(
// "server:" + srs_server + ", authors:" + srs_primary_authors +
// ", srs_id:" + srs_id + ", srs_pid:" + srs_pid + ", ip:" + srs_server_ip
//);
}
bandwidth.render("rtmp://dev:1935/app?key=35c9b402c12a7246868752e2878f7e0e&vhost=bandcheck.srs.com");
*/
function
SrsBandwidth
(
container
,
width
,
height
,
private_object
)
{
if
(
!
SrsBandwidth
.
__id
)
{
...
...
请
注册
或
登录
后发表评论