在 Youtube/Vimeo 等流媒体服务上存储移动应用视频与在 Firebase/AWS 等云存储上存储有什么区别?
我正在制作一个 React 应用程序,它将向用户显示一些图像/视频。为了存储视频,我选择了 Vimeo 并使用 ReactPlayer
来显示视频 - 我只需将 Vimeo URL 传递给我的 ReactPlayer
。 在研究过程中,我还遇到过将视频存储在 AWS 或 Firestore 等云存储上的情况。据我了解,我无法直接从 firebase 流式传输视频(通过提供 URL),应用程序需要先下载视频,然后播放。
如果是 Vimeo 或 youtube,会发生什么?视频不是也在那里下载吗?这两种方法有什么区别?
另外,您建议如何在外部存储视频和图像并在应用程序中显示它们。
I am making a React app that will display some Images/Videos to the users. To store videos, I chose Vimeo and use ReactPlayer
to display the video - I simply pass the Vimeo URL to my ReactPlayer
.
While researching, I also came across storing videos on cloud storage like AWS or Firestore. From what I understand, I cannot directly stream videos from firebase (by giving the URL), the app needs to download the video first and then play it.
What happens in the case of Vimeo or youtube? Isn't the video being downloaded there too? What is the difference between the two approaches?
Also, what do you recommend for storing videos as well as images externally and displaying them in the app.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 Youtube 嵌入 URL - 使用 ReactPlayer,您可以在 React 中播放 Youtube URL。这对我来说很有用。
Firebase - 下载网址 (https://firebasestorage.googleapis.com/v0 /b/...)来自 firebase 存储并在视频标签或 ReactPlayer 中播放它效果很好。问题是它不适用于移动设备(iPhone)。对于移动设备,我读到必须下载视频。我正在研究解决方案。 Firebase v9 文档指出 getStream() 可能是一种可以使用的方法。 https://firebase.google.com/docs/存储/web/download-files#web-version-9_2
For Youtube embedded URL's - Using ReactPlayer you can play the Youtube URL within React. This works for me below.
<ReactPlayer
url={"https://www.youtube.com/watch?v=ysz5S6PUM-U"}
width='100%'
height='100%'
controls
/>
Firebase - Downloading the url (https://firebasestorage.googleapis.com/v0/b/...) from firebase storage and playing it within a video tag or ReactPlayer works fine. The problem is that it doesn't work on mobile (iPhone's). For mobile that is where I read to that one must download the video. I'm researching for a solution. Firebase v9 docs state getStream() may be a method to use. https://firebase.google.com/docs/storage/web/download-files#web-version-9_2