using Microsoft.DirectX.AudioVideoPlayback;
private Video _video = null;
// open a new video
_video = new Video(openFileDialog1.FileName);
_video.Play();
I can play video with the above code, but I want the video to repeat itself. That is, when it has reached the end, I want the video to start all over again. How do I do that?
thanks.

1 answers
Make a timer of interval like 10msec where you check the current video state and Position, so whenever the video is running and the position is near the end restart the video.
if (_video.CurrentPosition> _video.Duration-0.2 && _video.State = Microsoft.DirectX.AudioVideoPlayback.StateFlags.Running) { _video.Stop(); _video.Play(); }answered 2 years ago by:
1556
494
thanks, it works. There should be 2 equal signs. if (_video.CurrentPosition> _video.Duration-0.2 && _video.State == Microsoft.DirectX.AudioVideoPlayback.StateFlags.Running) { _video.Stop(); _video.Play(); }