Using the js file twilio-video.js version 1.14.1, all code is functioning on a single .aspx page.
If it's achievable, I need the code to disable audio tracks for participants.
//The Participant object represents all individuals connected to the Room. For example, User-1's screen shows Participants User-2, User-3, and User-4.
participant.audioTracks.forEach(function (track) {
if (track.kind === 'audio') {
track.mediaStreamTrack.enabled = false;
track.mediaStreamTrack.muted = true;
}
// The sid identifies which audio track to disable for a specific Participant. For instance, if we want to disable User-3's audio on User-1's screen using the audio track's sid, provide me with the necessary code or reference URL link.
if (track.sid == sid)
{
// Disable the participant's audio track.
track.disable();
}
});
If there's a way to only display User-1's video and audio on User-3's screen, where User-3 is the local participant and User-1 is the remote participant, please share any suggestions and reference links.
If utilizing Rest API is an option, kindly suggest a reference URL link to Twilio's Rest API documentation.