Giter VIP home page Giter VIP logo

Comments (11)

Sebastien-Guillon avatar Sebastien-Guillon commented on July 28, 2024

from canvascameraplugin.

Sami-Radi avatar Sami-Radi commented on July 28, 2024

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.

Martin-Luckow avatar Martin-Luckow commented on July 28, 2024

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.

Sami-Radi avatar Sami-Radi commented on July 28, 2024

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.

Sami-Radi avatar Sami-Radi commented on July 28, 2024

Hello,

Any news ?

Best Regards,

from canvascameraplugin.

Martin-Luckow avatar Martin-Luckow commented on July 28, 2024

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

bildschirmfoto 2018-08-30 um 09 48 33

from canvascameraplugin.

Martin-Luckow avatar Martin-Luckow commented on July 28, 2024

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.

BHuys avatar BHuys commented on July 28, 2024

Is there any progress on this issue? I'm having the same permission problem with WKWebView, using data kills my performance.

from canvascameraplugin.

duncan-qabana avatar duncan-qabana commented on July 28, 2024

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.

Sami-Radi avatar Sami-Radi commented on July 28, 2024

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.

Sami-Radi avatar Sami-Radi commented on July 28, 2024

Hello,

I believe the problem is fixed now. Closing the issue.

Best Regards.

from canvascameraplugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.