-
Notifications
You must be signed in to change notification settings - Fork 429
[BUG] Mediaelement distorting app view after full screen on Android #2571
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
Comments
Have u tested with a physical device? I have noticed differences in behaviour for simulator vs an actual hardware device. Also depending on whether you have bottom nav buttons enabled. |
@ne0rrmatrix - Yes, I have tested on two physical devices. On a Lenovo Tab I got the spacing in top and bottom. On another device we also got white spacing on the right side of the screen. |
Which version of Android is affected? I just loaded the sample you provided in android 15 on emulator and was unable to replicate the issue. I am not doubting this is happening I just would like to replicate it so I can fix it. I don't have access to those models of phones so knowing which specific emulator or emulator config causes this would be helpful. edit: I checked the toolkit sample app and the sample provided. I was unable to replicate the issue. I saw above that the user had enabled 3 button support and thought maybe that could be it. Unfortunately it was not. I have tried android 34 and 35. If you can provide more info it would be much appreciated. |
I have seen the issue on physical devices with Android API versions 33 and 34. And my emulator version 34 on MacOS does it too. I do not know if it is related to the screen ratio or something. My emulator is Pixel 9. I really hope it helps. It happens as soon as we minimize from full screen. The OnSizeAllocated is triggered. |
Thank you. Yes that is very helpful. I am was testing on windows using pixel 7 and a Samsung tab s8 plus. I will switch to my mac mini and try on a pixel 9. That should get me started. I am going to go test on my mac now. |
I was able to replicate the issue using android 34 on my mac mini m2. It appears to be an issue when building using a mac. I tested again using windows for android 33,34, and 35 with zero issues on both toolkit sample and your sample. I also saw that the behaviour does not replicate with android 35 on my mac. My suggestion is try and help me out is if you have access to a windows pc can you try building on it and see if you can replicate issue? if you can do that and verify that issue is not present that would be helpful. If it is a device type specific build issue I can try and figure out what is going on. |
Of course, however, I will only have access to a Windows machine by Tuesday. But I will get back asap. |
I opened an issue on Dotnet Android github as it looks like the issue is possibly not an issue with media element. dotnet/android#9923 |
@ne0rrmatrix, I just managed to build my app on a Windows machine. Unfortunately, the result is exactly the same. I am still getting the white spaces - top + bottom on one device, top + bottom + right on the other device. |
I have done further testing. Issue can now be replicated in windows using toolkit sample on emulator for android 34. But I cannot replicate it all on any phone or tablet I have. I have tested it on 3 samsung phones. 2 running android 14. One running android 11. The table is running android 14 and shows zero issues. I do not have access to other devices atm. I am not sure how to proceed as this seems to be either an emulator issue or an edge case issue with some devices. |
@ne0rrmatrix, that's weird. I have tested physically on Lenovo Tab M8 and Samsung A15 - it happens on both devices. Unfortunately, I also don't have access to other physical devices atm. |
I switched device theme to light mode and I can replicate it 100 percent now. I will work on a fix now. |
Can you test this PR? #2587 Please report if it fixes your issue. |
I am sorry, I am really no expert on this. I have tried to reference the package locally but not been able to make it work. |
@ne0rrmatrix - I have managed to build the package on Windows and I can confirm that it works on all my devices. Very nice, thank you very mcuh for the effort. |
Having the problem as well which prevents us from showing native media controls on android... |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
On Android the view of the app is distorted or offset after the Mediaelement has been in full screen mode.
Before full screen:

After full screen mode:

Expected Behavior
App should look the same after exiting full screen mode.
Steps To Reproduce
Link to public reproduction project repository
https://github.com/KasperSommer/MediaElementIssue2
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: