0

我正在构建一个应用程序,用户将能够从我将提供的网址播放 facebook 视频。

有没有办法将 facebook 视频嵌入到来自 url 的 react-native 中?

我尝试过使用 react-native-video、react-facebook-player

React-facebook-player 仅适用于 react 应用程序。在 react-native 中,它给出了一个无法解析 div 的错误。

我可以在 Webview 中包装 react-facebook-player 组件吗?如果是这样,我该怎么做?

4

1 回答 1

0

使用 react-native-webview 例如:

<WebView
              style={{height: videoHeight}}
              source={{uri: 'https://www.facebook.com/video/embed?video_id=VIDEOID HERE'}}
              
            />

于 2020-09-08T04:46:32.917 回答