From bbb80730fb3bbfd45663b8651507f46dd992ab73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 11 Jul 2021 22:41:10 +0200 Subject: [PATCH] connection manager: add getters. --- src/component/internal/connection.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/component/internal/connection.ts b/src/component/internal/connection.ts index 080308e7..bca94c7c 100644 --- a/src/component/internal/connection.ts +++ b/src/component/internal/connection.ts @@ -111,10 +111,18 @@ export class NekoConnection extends EventEmitter { this._url = url.replace(/^http/, 'ws').replace(/\/+$/, '') + '/api/ws' } + public getUrl(): string { + return this._url + } + public setToken(token: string) { this._token = token } + public getToken(): string { + return this._token + } + public setVideo(video: string) { if (!this._state.webrtc.videos.includes(video)) { throw new Error('video id not found')