Skip to content

[BUG]: Android viewType={TEXTURE} is ignored — updateSurfaceView is a TODO stub (v6.16.1–v6.19.2) #5024

Description

@kOOnzTe

Version

6.19.2 (also reproducible on 6.18.0 and all v6.16.1+ releases)

Platforms

  • Android

What happened?

On Android v6, the viewType prop is wired through the native bridge (ReactExoplayerViewManagerReactExoplayerView.setViewTypeExoPlayerView.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

  1. Use react-native-video 6.19.2 on Android.
  2. Render a <Video viewType="texture" ... /> inside a container with borderRadius and overflow: 'hidden'.
  3. Play video content.
  4. Observe that video corners are not clipped and video can bleed outside the rounded bounds.
  5. (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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions