expo-video-thumbnails: "This media cannot be used"
See original GitHub issueSummary
On iOS, expo-video-thumbnails reports “This media cannot be used” for some videos (e.g., http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4). No problems on Android.
On my local machine, the stack trace is
This media cannot be used.
at node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:106:50 in promiseMethodWrapper
at node_modules/expo-modules-core/build/NativeModulesProxy.native.js:15:23 in moduleName.methodInfo.name
at node_modules/expo-video-thumbnails/build/VideoThumbnails.js:12:17 in getThumbnailAsync
at node_modules/expo-video-thumbnails/build/VideoThumbnails.js:11:7 in getThumbnailAsync
[...]
On Snack I get Error: "This media cannot be used." in [snack internals] << << << p
Is this a known issue?
What platform(s) does this occur on?
iOS
SDK Version
46.0.0
Environment
Not sure how to run npx expo-env-info
on snack
Reproducible demo
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
VideoThumbnails - Expo Documentation
expo -video-thumbnails allows you to generate an image to serve as a thumbnail from a video file. Platform Compatibility. Android Device, Android Emulator,...
Read more >How to Display a Video Preview in React Native Expo?
Try using MediaLibrary.getAssetInfoAsync(id) to get accessible uri. This function returns AssetInfo which includes localUri of the asset.
Read more >expo-video-thumbnails - npm
expo -video-thumbnails. Provides function that let you generate an image from video. This can be used for example to create a video gallery....
Read more >GoPro Quik: Unable To View Camera Media
If you can see thumbnails in media, but cannot play them, this indicates that the camera recorded a video in too high of...
Read more >@expo/metro-config | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had the same issue, until i checked the “time” parameter. I was passing a “time” that was beyond the duration of the video. In @jacksondc 's snack, the video’s duration is 15 secs, and the “time” parameter is also 15000, thus raising an error.
Passing any time that falls within the video’s duration solves the error for me
good catch @shrihari1999!
if anyone wants to open a pr to throw a better error in this case it would be welcomed, but i’ll close this issue