问题描述
我想知道是否有可能通过 React Native 组件 react-native-video 播放 Vimeo 和 YouTube.到目前为止,我的研究表明这几乎是不可能的,因为 react-native-video 需要对文件(或流?)的直接引用,而 YouTube 和 Vimeo 很难/难以获得这些引用?
I wonder if it is at all possible to play Vimeo and YouTube via the React Native component react-native-video. My research so far points to this being virtually impossible, because react-native-video needs a direct reference to a file (or a stream?) and these references are hard/difficult to obtain for YouTube and Vimeo?
有什么方法可以让 react-native-video 与 Vimeo & 一起工作?YouTube?
Is there any way to get react-native-video working with Vimeo & YouTube?
推荐答案
react-native-video 将与 Vimeo 一起使用,如果您订阅 Vimeo Pro.
react-native-video will work with Vimeo, if you subscribe to Vimeo Pro.
Vimeo Pro 提供了使用您的视频自己的第三方播放器的能力,这让您可以获取 360p、540p、720p 或 1080p 视频的 URL,或者作为可以选择正确分辨率的 HTTP Live Streaming url/用户连接的比特率.react-native-video 适用于任何这些格式!
Vimeo Pro offers the ability to use your video own third party player, which lets you get the url for your video in 360p, 540p, 720p, or 1080p specifically or as an HTTP Live Streaming url which can choose the correct resolution/bitrate for the user's connection. react-native-video work with any of these formats!
这篇关于react-native-video 播放 Vimeo 和 YouTube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!