Create console global message

- Add style
- Create zone and button to show the admin console
This commit is contained in:
Gregoire Parant
2020-09-16 21:50:04 +02:00
parent 509196785b
commit e59cbcfaa7
5 changed files with 107 additions and 11 deletions
+12 -8
View File
@@ -283,14 +283,6 @@ export class Connection implements Connection {
return this.socket.on(EventMessage.WEBRTC_SCREEN_SHARING_SIGNAL, callback);
}
public receivePlayGlobalMessage(callback: (message: GlobalMessageInterface) => void) {
return this.socket.on(EventMessage.PLAY_GLOBAL_MESSAGE, callback);
}
public receiveStopGlobalMessage(callback: (message: GlobalMessageInterface) => void) {
return this.socket.on(EventMessage.STOP_GLOBAL_MESSAGE, callback);
}
public onServerDisconnected(callback: (reason: string) => void): void {
this.socket.on('disconnect', (reason: string) => {
if (reason === 'io client disconnect') {
@@ -322,4 +314,16 @@ export class Connection implements Connection {
onActionableEvent(callback: (message: ItemEventMessageInterface) => void): void {
this.socket.on(EventMessage.ITEM_EVENT, callback);
}
public receivePlayGlobalMessage(callback: (message: GlobalMessageInterface) => void) {
return this.socket.on(EventMessage.PLAY_GLOBAL_MESSAGE, callback);
}
public receiveStopGlobalMessage(callback: (message: GlobalMessageInterface) => void) {
return this.socket.on(EventMessage.STOP_GLOBAL_MESSAGE, callback);
}
public emitGlobalMessage(message: GlobalMessageInterface){
return this.socket.emit(EventMessage.PLAY_GLOBAL_MESSAGE, message);
}
}