Skip to content

[video][android] Add an option to choose the surface type #36212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 25, 2025

Conversation

behenate
Copy link
Member

@behenate behenate commented Apr 16, 2025

Why

Fixes
#33789
#31722

When two VideoViews with contentFit="cover' are overlapping one of the video views will 'leak' onto the surface of another. This is a known upstream issue. Currently the only fix is to use a texture view rendering surface instead of surface view, but that reduces the performance, so we would like users to have a chooice.

How

Exported two views from the expo-video module - one with a TextureView surface and another with SurfaceView surface. On the JS side a prop selects an appropriate view to render. The type of surface has to be known at the time of creation of the view, so we couldn't just create a regular prop.

Test Plan

Tested in BareExpo on Android and iOS

image

Copy link
Contributor

Subscribed to pull request

File Patterns Mentions
docs/** @Simek, @amandeepmittal
packages/expo-video/** @lukmccall, @aleqsio

Generated by CodeMention

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Apr 16, 2025
@expo-bot
Copy link
Collaborator

expo-bot commented Apr 16, 2025

The Pull Request introduced fingerprint changes against the base commit: 10a0f5a

Fingerprint diff
[
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-video/android",
      "reasons": [
        "expoAutolinkingAndroid"
      ],
      "hash": "b976f32e97002006295322e6ca0999302243cd69"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-video/android",
      "reasons": [
        "expoAutolinkingAndroid"
      ],
      "hash": "17b25a615460fd604a81149dfabc4d8df4a7fef3"
    }
  }
]

Generated by PR labeler 🤖

@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Apr 17, 2025
@behenate behenate force-pushed the @behenate/video/texture-view-support branch from e938936 to 246e7ad Compare April 17, 2025 14:14
@expo-bot expo-bot added bot: suggestions ExpoBot has some suggestions bot: passed checks ExpoBot has nothing to complain about and removed bot: passed checks ExpoBot has nothing to complain about bot: suggestions ExpoBot has some suggestions labels Apr 17, 2025
@behenate behenate force-pushed the @behenate/video/texture-view-support branch from 9ec33d6 to a2551a1 Compare April 25, 2025 15:32
@behenate behenate force-pushed the @behenate/video/texture-view-support branch from a2551a1 to a1cdecb Compare April 25, 2025 15:35
@behenate behenate merged commit fba36cf into main Apr 25, 2025
17 checks passed
@behenate behenate deleted the @behenate/video/texture-view-support branch April 25, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants