正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | * @param private_object [optional] an object that used as private object, | 6 | * @param private_object [optional] an object that used as private object, |
7 | * for example, the logic chat object which owner this bandwidth. | 7 | * for example, the logic chat object which owner this bandwidth. |
8 | * Usage: | 8 | * Usage: |
9 | - var bandwidth = new SrsBandwidth("player_id", 100, 1); | 9 | + var bandwidth = new SrsBandwidth("container_id", 100, 1); |
10 | bandwidth.on_bandwidth_ready = function() { | 10 | bandwidth.on_bandwidth_ready = function() { |
11 | // auto start check bandwidth when tool is ready. | 11 | // auto start check bandwidth when tool is ready. |
12 | this.check_bandwidth(url); | 12 | this.check_bandwidth(url); |
@@ -24,6 +24,9 @@ | @@ -24,6 +24,9 @@ | ||
24 | //); | 24 | //); |
25 | } | 25 | } |
26 | bandwidth.render("rtmp://dev:1935/app?key=35c9b402c12a7246868752e2878f7e0e&vhost=bandcheck.srs.com"); | 26 | bandwidth.render("rtmp://dev:1935/app?key=35c9b402c12a7246868752e2878f7e0e&vhost=bandcheck.srs.com"); |
27 | +* where the HTML page must contains an element: | ||
28 | + <div id="container_id"></div> | ||
29 | +* this js will directly erase the container by swfobject. | ||
27 | */ | 30 | */ |
28 | function SrsBandwidth(container, width, height, private_object) { | 31 | function SrsBandwidth(container, width, height, private_object) { |
29 | if (!SrsBandwidth.__id) { | 32 | if (!SrsBandwidth.__id) { |
-
请 注册 或 登录 后发表评论