I want to display a video player and contols it in react native but that video player is in kotlin language, So how can control and display android native activity and controls it in react native ?
1 Answer
Yes you can make a Video Player from native side, and expose via NativeModules and pass some props.
Ive done it a long time back and its possible, you can pass URL, height width etc . but im not sure about how well can you fetch the controls etc.
Check this article out, hope it helps : Rn native ui comp
Fee lfree for doubts
5 Comments
Hamid khan
I need also to access video player functions like onpause, onplay etc which is in native so is it also possible?
Gaurav Roy
yes, those simple ones are possible as native modules., i strongly recommend you to check reactnative.dev/docs/native-modules-android this
Hamid khan
i have to run this daily motion player from react native and controls it also from react native please check the below link. developers.dailymotion.com/player/#embed-mobile-android-how-to
Gaurav Roy
yes its possible, but if youre. not a native android developer, i suggest take a help in how to integrate it with RN
Gaurav Roy
glad it helped, if you think it helped, do kindly upvote and mark as accepted. much appreciated