Hello,
I have used Plugin.MediaManager in my Xamarin.Forms application. It works perfectly in Android project, but in iOS project it does not.
I have added
VideoViewRenderer.Init();
in AppDelegate, and this is the code in the view:
async void PlayStop_Clicked(object sender, System.EventArgs e)
{
if (this.BtnPlayStop.Text == "Start Video")
{
string video = Path.Combine(_videoPath, this.viewModel.Item.Video);
if (File.Exists(video))
{
await CrossMediaManager.Current.Play(video, MediaFileType.Video);
this.BtnPlayStop.Text = "Stop Video";
}
}
else
{
await CrossMediaManager.Current.Stop();
this.BtnPlayStop.Text = "Start Video";
}
}
Code enters the first if, since button changes its text to 'Stop Video' but no video appears. The video is a local mp4 file.
As I told, this works perfect in Android.
What's wrong?
Thanks
Jaime