class static
HomeServerConnector. _CameraPicture
Abstract types
new _CameraPicture()
Retrieval of images of a camera defined in HS.
May not be directly instanced. An instance of the class is created by the method HomeServerConnector._Connection#getCameraPicture.
Example
var cp = conn.getCameraPicture("CP@MyCamera");
Methods
destroy()
Enables the object.
Example
cp.destroy();
getKey() → String
Returns the key of the object.
Example
var object_key = cp.getKey();
- Returns
-
String
getMeta(callback)
Retrieves the metadata.
Example
Retrieval of metadata.
cp.getMeta(function(err, data) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
getPicture(callback)
Returns the current camera image.
Example
Returns an image.
cp.getPicture(function(err, dataUrl) { document.getElementById("img").src = dataUrl; });
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
Abstract types
inner
getMetaCallback(err, data)
Example
Retrieval of metadata.
cp.getMeta(function(err, data) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
data |
Object |
|
Meta information Structure
Explanation
|
inner
getPictureCallback(err, dataUrl)
Example
Returns an image.
cp.getPicture(function(err, dataUrl) { document.getElementById("img").src = dataUrl; });
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
dataUrl |
String |
|
A string in the data URL format. For description and format see: Data-URL Wiki-Page. |