I'm using react native video for play video related things in my project.what I need to do is get the duration before the link load to the video player?in the design its need to show video duration before go to the video player.can we archive this?can anyone suggest a method of doing this?I can get the duration after the loading video in to the video player.will post player code for your reference
<TouchableOpacity
style={styles.videoView}
onPress={this.playOrPauseVideo.bind(this, paused)}>
<Video
ref={videoPlayer => this.videoPlayer = videoPlayer}
onEnd={this.onVideoEnd.bind(this)}
onLoad={this.onVideoLoad.bind(this)}
onProgress={this.onProgress.bind(this)}
source={{ uri: this.props.detailedWorkout.videoLink }}
paused={paused}
volume={Math.max(Math.min(1, volume), 0)}
resizeMode="none"
style={Platform.OS === "android" ? styles.videoContainerAndroid : styles.videoContainerIOS} />
{paused &&
<View style={styles.pauseImageWrapper}>
<Image style={styles.videoIcon} source={Platform.OS === "android" ? PlayOne : PlayTwo} />
</View>
}
</TouchableOpacity>
May thanks for your help