1

I'm trying to play a HTML5 video in Chrome 23 from Amazon Cloudfront. Should be straightforward, but I cannot get it to work. The HTML is what you'd expect:

<video width="1280" height="720">
  <source src="http://d1dsyb3mv0b0i6.cloudfront.net/test/lines.mp4" type="video/mp4" />
  Your browser does not support the video element.
</video>

I made sure the Content-Header is set to video/mp4 and the Content-Disposition is set to inline as suggested in this answer.

However, when I open my testpage with the video element in Chrome and I look at the network console, I only see that the request status is (pending) and subsequently (canceled):

enter image description here

The video plays just fine when I point the video element to the copy on my local machine, but for some reason it does not get served from Cloudfront correctly.

Note that I'm using a Download distribution, since I don't need RMTP streaming. Ust to be sure, I tried a Streaming distribution too, but that results in request status (pending) followed by (failed).

Anyone any ideas what could be wrong?

Community
  • 1
  • 1
Pascal Lindelauf
  • 4,782
  • 4
  • 40
  • 55
  • Visiting `http://d1dsyb3mv0b0i6.cloudfront.net/test/lines.mp4` shows an access denied error, normally happens if the object isn't there, have you been able to load it directly? – Jamie Taylor Dec 20 '12 at 09:36
  • 1
    Oh darn, Jamie, you're right! Turns out I had not set the right credentials on my S3 folder. AAARRRRGGGHHH! Sometimes you overlook the obvious. I'm going to delete the question, but leave it here for just an hour or two for you to read my reply. – Pascal Lindelauf Dec 20 '12 at 09:55
  • haha, It's happened to me before too, S3 permissions are tricky to pick up. Hope you get it all working fine now! – Jamie Taylor Dec 20 '12 at 10:01
  • Haha! In that case, I might just leave this question in. If you like, you can create a short real answer, then I'll accept that one. Thanks again. – Pascal Lindelauf Dec 20 '12 at 10:44
  • I have also found that setting the bucket to "Public" will not automatically set all of its content to public also. – David McCarran Apr 02 '14 at 05:07

1 Answers1

3

Check you've got the file where you think it is in S3 and make sure the permissions are set to allow loading objects without an authentication string.

Check here to generate policies too:

http://awspolicygen.s3.amazonaws.com/policygen.html

Jamie Taylor
  • 4,709
  • 5
  • 44
  • 66