ZegoMixerTask
ZegoMixerTask
Mix stream task object.
Details
This class is the configuration class of the stream mixing task. When a stream mixing task is requested to the ZEGO RTC server, the configuration of the stream mixing task is required. This class describes the detailed configuration information of this stream mixing task.
Declared in entity/ZegoMixerTask.java
Properties
taskID
private String taskIDMix stream task ID
audioConfig
videoConfig
inputList
outputList
watermark
whiteboard
backgroundColor
public int backgroundColorMix stream background color, The color value corresponding to RGBA is 0xRRGGBBAA, and setting the transparency of the background color is currently not supported. The AA in 0xRRGGBBAA is 00. For example, select RGB as #87CEFA as the background color, this parameter passes 0x87CEFA00.
backgroundImageURL
public String backgroundImageURLMix stream background image URL
soundLevel
public boolean soundLevelEnable or disable sound level callback for the task. If enabled, then the remote player can get the soundLevel of every stream in the inputlist by [onMixerSoundLevelUpdate] callback.
streamAlignmentMode
private ZegoStreamAlignmentMode streamAlignmentModeThe stream mixing alignment mode
userData
public ByteBuffer userDataUser data, the length of user data should not be more than 1000 bytes,After setting, the streaming party can obtain the SEI content by listening to the callback of [onPlayerRecvSEI]. it must be created using the [ByteBuffer. Allocatedirect] function, otherwise the data cannot be transferred to the SDK.
userDataLength
public int userDataLengthUser data length, not greater than 1000. that only data with length will be read by SDK. If the length is greater than the actual length of data, the SDK will read the data according to the actual length of data.
advancedConfig
public HashMap<String, String> advancedConfigSet advanced configuration, such as specifying video encoding and others. If you need to use it, contact ZEGO technical support.
minPlayStreamBufferLength
public int minPlayStreamBufferLengthSets the lower limit of the interval range for the adaptive adjustment of the stream playing cache of the stream mixing server. In the real-time chorus KTV scenario, slight fluctuations in the network at the push end may cause the mixed stream to freeze. At this time, when the audience pulls the mixed stream, there is a high probability of the problem of freeze. By adjusting the lower limit of the interval range for the adaptive adjustment of the stream playing cache of the stream mixing server, it can optimize the freezing problem that occurs when playing mixing streams at the player end, but it will increase the delay. It is not set by default, that is, the server uses its own configuration values. It only takes effect for the new input stream setting, and does not take effect for the input stream that has already started mixing.Value Range: [0,10000], exceeding the maximum value will result in a failure of the stream mixing request. On web platforms, this property does not take effect.
mixImageCheckMode
public ZegoMixImageCheckMode mixImageCheckModeSet the mixed stream image check mode.
Methods
ZegoMixerTask
public ZegoMixerTask(String taskID)entity/ZegoMixerTask.javagetTaskID
public void String getTaskID()entity/ZegoMixerTask.javasetInputList
public void setInputList(ArrayList<ZegoMixerInput> inputList)entity/ZegoMixerTask.javasetOutputList
public void setOutputList(ArrayList<ZegoMixerOutput> outputList)entity/ZegoMixerTask.javasetAudioConfig
public void setAudioConfig(ZegoMixerAudioConfig config)entity/ZegoMixerTask.javasetVideoConfig
public void setVideoConfig(ZegoMixerVideoConfig config)entity/ZegoMixerTask.javasetBackgroundColor
public void setBackgroundColor(int backgroundColor)entity/ZegoMixerTask.javasetBackgroundImageURL
public void setBackgroundImageURL(String backgroundImageURL)entity/ZegoMixerTask.javasetWatermark
public void setWatermark(ZegoWatermark watermark)entity/ZegoMixerTask.javasetWhiteboard
public void setWhiteboard(ZegoMixerWhiteboard whiteboard)entity/ZegoMixerTask.javaenableSoundLevel
public void enableSoundLevel(boolean enable)entity/ZegoMixerTask.javasetStreamAlignmentMode
public void setStreamAlignmentMode(ZegoStreamAlignmentMode mode)entity/ZegoMixerTask.javasetUserData
public void setUserData(ByteBuffer data, int length)entity/ZegoMixerTask.javasetAdvancedConfig
public void setAdvancedConfig(HashMap<String, String> advancedConfig)entity/ZegoMixerTask.javasetMinPlayStreamBufferLength
public void setMinPlayStreamBufferLength(int minPlayStreamBufferLength)entity/ZegoMixerTask.javasetMixImageCheckMode
public void setMixImageCheckMode(ZegoMixImageCheckMode mixImageCheckMode)entity/ZegoMixerTask.java