Below is my code to embed lib.vlc in my winform application. I want to play it for say 5 minutes and then close automatically. How is it possible?
private void PlayerForm_Load(object sender, EventArgs e)
{
Core.Initialize();
_libVLC = new LibVLC();
_videoView.MediaPlayer = new MediaPlayer(_libVLC);
_videoView.Dock = DockStyle.Fill;
// Add it to the form
Controls.Add(_videoView);
var uri = new Uri(videolink);
var media = new Media(_libVLC, uri, ":input-repeat=65535");
_videoView.MediaPlayer.Media = media;
_videoView.MediaPlayer.Play();
//Set fullscreen
this.FormBorderStyle = FormBorderStyle.None;
this.Size = screen.Bounds.Size;
this.Location = screen.Bounds.Location;
}
want that player to load for 5 minutes and then close automatically.