ZegoRangeAudio Class Reference
Inherits from | NSObject |
---|---|
Declared in | ZegoExpressDefines.h |
– setEventHandler:
The object used to receive range audio callbacks.
- (void)setEventHandler:(nullable id<ZegoRangeAudioEventHandler>)handler
Parameters
handler |
The object used to receive range audio callbacks. |
---|
Declared In
ZegoExpressDefines.h
– setAudioReceiveRange:
the audio range, the value must be greater than or equal to 0.
- (void)setAudioReceiveRange:(float)range
Parameters
range |
the audio range, the value must be greater than or equal to 0. |
---|
Declared In
ZegoExpressDefines.h
– setAudioReceiveRangeWithParam:
Configuration of audio receiving range.
- (int)setAudioReceiveRangeWithParam:(ZegoReceiveRangeParam *)param
Parameters
param |
Configuration of audio receiving range. |
---|
Return Value
Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details.
Declared In
ZegoExpressDefines.h
– setPositionUpdateFrequency:
the frequency, the value must be greater than 15 ms.
- (void)setPositionUpdateFrequency:(int)frequency
Parameters
frequency |
the frequency, the value must be greater than 15 ms. |
---|
Declared In
ZegoExpressDefines.h
– setRangeAudioVolume:
volume, [0,200].
- (void)setRangeAudioVolume:(int)volume
Parameters
volume |
volume, [0,200]. |
---|
Declared In
ZegoExpressDefines.h
– setStreamVocalRange:vocalRange:
play stream id
- (void)setStreamVocalRange:(NSString *)streamID vocalRange:(float)vocalRange
Parameters
streamID |
play stream id |
---|---|
vocalRange |
Flow sound range. |
Declared In
ZegoExpressDefines.h
– setStreamVocalRangeWithParam:param:
play stream id
- (int)setStreamVocalRangeWithParam:(NSString *)streamID param:(ZegoVocalRangeParam *)param
Parameters
streamID |
play stream id |
---|---|
param |
Flow sound range. |
Return Value
Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details.
Declared In
ZegoExpressDefines.h
– updateStreamPosition:position:
play stream id.
- (void)updateStreamPosition:(NSString *)streamID position:(float [ _Nonnull 3 ])position
Parameters
streamID |
play stream id. |
---|---|
position |
The unit vector of the front axis of its own coordinate system. The parameter is a float array with a length of 3. The three values represent the front, right, and top coordinate values in turn. |
Declared In
ZegoExpressDefines.h
– updateSelfPosition:axisForward:axisRight:axisUp:
The coordinates of the oneself in the world coordinate system. The parameter is a float array of length 3. The three values represent the front, right, and top coordinate values in turn.
- (void)updateSelfPosition:(float [ _Nonnull 3 ])position axisForward:(float [ _Nonnull 3 ])axisForward axisRight:(float [ _Nonnull 3 ])axisRight axisUp:(float [ _Nonnull 3 ])axisUp
Parameters
position |
The coordinates of the oneself in the world coordinate system. The parameter is a float array of length 3. The three values represent the front, right, and top coordinate values in turn. |
---|---|
axisForward |
The unit vector of the front axis of its own coordinate system. The parameter is a float array with a length of 3. The three values represent the front, right, and top coordinate values in turn. |
axisRight |
The unit vector of the right axis of its own coordinate system. The parameter is a float array with a length of 3. The three values represent the front, right, and top coordinate values in turn. |
axisUp |
The unit vector of the up axis of its own coordinate system. The parameter is a float array with a length of 3. The three values represent the front, right, and top coordinate values in turn. |
Declared In
ZegoExpressDefines.h
– updateAudioSource:position:
The userID of the sound source.
- (void)updateAudioSource:(NSString *)userID position:(float [ _Nonnull 3 ])position
Parameters
userID |
The userID of the sound source. |
---|---|
position |
The coordinates of the speaker in the world coordinate system. The parameter is a float array of length 3. The three values represent the front, right, and top coordinate values in turn. |
Declared In
ZegoExpressDefines.h
– enableSpatializer:
Whether to enable 3D sound effects.
- (void)enableSpatializer:(BOOL)enable
Parameters
enable |
Whether to enable 3D sound effects. |
---|
Declared In
ZegoExpressDefines.h
– enableMicrophone:
Whether to turn on the microphone.
- (void)enableMicrophone:(BOOL)enable
Parameters
enable |
Whether to turn on the microphone. |
---|
Declared In
ZegoExpressDefines.h
– enableSpeaker:
Whether to turn on the speaker.
- (void)enableSpeaker:(BOOL)enable
Parameters
enable |
Whether to turn on the speaker. |
---|
Declared In
ZegoExpressDefines.h
– setRangeAudioMode:
The range audio mode.
- (void)setRangeAudioMode:(ZegoRangeAudioMode)mode
Parameters
mode |
The range audio mode. |
---|
Declared In
ZegoExpressDefines.h
– setRangeAudioCustomMode:listenMode:
The range audio speak mode.
- (void)setRangeAudioCustomMode:(ZegoRangeAudioSpeakMode)speakMode listenMode:(ZegoRangeAudioListenMode)listenMode
Parameters
speakMode |
The range audio speak mode. |
---|---|
listenMode |
The range audio listening mode. |
Declared In
ZegoExpressDefines.h
– setTeamID:
Team ID, empty to exit the team, a string of up to 64 bytes in length. Support numbers, English characters and ‘~’, ‘!’, ‘@’, ‘#’, ‘$’, ‘%’, ‘^’, ‘&’, ‘*’, ‘(’, ‘)’, ‘_’, ‘+’, ‘=’, ‘-’, ‘`’, ‘;’, ‘’’, ‘,’, ‘.’, ‘<’, ‘>’, ‘\’.
- (void)setTeamID:(NSString *)teamID
Parameters
teamID |
Team ID, empty to exit the team, a string of up to 64 bytes in length. Support numbers, English characters and ‘~’, ‘!’, ‘@’, ‘#’, ‘$’, ‘%’, ‘^’, ‘&’, ‘*’, ‘(’, ‘)’, ‘_’, ‘+’, ‘=’, ‘-’, ‘`’, ‘;’, ‘’’, ‘,’, ‘.’, ‘<’, ‘>’, ‘\’. |
---|
Declared In
ZegoExpressDefines.h
– muteUser:mute:
User ID.
- (void)muteUser:(NSString *)userID mute:(BOOL)mute
Parameters
userID |
User ID. |
---|---|
mute |
Whether it can receive the audio data of the specified remote user, “YES” means prohibition, “NO” means receiving, the default value is “NO”. |
Declared In
ZegoExpressDefines.h
+ new
Please use the [createRangeAudio] function in ZegoExpressEngine class instead.
+ (instancetype)new
Declared In
ZegoExpressDefines.h
– init
Please use the [createRangeAudio] function in ZegoExpressEngine class instead.
- (instancetype)init
Declared In
ZegoExpressDefines.h