Skip to content

Commit 8df4085

Browse files
committed
Update sample to use iceCheckingTimeout: 3000
1 parent 67e41c3 commit 8df4085

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

demo/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'bootstrap/dist/css/bootstrap.min.css';
66
import type Platform from '@ringcentral/sdk/lib/platform/Platform';
77
import { SessionState } from 'sip.js';
88

9-
import WebPhone from '../src/index';
9+
import WebPhone, { WebPhoneOptions } from '../src/index';
1010
import incomingAudio from 'url:./audio/incoming.ogg';
1111
import outgoingAudio from 'url:./audio/outgoing.ogg';
1212
import type { WebPhoneInvitation } from '../src/session';
@@ -159,7 +159,7 @@ $(() => {
159159
}
160160

161161
function register(data) {
162-
const webPhoneConfig: any = {
162+
const webPhoneConfig: WebPhoneOptions = {
163163
enableDscp: true,
164164
clientId: localStorage.getItem('webPhoneclientId')!,
165165
audioHelper: {
@@ -176,6 +176,11 @@ $(() => {
176176
},
177177
enableQos: true,
178178
enableMediaReportLogging: true,
179+
180+
// in some network environments, the default iceCheckingTimeout of 500ms is not enough
181+
// we need more time to gather candidates.
182+
// disadvantage of this is that it will take more time to establish the call
183+
iceCheckingTimeout: 3000, // 3 seconds
179184
};
180185

181186
const urlParams = new URLSearchParams(window.location.search);

0 commit comments

Comments
 (0)