From 3ec2fa6d196096c8d1217de925d4dd53f0c8b12a Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Tue, 14 Jan 2014 19:34:36 +0100 Subject: [PATCH] use nick field associated with the participants, but dont show them yet --- app.js | 11 ++++++++++- css/main.css | 12 ++++++++++-- index.html | 1 + 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index b621189cb..46c56a869 100644 --- a/app.js +++ b/app.js @@ -81,7 +81,7 @@ function doJoin() { roomjid += '/' + Strophe.getNodeFromJid(connection.jid); } } else { - roomjid += '/' + Strophe.getNodeFromJid(connection.jid); + roomjid += '/' + Strophe.getNodeFromJid(connection.jid).substr(0,8); } connection.emuc.doJoin(roomjid); } @@ -246,6 +246,9 @@ $(document).bind('setLocalDescription.jingle', function (event, sid) { $(document).bind('joined.muc', function (event, jid, info) { updateRoomUrl(window.location.href); + document.getElementById('localNick').appendChild( + document.createTextNode(Strophe.getResourceFromJid(jid) + ' (you)') + ); // Once we've joined the muc show the toolbar showToolbar(); @@ -264,6 +267,11 @@ $(document).bind('entered.muc', function (event, jid, info, pres) { var remotes = document.getElementById('remoteVideos'); remotes.appendChild(container); + var nickfield = document.createElement('span'); + nickfield.appendChild(document.createTextNode(Strophe.getResourceFromJid(jid))); + container.appendChild(nickfield); + resizeThumbnails(); + if (focus !== null) { // FIXME: this should prepare the video if (focus.confid === null) { @@ -291,6 +299,7 @@ $(document).bind('left.muc', function (event, jid) { if (container) { // hide here, wait for video to close before removing $(container).hide(); + resizeThumbnails(); } if (Object.keys(connection.emuc.members).length === 0) { diff --git a/css/main.css b/css/main.css index e1453ad7e..8d200c7b7 100644 --- a/css/main.css +++ b/css/main.css @@ -29,6 +29,15 @@ html, body{ width: 100%; height: 100%; } +.videocontainer>span { + display: none; /* enable when you want nicks to be shown */ + position: absolute; + left: 0px; + bottom: -20px; + z-index: 0; + width: 100%; + font-size: 10pt; +} #largeVideo { } @@ -49,11 +58,10 @@ html, body{ width:auto; overflow: hidden; border:1px solid transparent; - font-size:0; z-index: 2; } -#remoteVideos span { +#remoteVideos>span { display: inline-block; z-index:0; border:1px solid #FFFFFF; diff --git a/index.html b/index.html index 45dcfa028..803c1d117 100644 --- a/index.html +++ b/index.html @@ -49,6 +49,7 @@
+