Comments (9)
can you precise what happens? Does it crash / does it renders black?
from react-native-view-shot.
not crash, called Promise catch and return error "Failed to capture view snapshot"
from react-native-view-shot.
I'll try to improve the error message because it's probably breaking internally in the Android side (it's Android, right?)
from react-native-view-shot.
no it`s on ios real device,using react native video module to play hls Stream,
from react-native-view-shot.
Ok. I'll give a try! it might be that the drawViewHierarchyInRect
function returns FALSE and I'll need to see what's the way to fix it / get a better error message.
from react-native-view-shot.
thanks
from react-native-view-shot.
I think the error needs to be more clear or it should just renders something black (not this weird error).
but note that it's likely snapshotting a video won't work (maybe we'll have good surprise, but not sure!). see actually TheWidlarzGroup/react-native-video#95
from react-native-view-shot.
I'm afraid currently answer is you can't.
even thought it seems to work on Simulator, the renderInContext does not work for Video, it renders black (if ignoring the returned value of drawViewHierarchyInRect – I don't want to ignore it and prefer the call to be a failure promise so you can deal with it and not end up with a black image)
– at least it's not possible with the video from react-native-video, therefore, it will be up to this library to provide you a way to get a snapshot from a video. and it's possible to do, but it needs lower level API calls ( http://stackoverflow.com/questions/8291727/ios-extracting-video-frames-as-images )
from react-native-view-shot.
we could find a generic solution that react-native-view-shot would use, like react-native-video could expose some sort of generic method we would duck-call. but i'll leave that to the following issue: TheWidlarzGroup/react-native-video#95
from react-native-view-shot.
Related Issues (20)
- Image Quality is too low while i am taking view shot of my screen
- White borders when view dimensions are not integers
- Crash error on android HOT 5
- not working on ios RN0.72.4
- newArchEnabled HOT 2
- Viewshot is not capture screen shot of absolute positioned Views/
- Is this package still maintained?, because it doesn't seem to work on android anymore HOT 2
- Run time crash due to use of depricated UI Image apis
- not working on android React-Native 0.7x HOT 1
- In scrollable content when i take a shot end of the content styles not applied example borderRadius and color and border
- Android: Image is coming partially black on Android when used in conjunction with ScrollView! HOT 3
- how to avoid black edges formed after capturing. HOT 3
- Regression in 4.0.0-alpha.2 HOT 1
- In android it does nothing and not showing any error logs. Works fine in iOS HOT 5
- Privacy Manifest file HOT 1
- captureRef webview ref error
- view-shot content will not update when webview changes
- One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts HOT 2
- Need support for android O and above
- The generated screenshot appears blurry on Android devices, as if the resolution is incorrect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-view-shot.