Hello,
I test your code await CrossMediaManager.Current.PlayFromResource("Assets:///Testvideo1.mp4");
, I cannot play as well, Please report an issue in XamarinMediaManager GitHub repo
However, I find a workaround to play the local video file.
Firstly, you can create raw
folder in the Resources
folder, then copy your video in the raw
folder and make sure this video's **BuildAction ** is AndroidResource.
Then. You can invoke code about playing the local video twice like following lines. This video could be played.
await CrossMediaManager.Android.PlayFromResource(Resource.Raw.test1.ToString());
await CrossMediaManager.Android.PlayFromResource(Resource.Raw.test1.ToString());
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.