我正在构建一个应用程序,用户可以在该应用程序中播放我提供的网址中的Facebook视频。
是否可以通过url将Facebook视频嵌入到react-native中?
我尝试使用react-native-video,react-facebook-player
React-facebook-player仅在react应用中起作用。在react-native中,它给出了无法解决div的错误。
我可以在Webview中包装react-facebook-player组件吗? 如果可以,我该怎么办?
答案 0 :(得分:0)
使用react-native-webview 例如:
<WebView
style={{height: videoHeight}}
source={{uri: 'https://www.facebook.com/video/embed?video_id=VIDEOID HERE'}}
/>