Skip to main content

AudioTracks

Electron APIs / recorder / AudioTracks

type AudioTracks = 0 | 1 | 2 | 4 | 8 | 16 | 32 | 255 | number;

Audio track selection flags.

Each value corresponds to a specific audio track using a bitmask format. You can combine tracks using bitwise OR operations. For example, Track1 | Track2 is 3.

Remarks

  • This format is useful when routing or encoding specific audio channels.
  • The number type is included to allow for custom or combined values not explicitly listed.

Example

const tracks: AudioTracks = 1 | 2; // Track1 and Track2