Skip to content

wild-times/vnet-acs-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How The Azure Communication Service works with our FrontEnd.

acs - Azure Communication Services

What we need.

  1. Get access_token from the backend. This backend is ours but the token shall also originate from acs (more on that later).
  2. 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.
  3. Get the name user's name. Can be entered at will or from the backend.

How it comes together

  1. Using the access_token, create an object of AzureCommunicationTokenCredential that takes the access_token as its argument.
  2. Create a CallClient.
  3. From the call client create a CallAgent, that takes the token_credential and name as arguments.
  4. Get the devices you need to send feed from device_manager.
  5. 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;

GOOD LUCK UNDERSTANDING

LOOK HERE FOR SIMPLICITY

Releases

No releases published

Packages

No packages published