Skip to content

Commit

Permalink
Merge pull request #1627 from yarikoptic/bf-video
Browse files Browse the repository at this point in the history
Assume that browser can play any "video/" content type.
  • Loading branch information
waxlamp committed Jul 13, 2023
2 parents 4b937b5 + 436a0ff commit cda4cbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dandiapi/api/views/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ def download(self, request, *args, **kwargs):
content_type,
)

if content_type == 'video/x-matroska':
if content_type.startswith('video/'):
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 cda4cbc

Please sign in to comment.