Videos in markdown don't work

Summary

Embedding a video in markdown with eg ![Demo](./images/demo.mp4) doesn't show the video in Safari/Mac.

Steps to reproduce

Go here.

Example Project

It happens in my repo and gitlab's own documentation

What is the current bug behavior?

Videos don't appear. Below is a screenshot from Gitlab's documentation on how to embed videos.

Safari loads the video, as you can see in the second screenshot, but doesn't play it. I suspect the problem is that Gitlab isn't serving byte ranges correctly. Safari does partial loads on the video, eg with a request header Range: bytes=45940736-46582809 and Gitlab correctly returns an HTTP 206 status code, but something must be going wrong.

What is the expected correct behavior?

Video should appear, with controls.

Relevant logs and/or screenshots

image

image

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Safari version: image

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes