{"action":"created","issue":{"url":"https://api.github.com/repos/shahen94/react-native-video-processing/issues/160","repository_url":"https://api.github.com/repos/shahen94/react-native-video-processing","labels_url":"https://api.github.com/repos/shahen94/react-native-video-processing/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/shahen94/react-native-video-processing/issues/160/comments","events_url":"https://api.github.com/repos/shahen94/react-native-video-processing/issues/160/events","html_url":"https://github.com/shahen94/react-native-video-processing/issues/160","id":302103684,"number":160,"title":"react-native 0.54: FileNotFoundException in android video player  ","user":{"login":"Jignesh85","id":37046815,"avatar_url":"https://avatars2.githubusercontent.com/u/37046815?v=4","gravatar_id":"","url":"https://api.github.com/users/Jignesh85","html_url":"https://github.com/Jignesh85","followers_url":"https://api.github.com/users/Jignesh85/followers","following_url":"https://api.github.com/users/Jignesh85/following{/other_user}","gists_url":"https://api.github.com/users/Jignesh85/gists{/gist_id}","starred_url":"https://api.github.com/users/Jignesh85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jignesh85/subscriptions","organizations_url":"https://api.github.com/users/Jignesh85/orgs","repos_url":"https://api.github.com/users/Jignesh85/repos","events_url":"https://api.github.com/users/Jignesh85/events{/privacy}","received_events_url":"https://api.github.com/users/Jignesh85/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-04T17:24:08Z","updated_at":"2018-03-05T06:55:04Z","closed_at":null,"author_association":"NONE","body":"In android, VideoPlayerView class, getting fileNotFoundException\r\n\r\n```\r\nif (VideoEdit.shouldUseURI(uriString)) {\r\n  Uri parsedUri = Uri.parse(mediaSource);\r\n  setDataSource(themedReactContext, parsedUri);\r\n\r\n  // this line throws exception\r\n  metadataRetriever.setDataSource(themedReactContext, parsedUri);\r\n} else {\r\n  setDataSource(mediaSource);\r\n  metadataRetriever.setDataSource(mediaSource);\r\n}\r\n```\r\nI have tried with different media source urls e.g. https://dl.dropbox.com/video_name.mp4.\r\n\r\nThe above function, calls below code in FFmpegMediaMetadataRetriever that causes exception:\r\n\r\n```\r\nContentResolver resolver = context.getContentResolver();\r\ntry {\r\n    fd = resolver.openAssetFileDescriptor(uri, \"r\"); // throws exception\r\n} catch(FileNotFoundException e) {\r\n    throw new IllegalArgumentException();\r\n}\r\n```\r\nIn IOS, everything works fine, but in android am struggling with correct path of url to pass.\r\n\r\nJavascript code:\r\n\r\n```\r\n<VideoPlayer\r\n    ref={ref => this.videoPlayerRef = ref}\r\n    startTime={this.state.startTime}\r\n    endTime={this.state.endTime}   \r\n    play={this.state.play}     \r\n    replay={true}  \r\n    rotate={true}  \r\n    source='https://dl.dropbox.com/video_name.mp4'\r\n    playerWidth={width} \r\n    playerHeight={height} \r\n    style={{ backgroundColor: 'black' }}\r\n    resizeMode={VideoPlayer.Constants.resizeMode.CONTAIN}\r\n    onChange={({ nativeEvent }) => console.log({ nativeEvent })}      \r\n    />\r\n```\r\nAdded Permissions:\r\n\r\n```\r\n<uses-permission android:name=\"android.permission.INTERNET\" />\r\n<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>\r\n\r\n<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />\r\n<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>\r\n```\r\nI am checking in Emulator, qemu-system-i386.\r\nAndroid Studio: 3.0.1 on Mac\r\n\r\nI am able to show image successfully using local path, but video.mp4 in VideoPlayer gives again FileNotFoundException.\r\n\r\nSnapshot from Emulator: https://i.stack.imgur.com/t2QvN.png"},"comment":{"url":"https://api.github.com/repos/shahen94/react-native-video-processing/issues/comments/370326300","html_url":"https://github.com/shahen94/react-native-video-processing/issues/160#issuecomment-370326300","issue_url":"https://api.github.com/repos/shahen94/react-native-video-processing/issues/160","id":370326300,"user":{"login":"shahen94","id":13334788,"avatar_url":"https://avatars0.githubusercontent.com/u/13334788?v=4","gravatar_id":"","url":"https://api.github.com/users/shahen94","html_url":"https://github.com/shahen94","followers_url":"https://api.github.com/users/shahen94/followers","following_url":"https://api.github.com/users/shahen94/following{/other_user}","gists_url":"https://api.github.com/users/shahen94/gists{/gist_id}","starred_url":"https://api.github.com/users/shahen94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shahen94/subscriptions","organizations_url":"https://api.github.com/users/shahen94/orgs","repos_url":"https://api.github.com/users/shahen94/repos","events_url":"https://api.github.com/users/shahen94/events{/privacy}","received_events_url":"https://api.github.com/users/shahen94/received_events","type":"User","site_admin":false},"created_at":"2018-03-05T06:55:04Z","updated_at":"2018-03-05T06:55:04Z","author_association":"OWNER","body":"Hi @Jignesh85 .\r\nCurrently, this library doesn't have an ability to load video over the internet. You should have it locally in your phone.\r\n\r\n"}}
{"actor":{"display_login":"shahen94"}}