How to access an uploaded video in the html

I want to display a user uploaded video in a custom module.

I added a video field, so the user is able to upload a video, but I cannot figure out how to access the source of that file, so I can include in the html.

The HTML currently looks like this:

 <div>
 <video class="header-video" playsinline autoplay muted loop>
 <source src="{{module.background_video.src}}" type="video/mp4">
 </video> 
 </div>

because a similar approach had worked for images, but here the src is just empty. I assume “module.background_video.src” is not correct, but I tried also tried several other possibilities, none worked and I cannot find any helpful documentation that addresses how to use the video module.

The video field is called ‘background_video’.

Hey @Hyde

Welcome to the Community.

The videoplayer field does not operate like an image field.

Basically, the video player pulls an ID from the file manager for the source of the video.

I would approach your problem by replacing the video field with a text field and having the user copy the url of the video they uploaded and inserting into that text field