Monogame Video Player

I am having a problem with the MonoGame Videoplayer where once a video is played it will never play again.

I loaded about eight videos into my program. I then check if the videoplayer is in a stopped state. If so, I have it select a random video.

This works until I repeat any of the eight videos. Then nothing plays, the state of the player is “playing” and the current runtime of the video is always at 0 at this point.

What is really interesting, if I replay the same video over and over again it doesn’t break. Its only when I go to video 1 then video 2 then back to video 1 that it breaks.

The code is rather straight forward also:

        if(jpsVideoPlayer.videoPlayer.State == MediaState.Stopped)
        {
            jpsVideoPlayer.videoPlayer.Play(jpsVideoPlayer.RandomVideo());
        }

Well, the workaround I use for this is:

1:
Once the videoplayer starts to run , NEVER LET THE VIDEOPLAYER REACH THE END of the videos. In otherwords avoid this (videoPlayer.State == MediaState.Stopped)

What I have been doing is something like

if (videoPlayer.PlayPosition.TotalMilliseconds >= video.Duration.TotalMilliseconds - 200) videoPlayer.Pause();

2:
When you have play other video Stop the player, before play the video.

videoPlayer.Stop();
videoPlayer.Play(video);