My web cam snap

Rick Spencer rick.spencer at canonical.com
Thu Jan 14 16:47:02 UTC 2016


I built my latest snap, that I call rest-cam. I designed this snap really
as a building block for other functionality. The idea being that I can
attach a camera to a device, install the snap, and then write easy code
either on the same device or on different devices, web pages, desktops,
etc... to interact with the camera.

Currently the functionality is pretty bare bones. If you want to write a
program that processes an image in some way, say uploads it to a cloud
service, etc... simply ask the api for the image:

http://ipaddress:8082/api/photo
This will take a photo on demand and serve that file. This is the main
purpose of the snap. I am envision a lot of apps using
http://localhost:8082/api/photo .

If you want to check if the camera is attached:
http://ipaddress:8082/api/status

I also include a web page that you can use just to futz with the camera,
and you just get that at the root.
http://ipaddress:8082/

I have some near term features to add. First, offering snappy config to set
the port, and also adding some simple authentication, which it totally
lacks, now. Then expanding the api to allow different size images.
Ultimately, I plan to add capturing video and streaming to the snap.

If you have suggestions for improving the design, new features, or really
and feedback, that would be most welcome.

Thanks.

Cheers, Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20160114/68d33e44/attachment.html>


More information about the snappy-app-devel mailing list