Interface BufferSourceAudioTrackInitConfig

Configurations for the audio track from an audio file or AudioBuffer object. Set these configurations when calling AgoraRTC.createBufferSourceAudioTrack.

Hierarchy

  • BufferSourceAudioTrackInitConfig

Index

Properties

Optional cacheOnlineFile

cacheOnlineFile: undefined | false | true

Whether to cache the online file:

  • true: Cache the online file.
  • false: (default) Do not cache the online file.

Optional encoderConfig

The audio encoder configurations.

You can set the audio encoder configurations in either of the following ways:

source

source: File | string | AudioBuffer

The type of the audio source:

  • File: An File object, representing a local audio file.
  • string: The online audio file retrieved from an HTTPS address. Ensure the address supports HTTPS and CORS.
  • AudioBuffer: An AudioBuffer object, representing the raw data in PCM format.