openvidu/openvidu-testapp/src/app/services/openvidu-params.service.ts

32 lines
546 B
TypeScript
Raw Normal View History

import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject';
export interface OpenviduParams {
openviduUrl: string;
openviduSecret: string;
}
@Injectable()
export class OpenviduParamsService {
params: OpenviduParams =
{
openviduUrl: 'https://localhost:8443/',
openviduSecret: 'MY_SECRET'
};
newParams$ = new Subject<OpenviduParams>();
constructor() { }
getParams() {
return this.params;
}
updateParams(params: any) {
this.params = params;
this.newParams$.next(params);
}
}