Skip to content
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

[BUG] Media element rotation on Android does not work as expected #1610

Open
2 tasks done
cagriy opened this issue Dec 18, 2023 · 3 comments
Open
2 tasks done

[BUG] Media element rotation on Android does not work as expected #1610

cagriy opened this issue Dec 18, 2023 · 3 comments
Labels
bug Something isn't working 📽️ MediaElement Issue/PR that has to do with MediaElement

Comments

@cagriy
Copy link

cagriy commented Dec 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

When a MediaElement is rotated, on iOS both the video frame and video content are rotated together, e.g. a 90-degree rotation gives a landscape orientation without changing the app's orientation.

On Android, however, although the video frame is rotated correctly, the content stays as is.

iOS:
image

Android:
image

Expected Behavior

It is expected that on Android both video frame and the content rotate together, similar to iOS implementation.

Steps To Reproduce

  1. Download repo
  2. Build and run on iOS simulator
  3. Run on Android simulator

Link to public reproduction project repository

https://github.com/cagriy/MediaElementBug

Environment

- .NET MAUI CommunityToolkit: 3.0.1
- OS: MacOs 14.0
- .NET MAUI: 7 and 8

Anything else?

No response

@cagriy cagriy added bug Something isn't working unverified labels Dec 18, 2023
@vhugogarcia vhugogarcia added the 📽️ MediaElement Issue/PR that has to do with MediaElement label Dec 20, 2023
@ne0rrmatrix
Copy link
Contributor

@vhugogarcia I can verify this as a bug on android. It is as described and needs to be fixed.

@jfversluis
Copy link
Member

Can we verify this is still a thing on the Media3 implementation of this?

@ne0rrmatrix
Copy link
Contributor

@jfversluis Yes I can confirm it is still an issue. Unfortunately it is a limittation of the default configuration for the video render. It is not recommended to change it but it can be done. It would affect performance and has been discussed in the past in monthly standup. I don't remember what we decided atm. The current renderer that is default is SurfaceView The one we would need to add for rotating video's or transparencies to work is TextureView which is available as an option. If anything we can discuss it again and go over the pro's and cons of adding it or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📽️ MediaElement Issue/PR that has to do with MediaElement
Projects
None yet
Development

No branches or pull requests

4 participants