Source code: https://github.com/chrisspieler/sbox-tips-videoplayer/tree/main/Libraries/videopanel

VideoPanel is a UI Panel that manages the playback of a VideoPlayer instance. You can create it like this:
<VideoPanel VideoPath="ui/video/ducks.mp4" width="640" height="360" ShowControls=@true/>


By default, ShowControls is set to false. When true, video playback controls will appear over the video.
You can set AutoHide to false to keep the controls always visible, and set AutoHideDelay to adjust how much time passes between when the video is no longer hovered and when the controls are hidden.

If you set VideoRoot to VideoRoot.WebStream, you may use a direct video stream URL in VideoPath.