Expo React Native app,Video sending time needs to minimize[currently long time to send it]

Viewed 61

Want to send the video to DB in the minimum time possible[currently 5-sec video takes more than 30 seconds], but quality does not matter. here.package.json and the code of the video are below. in package.json:

 "expo": ">=44.0.0-* <45.0.0",
 "expo-av": "~10.2.0",
 "react-native": "0.64.3",

in the video, sending function is as like this in code and it is sending high-quality video. Are there any properties to record low-quality video and send it fast:

recordVideo = async () => {
   this.setState({ recording: true });
    if (this.cameraRef.current) {
      try {
        const timerInterval = setInterval(this.timeCounter, 1000);
        const { uri, codec = "mp4" } = await this.cameraRef.current.recordAsync({ maxDuration: this.state.videoDuration, codec: "mp4"});
        clearInterval(timerInterval);
        if (uri) {this.setState({ codec: codec });
          ... ... ... 
import { Video, Audio } from "expo-av";

 <Video
    ref={this.video}
    source={{ uri: this.state.video_file }}
    shouldPlay={false} 
    useNativeControls
    onPlaybackStatusUpdate={(status) =>
       this.setState({ setStatus: status })}
     />
0 Answers
Related