Forum Xamarin.Forms

stop back ground task at Xamarin Form

hey, my friends, I have some issues to stop the video that works in the background!
this is my code:

public HomeTabPage()
CrossMediaManager.Current.PlayFromResource("MY VIDEO LINK");

what the function that will stop all the task on the background in the Android and iOS


  • jezhjezh Member, Xamarin Team Xamurai

    If you want to control the player, you can check the Usage document here.

       await CrossMediaManager.Current.Play();
       await CrossMediaManager.Current.Pause();
       await CrossMediaManager.Current.PlayPause();
       await CrossMediaManager.Current.Stop();

    if you want to stop the player, you can use following code:

       await CrossMediaManager.Current.Stop();
Sign In or Register to comment.