Reputation: 375
I have an Android videochat app running through a Kurento WebRTC server. The websocket, room and peer connections are handled with the help of Nubomedia libraries:
The connection works fine. Now I need to implement a pause/resume button but only for one of the streams. This way one peer can send his stream to the room while other may temporary disable his stream, but still see the other one.
I'm trying to stop it with:
nbmWebRTCPeer.stopLocalMedia();
Which works great, but I'm not able to resume it with:
nbmWebRTCPeer.startLocalMedia();
The upstream keeps frozen after resuming. Is not this a good approach? If not, is there any better? for example, sending a black stream instead of stop/start local media?
Upvotes: 0
Views: 1862
Reputation: 375
I ended up forking the library and adding my own funtion to call localVideoTrack.setEnabled(bool) in MediaResourceManager. Now I can pause/resume the outgoing video with ease.
Upvotes: 1