When displaying a video on top of a video using the RtcRemoteView.SurfaceView component, borderRadius not working with zOrderOnTop
See original GitHub issueTrying to display a video on top of another video.
The bottom video is a fullscreen video.
// FullVideo.js
<View fullScreen style={{ position: 'absolute', top: 0, left: 0, zIndex: 0}}> <RtcRemoteView.SurfaceView style={{ flex: 1 }} uid={uid} channelId={channelId} renderMode= {VideoRenderMode.Hidden} zOrderMediaOverlay />} </View>
Another video is displayed as absolute positioned, on top of it.
// SmallVideo.js
<View style={{ width, height, borderRadius: 10, overflow: 'hidden', zIndex: 2 }}> <RtcRemoteView.SurfaceView style={{ flex: 1 }} uid={uid} channelId={channelId} renderMode={VideoRenderMode.Hidden} zOrderOnTop /> </View>
When in SmallVideo.js the zOrderMediaOverlay prop is set, the View becomes TRANSPARENT When in SmallVideo.js the zOrderOnTop prop is set, borderRadius does not work even with overflow hidden
Even zIndex in the SurfaceView style doesn’t have any effect. Is there something missing here? I am using the react native v0.63.3
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top GitHub Comments
@dylancolin Did you try to use
RtcRemoteView.TextureView
? TheborderRadius
did not work for me, when I usedSurfaceView
, after I changed toTextureView
then it worked.seem like the issue has been solved.