我想显示一个按钮(继续),只有当我完成在 React Native 中观看整个视频时我正在观看我上传到 firebase 存储的视频
我是否有可能知道我何时到达视频的结尾?
export default class VideoModalChild extends React.Component{
constructor(props){
super(props)
this.state={
showTaskVisible:false
}
}
render(){
const task=this.props.task;
return(
<CustomBackground>
<Modal animationType="slide" visible={this.state.showTaskVisible} onRequestClose={()=>this.toggleisModal()}>
<TodoModalChild task={task} closeModal={()=>this.toggleisModal()}/>
</Modal>
<KeyboardAvoidingView>
<SafeAreaView>
<View>
{task.video? (
<Video
source={{uri:task.video}}
shouldPlay
muted={true}
repeat={true}
resizeMode={"cover"}
rate={1.0}
ignoreSilentSwitch={"obey"}
/>
):(
<Image source={white}}/>
)}
</View>
<TouchableOpacity onPress={()=>this.toggleisModal()}>
<Text>Continuuuue</Text>
</TouchableOpacity>
</SafeAreaView>
</KeyboardAvoidingView>
</CustomBackground>
)
}
}