mirror of
https://github.com/status-im/react-native-cameraroll.git
synced 2025-02-11 09:06:36 +00:00
parent
39cc3b0fbc
commit
a83ad4c14e
@ -619,7 +619,11 @@ public class CameraRollModule extends ReactContextBaseJavaModule {
|
|||||||
|
|
||||||
if (photoDescriptor != null) {
|
if (photoDescriptor != null) {
|
||||||
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
|
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
|
||||||
retriever.setDataSource(photoDescriptor.getFileDescriptor());
|
try {
|
||||||
|
retriever.setDataSource(photoDescriptor.getFileDescriptor());
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
// Do nothing. We can't handle this, and this is usually a system problem
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
int timeInMillisec =
|
int timeInMillisec =
|
||||||
Integer.parseInt(
|
Integer.parseInt(
|
||||||
@ -683,7 +687,11 @@ public class CameraRollModule extends ReactContextBaseJavaModule {
|
|||||||
if (photoDescriptor != null) {
|
if (photoDescriptor != null) {
|
||||||
if (isVideo) {
|
if (isVideo) {
|
||||||
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
|
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
|
||||||
retriever.setDataSource(photoDescriptor.getFileDescriptor());
|
try {
|
||||||
|
retriever.setDataSource(photoDescriptor.getFileDescriptor());
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
// Do nothing. We can't handle this, and this is usually a system problem
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
width =
|
width =
|
||||||
Integer.parseInt(
|
Integer.parseInt(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user