twilio-video.js icon indicating copy to clipboard operation
twilio-video.js copied to clipboard

not hide the canera and mute for the remote Participant.

Open Mu-Aleem opened this issue 2 years ago • 3 comments

please help me. my hide camera and mute work only for the local Participant not for the remote Participant.

const handleAudioToggle = () => { room.localParticipant.audioTracks.forEach((track) => { if (track.track.isEnabled) { track.track.disable(); } else { track.track.enable(); } setToggleAudio(track.track.isEnabled); }); };

const handleVideoToggle = () => { room.localParticipant.videoTracks.forEach((track) => { if (track.track.isEnabled) { track.track.disable(); } else { track.track.enable(); } setToggleVideo(track.track.isEnabled); }); };

hear is my function. when i console the room. not find any RemoteAudioTrack or RemoteVideoTrack .

Mu-Aleem avatar Aug 29 '23 10:08 Mu-Aleem

Hi @Mu-Aleem ,

Thanks for writing in with your issue. Are you sure you were not the only person in the Room? That might explain why there were no RemoteParticipants and RemoteTracks.

manjeshbhargav avatar Aug 29 '23 15:08 manjeshbhargav

hi @manjeshbhargav . I'm creating a basic video call app and after connecting the call when I hide or mute my mic its mute and hide on my side only. another user can hire and see my video which is totally wrong.

const handleAudioToggle = () => { room.localParticipant.audioTracks.forEach((track) => { if (track.track.isEnabled) { track.track.disable(); } else { track.track.enable(); } setToggleAudio(track.track.isEnabled); });

 const handleVideoToggle = () => {
room.localParticipant.videoTracks.forEach((track) => {
  if (track.track.isEnabled) {
    track.track.disable();
  } else {
    track.track.enable();
  }
  setToggleVideo(track.track.isEnabled);
});

};

hear is my function which i use for the hide and mute

Mu-Aleem avatar Aug 30 '23 06:08 Mu-Aleem

@Mu-Aleem ,

Have you deployed your app somewhere where I can play around with it? Muting is a basic feature that has been working for a long time, so I would like to access your app if possible.

manjeshbhargav avatar Aug 30 '23 17:08 manjeshbhargav