I want to play video on spalsh screen in xamarin.ios. but i searched a lot then i found we can't play video on splash screen.so i used a blank screen on splash screen in xamarin.ios and create a common view and used a plugin videoview and play video on this page. Now i want to go my next page after playing the video.but a error is coming Out of memory.My code is:
<?xml version="1.0" encoding="UTF-8"?>
<forms:VideoView HorizontalOptions="FillAndExpand" Source="https://aimonlinestorage.blob.core.windows.net/profilepicture/DesignPages.mp4"
VerticalOptions="FillAndExpand" x:Name="videoView"/>
and code behind page is:
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows.Input;
using Plugin.MediaManager;
using Prism.Commands;
using Prism.Navigation;
using Xamarin.Forms;
namespace SAC.MobileApp.Views
{
public partial class VideoSplash : ContentPage
{
private readonly INavigationService _navigationService;
private async Task Navigate(string name)
{
// await Task.Delay(20000);
// await this.navigationService.NavigateAsync(name);
}
public ICommand OutputAgeCommand { get; private set; }
public VideoSplash()
{
InitializeComponent();
Xamarin.Forms.NavigationPage.SetHasNavigationBar(this, false);
// videoView.Source = "https://aimonlinestorage.blob.core.windows.net/profilepicture/DesignPages.mp4";
DelayedNaviagition();
}
private async void DelayedNaviagition()
{
try
{
await Task.Delay(20000);
// this.navigationService.NavigateAsync(name, animated: false);
// await this.navigationService.NavigateAsync("MainPage", animated: false);
await _navigationService.NavigateAsync("NavigationPage/MainPage", null, useModalNavigation: true, animated: false);
}
catch(Exception ex)
{
}
}
}
}
Now exception is coming out of memory.and Navigation is not working after video playing...if anyone has any solution for it please suggest me..