Skip to content

Commit 384ca7e

Browse files
committed
Add WebRTCTransport endpoint
1 parent 1403031 commit 384ca7e

File tree

5 files changed

+389
-447
lines changed

5 files changed

+389
-447
lines changed

examples/camera-app/camera-common/camera-app.matter

-88
Original file line numberDiff line numberDiff line change
@@ -2522,93 +2522,6 @@ provisional cluster WebRTCTransportProvider = 1363 {
25222522
fabric command EndSession(EndSessionRequest): DefaultSuccess = 7;
25232523
}
25242524

2525-
/** The WebRTC transport requestor cluster provides a way for stream consumers (e.g. Matter Stream Viewer) to establish a WebRTC connection with a stream provider. */
2526-
provisional cluster WebRTCTransportRequestor = 1364 {
2527-
revision 1;
2528-
2529-
enum StreamUsageEnum : enum8 {
2530-
kInternal = 0;
2531-
kRecording = 1;
2532-
kAnalysis = 2;
2533-
kLiveView = 3;
2534-
}
2535-
2536-
enum WebRTCEndReasonEnum : enum8 {
2537-
kIceFailed = 0;
2538-
kIceTimeout = 1;
2539-
kUserHangup = 2;
2540-
kUserBusy = 3;
2541-
kReplaced = 4;
2542-
kNoUserMedia = 5;
2543-
kInviteTimeout = 6;
2544-
kAnsweredElsewhere = 7;
2545-
kOutOfResources = 8;
2546-
kMediaTimeout = 9;
2547-
kLowPower = 10;
2548-
kUnknownReason = 11;
2549-
}
2550-
2551-
bitmap WebRTCMetadataOptionsBitmap : bitmap8 {
2552-
kDataTLV = 0x1;
2553-
}
2554-
2555-
struct ICEServerStruct {
2556-
char_string urls[] = 1;
2557-
optional char_string username = 2;
2558-
optional char_string credential = 3;
2559-
optional int16u caid = 4;
2560-
}
2561-
2562-
fabric_scoped struct WebRTCSessionStruct {
2563-
int16u id = 1;
2564-
node_id peerNodeID = 2;
2565-
StreamUsageEnum streamUsage = 3;
2566-
nullable int16u videoStreamID = 4;
2567-
nullable int16u audioStreamID = 5;
2568-
WebRTCMetadataOptionsBitmap metadataOptions = 6;
2569-
fabric_idx fabricIndex = 254;
2570-
}
2571-
2572-
readonly attribute access(read: administer) WebRTCSessionStruct currentSessions[] = 0;
2573-
readonly attribute command_id generatedCommandList[] = 65528;
2574-
readonly attribute command_id acceptedCommandList[] = 65529;
2575-
readonly attribute event_id eventList[] = 65530;
2576-
readonly attribute attrib_id attributeList[] = 65531;
2577-
readonly attribute bitmap32 featureMap = 65532;
2578-
readonly attribute int16u clusterRevision = 65533;
2579-
2580-
request struct OfferRequest {
2581-
int16u webRTCSessionID = 0;
2582-
char_string sdp = 1;
2583-
optional ICEServerStruct ICEServers[] = 2;
2584-
optional char_string ICETransportPolicy = 3;
2585-
}
2586-
2587-
request struct AnswerRequest {
2588-
int16u webRTCSessionID = 0;
2589-
char_string sdp = 1;
2590-
}
2591-
2592-
request struct ICECandidatesRequest {
2593-
int16u webRTCSessionID = 0;
2594-
char_string ICECandidates[] = 1;
2595-
}
2596-
2597-
request struct EndRequest {
2598-
int16u webRTCSessionID = 0;
2599-
WebRTCEndReasonEnum reason = 1;
2600-
}
2601-
2602-
/** This command provides the stream requestor with WebRTC session details. */
2603-
command Offer(OfferRequest): DefaultSuccess = 1;
2604-
/** This command provides the stream requestor with the WebRTC session details (i.e. Session ID and SDP answer), It is the next command in the Offer/Answer flow to the ProvideOffer command. */
2605-
command Answer(AnswerRequest): DefaultSuccess = 2;
2606-
/** This command allows for string based https://rfc-editor.org/rfc/rfc8839#section-5.1 generated after the initial Offer / Answer exchange, via a JSEP https://datatracker.ietf.org/doc/html/rfc9429#section-4.1.20 event, a DOM https://www.w3.org/TR/webrtc/#dom-rtcpeerconnectioniceevent event, or other WebRTC compliant implementations, to be added to a session during the gathering phase. */
2607-
command ICECandidates(ICECandidatesRequest): DefaultSuccess = 3;
2608-
/** This command notifies the stream requestor that the provider has ended the WebRTC session. */
2609-
command End(EndRequest): DefaultSuccess = 4;
2610-
}
2611-
26122525
/** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */
26132526
provisional cluster Chime = 1366 {
26142527
revision 1;
@@ -3007,7 +2920,6 @@ endpoint 0 {
30072920
endpoint 1 {
30082921
device type ma_camera = 322, version 1;
30092922

3010-
binding cluster WebRTCTransportRequestor;
30112923

30122924
server cluster Identify {
30132925
ram attribute identifyTime default = 0x0000;

0 commit comments

Comments
 (0)