mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #257, support 0.1s+ latency. 2.0.70
This commit is contained in:
parent
68ade0a267
commit
10297fab51
19 changed files with 179 additions and 30 deletions
|
@ -22,7 +22,7 @@ function SrsPlayer(container, width, height, private_object) {
|
|||
this.height = height;
|
||||
this.id = SrsPlayer.__id++;
|
||||
this.stream_url = null;
|
||||
this.buffer_time = 0.8; // default to 0.8
|
||||
this.buffer_time = 0.3; // default to 0.3
|
||||
this.volume = 1.0; // default to 100%
|
||||
this.callbackObj = null;
|
||||
|
||||
|
|
14
trunk/research/players/srs_player.html
Normal file → Executable file
14
trunk/research/players/srs_player.html
Normal file → Executable file
|
@ -96,7 +96,7 @@
|
|||
|
||||
srs_player = new SrsPlayer("player_id", srs_get_player_width(), srs_get_player_height());
|
||||
srs_player.on_player_ready = function() {
|
||||
select_buffer_time("#btn_bt_0_8", 0.8);
|
||||
select_buffer_time("#btn_bt_0_1", 0.1);
|
||||
this.play(url);
|
||||
};
|
||||
srs_player.on_player_metadata = function(metadata) {
|
||||
|
@ -231,6 +231,15 @@
|
|||
}
|
||||
|
||||
if (true) {
|
||||
$("#btn_bt_0_1").click(function(){
|
||||
select_buffer_time("#btn_bt_0_1", 0.1);
|
||||
});
|
||||
$("#btn_bt_0_2").click(function(){
|
||||
select_buffer_time("#btn_bt_0_2", 0.2);
|
||||
});
|
||||
$("#btn_bt_0_3").click(function(){
|
||||
select_buffer_time("#btn_bt_0_3", 0.3);
|
||||
});
|
||||
$("#btn_bt_0_5").click(function(){
|
||||
select_buffer_time("#btn_bt_0_5", 0.5);
|
||||
});
|
||||
|
@ -504,6 +513,9 @@
|
|||
<div class="btn-group dropup">
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown">缓冲区<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a id="btn_bt_0_1" href="#">0.1秒(实时)</a></li>
|
||||
<li><a id="btn_bt_0_2" href="#">0.2秒(实时)</a></li>
|
||||
<li><a id="btn_bt_0_3" href="#">0.3秒(实时)</a></li>
|
||||
<li><a id="btn_bt_0_5" href="#">0.5秒(实时)</a></li>
|
||||
<li><a id="btn_bt_0_8" href="#">0.8秒(会议)</a></li>
|
||||
<li><a id="btn_bt_1" href="#">1秒(低延迟)</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue