StartAutoMix
https://rtc-api.zego.im/
This document describes how to call the server-side API to specify a Room and automatically mix all audio Streams in the Room. It can be applied to scenarios such as voice chat rooms, chorus, etc.
In cross-room PK connection scenarios, it supports adding a Stream from another Room to participate in automatic Stream Mixing; or removing a Stream from the current Room to not participate in automatic Stream Mixing. For details, please refer to the ExtraMixInput parameter description in the request parameters.
- Currently only supports automatic mixing of
audioStreams. - When Streams are added or removed in the Room later, you don't need to do any processing. ZEGOCLOUD server automatically updates Stream Mixing internally.
For the Stream Mixing function of the "client", please refer to Stream Mixing - Auto Stream Mixing; for related "server" callbacks, please refer to Stream Mixing Started Callback and Stream Mixing Stopped Callback.
Prerequisites
Before implementing Stream Mixing, please ensure:
- You have created a project in the ZEGOCLOUD Console and applied for a valid AppId and ServerSecret. For details, please refer to Console - Project Information.
- You have self-serviced enabled the "Stream Mixing" service permission in the ZEGOCLOUD Console. For details, please refer to Console - Service Configuration - Stream Mixing, or contact ZEGOCLOUD Technical Support to enable it.
- You have initiated publishing and subscribing Streams in the Room through your own client. For details, please refer to Implementing Video Call.
- If you want to automatically create the corresponding Room when it doesn't exist during auto Stream Mixing creation, please contact ZEGOCLOUD Technical Support to enable this feature.
In the test environment (see IsTest common parameter description for details), the Stream IDs of input Streams and output Streams:
- If it is the original Stream ID entered by the developer, you need to add the "zegotest-AppId-" prefix, otherwise the Stream Mixing will fail (the Stream Mixing server cannot pull the input Stream or pull the mixed output Stream). For example, if the developer enters the Stream ID as "test", in the test environment with AppId "123456789", the Stream ID should be "zegotest-123456789-test".
- If it is obtained through SDK interfaces or server-side API interfaces, you don't need to add the "zegotest-AppId-" prefix at this time.
Only some parameters in this interface support dynamic updates after Stream Mixing starts. Parameters not marked do not support dynamic updates. For details, please refer to the parameter descriptions in the table below.
Request
Query Parameters
Possible values: [StartAutoMix]
API Prototype Parameter
https://rtc-api.zego.im?Action=StartAutoMix
💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.
💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.
💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.
💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.
Possible values: [2.0]
Default value: 2.0
💡Public parameter. Signature version number.
- application/json
Responses
- 200
- application/json
