openvidu-testapp: new REST API paths

pull/550/head
pabloFuente 2020-10-02 18:12:25 +02:00
parent aeccab7399
commit 683511ba27
1 changed files with 4 additions and 2 deletions

View File

@ -84,6 +84,8 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
textAreaValue = ''; textAreaValue = '';
isFocusedOnReport = false; isFocusedOnReport = false;
private API_PATH = 'openvidu/api';
constructor( constructor(
private openviduParamsService: OpenviduParamsService, private openviduParamsService: OpenviduParamsService,
private testFeedService: TestFeedService, private testFeedService: TestFeedService,
@ -368,7 +370,7 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
private updateRemoteStreamsInfo() { private updateRemoteStreamsInfo() {
let headers = new HttpHeaders(); let headers = new HttpHeaders();
headers = headers.append('Authorization', 'Basic ' + btoa('OPENVIDUAPP:' + this.openviduSecret)); headers = headers.append('Authorization', 'Basic ' + btoa('OPENVIDUAPP:' + this.openviduSecret));
this.http.get(this.openviduUrl + 'api/sessions/' + this.fixedSessionId + '?webRtcStats=true', { headers }).subscribe( this.http.get(this.openviduUrl + this.API_PATH + '/sessions/' + this.fixedSessionId + '?webRtcStats=true', { headers }).subscribe(
sessionInfo => { sessionInfo => {
this.report.streamsOut.content.forEach(report => { this.report.streamsOut.content.forEach(report => {
@ -445,7 +447,7 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
/*addReportForStreamConcurrent(event: StreamManagerWrapper) { /*addReportForStreamConcurrent(event: StreamManagerWrapper) {
let headers = new HttpHeaders(); let headers = new HttpHeaders();
headers = headers.append('Authorization', 'Basic ' + btoa('OPENVIDUAPP:' + this.openviduSecret)); headers = headers.append('Authorization', 'Basic ' + btoa('OPENVIDUAPP:' + this.openviduSecret));
this.http.get(this.openviduUrl + 'api/sessions/' + this.fixedSessionId + '?webRtcStats=true', { headers }).subscribe( this.http.get(this.openviduUrl + this.API_PATH + '/sessions/' + this.fixedSessionId + '?webRtcStats=true', { headers }).subscribe(
sessionInfo => { sessionInfo => {
event.streamManager.stream.getSelectedIceCandidate() event.streamManager.stream.getSelectedIceCandidate()