connection manager: add getters.

This commit is contained in:
Miroslav Šedivý 2021-07-11 22:41:10 +02:00
parent 471b26ace5
commit bbb80730fb

View File

@ -111,10 +111,18 @@ export class NekoConnection extends EventEmitter<NekoConnectionEvents> {
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')