acs - Azure Communication Services
- Get
access_token
from the backend. This backend is ours but the token shall also originate from acs (more on that later). - Get the meeting UUID from the backend. This UUID is unique in acs, but we generate it ourselves. It will act as the address of our group call.
- Get the name user's name. Can be entered at will or from the backend.
- Using the
access_token
, create an object ofAzureCommunicationTokenCredential
that takes theaccess_token
as its argument. - Create a
CallClient
. - From the call client create a
CallAgent
, that takes the token_credential and name as arguments. - Get the devices you need to send feed from
device_manager
. - Join group call.
const token_string = '';
const UUID = '';
const token_credential = new AzureCommunicationTokenCredential(token_string);
const callClient = new CallClient();
const callAgent = await callClient.createCallAgent(token_credential, {
displayName: 'name_here'
});
const deviceManager = await callClient.getDeviceManager();
const mics = deviceManager.getMicrophones();
const cameras = deviceManager.getCameras();
const call = callAgent.join(UUID);
const others = call.remoteParticipants;