python - How do I make Flask stream a static file with HTTP 206 Partial Content? -


i want use looping video on site made powered flask. apparently, chrome not loop video, unless streamed http 206 code being returned. flask, however, returns static file http 200. how stream static content flask project (hosted on heroku, record) make video correctly loop in chrome?

reponse objects in flask have "status_code" parameter can pass. see this documentation more details, essentially, may want subclass response object.

also take @ make_response() - may reveal simpler way, depending on application structure.

take @ streaming pattern more details, it's geared towards generated content opposed static.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -