react-native-video play Vimeo and YouTube

痴心易碎 提交于 2019-12-01 04:21:38

问题


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?

Is there any way to get react-native-video working with Vimeo & YouTube?


回答1:


react-native-video will work with Vimeo, if you subscribe to Vimeo Pro.

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!




回答2:


I know a github project which is a Youtube component for react-native. Check it out, maybe it can help you ;)

Here you have an other project for Vimeo videos




回答3:


is there a way to play vimeo videos with just the vimeo ID



来源:https://stackoverflow.com/questions/39269687/react-native-video-play-vimeo-and-youtube

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