ReferenceHTTP API
audioCodec
The audioCodec router: 11 methods of the audio-codec capability, with tier, scope, input and output.
Capability audio-codec · scope system · mode singleton · source packages/types/src/capabilities/audio-codec.cap.ts:85.
Every method is called at /trpc/audioCodec.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
listSupportedCodecs | query | protected | view | no |
canHandle | query | protected | view | no |
createDecodeSession | mutation | protected | create | no |
createEncodeSession | mutation | protected | create | no |
closeSession | mutation | protected | create | no |
pushEncodedFrame | mutation | protected | create | no |
pullPcm | query | protected | view | no |
pushPcm | mutation | protected | create | no |
pullEncoded | query | protected | view | no |
flushEncode | mutation | protected | create | no |
listActiveSessions | query | protected | view | no |
audioCodec.listSupportedCodecs
- Kind: query —
GET /trpc/audioCodec.listSupportedCodecs - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.listSupportedCodecson your hub
Input
voidOutput
AudioCodecInfoSchema[]Shapes: AudioCodecInfoSchema
audioCodec.canHandle
- Kind: query —
GET /trpc/audioCodec.canHandle - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.canHandleon your hub
Input
{ codec: string; kind: "decode" | "encode" }Output
booleanaudioCodec.createDecodeSession
- Kind: mutation —
POST /trpc/audioCodec.createDecodeSession - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.createDecodeSessionon your hub
Input
AudioDecodeSessionConfigSchemaOutput
{ sessionId: string; nodeId: string }Shapes: AudioDecodeSessionConfigSchema
audioCodec.createEncodeSession
- Kind: mutation —
POST /trpc/audioCodec.createEncodeSession - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.createEncodeSessionon your hub
Input
AudioEncodeSessionConfigSchemaOutput
{ sessionId: string; nodeId: string }Shapes: AudioEncodeSessionConfigSchema
audioCodec.closeSession
- Kind: mutation —
POST /trpc/audioCodec.closeSession - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.closeSessionon your hub
Input
{ sessionId: string; nodeId?: string }Output
voidaudioCodec.pushEncodedFrame
- Kind: mutation —
POST /trpc/audioCodec.pushEncodedFrame - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.pushEncodedFrameon your hub
Input
{ sessionId: string; nodeId?: string; data: <custom>; pts?: number }Output
voidaudioCodec.pullPcm
- Kind: query —
GET /trpc/audioCodec.pullPcm - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.pullPcmon your hub
Input
{ sessionId: string; nodeId?: string; maxCount?: number = 8 }Output
AudioPcmChunkSchema[]Shapes: AudioPcmChunkSchema
audioCodec.pushPcm
- Kind: mutation —
POST /trpc/audioCodec.pushPcm - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.pushPcmon your hub
Input
{ sessionId: string; nodeId?: string; data: <custom>; pts?: number }Output
voidaudioCodec.pullEncoded
- Kind: query —
GET /trpc/audioCodec.pullEncoded - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.pullEncodedon your hub
Input
{ sessionId: string; nodeId?: string; maxCount?: number = 8 }Output
AudioEncodedChunkSchema[]Shapes: AudioEncodedChunkSchema
audioCodec.flushEncode
- Kind: mutation —
POST /trpc/audioCodec.flushEncode - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.flushEncodeon your hub
Input
{ sessionId: string; nodeId?: string }Output
AudioEncodedChunkSchema[]Shapes: AudioEncodedChunkSchema
audioCodec.listActiveSessions
- Kind: query —
GET /trpc/audioCodec.listActiveSessions - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityaudio-codec, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=audioCodec.listActiveSessionson your hub
Input
voidOutput
({ sessionId: string; kind: "decode" | "encode"; codec: string; sourceSampleRate: number; sourceChannels: number; targetSampleRate: number; targetChannels: number; format: PcmSampleFormatSchema; tag?: string; createdAtMs: number; lastActivityMs: number; framesIn: number; framesOut: number })[]Shapes: PcmSampleFormatSchema