add room.control.request.

This commit is contained in:
Miroslav Šedivý 2024-05-10 12:41:56 +02:00
parent 06955aa2f9
commit 86095ecdb1

View File

@ -37,6 +37,7 @@ export interface NekoEvents {
// room events
['room.control.host']: (hasHost: boolean, hostID: string | undefined, id: string) => void
['room.control.request']: (id: string) => void
['room.screen.updated']: (width: number, height: number, rate: number, id: string) => void
['room.settings.updated']: (settings: Settings, id: string) => void
['room.clipboard.updated']: (text: string) => void
@ -263,6 +264,11 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
// Control Events
/////////////////////////////
protected [EVENT.CONTROL_REQUEST]({ id }: message.SessionID) {
this._localLog.debug(`EVENT.CONTROL_REQUEST`)
this.emit('room.control.request', id)
}
protected [EVENT.CONTROL_HOST]({ has_host, host_id, id }: message.ControlHost) {
this._localLog.debug(`EVENT.CONTROL_HOST`)