|
|
|
@ -67,7 +67,7 @@
|
|
|
|
|
|
|
|
|
|
<label></label>
|
|
|
|
|
|
|
|
|
|
<div class="accordion">
|
|
|
|
|
<div class="accordion hide" id="srs_merge">
|
|
|
|
|
<div class="accordion-group">
|
|
|
|
|
<div class="accordion-heading">
|
|
|
|
|
<a href="#" id="ff_preview" target="_blank" class="accordion-toggle">
|
|
|
|
@ -113,6 +113,10 @@
|
|
|
|
|
sig.onmessage = function (msg) {
|
|
|
|
|
console.log('Notify: ', msg);
|
|
|
|
|
|
|
|
|
|
if (msg.event === 'leave') {
|
|
|
|
|
$('#player').hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (msg.event === 'publish') {
|
|
|
|
|
if (msg.peer && msg.peer.publishing && msg.peer.display !== display) {
|
|
|
|
|
startPlay(host, room, msg.peer.display);
|
|
|
|
@ -128,6 +132,12 @@
|
|
|
|
|
alert('From ' + msg.peer.display + ': ' + msg.data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (msg.participants.length >= 2) {
|
|
|
|
|
$('#srs_merge').show();
|
|
|
|
|
} else {
|
|
|
|
|
$('#srs_merge').hide();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
await sig.connect(conf.wsSchema, conf.wsHost, room, display);
|
|
|
|
|
|
|
|
|
@ -160,6 +170,10 @@
|
|
|
|
|
if (participant.display === display || !participant.publishing) return;
|
|
|
|
|
startPlay(host, room, participant.display);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (r0.participants.length >= 2) {
|
|
|
|
|
$('#srs_merge').show();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var startPublish = function (host, room, display) {
|
|
|
|
|