Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best way to get call info #399

Open
btoro opened this issue Nov 25, 2024 · 1 comment
Open

Best way to get call info #399

btoro opened this issue Nov 25, 2024 · 1 comment

Comments

@btoro
Copy link

btoro commented Nov 25, 2024

Id like to get information about the existing call to enable some functionality.

  1. How do I get whether the call is muted or not? Id like to show a muted indicator.
  2. How do I get the call duration?
@farhat-ha
Copy link
Collaborator

@btoro

  1. You can check the state of mute / unmute on the remote or local media stream.
call.remoteStream.getAudioTracks()[0].enabled // true or false. 

call.remoteStream.getAudioTracks().forEach(track => {
    track.addEventListener('mute', () => {
        console.log(`${track.kind} track is muted`);
    });

    track.addEventListener('unmute', () => {
        console.log(`${track.kind} track is unmuted`);
    });
});
  1. The SDK doesn't keep track of the call duration. That would have to be tracked by your implementation depending on the call state (active or on hold).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants