mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
refine the js library for bandwidth test.
This commit is contained in:
parent
0707c24b54
commit
d8ed7cc968
1 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
* @param private_object [optional] an object that used as private object,
|
* @param private_object [optional] an object that used as private object,
|
||||||
* for example, the logic chat object which owner this bandwidth.
|
* for example, the logic chat object which owner this bandwidth.
|
||||||
* Usage:
|
* Usage:
|
||||||
var bandwidth = new SrsBandwidth("player_id", 100, 1);
|
var bandwidth = new SrsBandwidth("container_id", 100, 1);
|
||||||
bandwidth.on_bandwidth_ready = function() {
|
bandwidth.on_bandwidth_ready = function() {
|
||||||
// auto start check bandwidth when tool is ready.
|
// auto start check bandwidth when tool is ready.
|
||||||
this.check_bandwidth(url);
|
this.check_bandwidth(url);
|
||||||
|
@ -24,6 +24,9 @@
|
||||||
//);
|
//);
|
||||||
}
|
}
|
||||||
bandwidth.render("rtmp://dev:1935/app?key=35c9b402c12a7246868752e2878f7e0e&vhost=bandcheck.srs.com");
|
bandwidth.render("rtmp://dev:1935/app?key=35c9b402c12a7246868752e2878f7e0e&vhost=bandcheck.srs.com");
|
||||||
|
* where the HTML page must contains an element:
|
||||||
|
<div id="container_id"></div>
|
||||||
|
* this js will directly erase the container by swfobject.
|
||||||
*/
|
*/
|
||||||
function SrsBandwidth(container, width, height, private_object) {
|
function SrsBandwidth(container, width, height, private_object) {
|
||||||
if (!SrsBandwidth.__id) {
|
if (!SrsBandwidth.__id) {
|
||||||
|
|
Loading…
Reference in a new issue