This commit is contained in:
RobinLinus 2020-12-16 04:16:53 +01:00
parent 612d8cf1ea
commit 85dedf03ce
4 changed files with 6 additions and 5 deletions

View file

@ -41,8 +41,8 @@ class ServerConnection {
case 'ping':
this.send({ type: 'pong' });
break;
case 'displayName':
Events.fire('displayName', msg);
case 'display-name':
Events.fire('display-name', msg);
break;
default:
console.error('WS: unkown message type', msg);

View file

@ -6,8 +6,8 @@ window.isProductionEnvironment = !window.location.host.startsWith('localhost');
window.iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
// set display name
Events.on('displayName', e => {
$("displayName").textContent = "You are known as " + e.detail.message;
Events.on('display-name', e => {
$('displayName').textContent = 'You are known as ' + e.detail.message;
});
class PeersUI {