mirror of https://github.com/OpenVidu/openvidu.git
openvidu-testapp: default url to location.hostname
parent
5286da813a
commit
bd0d4a82c0
|
@ -9,7 +9,7 @@ import { OpenviduParamsService } from './services/openvidu-params.service';
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
||||||
openviduURL = 'https://localhost:4443/';
|
openviduURL = 'https://' + window.location.hostname + ':4443/';
|
||||||
openviduSecret = 'MY_SECRET';
|
openviduSecret = 'MY_SECRET';
|
||||||
|
|
||||||
constructor(private router: Router, private openviduParamsService: OpenviduParamsService) { }
|
constructor(private router: Router, private openviduParamsService: OpenviduParamsService) { }
|
||||||
|
|
|
@ -229,6 +229,7 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log('There was an error connecting to the session:', error.code, error.message);
|
console.log('There was an error connecting to the session:', error.code, error.message);
|
||||||
|
alert('Error connecting to the session: ' + error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,10 @@ export interface OpenviduParams {
|
||||||
export class OpenviduParamsService {
|
export class OpenviduParamsService {
|
||||||
|
|
||||||
params: OpenviduParams =
|
params: OpenviduParams =
|
||||||
{
|
{
|
||||||
openviduUrl: 'https://localhost:4443/',
|
openviduUrl: 'https://' + window.location.hostname + ':4443/',
|
||||||
openviduSecret: 'MY_SECRET'
|
openviduSecret: 'MY_SECRET'
|
||||||
};
|
};
|
||||||
|
|
||||||
newParams$ = new Subject<OpenviduParams>();
|
newParams$ = new Subject<OpenviduParams>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue