So I was just starting out with flask, and was running through different exercises. Yesterday I deployed a video successfully to my flask webpage, but then today when I ran the same code, I got a black window where the video was supposed to play (image related).
Here is my flask code
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('video.html')
if __name__ == "__main__":
app.run(host="localhost", port=8000, debug=True)
And my HTML code
<html>
<head>
<meta name="viewport" content="width=device-width">
</head>
<body>
<video controls="" autoplay="" name="media">
<source src="file:///C:/Users/(username)/Desktop/Code/Flask/templates/sample.mp4" type="video/mp4">
</video>
</body>
</html>
My file structure is
Flask\
-app.py (flask code)
\templates\
-video.html (html code)
-sample.mp4
Linked videos do work, such as https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-1/ollie.mp4