问题描述
我已经在AWS S3
中上传了一个视频,并且想要在HTML5视频播放器中播放该视频.我不想公开观看视频.在权限部分为我提供了帐户用户ID,但是IDK如何使用它.有人可以告诉我如何使用带有帐户ID的视频文件吗?谢谢.
I have uploaded a video in my AWS S3
and I want to play the video in HTML5 video player. I don't want to make the video accessed publicly. I have been given an account user id in the permission section, but IDK how to use it. Can someone tell me how I can use my video file with my account id? Thanks.
Video Link: https://s3-ap-southeast-2.amazonaws.com/[THE-BUCKET]/[FOLDER]/video.mp4
.
MY AWS ACCOUNT USER ID (for example use): 2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5
So far I have got this: https://s3-ap-southeast-2.amazonaws.com/[THE-BUCKET]/[FOLDER]/video.mp4&AWSAccessKeyId=2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5
我遇到的问题:
推荐答案
要允许从Amazon S3播放视频文件,您的用户将需要访问它.
To allow a video file to be played from Amazon S3, it will need to be accessible by your users.
您可以通过以下方法限制访问权限:将视频保持私有状态,然后让您的应用程序生成预签名URL ,这是一个有时间限制的URL,用于授予对对象的访问权限.
You can limit access by keeping the video private and then having your application generate a Pre-Signed URL, which is a time-limited URL that grants access to an object.
或者,您可以通过 Amazon CloudFront 提供视频,后者可以通过允许在浏览器中播放但不能直接下载的协议提供视频.
Alternatively, you can serve the video via Amazon CloudFront, which can serve the video via protocols that allow it to be played in a browser, but not directly downloaded.
请参阅:使用RTMP发行版-Amazon CloudFront
这篇关于如何使用权限账户ID来访问AWS S3中的视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!