New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML5 Video problem on iOS devices when using Flask development server #712
Comments
Does the video not play when served through the own server, or does the exception occur without consequences? |
The video doesn't play on iOS devices and exception is raised. In Chrome or Safari the video plays without exception. |
I was able to reproduce a similar issue with Android 4.1. Putting the webm source at the top seems to solve the issue though. |
The player seems to cause the "broken pipe" error every time the mp4 source is listed before the webm one. e.g. these combos work (fetches the webm source right away)
these don't (it fetches the mp4 source, causes the broken pipe error and loads forever)
ogg never seems to be loaded. I fetched the example videos from the w3.org links you posted. The code i used to embed the videos: import flask
app = flask.Flask(__name__)
@app.route('/')
def index():
return """<video controls width="400" height="200">
<source src="/static/trailer.mp4" type="video/mp4">
<source src="/static/trailer.webm" type="video/webm">
<source src="/static/trailer.ogv" type="video/ogg">
</video>"""
app.run(debug=True, host="0.0.0.0") |
@spmacdonald Can you try every possible ordering of the source elements either for iOS? After all, this rather seems to be a bug in the browser than in Flask or Werkzeug. |
I had the same problem on a project that required HTML5 video, but it was with a django development server. I don't think this is a bug in flask. As for the iOS issue, try adding the webkit-playsinline attribute to the video tag:
|
BTW, you're using Werkzeug developer server. I think this bug should be moved there. |
Does this also occur if the development server is used with |
Hey, I've hit this too. It happens with threaded=True and threaded=False I get this traceback
|
This may be related but I don't know why the browser would close the connection |
This issue has been refiled against Werkzeug: pallets/werkzeug#410 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
32] Broken pipe) with the Flask server. See: pallets/flask#712.
When I render this template and serve it using the development server, it works correctly in Chrome, Safari and IE:
When I try to load the same page with an iOS device I see the following exception:
If I replace the template with:
Taken from, http://www.w3.org/2010/05/video/mediaevents.html
The video plays as expected on all devices I have tried it on (iPad and iPhone)
The text was updated successfully, but these errors were encountered: