I am new to ClojureScript. I would like to embed video (Youtube) to the hybrid mobile app using ClojureScript and React Native. I have tried to implement react-native-vi
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.
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"))