Reputation: 3352
The mozCamera API provides an interface
"CameraManager.getCamera(... onsuccess(camera) ... )"
which gets an object 'camera' of class CameraControl. When I look at its API. CameraControl's member function '.getPreviewStream()' providedes a MediaStream object. So far so good.
But how is it possible to get something like chunks of Uint8Array-s out of this stream? (This is necessary in order to pass the stream through a device-specific communication infrastructure.)
Upvotes: 0
Views: 163
Reputation: 2334
In future release the mozCamera API will be replaced by standard getUserMedia (WebRTC) API, so you can use general web way to process your stream data.
BTW currently mozCamera API is only available for pre-bundled apps.
Upvotes: 1
Reputation: 85
Not sure it solves your problem, but: The camera API is a certified API, i.e. only for core apps/Mozilla. Using Web Activities might help instead, read out the image as a blob and then work with that.
Upvotes: 2