nodesto
nodesto

Reputation: 505

Media not playing in <video> and <audio>

I am saving video and audio to my AWS cloud storage.

When I insert the tags in the HTML:

<video controls>
  <source type="video/mp4" src="https://s3-eu-west-1.amazonaws.com/hikebeat/video/hikebeat_56e997a92176868d8b3ef8c5_1458247689.mp4">
  Your browser does not support the video tag.
</video>

<audio controls>
  <source type="audio/mp4" src="https://s3-eu-west-1.amazonaws.com/hikebeat/audio/hikebeat_56e997a92176868d8b3ef8c5_1458245562.m4a">
  Your browser does not support the audio element.
</audio>

The result is that only the audio plays in the browser, the video does not work. However, when trying to manually download the video, it is perfectly playable in media software.

Is there something I am overlooking when working with the <video> and <audio> HTML5 elements?

Upvotes: 0

Views: 421

Answers (1)

Tom Mettam
Tom Mettam

Reputation: 2963

Your video file is corrupt

Please see: https://gyazo.com/9631bad0402d8b3870fd4aee0b84fe52

Edit

It appears to actually be something to do with the way S3 is serving the file. I rehosted the file on my own server and tried it with no issue.

Edit Again

It's the gzip encoding. It seems browsers don't like playing video which has been transferred compressed.

Upvotes: 1

Related Questions