mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add id to event screen updated.
This commit is contained in:
parent
7eb40aba81
commit
17b6493832
@ -36,7 +36,7 @@ export interface NekoEvents {
|
||||
|
||||
// room events
|
||||
['room.control.host']: (hasHost: boolean, hostID?: string) => void
|
||||
['room.screen.updated']: (width: number, height: number, rate: number) => void
|
||||
['room.screen.updated']: (width: number, height: number, rate: number, id?: string) => void
|
||||
['room.clipboard.updated']: (text: string) => void
|
||||
['room.broadcast.status']: (isActive: boolean, url?: string) => void
|
||||
|
||||
@ -278,10 +278,10 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
||||
// Screen Events
|
||||
/////////////////////////////
|
||||
|
||||
protected [EVENT.SCREEN_UPDATED]({ width, height, rate }: message.ScreenSize) {
|
||||
protected [EVENT.SCREEN_UPDATED]({ width, height, rate, id }: message.ScreenSizeUpdate) {
|
||||
this._localLog.debug(`EVENT.SCREEN_UPDATED`)
|
||||
this._state.screen.size = { width, height, rate } // TODO: Vue.Set
|
||||
this.emit('room.screen.updated', width, height, rate)
|
||||
this.emit('room.screen.updated', width, height, rate, id)
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { ICEServer } from '../internal/webrtc'
|
||||
import type { Settings } from './state'
|
||||
import type { Settings, ScreenSize } from './state'
|
||||
import type { PeerRequest, PeerVideo, PeerAudio } from './webrtc'
|
||||
|
||||
/////////////////////////////
|
||||
@ -141,10 +141,8 @@ export interface ControlTouch extends Partial<ControlPos> {
|
||||
// Screen
|
||||
/////////////////////////////
|
||||
|
||||
export interface ScreenSize {
|
||||
width: number
|
||||
height: number
|
||||
rate: number
|
||||
export interface ScreenSizeUpdate extends ScreenSize {
|
||||
id?: string
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
|
@ -496,8 +496,8 @@ onMounted(() => {
|
||||
neko.value!.events.on('room.control.host', (hasHost: boolean, hostID?: string) => {
|
||||
console.log('room.control.host', hasHost, hostID)
|
||||
})
|
||||
neko.value!.events.on('room.screen.updated', (width: number, height: number, rate: number) => {
|
||||
console.log('room.screen.updated', width, height, rate)
|
||||
neko.value!.events.on('room.screen.updated', (width: number, height: number, rate: number, id: string) => {
|
||||
console.log('room.screen.updated', width, height, rate, 'by', id)
|
||||
})
|
||||
neko.value!.events.on('room.clipboard.updated', (text: string) => {
|
||||
console.log('room.clipboard.updated', text)
|
||||
|
Loading…
Reference in New Issue
Block a user