0
我選擇完美的圖像,但我無法選擇視頻, 我需要做什麼?如何使用REACT-NATIVE-IMAGE-PICKER從庫中選擇視頻?
從'react-native-image-picker'導入ImagePicker;
openImagePicker(){
const options = {
title:'select an option',
storageOptions:{
skipBackup:true,
path:'images'
}
}
ImagePicker.showImagePicker(options,(response) => {
if(response.didCancel){
console.log('user cancelled');
}else if (response.error) {
console.log('ERROR'+response.error);
}else if (response.customButton) {
console.log('user tapped'+response.customButton);
}else {
this.setState({
imagePath: response.uri,
imageHeight: response.height,
imageWidth: response.width
})
}
})
}
謝謝,它的工作原理! – Oscar
如何在'View'中顯示選定的視頻? –