Here’s one way to do it:
This is using a slider (because it’s easier) and the progress bar is for display only.
- PreConstruct ensures we choose the correct playlist - this is optional and depends on how you set up the media
- Tick sets the slider’s and progress bar’s position during playback, according to its current progress
- the Slider’s onValueChanged mapRanges the slider’s value onto the media length
- MouseCapture pauses the video during Seek and allows it to play again once we’re done scrubbing
Hope it helps.
I’m not good with VR but for as long as the player can grab onto the slider’s handle, the above should work just fine… Since you’ll be using a WidgetComponent for this, ensure it can receive Hardware Input.
Note:
I wanted to contain the whole thing in a single blueprint for simplicity sake. However, I believe it would be more performant to play the video on a simple plane rather than inside a widget via a texture. In which case you’d need to hook up the widget’s controls to whatever object holds onto the media player - simple event dispatcher would work for this.
Good luck.