Dominevo
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.

MethodKindTierToken scopeViewer
listSupportedCodecsqueryprotectedviewno
canHandlequeryprotectedviewno
createDecodeSessionmutationprotectedcreateno
createEncodeSessionmutationprotectedcreateno
closeSessionmutationprotectedcreateno
pushEncodedFramemutationprotectedcreateno
pullPcmqueryprotectedviewno
pushPcmmutationprotectedcreateno
pullEncodedqueryprotectedviewno
flushEncodemutationprotectedcreateno
listActiveSessionsqueryprotectedviewno

audioCodec.listSupportedCodecs

  • Kind: query — GET /trpc/audioCodec.listSupportedCodecs
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.listSupportedCodecs on your hub

Input

void

Output

AudioCodecInfoSchema[]

Shapes: AudioCodecInfoSchema

audioCodec.canHandle

  • Kind: query — GET /trpc/audioCodec.canHandle
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.canHandle on your hub

Input

{ codec: string; kind: "decode" | "encode" }

Output

boolean

audioCodec.createDecodeSession

  • Kind: mutation — POST /trpc/audioCodec.createDecodeSession
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.createDecodeSession on your hub

Input

AudioDecodeSessionConfigSchema

Output

{ 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: create on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.createEncodeSession on your hub

Input

AudioEncodeSessionConfigSchema

Output

{ 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: create on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.closeSession on your hub

Input

{ sessionId: string; nodeId?: string }

Output

void

audioCodec.pushEncodedFrame

  • Kind: mutation — POST /trpc/audioCodec.pushEncodedFrame
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.pushEncodedFrame on your hub

Input

{ sessionId: string; nodeId?: string; data: <custom>; pts?: number }

Output

void

audioCodec.pullPcm

  • Kind: query — GET /trpc/audioCodec.pullPcm
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.pullPcm on 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: create on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.pushPcm on your hub

Input

{ sessionId: string; nodeId?: string; data: <custom>; pts?: number }

Output

void

audioCodec.pullEncoded

  • Kind: query — GET /trpc/audioCodec.pullEncoded
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.pullEncoded on 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: create on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.flushEncode on 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: view on capability audio-codec, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=audioCodec.listActiveSessions on your hub

Input

void

Output

({ 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