react-native-video

ClojureScript + React-Native - Embed Videos

血红的双手。 提交于 2019-12-02 06:37:51
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-video and react-native-youtube plugins in ClojureScript for achieving this. But, both of these end with a crash. I don't know whether there is something wrong with referring to the library or not. Using react-native-video : (def Video (js/require "react-native-video")) (def video-view (r/adapt-react-class Video)) The component reference is: [video-view {:style {:position "absolute" :top 0 :bottom 0 :left 0 :right 0} :source {:uri

Pause video in flatlist when out of view

冷暖自知 提交于 2019-11-28 04:31:13
问题 I have a flatlist showing videos. I want that when a video goes out of the view it should be paused. I am maintaining the pause state in each of the Posts component. class Posts extends React.PureComponent { constructor() { super() this.state = { pause: true, } return(){ <Video pause={this.state.pause} //other props /> } } I am using react-native-video . I have tried using onViewableItemsChanged prop of Flatlist but it doesn't change the state. I tried this . But it doesn't seem to work for