Cameras1363 — WebRTC Transport Provider

Matter Cluster 1363 — WebRTC Transport Provider

Matter Cluster 1363 (0x0553) WebRTC Transport Provider: attributes, commands, events, data types, shadow paths and bridge payload examples.

Matter Cluster 1363 — WebRTC Transport Provider Cluster

Matter Cluster 1363, also written as 0x0553, is the WebRTC Transport Provider Cluster. The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC. Devices implementing this cluster must also implement Camera AV Stream Management Cluster on the same endpoint.

Cluster Identity

FieldValue
Cluster ID decimal1363
Cluster ID hex0x0553
Cluster nameWebRTC Transport Provider
Cluster revision (Matter 1.6.1)2
Roleapplication
ScopeEndpoint
PICS codeWEBRTCP
Typical endpoint1

Revision history

RevisionChange
1Initial version of the WebRTC Transport Provider Cluster
2Add multi stream support

Shadow Path Format

Cluster 1363 values in the device shadow use this format:

endpoint_id / 1363 / attribute_id

Example:

{
  "1/1363/0": []
}
PartMeaning
1Endpoint ID
1363WebRTC Transport Provider cluster
0CurrentSessions attribute

Cluster 1363 Features

The FeatureMap attribute (1/1363/65532) is a bitmap. Each bit set means the device implements that feature and the attributes and commands that depend on it.

BitCodeFeatureConformanceMeaning
0METADATAMetadataP, OSupports metadata transmission in WebRTC sessions

Example: FeatureMap = 0 means no optional feature is enabled; 1 means every feature listed above is enabled.


Cluster 1363 Attributes

Cluster 1363 defines 1 attribute plus the global attributes. Conformance: M mandatory, O optional, a feature code means "mandatory when that feature is present", square brackets mean "optional when …".

IDHexAttributeTypeConformanceAccessQualitiesDefault
00x0000CurrentSessionslist of WebRTCSessionStructMR (read: manage, fabric-sensitive)——

Global attributes

IDHexAttributeMeaning
655280xFFF8GeneratedCommandListResponse command IDs this server generates.
655290xFFF9AcceptedCommandListCommand IDs this server accepts.
655310xFFFBAttributeListAttribute IDs implemented.
655320xFFFCFeatureMapImplemented optional features (see above).
655330xFFFDClusterRevisionCluster revision implemented; 2 for a Matter 1.6.1 device.

Attribute Details

Attribute 0 / 0x0000 — CurrentSessions

Path example:

1/1363/0

This attribute is a list of WebRTCSessionStruct, which represents all the active WebRTC Sessions.

PropertyValue
Typelist of WebRTCSessionStruct
ConformanceM
AccessR (read: manage, fabric-sensitive)

Example:

{
  "1/1363/0": []
}

Cluster 1363 Commands

Cluster 1363 has 5 client-to-server commands and 2 responses.

IDHexCommandDirectionConformanceResponseDescription
00x00SolicitOfferclient → serverMSolicitOfferResponseRequests that the Provider initiates a new session with the Offer / Answer flow in a way that allows for options to be passed and work with devices needing the standby flow.
10x01SolicitOfferResponseserver → clientM—This command is generated in response to a SolicitOffer command.
20x02ProvideOfferclient → serverMProvideOfferResponseThis command allows an SDP Offer to be set and start a new session.
30x03ProvideOfferResponseserver → clientM—This command contains information about the session and streams created as a response to the requestor's offer.
40x04ProvideAnswerclient → serverMstatusThis command is initiated from a Node in response to an Offer that was previously received from a remote peer.
50x05ProvideICECandidatesclient → serverMstatus—
60x06EndSessionclient → serverMstatusThis command instructs the stream provider to end the WebRTC session.

AcceptedCommandList

The AcceptedCommandList attribute lists the command IDs the endpoint actually implements:

endpoint_id / 1363 / 65529
{
  "1/1363/65529": [
    0,
    2,
    4,
    5,
    6
  ]
}

Before sending a Cluster 1363 command, check that the command ID exists in endpoint/1363/65529. Optional commands are only present when the matching feature is set in FeatureMap.


