Unity Video SDK API Reference Documentation
Loading...
Searching...
No Matches
ZMVideoSDK Class Reference

Zoom Video SDK API manager. Main singleton object that controls the video session creation, event callbacks and other main features of video SDK. ZoomVideoSDK#initialize(Context, ZoomVideoSDKInitParams). More...

Public Member Functions

void Initialize (ZMVideoSDKInitParams zmVideoSDKInitParams, Action< ZMVideoSDKErrors > callback)
 Initialize the Zoom Video SDK with the appropriate parameters in the ZMVideoSDKInitParams structure.
 
void CleanUp (Action< ZMVideoSDKErrors > callback)
 Clean up ZOOM Video SDK.
 
void AddListener (IZMVideoSDKDelegate videoSDKDelegate)
 Add a listener for session events.
 
void RemoveListener (IZMVideoSDKDelegate videoSDKDelegate)
 Remove a listener for session events.
 
void JoinSession (ZMVideoSDKSessionContext zmVideoSDKSessionContext, Action< ZMVideoSDKErrors > callback)
 Call this method to join a session with the appropriate ZMVideoSDKSessionContext parameters. When seccessful, the SDK will attempt to join a session. Use the callbacks in the listener to confirm whether the SDK actually joined.
 
void LeaveSession (bool end, Action< ZMVideoSDKErrors > callback)
 Call this method to leave a session previously joined through joinSession method call. When successful, the SDK will attempt to leave a session. Use the callbacks in the listener to confirm whether the SDK actually left.
 
ZMVideoSDKSession GetSessionInfo ()
 Returns the current session information.
 
bool IsInSession ()
 Check if there is an active session between participants.
 
string GetSDKVersion ()
 Returns the sdk version.
 
ZMVideoSDKAudioHelper GetAudioHelper ()
 Returns an instance to manage audio controls related to the current video SDK session.
 
ZMVideoSDKVideoHelper GetVideoHelper ()
 Returns an instance to manage cameras and video during a video SDK session.
 
ZMVideoSDKUserHelper GetUserHelper ()
 Returns an instance to manage cameras and video during a video SDK session.
 
ZMVideoSDKChatHelper GetChatHelper ()
 Returns an instance to send and receive chat messages within video SDK session participants.
 
ZMVideoSDKRecordingHelper GetRecordingHelper ()
 
ZMVideoSDKShareHelper GetShareHelper ()
 

Properties

static ZMVideoSDK Instance [get]
 

Private Member Functions

 ZMVideoSDK ()
 

Static Private Member Functions

static ZMVideoSDK ()
 

Static Private Attributes

static readonly ZMVideoSDK instance = new ZMVideoSDK()
 

Detailed Description

Zoom Video SDK API manager. Main singleton object that controls the video session creation, event callbacks and other main features of video SDK. ZoomVideoSDK#initialize(Context, ZoomVideoSDKInitParams).

Definition at line 8 of file ZMVideoSDK.cs.

Constructor & Destructor Documentation

◆ ZMVideoSDK() [1/2]

static ZMVideoSDK.ZMVideoSDK ( )
inlinestaticprivate

Definition at line 21 of file ZMVideoSDK.cs.

22 {
23 }

◆ ZMVideoSDK() [2/2]

ZMVideoSDK.ZMVideoSDK ( )
inlineprivate

Definition at line 25 of file ZMVideoSDK.cs.

26 {
27#if UNITY_STANDALONE_OSX
28 _videoSDK = MacZMVideoSDK.Instance;
29#elif UNITY_ANDROID
30 _videoSDK = AndroidZoomVideoSDK.Instance;
31#elif UNITY_IOS
32 _videoSDK = IOSZMVideoSDK.Instance;
33#elif UNITY_STANDALONE_WIN
34 _videoSDK = WindowsZoomVideoSDK.Instance;
35#else
36 Debug.Log("Platform not supported.");
37#endif
38 }

Member Function Documentation

◆ AddListener()

void ZMVideoSDK.AddListener ( IZMVideoSDKDelegate  videoSDKDelegate)
inline

Add a listener for session events.

Parameters
videoSDKDelegateA listener class that groups together all the callbacks related to a session.

Definition at line 69 of file ZMVideoSDK.cs.

