Skip to content

TrackPublishOptions audioBitrate Setting #1829

@rsmithclearspeed

Description

@rsmithclearspeed

Describe the bug

The documentation here indicates that it is possible to set the audioBitrate parameter directly via the TrackPublishOptions input type. However, the published type does not appear to have this field.

Is it currently possible to directly configure the bitrate via the Javascript SDK?

Reproduction

Attempting to set the bitrate as shown in the example from the documentation (see below code snippet) returns the following Typescript error: Object literal may only specify known properties, and 'audioBitrate' does not exist in type 'TrackPublishOptions'.

const localParticipant = useLocalParticipant();

const audioTrack = await createLocalAudioTrack({
  channelCount: 2,
  echoCancellation: false,
  noiseSuppression: false,
});
const audioPublication = await localParticipant.publishTrack(audioTrack, {
  audioBitrate: 510000,
  dtx: false,
  red: false,
});

Logs

System Info

System:
    OS: macOS 26.3
    CPU: (16) arm64 Apple M4 Max
    Memory: 1.30 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.15.0 - /Users/rsmith/.nvm/versions/node/v22.15.0/bin/node
    npm: 11.4.2 - /Users/rsmith/.nvm/versions/node/v22.15.0/bin/npm
  Browsers:
    Chrome: 145.0.7632.160
    Firefox: 144.0.2
    Safari: 26.3
  npmPackages:
    @livekit/components-react: ^2.0.0 => 2.9.20
    @livekit/components-styles: ^1.0.0 => 1.2.0
    livekit-client: ^2.0.0 => 2.17.2

Severity

serious, but I can work around it

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions