Skip to content
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

Serve mp4 video that can be viewed in a browser #8

Open
simonw opened this issue May 17, 2020 · 1 comment
Open

Serve mp4 video that can be viewed in a browser #8

simonw opened this issue May 17, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@simonw
Copy link
Owner

simonw commented May 17, 2020

I ran into problems serving mp4 files such that they could be embedded in an HTML <video> element:

<video controls width="600">
    <source src="/media/video.mp4" type="video/mp4">
</video>

I think this is due to to a lack of support for HTTP range requests. I filed a bug with Starlette here: encode/starlette#950

@simonw simonw added the bug Something isn't working label May 17, 2020
@simonw
Copy link
Owner Author

simonw commented May 17, 2020

It looks like Quart may be the only current ASGI Python library with support for range requests: https://github.com/pgjones/quart/blob/49a70ed62ad1035dbdf884393dd6c70893484b14/src/quart/wrappers/response.py#L145-L210

I think Falcon has support in its upcoming version 3.0 but that hasn't been released yet (previous versions of Falcon are just WSGI - 3.0 will introduce ASGI as well): https://github.com/falconry/falcon/blob/8db254e16f343e91639bbf85f789d6f0a7cccc35/falcon/request.py#L346-L359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant