VideoView Android Xamarin play video sequence

0

How to make the application below wheels the two videos in sequence.

namespace AppExibeVideo
{
[Activity(Label = "AppExibeVideo", MainLauncher = true)]
public class MainActivity : Activity
{
    VideoView video;

    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);

        // Set our view from the "main" layout resource
        SetContentView(Resource.Layout.Main);

        video = FindViewById<VideoView>(Resource.Id.videoView);            

        /* VIDEOS ESTÃO NA PASTA DA APLICAÇÃO */
        var uri1 = Android.Net.Uri.Parse("android.resource://" + Application.PackageName + "/" + Resource.Drawable.a);
        var uri2 = Android.Net.Uri.Parse("android.resource://" + Application.PackageName + "/" + Resource.Drawable.b);

        if (uri1 != null && uri2 != null)
        {                
            video.SetVideoPath(uri1.ToString());
            video.Start();

            video.SetVideoPath(uri2.ToString());
            video.Start();
        }
        else
        {
            Toast.MakeText(this, "Video não expecificado", ToastLength.Short).Show();
        }

    }
}

}

    
asked by anonymous 17.01.2018 / 02:27

0 answers