shahen94 / react-native-video-processing

Native Video editing/trimming/compressing :movie_camera: library for React-Native
https://shahen94.github.io/react-native-video-processing/
MIT License
1.25k stars 326 forks source link

ios tracker dont move #329

Closed pmella16 closed 3 years ago

pmella16 commented 3 years ago

Current Behavior

Hi, the ios green tracker dont move, actually i have the current time, but this dont works

this.state = {
  trimmerPosition: 0
}
         <VideoPlayer
         ref={ref => this.videoPlayerRef = ref}
         height={Screen.height * 0.7}
         width={Screen.width}
         startTime={this.state.video.startTime}  // seconds
         endTime={this.state.video.endTime}   // seconds
         play={this.state.play}     // default false
         replay={true}   // should player play video again if it's ended
         source={this.state.video.uri}
         volume={1}

         onChange={  ({ nativeEvent }) => {
           this.setState({ trimmerPosition: nativeEvent.currentTime });
          }
        }
         resizeMode={VideoPlayer.Constants.resizeMode.CONTAIN}
        />

<Trimmer source={uri} height={50} width={Screen.width} currentTime={this.state.trimmerPosition} // use this prop to set tracker position iOS only themeColor={'gray'} // iOS only thumbWidth={30} // iOS only trackerColor={'green'} // iOS only onChange={(e) => { this.onChangeTimmer(e.startTime, e.endTime); }} />

video demo https://youtu.be/hDID_zNgn1k

Expected Behavior

move the ios tracker or hide this

Your Environment

software version
react-native-video-processing 1.13.0
react-native 0.59.10
node v12.18.4
pmella16 commented 3 years ago

it was my error trying to dynamically load the component, I changed it inside the render as it would normally be done and the tracker moves smoothly