How to resume a video after calling SurfaceViewRenderer.pauseVideo() In webrtc org.webrtc.SurfaceViewRenderer

Viewed 421

I'm successfully able to pause the video by calling

surfaceViewRenderer.pauseVideo();

But I'm not able to resume it. Any help will be useful. There's no function as start or resume.

2 Answers

Finally after a while I saw the code for the surfaceViewRenderer.pauseVideo(); and what it does is set the fps to 0, so in order to resume the video we can just call

surfaceViewRenderer.setFpsReduction(30);

Where 30 is the fps (Frames Per Second) sent to the remote user.

Even though Singh solution works, but you should know the framerate, you should use disableFpsReduction.

surfaceViewRenderer.disableFpsReduction();
Related