Skip to content

Commit 857f288

Browse files
committed
Update OPENVIDU_URL params
1 parent 633915e commit 857f288

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

openvidu-android/app/src/main/java/io/openvidu/openvidu_android/activities/SessionActivity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,27 +145,27 @@ private void getToken(String sessionId) {
145145
// Session Request
146146
RequestBody sessionBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"),
147147
"{\"customSessionId\": \"" + sessionId + "\"}");
148-
this.httpClient.httpCall("/api/sessions", "POST", "application/json", sessionBody, new Callback() {
148+
this.httpClient.httpCall("/openvidu/api/sessions", "POST", "application/json", sessionBody, new Callback() {
149149

150150
@Override
151151
public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
152152
int responseCode = response.code();
153-
Log.d(TAG, "POST /api/sessions response code: " + responseCode);
153+
Log.d(TAG, "POST /openvidu/api/sessions response code: " + responseCode);
154154

155155
// Accept both 200 OK (session created) and 409 Conflict (session already
156156
// exists)
157157
if (responseCode == 200 || responseCode == 409) {
158158
// Token Request
159159
RequestBody tokenBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"),
160160
"{}");
161-
httpClient.httpCall("/api/sessions/" + sessionId + "/connection", "POST", "application/json",
161+
httpClient.httpCall("/openvidu/api/sessions/" + sessionId + "/connection", "POST", "application/json",
162162
tokenBody, new Callback() {
163163

164164
@Override
165165
public void onResponse(@NotNull Call call, @NotNull Response response) {
166166
try {
167167
String responseString = response.body().string();
168-
Log.d(TAG, "POST /api/sessions/connection response: " + responseString);
168+
Log.d(TAG, "POST /openvidu/api/sessions/connection response: " + responseString);
169169

170170
// Parse JSON response to extract token
171171
JSONObject jsonResponse = new JSONObject(responseString);
@@ -183,19 +183,19 @@ public void onResponse(@NotNull Call call, @NotNull Response response) {
183183

184184
@Override
185185
public void onFailure(@NotNull Call call, @NotNull IOException e) {
186-
Log.e(TAG, "Error POST /api/sessions/SESSION_ID/connection", e);
186+
Log.e(TAG, "Error POST /openvidu/api/sessions/SESSION_ID/connection", e);
187187
connectionError(OPENVIDU_URL);
188188
}
189189
});
190190
} else {
191-
Log.e(TAG, "Unexpected response code for POST /api/sessions: " + responseCode);
191+
Log.e(TAG, "Unexpected response code for POST /openvidu/api/sessions: " + responseCode);
192192
connectionError(OPENVIDU_URL);
193193
}
194194
}
195195

196196
@Override
197197
public void onFailure(@NotNull Call call, @NotNull IOException e) {
198-
Log.e(TAG, "Error POST /api/sessions", e);
198+
Log.e(TAG, "Error POST /openvidu/api/sessions", e);
199199
connectionError(OPENVIDU_URL);
200200
}
201201
});

openvidu-ionic/src/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export class AppComponent implements OnDestroy {
299299

300300
async createSession(sessionId) {
301301
const response = this.httpClient.post(
302-
this.OPENVIDU_URL + 'api/sessions',
302+
this.OPENVIDU_URL + 'openvidu/api/sessions',
303303
{ customSessionId: sessionId },
304304
{
305305
headers: {
@@ -316,7 +316,7 @@ export class AppComponent implements OnDestroy {
316316

317317
async createToken(sessionId) {
318318
const response = this.httpClient.post(
319-
this.OPENVIDU_URL + 'api/sessions/' + sessionId + '/connection',
319+
this.OPENVIDU_URL + 'openvidu/api/sessions/' + sessionId + '/connection',
320320
{},
321321
{
322322
headers: {

0 commit comments

Comments
 (0)