【问题标题】:Play facebook video from url in react native在本机反应中从 url 播放 facebook 视频
【发布时间】:2020-02-03 17:40:02
【问题描述】:

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

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

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

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

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

【问题讨论】:

    标签: reactjs facebook react-native embedded-video


    【解决方案1】:

    使用 react-native-webview 例如:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-27
      • 2014-05-01
      • 1970-01-01
      • 2018-08-17
      • 2017-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多