You can also view
You are viewing documentation for version 11. This is the most recent stable release!

Camera JS Events

You can be notified when events occur in your <photobooth> using our Javascript API. Below is a full list of the available events.

How do I observe camera events?
initialized
connecting
connected
disconnected
cameraError
photoTaken
filterSelected
publishing
uploadProgress
published
publishFailed
metadataError

How do I observe PhotoBooth events?

You can observe a PhotoBooth's events at any time (even before you create it) by using the PhotoBooth's id and the CameraTag.observe method. Here is an example observing the publish event from a PhotoBooth with the id 'MyBooth1':
CameraTag.observe('MyBooth1', 'published', function(){
 alert('this image has been published!')
});

initialized

Intitialized and is ready for use

connecting

Photobooth is attempting to connect to the camera

connected

Successfully connected to the camera

disconnected

Connection to the camera was dropped.

cameraError

There was an error finding or connecting to the camera.

photoTaken

A photo has been taken (or a file selected for upload)

filterSelected

A filter has been applied to the selected photo

publishing

Publishng to the server has started

uploadProgress( progress )

Periodically fired to provide upload status. Recieves a arameter indicating what percent of the uplaod is complete.

published

The image was successfully published to the server

publishing

The video has begun publishing to the CameraTag server

published

The video was has finsihed publishing to the CameraTag sever

publishError

The image failed to publish to the server

metadataError

There was an error adding metadata to the image.