mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
connection manager: add getters.
This commit is contained in:
parent
471b26ace5
commit
bbb80730fb
@ -111,10 +111,18 @@ export class NekoConnection extends EventEmitter<NekoConnectionEvents> {
|
|||||||
this._url = url.replace(/^http/, 'ws').replace(/\/+$/, '') + '/api/ws'
|
this._url = url.replace(/^http/, 'ws').replace(/\/+$/, '') + '/api/ws'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getUrl(): string {
|
||||||
|
return this._url
|
||||||
|
}
|
||||||
|
|
||||||
public setToken(token: string) {
|
public setToken(token: string) {
|
||||||
this._token = token
|
this._token = token
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getToken(): string {
|
||||||
|
return this._token
|
||||||
|
}
|
||||||
|
|
||||||
public setVideo(video: string) {
|
public setVideo(video: string) {
|
||||||
if (!this._state.webrtc.videos.includes(video)) {
|
if (!this._state.webrtc.videos.includes(video)) {
|
||||||
throw new Error('video id not found')
|
throw new Error('video id not found')
|
||||||
|
Loading…
Reference in New Issue
Block a user