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/client/lib/voip/SimpleVoipUser.ts

26 lines
661 B

import { IMediaStreamRenderer } from '../../../definition/voip/VoIPUserConfiguration';
import { VoIPUser } from './VoIPUser';
export class SimpleVoipUser {
static async create(
userName: string,
password: string,
registrar: string,
webSocketPath: string,
iceServers: Array<object>,
callType?: 'audio' | 'video',
mediaStreamRendered?: IMediaStreamRenderer,
): Promise<VoIPUser> {
const config = {
authUserName: userName,
authPassword: password,
sipRegistrarHostnameOrIP: registrar,
webSocketURI: webSocketPath,
enableVideo: callType === 'video',
iceServers,
};
return VoIPUser.create(config, mediaStreamRendered);
}
}