react-native-mov-to-mp4
Convert mov file to mp4 for cross-platform playback compatibility.
Installation
react-native >= 0.40:
npm install react-native-mov-to-mp4 --save
also for iOS:
cd ios && pod install && cd ..
react-native < 0.40:
npm install react-native-mov-to-mp4@0.1 --save
link react-native-mov-to-mp4:
react-native link react-native-mov-to-mp4
; const filename = Date;MovToMp4 ;
Parameters:
convertMovToMp4(videoFilePath,newFilenameMp4,callback)
Example
this example use react-native-camera
{ return <View style=stylescontainer> <Camera ref= { thiscamera = cam; } captureTarget=CameraconstantsCaptureTargetdisk captureMode=CameraconstantsCaptureModevideo style=stylespreview aspect=CameraconstantsAspectfill> <Text style=stylescapture onPress=thistakeVideo>CAPTURE</Text> </Camera> </View> ; } { ifthisisRec thisisRec = false; thiscamera; else thisisRec = true; thiscamera ; }
License
MIT