public static VideoSourcePlayer restart(this VideoSourcePlayer videoPlayer) { videoPlayer.invokeOnThread( () => { videoPlayer.Start(); }); return(videoPlayer); }
public static VideoSourcePlayer play(this VideoSourcePlayer videoPlayer, string aviFile) { videoPlayer.invokeOnThread( () => { var videoSource = new FileVideoSource(aviFile); videoPlayer.SignalToStop( ); videoPlayer.WaitForStop( ); videoPlayer.VideoSource = videoSource; videoPlayer.Start( ); }); return(videoPlayer); }