Describe the bug
Video is not displaying using mesop video or markdown components while displaying using HTML video element.
To Reproduce
Create an socket server hosting videos you want to host:
Here is the code I used:
import http.server
import socketserver
import os
PORT = 8003
DIRECTORY = "./videos"
Change the current working directory to serve files from './videos' directory
if not os.path.exists(DIRECTORY):
os.makedirs(DIRECTORY)
os.chdir(DIRECTORY)
Define the handler to serve files
Handler = http.server.SimpleHTTPRequestHandler
Start the server
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print(f"Serving at port {PORT}")
httpd.serve_forever()
2. Create a mesop video component and link them to a video you are using
```py
me.video(
src="http://localhost:8003/Mesop%20-%20Googles%20Tool%20to%20Build%20Python%20Web%20Apps.mp4",
)
Visual:
The link works in an HTML file:
<video controls width="640" height="360">
<source src="http://localhost:8003/Mesop%20-%20Googles%20Tool%20to%20Build%20Python%20Web%20Apps.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Visual
Expected behavior
I expect the video to be displayed in the video component.
Desktop System Info
OS: WSL: Ubuntu-22.04
Browser Chrome
Version mesop==0.8.0
Additional context
The same issue happens using the markdown component with an HTML video tag.
I also noticed that it takes a considerable amount of time for it to display for the HTML file, however it never displays using mesop.
I do not get a request when using the mesop components
127.0.0.1 - - [18/Jun/2024 16:42:06] "GET /Mesop%20-%20Googles%20Tool%20to%20Build%20Python%20Web%20Apps.mp4 HTTP/1.1" 200 -
Describe the bug Video is not displaying using mesop video or markdown components while displaying using HTML video element.
To Reproduce
PORT = 8003 DIRECTORY = "./videos"
Change the current working directory to serve files from './videos' directory
if not os.path.exists(DIRECTORY): os.makedirs(DIRECTORY) os.chdir(DIRECTORY)
Define the handler to serve files
Handler = http.server.SimpleHTTPRequestHandler
Start the server
with socketserver.TCPServer(("", PORT), Handler) as httpd: print(f"Serving at port {PORT}") httpd.serve_forever()
Visual:
The link works in an HTML file:
Visual
Expected behavior I expect the video to be displayed in the video component.
Desktop System Info
Additional context The same issue happens using the markdown component with an HTML video tag.
I also noticed that it takes a considerable amount of time for it to display for the HTML file, however it never displays using mesop.
I do not get a request when using the mesop components 127.0.0.1 - - [18/Jun/2024 16:42:06] "GET /Mesop%20-%20Googles%20Tool%20to%20Build%20Python%20Web%20Apps.mp4 HTTP/1.1" 200 -