From 4c18692c4031a915f910c61344f4478600d1dba3 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Fri, 7 Dec 2018 12:31:17 +0100 Subject: [PATCH] openvidu-ionic: use demos openvidu-server url if iOS device --- openvidu-ionic/src/app/app.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openvidu-ionic/src/app/app.component.ts b/openvidu-ionic/src/app/app.component.ts index 3ab64073..dffc2070 100644 --- a/openvidu-ionic/src/app/app.component.ts +++ b/openvidu-ionic/src/app/app.component.ts @@ -16,7 +16,7 @@ declare var cordova; }) export class AppComponent implements OnDestroy { - OPENVIDU_SERVER_URL = 'https://' + location.hostname + ':4443/'; + OPENVIDU_SERVER_URL = 'https://' + location.hostname + ':4443'; OPENVIDU_SERVER_SECRET = 'MY_SECRET'; ANDROID_PERMISSIONS = [ @@ -264,6 +264,9 @@ export class AppComponent implements OnDestroy { */ getToken(): Promise { + if (this.platform.is('ios') && this.platform.is('cordova') && this.OPENVIDU_SERVER_URL === 'https://localhost:4443') { + this.OPENVIDU_SERVER_URL = 'https://demos.openvidu.io:4443'; + } return this.createSession(this.mySessionId).then((sessionId) => { return this.createToken(sessionId); });