NativeScript / NativeScript/plugins
[@nativescript/imagepicker] MediaMetadataRetriever.setDataSource fails with status = 0xFFFFFFEA
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 123
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 1
Description
Device: Samsung S21
Description
When selecting a video using @nativescript/imagepicker, the returned file path is a content:// URI.
Calling Android APIs such as:
android.media.MediaMetadataRetriever.setDataSource(item.path);
or
android.media.ThumbnailUtils.createVideoThumbnail(item.path, ...)
throws:
Error: java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA
This happens because these overloads expect a real filesystem path, not a content:// URI.
Steps to Reproduce
Create imagepicker:
let imagePickerObj = imagePickerPlugin.create({
mode: "multiple", android: { use_photo_picker: true }});
Pick a video from gallery.
Try to generate metadata or thumbnail:
let retriever = new android.media.MediaMetadataRetriever();
retriever.setDataSource(item.path); // crashes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the @nativescript/imagepicker Android handling for use_photo_picker and trace how item.path is returned for a selected video. Reproduce the failure with MediaMetadataRetriever.setDataSource(item.path) and ThumbnailUtils.createVideoThumbnail; done means a selected video can be passed to Android metadata or thumbnail APIs without the reported status error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100