diff --git a/trunk/3rdparty/signaling/www/demos/one2one.html b/trunk/3rdparty/signaling/www/demos/one2one.html
index 6ec7d0b43..499925b0a 100644
--- a/trunk/3rdparty/signaling/www/demos/one2one.html
+++ b/trunk/3rdparty/signaling/www/demos/one2one.html
@@ -67,7 +67,7 @@
-
+
@@ -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) {