protected override async void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     link = Intent.GetStringExtra("link");
     SetContentView(Resource.Layout.Song);
     FindViews();
     mediaService.CreateMediaPlayer();
     var video = await VideoHelper.ResolveDownloadUrls(link, this);
 }
Пример #2
0
        private async Task StartPlayingSong(object sender, AdapterView.ItemClickEventArgs e)
        {
            var dialog = DisplayHelper.MakeProgressDialog(this, "Wait...");

            dialog.Show();
            var    adapter = songListView.Adapter as VideoAdapter;
            var    id      = adapter[e.Position].id.videoId;
            string link    = "https://www.youtube.com/watch?v=" + id;

            var x = this;

            MediaService.CreateMediaPlayer();
            var video = await VideoHelper.ResolveDownloadUrls(link, this);

            await Play(video);


            //var songActivity = new Intent(this, typeof(SongActivity));
            //songActivity.PutExtra("link", link);
            //StartActivity(songActivity);
            dialog.Hide();
        }