70 {
71 _videoSDK.AddListener(videoSDKDelegate);
72 }

◆ CleanUp()

void ZMVideoSDK.CleanUp ( Action< ZMVideoSDKErrors callback)
inline

Clean up ZOOM Video SDK.

Parameters
[out]callbacka callback function to return the ZMVideoSDKErrors status code of this method.

Definition at line 60 of file ZMVideoSDK.cs.

61 {
62 _videoSDK.Cleanup(callback);
63 }

◆ GetAudioHelper()

ZMVideoSDKAudioHelper ZMVideoSDK.GetAudioHelper ( )
inline

Returns an instance to manage audio controls related to the current video SDK session.

Returns
If the function succeeds, the return value is the audio helper object. Otherwise returns NULL. For more details, see ZMVideoSDKAudioHelper.

Definition at line 142 of file ZMVideoSDK.cs.

143 {
144 ZMVideoSDKAudioHelper helper = _videoSDK.GetAudioHelper();
145 if (helper == null)
146 {
147 throw new NullReferenceException("GetAudioHelper returns null");
148 }
149 return helper;
150 }
Audio control interface SeeZMVideoSDK#GetAudioHelper().

◆ GetChatHelper()

ZMVideoSDKChatHelper ZMVideoSDK.GetChatHelper ( )
inline

Returns an instance to send and receive chat messages within video SDK session participants.

Returns
If the function succeeds, the return value is the chat helper object. Otherwise returns NULL. For more details, see ZMVideoSDKChatHelper.

Definition at line 184 of file ZMVideoSDK.cs.

185 {
186 ZMVideoSDKChatHelper helper = _videoSDK.GetChatHelper();
187 if (helper == null)
188 {
189 throw new NullReferenceException("GetChatHelper returns null");
190 }
191 return helper;
192 }

◆ GetRecordingHelper()

ZMVideoSDKRecordingHelper ZMVideoSDK.GetRecordingHelper ( )
inline

Returns an instance to manage cloud recordings during a video SDK session.

Returns
A ZMVideoSDKRecordingHelper instance.

Definition at line 199 of file ZMVideoSDK.cs.

200 {
201 ZMVideoSDKRecordingHelper helper = _videoSDK.GetRecordingHelper();
202 if (helper == null)
203 {
204 throw new NullReferenceException("GetRecordingHelper returns null");
205 }
206 return helper;
207 }

◆ GetSDKVersion()

string ZMVideoSDK.GetSDKVersion ( )
inline

Returns the sdk version.

Returns
If the function succeeds, the return value is sdk version. Otherwise returns NULL.

Definition at line 133 of file ZMVideoSDK.cs.

134 {
135 return _videoSDK.GetSdkVersion();
136 }

◆ GetSessionInfo()

ZMVideoSDKSession ZMVideoSDK.GetSessionInfo ( )
inline

Returns the current session information.

Returns
If the function succeeds, the return value is the pointer to ZMVideoSDKSession object. Otherwise NULL.

Definition at line 110 of file ZMVideoSDK.cs.

111 {
112 ZMVideoSDKSession info = _videoSDK.GetSessionInfo();
113 if (info == null)
114 {
115 throw new NullReferenceException("GetSessionInfo returns null");
116 }
117 return info;
118 }
Session instance object See ZMVideoSDK#JoinSession(ZMVideoSDKSessionContext).

◆ GetShareHelper()

ZMVideoSDKShareHelper ZMVideoSDK.GetShareHelper ( )
inline

Returns an instance to manage screen sharing during a video SDK session.

Returns
ZoomVideoSDKShareHelper

Definition at line 213 of file ZMVideoSDK.cs.

214 {
215 ZMVideoSDKShareHelper helper = _videoSDK.GetShareHelper();
216 if (helper == null)
217 {
218 throw new NullReferenceException("GetShareHelper returns null");
219 }
220 return helper;
221 }

◆ GetUserHelper()

ZMVideoSDKUserHelper ZMVideoSDK.GetUserHelper ( )
inline

Returns an instance to manage cameras and video during a video SDK session.

Returns
If the function succeeds, the return value is the video helper object. Otherwise returns NULL. For more details, see ZMVideoSDKUserHelper.

Definition at line 170 of file ZMVideoSDK.cs.

