Video SDK for iOS API Reference
Loading...
Searching...
No Matches
ZoomVideoSDKAudioHelper Class Reference

A class to operate audio actions. More...

#include <ZoomVideoSDKAudioHelper.h>

Inherits NSObject.

Instance Methods

(ZoomVideoSDKError- startAudio
 Starts audio.
 
(ZoomVideoSDKError- stopAudio
 Stops audio.
 
(ZoomVideoSDKError- muteAudio:
 Mutes the user's audio.
 
(ZoomVideoSDKError- unmuteAudio:
 Asks to unmute the user's audio.
 
(ZoomVideoSDKError- muteAllAudio:
 Mutes all users' VOIP audio except self.
 
(ZoomVideoSDKError- allowAudioUnmutedBySelf:
 Allows others to unmute themselves or not.
 
(ZoomVideoSDKError- unmuteAllAudio
 Asks to unmute all users' VOIP audio.
 
(ZoomVideoSDKError- subscribe
 Subscribes to audio raw data.
 
(ZoomVideoSDKError- unSubscribe
 Unsubscribes from audio raw data.
 
(BOOL) - resetAudioSession
 Resets the audio session including category and mode for ZoomVideoSDK audio session environment when developer changes audio session in session.
 
(BOOL) - setSDKAudioSessionEnv
 Sets the AVAudioSession environment for Zoom Video SDK session.
 
(void) - cleanAudioSession
 Cleans the audio session including category and mode.
 
(ZoomVideoSDKAudioDevice *_Nullable) - getCurrentAudioOutputRoute
 Gets the current audio output port description.
 
(BOOL) - setAudioOutputRoute:
 Sets the audio output device.
 
(NSArray< ZoomVideoSDKAudioDevice * > *_Nullable) - getAvailableAudioOutputRoute
 Gets the available audio output port descriptions.
 
(BOOL) - showAudioOutputDeviceAirPlayPicker:
 Displays the system AirPlay picker.
 
(ZoomVideoSDKAudioDevice *_Nullable) - getCurrentAudioInputDevice
 Gets the current audio input device.
 
(NSArray< ZoomVideoSDKAudioDevice * > *_Nullable) - getAvailableAudioInputsDevice
 Gets the list of available audio input devices.
 
(BOOL) - setAudioInputDevice:
 Sets the audio input device.
 

Detailed Description

A class to operate audio actions.

Definition at line 32 of file ZoomVideoSDKAudioHelper.h.

Method Documentation

◆ allowAudioUnmutedBySelf:

- (ZoomVideoSDKError) allowAudioUnmutedBySelf: (BOOL) allowUnmute

Allows others to unmute themselves or not.

Parameters
allowUnmuteYES to allow users to unmute themselves, NO otherwise.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Only host or manager can change this property.

◆ cleanAudioSession

- (void) cleanAudioSession

Cleans the audio session including category and mode.

Warning
SDK will restore audio session status after session end. If developer calls overrideOutputAudioPort interface with AVAudioSessionPortBuiltInSpeaker in AVAudioSessionCategoryPlayAndRecord category before join session, then SDK cannot restore audio session BuiltInSpeaker output when session ends.
Deprecated
No longer maintained.

◆ getAvailableAudioInputsDevice

- (NSArray< ZoomVideoSDKAudioDevice * > *_Nullable) getAvailableAudioInputsDevice

Gets the list of available audio input devices.

Returns
If the function succeeds, it returns an NSArray of ZoomVideoSDKAudioDevice objects for available audio input devices. Otherwise, this function fails and returns nil.

◆ getAvailableAudioOutputRoute

- (NSArray< ZoomVideoSDKAudioDevice * > *_Nullable) getAvailableAudioOutputRoute

Gets the available audio output port descriptions.

Returns
If the function succeeds, it returns an NSArray of ZoomVideoSDKAudioDevice objects for available audio output port descriptions. Otherwise, this function fails and returns nil.

◆ getCurrentAudioInputDevice

- (ZoomVideoSDKAudioDevice *_Nullable) getCurrentAudioInputDevice

Gets the current audio input device.

Returns
If the function succeeds, it returns a ZoomVideoSDKAudioDevice object. Otherwise, this function fails and returns nil.

◆ getCurrentAudioOutputRoute

- (ZoomVideoSDKAudioDevice *_Nullable) getCurrentAudioOutputRoute

Gets the current audio output port description.

Returns
If the function succeeds, it returns a ZoomVideoSDKAudioDevice object. Otherwise, this function fails and returns nil.

◆ muteAllAudio:

- (ZoomVideoSDKError) muteAllAudio: (BOOL) allowUnmute

Mutes all users' VOIP audio except self.

Parameters
allowUnmuteYES to allow users to unmute themselves, NO otherwise.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Only host or manager can mute all users' audio.

◆ muteAudio:

- (ZoomVideoSDKError) muteAudio: (ZoomVideoSDKUser *_Nullable) user

Mutes the user's audio.

Parameters
userThe user whose audio will be muted. Use nil to mute self.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Only host or manager can mute others audio.

◆ resetAudioSession

- (BOOL) resetAudioSession

Resets the audio session including category and mode for ZoomVideoSDK audio session environment when developer changes audio session in session.

Returns
If the function succeeds, it returns YES. Otherwise, NO.
Deprecated
Use setSDKAudioSessionEnv instead.

◆ setAudioInputDevice:

- (BOOL) setAudioInputDevice: (ZoomVideoSDKAudioDevice *_Nullable) device

Sets the audio input device.

Parameters
deviceThe device to set as the audio input.
Returns
If the function succeeds, it returns YES. Otherwise, NO.

◆ setAudioOutputRoute:

- (BOOL) setAudioOutputRoute: (ZoomVideoSDKAudioDevice *_Nullable) device

Sets the audio output device.

Parameters
deviceThe device to set as the audio output.
Returns
If the function succeeds, it returns YES. Otherwise, NO.

◆ setSDKAudioSessionEnv

- (BOOL) setSDKAudioSessionEnv

Sets the AVAudioSession environment for Zoom Video SDK session.

Returns
If the function succeeds, it returns YES. Otherwise, NO.
Warning
If developer changes AVAudioSession for special needs in SDK session, it will cause the audio output abnormal. Then developer can set SDK AVAudioSession environment.

◆ showAudioOutputDeviceAirPlayPicker:

- (BOOL) showAudioOutputDeviceAirPlayPicker: (UIView *_Nullable) parentView

Displays the system AirPlay picker.

Parameters
parentViewThe parent view where the AirPlay picker will be shown.
Returns
If the function succeeds, it returns YES. Otherwise, NO.

◆ startAudio

- (ZoomVideoSDKError) startAudio

Starts audio.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ stopAudio

- (ZoomVideoSDKError) stopAudio

Stops audio.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ subscribe

- (ZoomVideoSDKError) subscribe

Subscribes to audio raw data.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Please check the callback "- (void)onMixedAudioRawDataReceived:(ZoomVideoSDKAudioRawData *)rawData".
Please check the callback "- (void)onOneWayAudioRawDataReceived:(ZoomVideoSDKAudioRawData *)rawData user:(ZoomVideoSDKUser *)user".

◆ unmuteAllAudio

- (ZoomVideoSDKError) unmuteAllAudio

Asks to unmute all users' VOIP audio.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Only host or manager can ask to unmute all users' audio.
This function will trigger the callback onHostAskUnmute.

◆ unmuteAudio:

- (ZoomVideoSDKError) unmuteAudio: (ZoomVideoSDKUser *_Nullable) user

Asks to unmute the user's audio.

Parameters
userThe user whose audio will be unmuted. Use nil to unmute self.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Only host or manager can unmute others audio.
This function will trigger the callback onHostAskUnmute.

◆ unSubscribe

- (ZoomVideoSDKError) unSubscribe

Unsubscribes from audio raw data.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Please check the callback "- (void)onMixedAudioRawDataReceived:(ZoomVideoSDKAudioRawData *)rawData".
Please check the callback "- (void)onOneWayAudioRawDataReceived:(ZoomVideoSDKAudioRawData *)rawData user:(ZoomVideoSDKUser *)user".