I am working on an issue that uses WebRTC technology. The app is written in Xamarin Android
. For video output I am using org.webrtc.SurfaceViewRenderer
. The problem is that I need to display another video stream on top of one SurfaceViewRenderer
video stream (capture comes from the phone's camera), in which, for example, something will be drawn or the picture will change in real time (drawing with a brush), so that the user on the device can see both video streams at once, the one that is the main one and the one that is superimposed on top.
It may not be the right solution, but I tried placing both SurfaceViewRenderer
on top of each other, both stretched to full screen. Capturing video comes from a transparent window on which to draw. During playback, the upper SurfaceViewRenderer
completely overlaps the lower one and is not visible, since in addition to the drawn one, a black background appears in the video. I believe that this black background in the video does not allow you to see what is located under the SurfaceViewRenderer
.
I tried setting transparency but it didn't help.
Maybe someone came across a similar problem, how can you make a transparent video stream in SurfaceViewRenderer
?
question from:
https://stackoverflow.com/questions/65904962/video-stream-in-surfaceviewrenderer-with-transparency 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…