171 {
172 ZMVideoSDKUserHelper helper = _videoSDK.GetUserHelper();
173 if (helper == null)
174 {
175 throw new NullReferenceException("GetUserHelper returns null");
176 }
177 return helper;
178 }
User control interface. See ZMVideoSDK#GetUserHelper().

◆ GetVideoHelper()

ZMVideoSDKVideoHelper ZMVideoSDK.GetVideoHelper ( )
inline

Returns an instance to manage cameras and video during a video SDK session.

Returns
If the function succeeds, the return value is the video helper object. Otherwise returns NULL. For more details, see ZMVideoSDKVideoHelper.

Definition at line 156 of file ZMVideoSDK.cs.

157 {
158 ZMVideoSDKVideoHelper helper = _videoSDK.GetVideoHelper();
159 if (helper == null)
160 {
161 throw new NullReferenceException("GetVideoHelper returns null");
162 }
163 return helper;
164 }
An interface to control video and manage cameras during a video session. See ZMVideoSDK#GetVideoHelpe...

◆ Initialize()

void ZMVideoSDK.Initialize ( ZMVideoSDKInitParams  zmVideoSDKInitParams,
Action< ZMVideoSDKErrors callback 
)
inline

Initialize the Zoom Video SDK with the appropriate parameters in the ZMVideoSDKInitParams structure.

Parameters
[out]zmVideoSDKInitParamsParameters for init zoom video sdk. For more details, see ZMVideoSDKInitParams structure.
[out]callbacka callback function to return the ZMVideoSDKErrors status code of this method.

Definition at line 52 of file ZMVideoSDK.cs.

53 {
54 _videoSDK.Initialize(zmVideoSDKInitParams, callback);
55 }

◆ IsInSession()

bool ZMVideoSDK.IsInSession ( )
inline

Check if there is an active session between participants.

Returns
True if there is; False if not

Definition at line 124 of file ZMVideoSDK.cs.

125 {
126 return _videoSDK.IsInSession();
127 }

◆ JoinSession()

void ZMVideoSDK.JoinSession ( ZMVideoSDKSessionContext  zmVideoSDKSessionContext,
Action< ZMVideoSDKErrors callback 
)
inline

Call this method to join a session with the appropriate ZMVideoSDKSessionContext parameters. When seccessful, the SDK will attempt to join a session. Use the callbacks in the listener to confirm whether the SDK actually joined.

Parameters
[out]zmVideoSDKSessionContextThe parameter is used to join session. For more details, see ZMVideoSDKSessionContext structure.
[out]callbacka callback function to return the ZMVideoSDKErrors status code of this method.

Definition at line 89 of file ZMVideoSDK.cs.

90 {
91 _videoSDK.JoinSession(zmVideoSDKSessionContext, callback);
92 }

◆ LeaveSession()

void ZMVideoSDK.LeaveSession ( bool  end,
Action< ZMVideoSDKErrors callback 
)
inline

Call this method to leave a session previously joined through joinSession method call. When successful, the SDK will attempt to leave a session. Use the callbacks in the listener to confirm whether the SDK actually left.

Parameters
[out]endTrue if the host should end the entire session, or False if the host should just leave the session.
[out]callbacka callback function to return the ZMVideoSDKErrors status code of this method.

Definition at line 100 of file ZMVideoSDK.cs.

101 {
102 _videoSDK.LeaveSession(end, callback);
103 }

◆ RemoveListener()

void ZMVideoSDK.RemoveListener ( IZMVideoSDKDelegate  videoSDKDelegate)
inline

Remove a listener for session events.

Parameters
videoSDKDelegateA listener class that groups together all the callbacks related to a session.

Definition at line 78 of file ZMVideoSDK.cs.

79 {
80 _videoSDK.RemoveListener(videoSDKDelegate);
81 }

Field Documentation

◆ instance

readonly ZMVideoSDK ZMVideoSDK.instance = new ZMVideoSDK()
staticprivate

Definition at line 10 of file ZMVideoSDK.cs.

Property Documentation

◆ Instance

ZMVideoSDK ZMVideoSDK.Instance
staticget

Definition at line 39 of file ZMVideoSDK.cs.

40 {
41 get
42 {
43 return instance;
44 }
45 }
static readonly ZMVideoSDK instance
Definition ZMVideoSDK.cs:10