Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fixes setting of default display name in remote videos.

yanaseec2c487fdce
diff --git a/app.js b/app.js
index 136deb99d5..fa1e0c10dd 100644
--- a/app.js
+++ b/app.js
@@ -594,14 +594,9 @@ $(document).bind('joined.muc', function (event, jid, info) {
// Once we've joined the muc show the toolbar
Toolbar.showToolbar();
- var displayName = '';
if (info.displayName)
- displayName = info.displayName + ' (me)';
- else
- displayName = "Me";
-
- $(document).trigger('displaynamechanged',
- ['localVideoContainer', displayName]);
+ $(document).trigger('displaynamechanged',
+ ['localVideoContainer', info.displayName + ' (me)']);
});
$(document).bind('entered.muc', function (event, jid, info, pres) {
diff --git a/index.html b/index.html
index a09a4ff662..3a5f2ff5e7 100644
--- a/index.html
+++ b/index.html
@@ -58,7 +58,7 @@
<link rel="stylesheet" href="css/popup_menu.css?v=2">
<link rel="stylesheet" href="css/popover.css?v=1">
<link rel="stylesheet" href="css/contact_list.css?v=1">
- <link rel="stylesheet" href="css/welcome_page.css?v=1">
+ <link rel="stylesheet" href="css/welcome_page.css?v=1">
<!--
Link used for inline installation of chrome desktop streaming extension,
is updated automatically from the code with the value defined in config.js -->
@@ -277,6 +277,5 @@
</div>
<a id="downloadlog" onclick='dump(event.target);' data-toggle="popover" data-placement="right" data-content="Download logs" ><i class="fa fa-cloud-download"></i></a>
</div>
-
</body>
</html>
diff --git a/videolayout.js b/videolayout.js
index 069565cc1e..fa28ed927f 100644
--- a/videolayout.js
+++ b/videolayout.js
@@ -28,6 +28,9 @@ var VideoLayout = (function (my) {
var localVideoContainer = document.getElementById('localVideoWrapper');
localVideoContainer.appendChild(localVideo);
+ // Set default display name.
+ setDisplayName('localVideoContainer');
+
AudioLevels.updateAudioLevelCanvas();
var localVideoSelector = $('#' + localVideo.id);
@@ -103,7 +106,6 @@ var VideoLayout = (function (my) {
}
};
-
/**
* Updates the large video with the given new video source.
*/
@@ -306,6 +308,9 @@ var VideoLayout = (function (my) {
var container
= VideoLayout.addRemoteVideoContainer(peerJid, videoSpanId);
+ // Set default display name.
+ setDisplayName(videoSpanId);
+
var nickfield = document.createElement('span');
nickfield.className = "nick";
nickfield.appendChild(document.createTextNode(resourceJid));
@@ -541,7 +546,7 @@ var VideoLayout = (function (my) {
editableText.className = 'displayname';
editableText.id = 'editDisplayName';
- if (displayName.length) {
+ if (displayName && displayName.length) {
editableText.value
= displayName.substring(0, displayName.indexOf(' (me)'));
}