We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to create button to toggle audio off on, i need current status audio to show icon related to current status
isMuted(kind) { try { if (kind === 'audio') { const tracks = this.localStream.getAudioTracks() tracks.forEach(track => { console.log('track: ', track) }) // return this.localStream.getAudioTracks()[0].enabled return tracks[0].enabled } if (kind === 'video') { return this.localStream.getVideoTracks()[0].enabled } throw new Error('track kind is required') } catch (error) { console.error(error); } },
console.log('audio muted', this.isMuted('audio')) this.localStream.mute('audio') console.log('audio muted', this.isMuted('audio')) client.publish(this.localStream) this.localStream.unmute('audio') console.log('audio muted', this.isMuted('audio')) this.localStream.mute('audio') console.log('audio muted', this.isMuted('audio'))
MediaStreamTrack.enabled is false after localStream.mute('audio') MediaStreamTrack.enabled is true after localStream.unmute('audio')
MediaStreamTrack.enabled always true
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Your environment.
What did you do?
I want to create button to toggle audio off on,
i need current status audio to show icon related to current status
What did you expect?
MediaStreamTrack.enabled is false after localStream.mute('audio')
MediaStreamTrack.enabled is true after localStream.unmute('audio')
What happened?
MediaStreamTrack.enabled always true
The text was updated successfully, but these errors were encountered: