Smart Home CameraStream Trait Schema

action.devices.traits.CameraStream - This trait belongs to devices which have the capability to
stream video feeds to third party screens, Chromecast-connected screens or an Android phone. By and
large, these are currently security cameras or baby cameras. But this would also apply to more
complex devices which have a camera on them (for example, video-conferencing robotics/devices or a vacuum
robot with a camera on it).

Device ATTRIBUTES

Attribute

Definition

cameraStreamSupportedProtocols

Ordered list of strings describing supported media types, according to preference, for
the real-time stream.
Note: For now, the media target is just Chromecast service. Please see the
Supported Video Formats section below for more details on supported
protocols with Chromecast.

cameraStreamNeedAuthToken

Bool to indicate if an Auth token will be needed to stream the camera feed.
Note: For now, this field is only relevant if a custom Cast receiver is used (see
cameraStreamAuthToken below). If cameraStreamNeedAuthToken is
true AND an Auth Token is not explicitly provided to Google, we will generate an
authentication token using the user's oauth credentials stored after initial setup with the
partner (the same auth token for execution/sync).

[This section requires a browser that supports JavaScript and iframes.]

Device STATES

None

Device COMMANDS

Note that this command is not straight execution as with other traits/commands,
but the first stage of a pipeline; GetCameraStream returns an address which the
Assistant feeds to the media target (for now, just Chomecast-enabled targets). However, since these
have real effects, rather than simply querying potentially cached data, they are EXECUTE commands,
not QUERY.

Command

Parameters/Definition

action.devices.commands.GetCameraStream

Begin streaming the camera (the return URL of stream) in order to present on a screen such as the
user's phone, the Assistant surface itself, or another media/Cast target.

StreamToChromecast Bool to indicate whether the stream will be played on a
Chromecast device.
Note: Currently, this is always true. Once we have third party media target
screen support, this field could be false, and if so, the cameraStreamReceiverAppId
below won’t be relevant.

SupportedStreamProtocols List of strings. We send along the supported media
types/formats of the desired destination; client should return a streaming URL pointing to
one of these formats.
Note: This is reserved for future use. For now, Chromecast is the only media
target. Please see the
Supported Video Formats section below for more details on supported
protocols.

cameraStreamReceiverAppId String. Optional. Cast receiver id if the steam
has to be processed by a specific receiver.
Note: If this field is empty, the generic Cast receiver will be used (see
the Supported Video Formats section below for more
details on the generic Cast receiver).

cameraStreamAuthToken String. Optional.
A token for the specific receiver to authenticate the stream.
Notes:

The generic Cast receiver doesn’t support authentication, so no token is required.

If cameraStreamReceiverAppId is not empty (a custom Cast
receiver is specified), but the cameraStreamAuthToken field is empty
(no auth token is provided), the same OAuth token for execution/sync will be used.