webrtcSession
The webrtcSession router: 11 methods of the webrtc-session capability, with tier, scope, input and output.
Capability webrtc-session · scope device · mode singleton · source packages/types/src/capabilities/webrtc-session.cap.ts:284.
Every method is called at /trpc/webrtcSession.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
listStreams | query | protected | view | yes |
createSession | mutation | protected | create | yes |
handleOffer | mutation | protected | create | yes |
handleAnswer | mutation | protected | create | yes |
addIceCandidate | mutation | protected | create | yes |
getIceCandidates | query | protected | view | yes |
closeSession | mutation | protected | create | yes |
hasAdaptiveBitrate | query | protected | view | yes |
getSessionState | query | protected | view | yes |
applyDownlinkProbe | mutation | protected | create | yes |
getSessionDebug | query | protected | view | yes |
webrtcSession.listStreams
- Kind: query —
GET /trpc/webrtcSession.listStreams - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.listStreamson your hub
Input
{ deviceId: number }Output
WebrtcStreamChoiceSchema[]Shapes: WebrtcStreamChoiceSchema
webrtcSession.createSession
- Kind: mutation —
POST /trpc/webrtcSession.createSession - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.createSessionon your hub
Input
{ deviceId: number; target: WebrtcStreamTargetSchema; hints?: webrtcClientHintsSchema; relayOnly?: boolean; consumerAttribution?: { kind: BrokerConsumerKindSchema; label?: string; media?: "audio" | "video" | "both"; targetCodec?: string; transport?: "passthrough" | "repacketize" | "transcode"; remoteAddr?: string; userAgent?: string; userId?: string; sessionId?: string; extra?: Record<string, string> } }Output
{ sessionId: string; sdpOffer: string }Shapes: WebrtcStreamTargetSchema · BrokerConsumerKindSchema
webrtcSession.handleOffer
- Kind: mutation —
POST /trpc/webrtcSession.handleOffer - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.handleOfferon your hub
Input
{ deviceId: number; target?: WebrtcStreamTargetSchema; sdpOffer: string; sessionId?: string; relayOnly?: boolean; nonTrickle?: boolean; disableTurn?: boolean; disableIpv6?: boolean; consumerAttribution?: { kind: BrokerConsumerKindSchema; label?: string; media?: "audio" | "video" | "both"; targetCodec?: string; transport?: "passthrough" | "repacketize" | "transcode"; remoteAddr?: string; userAgent?: string; userId?: string; sessionId?: string; extra?: Record<string, string> }; hints?: webrtcClientHintsSchema; talkback?: boolean }Output
{ sessionId: string; sdpAnswer: string }Shapes: WebrtcStreamTargetSchema · BrokerConsumerKindSchema
webrtcSession.handleAnswer
- Kind: mutation —
POST /trpc/webrtcSession.handleAnswer - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.handleAnsweron your hub
Input
{ deviceId: number; sessionId: string; sdpAnswer: string }Output
voidwebrtcSession.addIceCandidate
- Kind: mutation —
POST /trpc/webrtcSession.addIceCandidate - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.addIceCandidateon your hub
Input
{ deviceId: number; sessionId: string; candidate: string; sdpMid?: string | null; sdpMLineIndex?: number | null }Output
voidwebrtcSession.getIceCandidates
- Kind: query —
GET /trpc/webrtcSession.getIceCandidates - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.getIceCandidateson your hub
Input
{ deviceId: number; sessionId: string }Output
{ candidates: ({ candidate: string; sdpMid: string | null; sdpMLineIndex: number | null })[]; done: boolean }webrtcSession.closeSession
- Kind: mutation —
POST /trpc/webrtcSession.closeSession - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.closeSessionon your hub
Input
{ deviceId: number; sessionId: string }Output
voidwebrtcSession.hasAdaptiveBitrate
- Kind: query —
GET /trpc/webrtcSession.hasAdaptiveBitrate - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.hasAdaptiveBitrateon your hub
Input
{ deviceId: number; profile: CamProfileSchema }Output
booleanShapes: CamProfileSchema
webrtcSession.getSessionState
- Kind: query —
GET /trpc/webrtcSession.getSessionState - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.getSessionStateon your hub
Input
{ deviceId: number; sessionId: string }Output
{ pendingRenegotiation: { target: WebrtcStreamTargetSchema; epoch: number } | null; alive: boolean }Shapes: WebrtcStreamTargetSchema
webrtcSession.applyDownlinkProbe
- Kind: mutation —
POST /trpc/webrtcSession.applyDownlinkProbe - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.applyDownlinkProbeon your hub
Input
{ deviceId: number; sessionId: string; downlinkMbps: number }Output
{ outcome: "switching" | "held"; tier: CamProfileSchema | null; reason: string }Shapes: CamProfileSchema
webrtcSession.getSessionDebug
- Kind: query —
GET /trpc/webrtcSession.getSessionDebug - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitywebrtc-session, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=webrtcSession.getSessionDebugon your hub
Input
{ deviceId: number; sessionId: string }Output
WebrtcSessionDebugSchemaShapes: WebrtcSessionDebugSchema