VLC .NET C# Auto play media only after buffering up to the set postion? -


i'm trying use vlc dotnet libraries available here. able load video , show within form. however, having trouble doing following:

  1. when set media of vlccontrol, control auto plays media. not want. see other examples online explicit call play method made start media.

  2. i need set position of video , buffer position before playing media. possible in way? can set position every time shows first frame until buffers set position.

how can play media starting @ position after media finished buffering set position?

here code have far:

public partial class vlcform : form {     public vlcform()     {         initializecomponent();          loadmedia(@"c:\users\jonathan.trowbridge.wvs\desktop\samplevideo.mkv");         setstartposition((float)new random().nextdouble());         application.run(this);     }      private void setstartposition(float position)     {         vlccontrol.position = position;     }      private void loadmedia(string path)     {         try         {             vlccontrol.media = new pathmedia(path);         }         catch (keynotfoundexception exp)         {             messagebox.show("media not found.", "", messageboxbuttons.ok, messageboxicon.error);             this.close();             environment.exit(1);         }     } } 

update:

i found able prevent media automatically playing once vlccontext media property set adding pathmedia vlccontext medias , calling play on first item in list following code:

//vlccontrol.media = new pathmedia(path); vlccontrol.medias.add(new pathmedia(path)); vlccontrol.play(vlccontrol.medias[0]); 

this feels super hacky , still doesn't solve issue of prebuffering video before displaying first frame.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -