Hello,
Welcome to our Microsoft Q&A platform!
- Please update your Xamarin.forms(5.0.0.2337) and Xamarin.essentials(1.7.1) nuget package to the latest.
- Then search
Xamarin.CommunityToolkit
nuget package in the Nuget package manager, install it - Set the Android Target framework to the latest verion(My latest version is Android 12.0(S)) and Target Android Version to latest version((My latest version is Android 12.0(S)) )
- Add the pre-fix in the
MainPage.xaml
like following code. I run it, this video play normally in android 10 or 11. <?xml version="1.0" encoding="utf-8" ?>
<ContentPage
...
xmlns:local="http://xamarin.com/schemas/2020/toolkit"
...... >
<local:MediaElement Source="ms-appx:///yoga2.mp4" ShowsPlaybackControls="False"
IsLooping="True" Aspect="AspectFill" AutoPlay="True"
HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"/>
...
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.