Answer the question
In order to leave comments, you need to log in
Why is the video on the site not working correctly?
Hello.
Help solve this problem.
There is a site https://maxtreat.ru/ with a block under the KOMMERSANT banner, there is a photo with a button - by clicking on the button, a video is loaded in a pop-up window.
The problem is this.
The video opens. It is written through the video tag
Here is the pop-up window code.
<div class="video-window">
<div class="video-window__shell">
<button class="video-window__shell__close"></button>
<video src="main/video/videoplayback.mp4" controls></video>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Firstly, I would do it all by inserting through JS (the video itself), it just doesn't make sense to load it (pull from the server) until the user clicks to open this popup, this will allow you to win in speed.
Secondly, when the user closes the popup, you can clear the path or completely delete the video again. When you reopen it, it will be taken from the cache and everything will be fine (if everything is configured correctly)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question