How do you configure S3 and Cloud Front to stream HTML5 video? Tried everything

折月煮酒 提交于 2019-11-29 22:21:33

Using the S3 web management console (https://console.aws.amazon.com/s3), select your bucket, right-click one of your video files, switch to the metadata tab and set 2 headers:

  • Content-Type: whatever your video file's content type is
  • Content-Disposition: inline

Also, make sure your CloudFront distribution is set as a "streaming" distribution and not a "download" one.

Edit:

From the AWS docs:

CloudFront servers don't determine the MIME type for the objects they serve. Therefore, when you upload an object to your origin, you should set the object's Content-Type header.

Source: http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/ObjectMIMEType.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!