Bridge Command Payload Format

The bridge accepts Matter commands in this structure:

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1363,
    "command_name": "SolicitOffer",
    "payload": {},
    "timed_request_timeout_ms": 1000
  }
}

For Cluster 1363, always use "cluster_id": 1363. Payload keys are the command field names in lowerCamelCase. Octet-string fields are base64-encoded. timed_request_timeout_ms is required for timed commands and ignored otherwise.


Command: SolicitOffer

Purpose

Requests that the Provider initiates a new session with the Offer / Answer flow in a way that allows for options to be passed and work with devices needing the standby flow.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command nameSolicitOffer
Directionclient → server
ConformanceM
ResponseSolicitOfferResponse
Access(invoke: operate, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0StreamUsagestreamUsageStreamUsageEnumM—This field contains the StreamUsageEnum that indicates the stream usage for this session and is used per Resource Management and Stream Priorities.
1OriginatingEndpointIDoriginatingEndpointIDendpoint-noM——
2VideoStreamIDvideoStreamIDVideoStreamID (nullable)O, D——
3AudioStreamIDaudioStreamIDAudioStreamID (nullable)O, D——
4ICEServersiceServerslist of ICEServerStructOmax 10 entries—
5ICETransportPolicyiceTransportPolicystringOmax length 16—
6MetadataEnabledmetadataEnabledboolMETADATA—This field indicates if metadata transmission is active in this session.
8VideoStreamsvideoStreamslist of VideoStreamID[ClusterRevision >= 2], O1 to 16 entriesThis field is the list of requested VideoStreamID for this session. Valid values are found in the AllocatedVideoStreams attribute.
9AudioStreamsaudioStreamslist of AudioStreamID[ClusterRevision >= 2], O1 to 16 entriesThis field is a list of requested AudioStreamID for this session. Valid values are found in the AllocatedAudioStreams attribute.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1363,
    "command_name": "SolicitOffer",
    "payload": {
      "streamUsage": 0,
      "originatingEndpointID": 1
    }
  }
}

The device answers with SolicitOfferResponse (see below).


Command: SolicitOfferResponse

Purpose

This command is generated in response to a SolicitOffer command. This response contains information about the session and streams created and/or if a deferred offer will take place. Upon receipt, the client must create a new WebRTCSessionStruct populated with the values from this command, along with the accessing Peer Node ID and Local Fabric Index entries stored in the Secure Session Context as the PeerNodeID and FabricIndex values, and store it in the WebRTC Transport Requestor cluster's CurrentSessions attribute. The session establishment is considered failed unless a Offer command is received by the Requestor from the PeerEndpointID / FabricIndex within 30 seconds.

Command Identity

FieldValue
Command ID1
Command hex0x01
Command nameSolicitOfferResponse
Directionserver → client (response)
ConformanceM

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionIDM——
1DeferredOfferdeferredOfferboolM—This field must indicates the delayed processing hint of the provider. If DeferredOffer is FALSE, the VideoStreamID and AudioStreamID fields must NOT be null in this response and the Provider will without delay invoke the Offer command.
2VideoStreamIDvideoStreamIDVideoStreamID (nullable)SolicitOffer, D——
3AudioStreamIDaudioStreamIDAudioStreamID (nullable)SolicitOffer, D——

Command: ProvideOffer

Purpose

This command allows an SDP Offer to be set and start a new session. This command can also be used in the re-offer flow of an existing session to change the details of the SDP (e.g. to enable/disable two-way talk).

Command Identity

