@Alexandre Gurgel thanks for the question.
- To answer your first question, yes the
callAgent.join()
method should handle both audio and video streams. If you’re not getting audio, it could be due to a variety of reasons. It might be a problem with the audio device, or it could be that the audio stream is not being correctly added to the call. You should ensure that the audio track is correctly initialized and added to the call. - The
call.on('changedParticipant')
event should trigger when there’s a change in the participants of the call. If you’re only receiving the video stream in this event, it might be because the audio stream is not being correctly initialized or added to the call. Here is a sample code:callAgent.join({ roomId }, options) .then(() => callAgent.startCall([])) // Start the call after joining .then(() => { call.on('changedParticipant', (participant) => { const mediaStream = participant.mediaStream; if (mediaStream) { const audioTracks = mediaStream.audioTracks; // Check for audio tracks const videoTracks = mediaStream.videoTracks; // Handle both audio and video tracks here } }); }) .catch((error) => { console.error('Error joining or starting call:', error); });
Based on this ACS troubleshooting documentation, the 401 Unauthorized error means there is an issue with the authentication token. The token might be expired, incorrectly formatted, or not correctly attached to the request. You should ensure that the token is correctly generated in your Azure Function and correctly attached to your requests.
The 403 Forbidden error means the server understood the request but refuses to authorize it. This status is similar to 401 (Unauthorized), but indicates that the client must authenticate itself to get the requested response. A 403 response is not a guarantee that the client will be able to access the requested resource; a server that wishes to make public why the request has been forbidden can describe that reason in the response payload
Make sure that your user token is correctly generated and that it has the necessary permissions to perform the actions you’re trying to perform
hope this helps! If you have any other questions, please let us know
-Grace