From 5166847f77bcac8c3d805b270a966aa1ad9d31f0 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 24 Apr 2018 11:08:06 +0200 Subject: [PATCH] added audio room connection/deco management --- parcel/lib/room-controller.js | 10 +++++----- parcel/vue/auth/dialog.vue | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/parcel/lib/room-controller.js b/parcel/lib/room-controller.js index b8df304..adb7fa6 100644 --- a/parcel/lib/room-controller.js +++ b/parcel/lib/room-controller.js @@ -46,20 +46,20 @@ export default class RoomController{ if( type === 'text' ) this[type].current = room.id; - /* (5) Tell websocket: new text room */ - if( typeof this[type].current === 'number' && window.csock instanceof wscd ) - (type === 'text') && csock.send({ buffer: { rid: room.id } }); - - /* (6) If 'voice' room -> toggle audio */ + /* (5) If 'voice' room -> toggle audio */ if( type === 'voice' ){ AudioManager.kill(); + csock.send({ buffer: { audio: false } }); if( typeof this[type].current === 'number' ) AudioManager.launch(this[type].current); } + /* (6) Tell websocket we connect to room */ + if( typeof this[type].current === 'number' && window.csock instanceof wscd ) + csock.send({ buffer: { rid: this[type].current } }); /* (6) Update buffer */ this._buffer[type] = {}; diff --git a/parcel/vue/auth/dialog.vue b/parcel/vue/auth/dialog.vue index e05212a..1ea930e 100644 --- a/parcel/vue/auth/dialog.vue +++ b/parcel/vue/auth/dialog.vue @@ -38,7 +38,7 @@
- {{ gs.content.user(uid).username }} + {{ ( uid == gs.auth.user.uid ) ? 'You' : gs.content.user(uid).username }}