FieldValue
Command ID2
Command hex0x02
Command nameProvideOffer
Directionclient → server
ConformanceM
ResponseProvideOfferResponse
Access(invoke: operate, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionID (nullable)M——
1SDPsdpstringM——
2StreamUsagestreamUsageStreamUsageEnumWebRTCSessionID = null, O—This field contains the StreamUsageEnum that indicates the stream usage for this session.
3OriginatingEndpointIDoriginatingEndpointIDendpoint-noWebRTCSessionID = null, O——
4VideoStreamIDvideoStreamIDVideoStreamID (nullable)O, D——
5AudioStreamIDaudioStreamIDAudioStreamID (nullable)O, D——
6ICEServersiceServerslist of ICEServerStructOmax 10 entries—
7ICETransportPolicyiceTransportPolicystringOmax length 16—
8MetadataEnabledmetadataEnabledboolMETADATA & WebRTCSessionID = null—This field indicates if metadata transmission is active in this session.
10VideoStreamsvideoStreamslist of VideoStreamID[ClusterRevision >= 2 & WebRTCSessionID = null], O1 to 16 entriesThis field is the list of requested VideoStreamID for this session. Valid values are found in the AllocatedVideoStreams attribute.
11AudioStreamsaudioStreamslist of AudioStreamID[ClusterRevision >= 2 & WebRTCSessionID = null], O1 to 16 entriesThis field is a list of requested AudioStreamID for this session. Valid values are found in the AllocatedAudioStreams attribute.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1363,
    "command_name": "ProvideOffer",
    "payload": {
      "webRTCSessionID": 0,
      "sdp": "example"
    }
  }
}

The device answers with ProvideOfferResponse (see below).


Command: ProvideOfferResponse

Purpose

This command contains information about the session and streams created as a response to the requestor's offer. Upon receipt, the client must create a new WebRTCSessionStruct populated with the values from this command, along with the accessing Peer Node ID and Local Fabric Index entries stored in the Secure Session Context as the PeerNodeID and FabricIndex values, and store it in the WebRTC Transport Requestor cluster's CurrentSessions attribute.

Command Identity

FieldValue
Command ID3
Command hex0x03
Command nameProvideOfferResponse
Directionserver → client (response)
ConformanceM

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionIDM——
1VideoStreamIDvideoStreamIDVideoStreamID (nullable)ProvideOffer, D——
2AudioStreamIDaudioStreamIDAudioStreamID (nullable)ProvideOffer, D——

Command: ProvideAnswer

Purpose

This command is initiated from a Node in response to an Offer that was previously received from a remote peer. It has the following data fields: This command must respond with a response status of NOT_FOUND if the WebRTCSessionID does not match an entry in CurrentSessions, or if the matching entry's associated fabric and PeerNodeID do not match the accessing fabric and the Peer Node ID entry stored in the Secure Session Context of the session this command was received on.

Command Identity

FieldValue
Command ID4
Command hex0x04
Command nameProvideAnswer
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: operate, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionIDM——
1SDPsdpstringM——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1363,
    "command_name": "ProvideAnswer",
    "payload": {
      "webRTCSessionID": 0,
      "sdp": "example"
    }
  }
}

Command: ProvideICECandidates

Purpose

ProvideICECandidates is a client-to-server command of the WebRTC Transport Provider cluster.

Command Identity

FieldValue
Command ID5
Command hex0x05
Command nameProvideICECandidates
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: operate, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionIDM——
1ICECandidatesiceCandidateslist of ICECandidateStructMmin 1 entries—

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1363,
    "command_name": "ProvideICECandidates",
    "payload": {
      "webRTCSessionID": 0,
      "iceCandidates": []
    }
  }
}

Command: EndSession

Purpose

This command instructs the stream provider to end the WebRTC session.

Command Identity

FieldValue
Command ID6
Command hex0x06
Command nameEndSession
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: operate, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0WebRTCSessionIDwebRTCSessionIDWebRTCSessionIDM——
1ReasonreasonWebRTCEndReasonEnumM—This field is one of the values in WebRTCEndReasonEnum.

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 1,
    "cluster_id": 1363,
    "command_name": "EndSession",
    "payload": {
      "webRTCSessionID": 0,
      "reason": 0
    }
  }
}

Cluster 1363 Events

Cluster 1363 defines no events.


SmartphoneKey Notes

  • Cluster 1363 is not currently exposed by SmartphoneKey devices. This page documents the Matter 1.6.1 specification so that future devices can be interpreted without changes to the backend.
  • Shadow paths follow endpoint/1363/attribute; attribute values that the device reports as unreadable are written as n/a.
  • Attribute IDs, command IDs and enum values on this page come from the CSA Matter 1.6.1 data model; descriptions are condensed from the specification text.