Comments (11)
from canvascameraplugin.
Hello,
The latest cordova-ios application uses wkwebview instead of webview. WKWebView doesn't allow local resource files loading (i.e. URLs such as file://...) from the loaded html file. However there are workarounds. I'll update you as soon as i find a suitable solution.
Best Regards,
from canvascameraplugin.
Thanks for your answer.
Btw... I have a question and kind of a feature request :)
Some ugly phones (ynwim) show a horizonatally front cam preview, i.e. you look into a mirror. Others show unflipped previews... closer to reality.
In my app I use the front cam for real time pattern recognition and have to know if the image is flipped or not. Currently, the user has to check it by himself in the apps configuration.
Do you see a chance to detect flipped video streams on the level of the plugin?
Best regards
Martin
from canvascameraplugin.
Hello,
In the latest release the mirroring problem is fixed. However, I could not reproduce the bug you reported.
I implemented a fix, it works fine with our phone. Could you test the latest release and tell us if the problem still occurs ("Not allowed to load local resource...").
If it does, could you give us the iOS version you're using and the phone model.
Thanks,
Best regards
Sami
from canvascameraplugin.
Hello,
Any news ?
Best Regards,
from canvascameraplugin.
Hi Sami.
First: sorry for the late answer.
After some iOS-updates I tried it today with the latest version of your plugin and the option use:"file". The problem remains.
The device is an iPhone 5s with iOS 11.4.1.
Best regards
Martin
from canvascameraplugin.
Hi Sami.
I found the reason:
When running under iOS "use":"file" works only if using UIWebView.
Using the newer WKWebView leads to the "Not allowed"-error above. Seems, that this could be solved by rewriting "file://..." to "//...".
(My "fault": I am using Ionic, which uses WKWebView by default.)
Annother impact: using "use":"data" has the effect, that on a iPhone 5s the machine/app gets slower and slower and exits finally (after 20 minutes or so). Meanwhile the poor iPhone is close to its melting point :)
I have the feeling, the garbage collection is not fast enough to dispose outdated images.
This problem does not exist when using "file".
It woud be great, if you could detect UIWebView or WKWebView in your plugin and create the file-url accordingly.
Best Regards
Martin
from canvascameraplugin.
Is there any progress on this issue? I'm having the same permission problem with WKWebView, using data kills my performance.
from canvascameraplugin.
Hey Sami,
I saw your comment on #15 . I just wanted to let you know that it also doesn't work anymore on ios 12.2.
After updating my iphone 6s to 12.2, the plugin constantly throws this error. Using data is not really an option for the app I am developing.
If you need anymore information. I am available to provide it.
from canvascameraplugin.
Hello,
It seems that Ionic is using as a default the Ionic Web View for Cordova plugin. According to its documentation the plugin changes Cordova default UIWebView to WKWebView.
According to previous messages :
When running under iOS "use":"file" works only if using UIWebView.
Using the newer WKWebView leads to the "Not allowed"-error above. Seems, that this could be solved by rewriting "file://..." to "//...".
...
It woud be great, if you could detect UIWebView or WKWebView in your plugin and create the file-url accordingly.
The latest version of the plugin implements exactly this solution. Checks if the cordova-plugin-ionic-webview plugin is in use, and rewrite the URL accordingly.
In conclusion, the bug should be fixed with the latest version.
Best regards.
from canvascameraplugin.
Hello,
I believe the problem is fixed now. Closing the issue.
Best Regards.
from canvascameraplugin.
Related Issues (20)
- Is there any example of the "onAfterDraw"? HOT 1
- Is there any way to set the Orientation? HOT 1
- installation on ionic 3 HOT 1
- save recording video as file? HOT 1
- Image data in capture resolution HOT 1
- cameraPosition not set through options HOT 2
- Add crossOrigin = 'anonymous' to initialize method in CanvasCamera.js HOT 2
- Performance problem when using with Angular HOT 4
- Proposal: Horizontal and vertical flipping of the output ... HOT 3
- Tap to Focus HOT 1
- Typescript types not working HOT 2
- Is it possible create demo in ionic 4 / angular 8? HOT 1
- Failed to load resource error HOT 2
- Enable ability to set orientation
- fps not work
- cordova-android: 8.1.0, failed version requirement: <6.3.0
- How to apply a green screen to the canvas?
- Plugin not working on cordova-ios 6.1.0 HOT 2
- How to Record Video? HOT 3
- Poor performance on Android HOT 1
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 canvascameraplugin.