2

This is layout of videocall in my app. I use webrtc library. https://i.stack.imgur.com/akK7p.jpg

I want to drag SurfaceViewRenderer which on right&top to any where in screen device.So how can I do that? Thanks.

  • I change SurfaceViewRenderer to TextureViewRenderer then use custom drag to move video. It's work ok. – Nguyễn Thành Duy May 16 '20 at 09:00
  • hi, how can you use TextureViewRenderer? i tried to find library include it – famfamfam Aug 29 '20 at 07:22
  • https://www.programcreek.com/java-api-examples/index.php/?code=Piasy/VideoCRE/VideoCRE-master/VideoCRE/src/main/java/com/github/piasy/videocre/TextureViewRenderer.java. I have used this class so you can refer it. – Nguyễn Thành Duy Aug 31 '20 at 05:10
  • Hi, thanks for your help, im working with SurfaceRenderer and WebRtc, but my problem is when surface were added to VideoTrack -> get real video size -> but when i updated layoutParams to match real size -> the size of surface does not changed, did you meet this problem? Plz help https://pastebin.com/rDc1jv6H – famfamfam Aug 31 '20 at 08:41
  • I puts TextureViewRenderer in Framelayout and change layout by `FrameLayout.LayoutParams remoteLayout = (FrameLayout.LayoutParams) fullscreen_video_view.getLayoutParams(); remoteLayout.width = widthVideo; remoteLayout.height = heightVideo; fullscreen_video_view.setLayoutParams(remoteLayout); fullscreen_video_view.requestLayout();` Maybe you should put main_render.requestLayout() below main_render.layoutParams = params – Nguyễn Thành Duy Sep 01 '20 at 04:51
  • Please, share a piece of code with us! – james04 Apr 30 '21 at 19:05
  • Can you share a piece of code showing how u did this? – james04 May 04 '21 at 11:16

0 Answers0