ISBX / apprtc-ios

A native iOS video chat app based on WebRTC
BSD 3-Clause "New" or "Revised" License
1.34k stars 411 forks source link

Video Mute is not working #23

Open iOSDevHP opened 8 years ago

iOSDevHP commented 8 years ago

Hi,

I've taken a pull from this repository and I am trying to setup only Audio call but [self.client muteVideoIn]; and [self.client unmuteVideoIn]; methods are not working.

I am getting WARNING: Renegotiation needed but unimplemented. error in log.

Kindly help me in order to implement audio call feature.

Thanks, HP.

lkevin029 commented 8 years ago

Hello @iOSDevHP did you find a work around about this issue?

kadamska commented 8 years ago

Is there any fix or workaround for this?

wenxin3262 commented 8 years ago

try not to remove stream, just set enabled = false when you want to mute

kadamska commented 8 years ago

@wenxin3262 what flag are you referring to? How do you set it? [Edit] I think I got it, in case anybody needs it (for muting): RTCVideoTrack *videoTrack = localStream.videoTracks[0]; [videoTrack setEnabled:NO]; Btw, this works for audio as well.

hardikdarji commented 7 years ago

RTCMediaStream localStream = _peerConnection.localStreams[0]; [(RTCMediaStreamTrack) localStream.audioTracks[0] setEnabled:NO]; worked for me. is for audio but you can same as check with the audio track.