When playing a long video using vlcj's EmbeddedMediaPlayer instance, the computer enters a locked or (depending on my configuration) sleep mode while the video is playing. Unlocking or waking up the computer often causes failures in the playback.
The easiest and most obvious way to handle this is to turn off sleep and/or locking on your computer. If, however, you need your computer to lock or sleep only when not playing a video, this is not the best solution. The best solution is to somehow disable sleeping or locking while the video is playing.
The VLC player does this without problems. I have played 2+ hour videos using it on different operating systems without my system sleeping or locking. I know that this is possible, but I cannot find any information on doing this using VLCJ.
Is there a call or series of calls that I can make that will prevent a machine from sleeping or locking while a video is being played? If so, how do I engage this functionality?