Using the camera on an iOS-target?

93 views
Skip to first unread message

Xerosugar

unread,
Feb 19, 2014, 5:09:06 PM2/19/14
to haxe...@googlegroups.com
Hi!

I'd like to know if it's currently possible to access/use the camera on an iOS-device from a Haxe-program. I'm making a game with HaxeFlixel and I want to use the camera in order to read QR-codes.

Thanks!

Saar Korren

unread,
Feb 19, 2014, 5:30:19 PM2/19/14
to haxe...@googlegroups.com
You can -technically- do anything in Haxe that the underlying platform is capable of, by either using code-injection with untyped magic and meta, or by adding your own files with FFI.

When it comes to the camera, though, while you can take a picture relatively seamlessly, if you want a streaming display, you're going to need a native surface, since that's the only way the iOS is capable of rendering the camera stream in real time. Game engines like HaxeFlixel usually cover their screen with their own control, so getting your camera feed in there can be problematic.

But, like I said, if all you want is a picture, you can capture it without needing a native surface in the UI tree. There are appropriate methods for doing it.

da...@postite.com

unread,
Feb 19, 2014, 5:42:08 PM2/19/14
to haxe...@googlegroups.com

https://github.com/josuigoa/CameraMic

It's the only camera extension I'm aware of. Never used though

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

Michel Romecki

unread,
Feb 19, 2014, 5:44:12 PM2/19/14
to Haxe ML
Hi,
https://github.com/josuigoa/CameraMic only takes picture through native cam, tried on android
Reply all
Reply to author
Forward
0 new messages