I want to display a video in gr.HTML(). It works with Gradio==4.44.0, But as soon as I upgrade to the newest version it stops working and the video is not shown.
When I downgrade to 4.44.0 version, it works, so the code and paths and permissions are correct. I also tried static folder and set_static_paths solutions, but it doesn't work. I want to show a video in HTML component because it allows me to display the video at a specific start and end time which is unavailable in gr.Video() as far as I know.
Have you searched existing issues? 🔎
[X] I have searched and found no existing issues
Reproduction
import gradio as gr
html = """
<div class='myVideo'>
<video controls>
<source src='file/shots/output.MP4' type='video/mp4'>
Your browser does not support the video tag.
</video>
</div>
"""
with gr.Blocks() as demo:
with gr.Row():
gr.HTML(html)
demo.launch(allowed_paths=["/Users/a612/Desktop/Hj/"])
Screenshot
No response
Logs
No response
System Info
Gradio Environment Information:
------------------------------
Operating System: Darwin
gradio version: 4.44.0
gradio_client version: 1.3.0
------------------------------------------------
gradio dependencies in your environment:
aiofiles: 23.2.1
anyio: 4.4.0
fastapi: 0.115.5
ffmpy: 0.4.0
gradio-client==1.3.0 is not installed.
httpx: 0.27.0
huggingface-hub: 0.25.1
importlib-resources: 6.4.5
jinja2: 3.1.4
markupsafe: 2.1.5
matplotlib: 3.9.0
numpy: 1.26.4
orjson: 3.10.7
packaging: 24.0
pandas: 2.2.2
pillow: 10.3.0
pydantic: 2.7.3
pydub: 0.25.1
python-multipart: 0.0.12
pyyaml: 6.0.2
ruff: 0.6.8
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.12.5
typing-extensions: 4.11.0
urllib3: 2.2.3
uvicorn: 0.31.0
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.
gradio_client dependencies in your environment:
fsspec: 2024.9.0
httpx: 0.27.0
huggingface-hub: 0.25.1
packaging: 24.0
typing-extensions: 4.11.0
websockets: 12.0
Describe the bug
I want to display a video in gr.HTML(). It works with Gradio==4.44.0, But as soon as I upgrade to the newest version it stops working and the video is not shown. When I downgrade to 4.44.0 version, it works, so the code and paths and permissions are correct. I also tried static folder and set_static_paths solutions, but it doesn't work. I want to show a video in HTML component because it allows me to display the video at a specific start and end time which is unavailable in gr.Video() as far as I know.
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
I can work around it