Menu

Expand
Rate this page:

Audio Mixer Changelog

1.0.0 (October 20th, 2021)

The 1.0.0-beta.1 Audio Mixer has been promoted to 1.0.0 and is now Generally Available! Thank you for all the feedback from our beta customers. For more details about the Audio Mixer, please visit the documentation.

1.0.0-beta.1 (October 13th, 2021)

A Media Extension that mixes a Programmable Video Room's participants' audio tracks.

Features

  • Automatically connects and disconnects to a Programmable Video Room.
  • Mixes all Participants' audio tracks into a Twilio Live Stream.
  • Inserts TimedMetadata that can be used for building a rich application UI. See TimedMetadata section for more details.

Getting Started

To use an Audio Mixer in a Twilio Live application, specify the audio mixer extension name and extension context parameters when creating a MediaProcessor.

curl -X POST 'https://media.twilio.com/v1/MediaProcessors' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' \
  -d 'Extension="audio-mixer-v1"' \
  -d 'ExtensionContext={"room": {"name": "RM123"}, "outputs": ["VJXXX"]}'

Extension Context

The snippet below describes the Audio Mixer extension context parameters.

{
  // Room Parameters (required)
  "room": {
      "name": "RM123", // required
  },

  // Extension Identity (optional, audio-mixer-v1 by default)
  "identity": "audio-mixer-v1",

  // Media destinations (required)
  "outputs": ["VJXXX"],

  // Audio bitrate (optional)
  "audioBitrate": 128,
}

Timed Metadata

The audio mixer gets a Room's participants every 500 ms and inserts this information into the stream via the TimedMetadata API as a JSON object. The payload includes a "p" object that stands for participants and an "s" object that represents a sequence ID. Each key within the "p" object represents a participant’s identity and the value contains a JSON object. The JSON object contains a "v" key which represents the participant’s volume level. This option saves space via abbreviated keys but also allows for additions to the payload. Applications are encouraged to inspect a payload’s sequence ID and discard a message payload received out-of-order. The snippet below describes an example payload with two participants.

{
  "s": 23, // sequence id
  "p": {
    "alice" : {"v":300},
    "bob" : {"v":-1} // bob is muted
  }
}

To process this TimedMetadata payload in your client application, observe TimedMetadata events in the Player SDK and parse the TimedMetadata payload as a JSON object.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.

        
        
        

        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. Please select the reason(s) for your feedback or provide additional information about how we can improve:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more