ClojureScript + React-Native - Embed Videos

血红的双手。 提交于 2019-12-02 06:37:51

Without knowing what error you're getting and which setup you have, try calling the modules like this instead:

(def Video (aget (js/require "react-native-video") "default"))

I could embed YouTube video by using ReactNative WebView.

(def ReactNative (js/require "react-native"))
(def web-view (r/adapt-react-class (oget ReactNative "WebView")))

The component reference:

[web-view { :style {
                            :width 400
                            :height 200
                            :zIndex 10}
                      :javaScriptEnabled true
                      :domStorageEnabled true
                      :source {:uri "https://www.youtube.com/embed/M8Fn8SfXw3M"}}]

I think react-native-video is not supporting youtube videos.

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