-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on iOS / Cordova builds #27
Comments
Hi, Unfortunately I don't use Cordova. But I think it has something to do with the webcam access. Can you get webcam access using getUserMedia API with cordova? |
Hey Xavier, Sorry about the delayed response - I've been away. A little cursory duckduckgoing (and some simple tests) tells me I don't get the UserMedia API in a Cordova/iOS project, certainly at platform version 4.2 of the iOS platform plugin for Cordova. There's a plugin for Cordova called Crosswalk which apparently does allow the UserMedia API, as mentioned on this stackoverflow question, but most answers seem to relate to Android, which is accessing the camera fine. I'll post anything I figure out here for anyone else have issues relating to Cordova 7/iOS platform 4.5.5 |
Hey @xavierjs - an update! (a sad update though!) Looks like Apple is restricting access to getUserMedia in applications with embedded webviews, which is (clarified with a test case here)[https://github.com/marcusbelcher/cordova-getUserMedia-test]. They're speculating this may be relaxed for ios13, but there's nothing concrete to back that up, sadly! I went down a Crosswalk route testing out builds on iOS but still could not get this to work, for the reasons detailed above - effectively that Apple are blocking access in a webview. Sorry to misunderstand the issue and bring it to your attention - but at least hope it may be of use to others. Thanks for all your help, trouble, and (otherwise) great system, Xavier!
|
If interested, we found this plugin https://github.com/cordova-rtc/cordova-plugin-iosrtc which says it can act as a direct drop-in for the W3C WebRTC API, but we still have the same issues. |
Hi @davemee Unfortunately yes, even in IOS13 Apple does not enable getUserMedia API in webviews :(. I think that before they officially anounce the getUserMedia support in webview, it is not very reliable to use workarounds: either they will rely on tricks that may be broken with some specific versions of IOs or new releases, or they will introduce major bottlenecks slowing down the whole application (I guess they could for example stream the video through a local websocket server...). |
hello @xavierjs -update
This would seem to indicate that we are not intercepting the Jeeliz code at the right point. Many thanks for your help again :-) Kei |
Hi, This error is normal and handled, it occurs when the lib tests the real WebGL capabilities (see jeeliz/jeelizFaceFilter#85 (comment)). Best, |
hello @xavierjs "Can you put the video into a WebGL texture and display it properly?" No
This code produces the following error when we try to link it up to the THREE code.
we would really really appreciate any help you could give us to direct the video stream from (4) into the jeeliz libraries - any ideas? Thanks for being there... |
Hi @KeiPG Thanx for these detailed informations. Unfortunately if we cannot import the video into a WebGL texture, I can't see how it is possible to use this library with Apache Cordova. The plugin giving But anyway, I think the best way to work on it is to implement a simple WebGL example displaying the video into a WebGL texture (like the THREE.js example). Then it won't be a big deal to adapt this lib to Apache Cordova. On the Android device, these errors are quite important:
Because we need either WebGL2, either WebGL1 with Best, |
Hi @xavierjs Thanks for your continued suggestions! We've made a certain amount of progress in getting a webgl canvas available on iOS (before the new version later today :)) We dropped the use of the iosrtc cordova plugin, as it didn't exposed the element to the video tag(it would just display the video in front of the video tag and didn't give access). We have been trying a few things and have been able to get the camera onto a webgl canvas. Thanks Again for being there... |
Hello from https://github.com/cordova-rtc/cordova-plugin-iosrtc |
Hey Xavier, We have a stack of pieces that allows us to render video to a HTML canvas element working in a Cordova/iOS application now. We're wondering if you had any plans to allow the initialisation of Jeeliz to specify a user-provided canvas as the video source on the Jeeliz roadmap? This is part of a project both being used to teach CS students and to develop an non-profit application providing emotional support for a children's charity, if you would like some positive karma for encouragement! |
Hi, I took some days off, but I am back now. Best, |
Pull request issued which will build for iOS and render the camera to a HTML canvas (however, the Jeeliz library is not integrated in this) Hope that's of use, Xavier! Best, |
Hi, Thanx a lot for this PR, I will do my best to make it work and keep you tuned here. Best, |
Hi @davemee, I cannot get your demo working ( https://github.com/jeeliz/jeelizWeboji/tree/master/demos/cordova/canvas-camera-test ). I installed latest npm, then Cordova and Ionic using npm.
and then I commented these 2 lines in
And the project was built successfully. But when I tried to run it on the device it did not worked. The app was not installed at all. And I did not get any error message. No icon appear on the Iphone, and after a few seconds I have this error message on Xcode:
This is strange because the app launches correctly with the Iphone11 simulator (but I cannot get the camera video stream). I don't have a Mac, I just borrowed one for these tests, it is not very handy. I have still other stuffs to try (I will test with the latest IOS platform, not the 4.5.5)... Best, |
Hey Xavier, I've been away a few days (and will be again), but I got your app to build and run. However, I'm having a few errors and I'm trying to pin them down. There's a lot in the console generated by Jeeliz firing before things seem to have initialised fully, and something somewhere is disrupting the camera canvas plugin as it's namespace is not registered under the window object - I'll keep investigating and push another PR when I have it running well. Thanks again for taking this on, Best Dave |
Hmm, I'm still struggling to get this to behave. I've create a new PR and tested on both iOS and Android (6.3.0), both of which should work the same way (so this should be testable and consistent on iOS and Android now) I've been trying to work on the F^Ho^HRaccoon demo. They both render the video to a canvas using the CameraCapture plugin, but I can't get anything of Jeeliz to operate beyond this. I get the following error on the Chrome debug console - this is a 'red' error, not a warning, so I suspect it's causing a bigger issue (however, I don't get this on iOS at all)
|
Hi, I will take a look at this error. Best, |
Hi, I have just pushed a fix regarding the error Best, |
Hey Xavier, Thanks for the updates! You know, this plugin also works on Android, so an Apple system isn't always needed - the broad process is the same on both platforms, but each may have different smaller errors. In the meantime, I have error logs from both platforms - neither is picking up the video stream, I'm sad to say.
(above: iOS Xcode console)
(Above: Android, chromium web inspector console) |
Hi @davemee With Android I think that a webview component with the rights properties (to get camera access) can do the job to run Jeeliz libs. But with IOS it is not possible and I am also interested to find a way to get video access. It is also very challenging :) . The error abour I am currently trying stuffs to make it work with IOS. Best, |
I managed to install the canvas test app on my Iphone XR with IOS 13.2 beta following these steps: Updating MacOSX to High Sierra (10.14) and installing XCode 11 and brew.
Then running from the
Then I had an error about the dev team. I opened the project using Xcode:
I changed bundle identifier to com.jeeliz.ios or whatever in General tab/Identity section In Build Settings tab, go to Signing and set Code Signing Identity to IOS Developer Plug Iphone, click on Product/Destination and set Device/Iphone The icon of the App labeled with I went back, I clicked on the app again and I got the video working :) Now I have to add the weboji lib :) |
Wow I just discovered that we can access to the web console as if it were a web app using https://geeklearning.io/apache-cordova-and-remote-debugging-on-ios/ |
I have found the issue :) With Cordova/Safari there is a bug: I will add a workaround and push very soon. |
@davemee I updated the iOS cordova raccoon demo. Best, |
Confimed - works beautifully. Thanks for your perseverance, Xavier, and great suite of code! |
Thanx a lot for you help @davemee . We are sometimes asked to make the library work also on a native environment. The typical use case is a customer who want a native app, but who also have an older native one and who want to be able to only develop 1 solution for the 2 use cases. |
BREAKING NEWS: Camera access is enabled on IOS14.3 which is released this Monday ( December 14th ). So Weboji will work on Chrome, Firefox, Opera for IOS, and into |
Hi,
We're using this library with great success on Android and macOS Safari, but when we bundle it as part of a Cordova application on iOS we get the following error:
WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL (k - jeelizFaceTransfer.js:86:267)
This is when testing on an iPad 3 running iOS 9.3.5 (13G36).
Does this error trigger any resonance?
The text was updated successfully, but these errors were encountered: