Skip to content

Commit

Permalink
Do not force a content type on <video> content
Browse files Browse the repository at this point in the history
The `type` attribute is not needed (and is actively harmful). The browser will play the video file if it can, and in fact it will not be able to play non-mp4 files with the attribute as written.
  • Loading branch information
waxlamp authored and yarikoptic committed Jun 29, 2023
1 parent d650ab1 commit 436a0ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dandiapi/api/views/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def download(self, request, *args, **kwargs):
return HttpResponse(
f"""
<video autoplay muted controls>
<source src="{url}" type="video/mp4">
<source src="{url}">
</video>
""",
content_type='text/html',
Expand Down

0 comments on commit 436a0ff

Please sign in to comment.