XamarinCommunityToolkit
XamarinCommunityToolkit copied to clipboard
[Bug] [Android] MediaElement works unstable inside CarouselView / SfRotator
Description
If page contains MediaElement inside CarouselView / SfRotator strange things happen on Android (on iOS everything works perfect).
- When CarouselView is scrolled (or just created for the first time) it is possible to see exception:
01-05 13:54:34.778 W/MediaPlayer(19222): Couldn't open https://sec.ch9.ms/...
01-05 13:54:34.778 W/MediaPlayer(19222): java.io.FileNotFoundException: No content provider: https://sec.ch9.ms/ch9/5d93/a1eab4bf-3288-4faf-81c4-294402a85d93/XamarinShow_mid.mp4
01-05 13:54:34.778 W/MediaPlayer(19222): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1686)
-
If page contains standalone MediaElement and CarouselView with MediaElements inside, scrolling CarouselView sometimes rewinds the video backwards a few seconds on standalone MediaElement.
-
After scrolling CarouselView (or SfRotator) or just after new CarouselView is created sometimes MediaElements not displaying any video, just transparent frame (it happens only on certain Android devices).
It seems that opened MediaElements interfere with each other. It happened also just with one CarouselView or SfRotator without any standalone MediaElement, just then it is less visible and seems to happen not on every Android device (or not always).
Steps to Reproduce
- On Android create page with standalone MediaElement and CarouselView with MediaElement items inside.
- Scroll left or right few times
Expected Behavior
Group of MediaElements works on Android same way as on iOS, without any problem.
Actual Behavior
On Android, MediaElements interfere with each other.
Basic Information
- Version with issue: 1.0.0-pre6
- Platform Target Frameworks:
- Android: 11
Reproduction Link
Same problem still exists in 1.0.0 version.
Thanks for letting us know! We'll do our best to look into it. To be honest I'm not sure if using a MediaElement in controls like these is the best idea to begin with, so you might want to look into other ways of doing the thing you want to achieve. But we'll see what we can do.
Thanks!
@jfversluis Thank you! Yeah, I'm considering using different approach (at least on Android, on iOS it works really nice), but before, I was using XamarinMediaManager and it was working fairly nice on Android also, so I believe it is possible.
Does anyone have a good solution / substitute to help the community? I am investigating and will try to share if I have any headway.
I am having this issue.... Any solution?
Hello, carouselView seems to be the best alternative to develop an application similar to TikTok and Instagram. Apart from that, is there anyone who can work MediaElement and scrolling video feature with a different component?