ZegoRangeSceneStream
ZegoRangeSceneStream
Declared in ZegoExpressDefines.h
Methods
setEventHandler:
- (BOOL)setEventHandler:(nullable id<ZegoRangeSceneStreamEventHandler>) handler;ZegoExpressDefines.hParameters
| Name | Type | Description |
|---|---|---|
| handler | nullable id<ZegoRangeSceneStreamEventHandler> | The object used to receive range scene stream callbacks. |
Details
Set the callback function of the range scene stream module.
- When to call: After getting range scene stream instance by [getRangeSceneStream].
- Available since: 3.0.0
Return
The result of set range scene stream event handler, true: success, false: fail.
setReceiveRange:
- (int)setReceiveRange:(float) range;ZegoExpressDefines.hParameters
| Name | Type | Description |
|---|---|---|
| range | float | The range distance from the center point of the person. |
Details
This interface will set the receiving range of audio and video streams, and ZEGO SDK will actively playing the streams of users in this range.
- When to call: After [getRangeSceneStream].
- Default value: The default value of receive range is 0.0 .
- Caution: None.
- Restrictions: None.
Return
Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details.
setReceiveRangeWithParam:
- (int)setReceiveRangeWithParam:(ZegoReceiveRangeParam *) param;ZegoExpressDefines.hParameters
| Name | Type | Description |
|---|---|---|
| param | ZegoReceiveRangeParam * | The configuration of audio receiving range. |
Details
This interface will set the receiving range of audio and video streams, and ZEGO SDK will actively playing the streams of users in this range.
- When to call: After [getRangeSceneStream].
- Default value: The default value of receive range is 0.0 .
- Caution: None.
- Restrictions: None.
Return
Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details.
enableRangeSpatializer:
- (int)enableRangeSpatializer:(BOOL) enable;ZegoExpressDefines.hParameters
| Name | Type | Description |
|---|---|---|
| enable | BOOL | Whether to turn 3D spatial sound on, true: enable, false: disable. |
Details
After it is turned on, the audio of non-team members in the world will change spatially with the distance and direction from the person.
- When to call: After [getRangeSceneStream].
- Default value: Disable.
- Caution: None.
- Restrictions: Media volume is required to use 3D spatial sound.
Return
Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details.
mutePlayAudio:mute:
- (int)mutePlayAudio:(NSString *) userID mute:(BOOL) mute;ZegoExpressDefines.hParameters
| Name | Type | Description |
|---|---|---|
| userID | NSString * | User ID. |
| mute | BOOL | true: do not receive the user's audio stream, false: receive the user's audio stream. |
Details
Set whether to receive the audio data of the specified user.
- When to call: After [LoginScene], before [LogoutScene].
- Default value: Receive.
- Caution: None.
- Restrictions: None.
Return
Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details.
mutePlayVideo:mute:
- (int)mutePlayVideo:(NSString *) userID mute:(BOOL) mute;ZegoExpressDefines.hParameters
| Name | Type | Description |
|---|---|---|
| userID | NSString * | User ID. |
| mute | BOOL | true: do not receive the user's video stream, false: receive the user's video stream. |
Details
After it is turned on, the audio of non-team members in the world will change spatially with the distance and direction from the person.
- When to call: After [LoginScene], before [LogoutScene].
- Default value: Receive.
- Caution: None.
- Restrictions: None.
Return
Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details.
