Version
6.19.2 (also reproducible on 6.18.0 and all v6.16.1+ releases)
Platforms
What happened?
On Android v6, the viewType prop is wired through the native bridge (ReactExoplayerViewManager → ReactExoplayerView.setViewType → ExoPlayerView.updateSurfaceView), but updateSurfaceView() is a no-op TODO stub:
fun updateSurfaceView(viewType: Int) {
// TODO: Implement proper surface type switching if needed
}
As a result, viewType="texture" / viewType={ViewType.TEXTURE} is ignored on Android. Video continues to render on the default SurfaceView, which does not respect parent borderRadius / overflow: hidden clipping.
Expected: Setting viewType to TextureView should swap the internal surface so video clips correctly inside rounded preview cards and does not bleed into neighboring list cells (e.g. FlashList inline autoplay feeds).
Actual: No surface swap occurs; rounded corners and overflow clipping do not work for video content.
Regression context
Reproduction
- Use react-native-video
6.19.2 on Android.
- Render a
<Video viewType="texture" ... /> inside a container with borderRadius and overflow: 'hidden'.
- Play video content.
- Observe that video corners are not clipped and video can bleed outside the rounded bounds.
- (Optional) Place multiple inline autoplay videos in a FlashList — neighboring cells may show video bleed.
Proposed fix
Implement ExoPlayerView.updateSurfaceView() to swap TextureView / SurfaceView inside the media3 PlayerView content frame, clear/reattach the ExoPlayer surface, and sync the internal PlayerView.surfaceView field.
I have a working implementation ready in a PR targeting support/6.x.x.
Version
6.19.2 (also reproducible on 6.18.0 and all v6.16.1+ releases)
Platforms
What happened?
On Android v6, the
viewTypeprop is wired through the native bridge (ReactExoplayerViewManager→ReactExoplayerView.setViewType→ExoPlayerView.updateSurfaceView), butupdateSurfaceView()is a no-op TODO stub:As a result,
viewType="texture"/viewType={ViewType.TEXTURE}is ignored on Android. Video continues to render on the defaultSurfaceView, which does not respect parentborderRadius/overflow: hiddenclipping.Expected: Setting
viewTypeto TextureView should swap the internal surface so video clips correctly inside rounded preview cards and does not bleed into neighboring list cells (e.g. FlashList inline autoplay feeds).Actual: No surface swap occurs; rounded corners and overflow clipping do not work for video content.
Regression context
ExoPlayerViewimplementation.PlayerViewmigration (feat(android): replace custom VideoView with media3PlayerView#4581) broke surface switching.surfaceTypeprop andVideoView.ktlayout recreation (feat(android): add surface type prop #4719), but the v6 maintenance branch still has the stub.Reproduction
6.19.2on Android.<Video viewType="texture" ... />inside a container withborderRadiusandoverflow: 'hidden'.Proposed fix
Implement
ExoPlayerView.updateSurfaceView()to swapTextureView/SurfaceViewinside the media3PlayerViewcontent frame, clear/reattach the ExoPlayer surface, and sync the internalPlayerView.surfaceViewfield.I have a working implementation ready in a PR targeting
support/6.x.x.