logo
On this page

ZegoRangeSceneStream

ZegoRangeSceneStream

Declared in ZegoExpressDefines.h

Methods

setEventHandler:

setEventHandler:
- (BOOL)setEventHandler:(nullable id<ZegoRangeSceneStreamEventHandler>) handler;
set range scene stream event handler.
Declared in ZegoExpressDefines.h

Parameters

NameTypeDescription
handlernullable 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:

setReceiveRange:
- (int)setReceiveRange:(float) range;
Set the receiving range of audio and video streams.
Declared in ZegoExpressDefines.h

Parameters

NameTypeDescription
rangefloatThe 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:

setReceiveRangeWithParam:
- (int)setReceiveRangeWithParam:(ZegoReceiveRangeParam *) param;
Set the receiving range of audio and video streams.
Declared in ZegoExpressDefines.h

Parameters

NameTypeDescription
paramZegoReceiveRangeParam *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:

enableRangeSpatializer:
- (int)enableRangeSpatializer:(BOOL) enable;
Turn 3D spatial sound on or off.
Declared in ZegoExpressDefines.h

Parameters

NameTypeDescription
enableBOOLWhether 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:

mutePlayAudio:mute:
- (int)mutePlayAudio:(NSString *) userID mute:(BOOL) mute;
Set whether to receive the audio data of the specified user.
Declared in ZegoExpressDefines.h

Parameters

NameTypeDescription
userIDNSString *User ID.
muteBOOLtrue: 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:

mutePlayVideo:mute:
- (int)mutePlayVideo:(NSString *) userID mute:(BOOL) mute;
Set whether to receive the video data of the specified user.
Declared in ZegoExpressDefines.h

Parameters

NameTypeDescription
userIDNSString *User ID.
muteBOOLtrue: 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.

Previous

zegorangesceneitemeventhandler

Next

zegorangescenestreameventhandler

On this page

Back to top