From 28e6c25f4be08172826f59ba64dd0fe2198036de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 14 Jul 2021 14:30:55 +0200 Subject: [PATCH] add screencast to connection state. --- src/component/internal/messages.ts | 1 + src/component/main.vue | 1 + src/component/types/messages.ts | 1 + src/component/types/state.ts | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/component/internal/messages.ts b/src/component/internal/messages.ts index 9a6e9056..4f98e05a 100644 --- a/src/component/internal/messages.ts +++ b/src/component/internal/messages.ts @@ -76,6 +76,7 @@ export class NekoMessages extends EventEmitter { this._log.debug('EVENT.SYSTEM_INIT') Vue.set(this._state, 'session_id', conf.session_id) Vue.set(this._state.control, 'implicit_hosting', conf.implicit_hosting) + Vue.set(this._state.connection, 'screencast', conf.screencast_enabled) Vue.set(this._state.connection.webrtc, 'videos', conf.webrtc.videos) for (const id in conf.sessions) { diff --git a/src/component/main.vue b/src/component/main.vue index 28c12898..ba58f608 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -107,6 +107,7 @@ videos: [], auto: true, }, + screencast: false, type: 'none', }, video: { diff --git a/src/component/types/messages.ts b/src/component/types/messages.ts index 338854e6..340a57aa 100644 --- a/src/component/types/messages.ts +++ b/src/component/types/messages.ts @@ -21,6 +21,7 @@ export interface SystemInit { screen_size: ScreenSize sessions: Record implicit_hosting: boolean + screencast_enabled: boolean webrtc: SystemWebRTC } diff --git a/src/component/types/state.ts b/src/component/types/state.ts index 56ad18c1..72e3b21d 100644 --- a/src/component/types/state.ts +++ b/src/component/types/state.ts @@ -15,7 +15,8 @@ export default interface State { export interface Connection { status: 'disconnected' | 'connecting' | 'connected' webrtc: WebRTC - type: 'webrtc' | 'fallback' | 'none' + screencast: boolean + type: 'webrtc' | 'screencast' | 'none' } export interface WebRTC {