[lib.audio-manager].launch(room_id) tested + [lib.room-controller].nav('voice') always kills audio-manager before starting it
This commit is contained in:
parent
d205985305
commit
3f06b3dc39
|
@ -497,10 +497,10 @@ export default class AudioManager{
|
|||
kill(){
|
||||
|
||||
/* (1) Close websocket */
|
||||
this.ws.close();
|
||||
this.ws && this.ws.close();
|
||||
|
||||
/* (2) Stop recording */
|
||||
this.recorder.stop();
|
||||
this.recorder && this.recorder.stop();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -50,13 +50,13 @@ export default class RoomController{
|
|||
if( type === 'text' && window.csock instanceof wscd )
|
||||
csock.send({ buffer: { rid: room.id } });
|
||||
|
||||
/* (6) If 'voice' room -> launch audio */
|
||||
/* (6) If 'voice' room -> toggle audio */
|
||||
if( type === 'voice' ){
|
||||
|
||||
AudioManager.kill();
|
||||
|
||||
if( typeof this[type].current === 'number' )
|
||||
AudioManager.launch(this[type].current);
|
||||
else
|
||||
AudioManager.kill();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue