The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/lib/voip/SimpleVoipUser.ts

28 lines
707 B

import { IMediaStreamRenderer } from '@rocket.chat/core-typings';
import { VoIPUser } from './VoIPUser';
export class SimpleVoipUser {
static async create(
userName: string,
password: string,
registrar: string,
webSocketPath: string,
iceServers: Array<object>,
voipRetryCount: number,
callType?: 'audio' | 'video',
mediaStreamRendered?: IMediaStreamRenderer,
): Promise<VoIPUser> {
const config = {
authUserName: userName,
authPassword: password,
sipRegistrarHostnameOrIP: registrar,
webSocketURI: webSocketPath,
enableVideo: callType === 'video',
iceServers,
connectionRetryCount: voipRetryCount,
};
return VoIPUser.create(config, mediaStreamRendered);
}
}