calling: update getIceServers to use new turn routing endpoint
Co-authored-by: Adel Lahlou <adel@signal.com>
This commit is contained in:
@@ -2613,12 +2613,20 @@ export class CallingClass {
|
||||
const isContactUntrusted = !isInSystemContacts(conversation.attributes);
|
||||
|
||||
const callSettings = {
|
||||
// only include hostname with urlsWithIps
|
||||
// proritize ice servers with IPs to avoid DNS
|
||||
iceServers: [
|
||||
{
|
||||
hostname: iceServer.hostname,
|
||||
username: iceServer.username,
|
||||
password: iceServer.password,
|
||||
urls: (iceServer.urlsWithIps ?? []).slice(),
|
||||
},
|
||||
{
|
||||
hostname: '',
|
||||
username: iceServer.username,
|
||||
password: iceServer.password,
|
||||
urls: iceServer.urls.slice(),
|
||||
urls: (iceServer.urls ?? []).slice(),
|
||||
},
|
||||
],
|
||||
hideIp: shouldRelayCalls || isContactUntrusted,
|
||||
|
@@ -503,7 +503,7 @@ const URL_CALLS = {
|
||||
discovery: 'v1/discovery',
|
||||
getGroupAvatarUpload: 'v1/groups/avatar/form',
|
||||
getGroupCredentials: 'v1/certificate/auth/group',
|
||||
getIceServers: 'v1/accounts/turn',
|
||||
getIceServers: 'v1/calling/relays',
|
||||
getOnboardingStoryManifest:
|
||||
'dynamic/desktop/stories/onboarding/manifest.json',
|
||||
getStickerPackUpload: 'v1/sticker/pack/form',
|
||||
@@ -735,6 +735,8 @@ export type GetIceServersResultType = Readonly<{
|
||||
username: string;
|
||||
password: string;
|
||||
urls: ReadonlyArray<string>;
|
||||
urlsWithIps: ReadonlyArray<string>;
|
||||
hostname: string;
|
||||
}>;
|
||||
|
||||
export type GetDevicesResultType = ReadonlyArray<
|
||||
|
Reference in New Issue
Block a user