agora-rtc-react icon indicating copy to clipboard operation
agora-rtc-react copied to clipboard

even if removes the hook, the camera and video are still in use.

Open ParkDyel opened this issue 9 months ago • 3 comments

What kind of problem do you need help?

(I used a translator because my English is not good)

In my service, I use it for a 2-person conference, and I want to end the conference when the other party leaves.

When I hang up, the video and camera are normally disabled in Chrome, but when the other party who is using a mobile phone hangs up, the callStatus becomes 'ENDED', so even if I call localCameraTrack?.close(); localCameraTrack?.removeAllListeners();, Chrome still shows it as being in use.

I thought I handled it the same way when I left and when the other party left, but is there something different? Is there something I need to call related to it?

The package version is 2.1.0.

Thanks for reading the long text.

ParkDyel avatar Mar 20 '25 08:03 ParkDyel

@ParkDyel you can end the conference by set ready to false https://github.com/AgoraIO-Extensions/agora-rtc-react/blob/main/packages/agora-rtc-react/src/hooks/useJoin.ts#L18

guoxianzhe avatar Mar 21 '25 06:03 guoxianzhe

@guoxianzhe This issue only occurs with the newest version 2.4.0. Please check again.

ThanhNam20 avatar Mar 21 '25 09:03 ThanhNam20

pass isReady to useJoin doesn't seem to improve the situation. I'm trying various methods to close the pipeline.

even if close track, tab is still have video icon.

client.localTracks.forEach(track => {
  console.log('track', track.getTrackId(), track.getTrackLabel()); // return video track, and mic track
  track.stop();
  track.close();
});

ParkDyel avatar Apr 01 '25 07:04 ParkDyel