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

2

5

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.

Pulpit answered 13/5, 2020 at 19:35 Comment(0)
P
4

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.

Pulpit answered 14/5, 2020 at 9:46 Comment(0)
G
4

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

surfaceViewRenderer.disableFpsReduction();
Gyatt answered 18/1, 2021 at 13:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.