mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Tools: Refine one to one demo
This commit is contained in:
parent
ea417201b3
commit
aa9c4e8604
1 changed files with 6 additions and 6 deletions
12
trunk/3rdparty/signaling/www/demos/one2one.html
vendored
12
trunk/3rdparty/signaling/www/demos/one2one.html
vendored
|
@ -45,14 +45,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span4">
|
<div class="span4 hide" id="publisher">
|
||||||
<label></label>
|
<label></label>
|
||||||
<video id="rtc_media_publisher" width="310" autoplay muted controls></video>
|
<video id="rtc_media_publisher" width="310" autoplay muted controls></video>
|
||||||
|
|
||||||
<label></label>
|
<label></label>
|
||||||
<span id='self'></span>
|
<span id='self'></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="span6">
|
<div class="span6 hide" id="player">
|
||||||
<label></label>
|
<label></label>
|
||||||
<video id="rtc_media_player" width="310" autoplay muted controls></video>
|
<video id="rtc_media_player" width="310" autoplay muted controls></video>
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@
|
||||||
var startPublish = function (host, room, display) {
|
var startPublish = function (host, room, display) {
|
||||||
var url = 'webrtc://' + host + '/' + room + '/' + display + conf.query;
|
var url = 'webrtc://' + host + '/' + room + '/' + display + conf.query;
|
||||||
$('#rtc_media_publisher').show();
|
$('#rtc_media_publisher').show();
|
||||||
|
$('#publisher').show();
|
||||||
|
|
||||||
if (publisher) {
|
if (publisher) {
|
||||||
publisher.close();
|
publisher.close();
|
||||||
|
@ -163,6 +164,7 @@
|
||||||
var startPlay = function (host, room, display) {
|
var startPlay = function (host, room, display) {
|
||||||
var url = 'webrtc://' + host + '/' + room + '/' + display + conf.query;
|
var url = 'webrtc://' + host + '/' + room + '/' + display + conf.query;
|
||||||
$('#rtc_media_player').show();
|
$('#rtc_media_player').show();
|
||||||
|
$('#player').show();
|
||||||
|
|
||||||
if (player) {
|
if (player) {
|
||||||
player.close();
|
player.close();
|
||||||
|
@ -184,15 +186,13 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$('#rtc_media_publisher').hide();
|
|
||||||
$('#rtc_media_player').hide();
|
|
||||||
$("#btn_start").click(startDemo);
|
|
||||||
|
|
||||||
// Pass-by to SRS url.
|
// Pass-by to SRS url.
|
||||||
let conf = SrsRtcSignalingParse(window.location);
|
let conf = SrsRtcSignalingParse(window.location);
|
||||||
$('#txt_host').val(conf.host);
|
$('#txt_host').val(conf.host);
|
||||||
conf.room && $('#txt_room').val(conf.room);
|
conf.room && $('#txt_room').val(conf.room);
|
||||||
$('#txt_display').val(conf.display);
|
$('#txt_display').val(conf.display);
|
||||||
|
|
||||||
|
$("#btn_start").click(startDemo);
|
||||||
if (conf.autostart) {
|
if (conf.autostart) {
|
||||||
startDemo();
|
startDemo();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue