question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expo-video-thumbnails: "This media cannot be used"

See original GitHub issue

Summary

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

https://snack.expo.dev/SSxd7QWRH

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
shrihari1999commented, Nov 26, 2022

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

1reaction
brentvatnecommented, Nov 26, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found