Opened 9 months ago
Closed 9 months ago
#35168 closed Bug (worksforme)
Problem with templates and the <video></video> tag
Reported by: | Estuardo Ramírez | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 5.0 |
Severity: | Normal | Keywords: | templates, video tag, bug |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The templates have a problem because when you create a <video></video> tag it plays the video but when the tag has "controls" controls, it does not allow the video to go forward or backward and it is a problem since you cannot do anything, not even using js or css code.
And NO, it is not a browser compatibility problem, no matter what browser you do it in, it doesn't work, whether you use static, media or whatever you use, it doesn't work.
If you run this code in Django:
{% load static %} <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <video width="640" height="360" controls> <source src="{% static "prueba.mp4" %}" type="video/mp4"> Tu navegador no soporta el tag de video. </video> </body> </html>
It doesn't work, that is, the video plays but it doesn't let you rewind or fast forward the video.
And if you run that code in a simple html file without all that magic it works perfectly.
The error has been around for many versions, I have already tried it with different versions. I noticed this error thanks to the Django community in Spanish on Telegram
Thanks for the report, however it works for me. Django doesn't do anything specific with the
<video>
tags so if it works in static HTML, it will work in DTL.You can try to use one of support channels where folks will help you debug your issue.