Skip to content

Commit

Permalink
Allow streaming video files, sort of.
Browse files Browse the repository at this point in the history
This ideally should be expanded to allow reading attachments from
specific start positions, further expanding what's possible with
streaming large video files directly. For now, this will send the entire
video as a single response, and the browser can choose to play it if
that functionality is supported for the container and codec.
  • Loading branch information
Alanaktion committed Sep 4, 2018
1 parent 0533781 commit 7655c55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controller/files.php
Expand Up @@ -261,7 +261,8 @@ public function file($f3, $params)
$force = true;
if (substr($file->content_type, 0, 5) == "image" ||
$file->content_type == "text/plain" ||
$file->content_type == "application/pdf"
$file->content_type == "application/pdf" ||
in_array($file->content_type, ['video/mp4', 'video/webm'])
) {
$force = false;
}
Expand Down

0 comments on commit 7655c55

Please sign in to comment.