Unity Video SDK API Reference Documentation
Loading...
Searching...
No Matches
ZMVideoSDKVideoHelper.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
10{
11
12#if UNITY_STANDALONE_OSX
13 private MacZMVideoSDKVideoHelper _videoSDKVideoHelper = null;
14 public ZMVideoSDKVideoHelper(MacZMVideoSDKVideoHelper videoSDKVideoHelper)
15 {
16 _videoSDKVideoHelper = videoSDKVideoHelper;
17 }
18#elif UNITY_IOS
19 private IOSZMVideoSDKVideoHelper _videoSDKVideoHelper = null;
20 public ZMVideoSDKVideoHelper(IOSZMVideoSDKVideoHelper videoSDKVideoHelper)
21 {
22 _videoSDKVideoHelper = videoSDKVideoHelper;
23 }
24#elif UNITY_ANDROID
25 private AndroidZoomVideoSDKVideoHelper _videoSDKVideoHelper = null;
26 public ZMVideoSDKVideoHelper(AndroidJavaObject videoSDKVideoHelper)
27 {
28 AndroidZoomVideoSDKVideoHelper androidVideoHelper = new AndroidZoomVideoSDKVideoHelper(videoSDKVideoHelper);
29 _videoSDKVideoHelper = androidVideoHelper;
30 }
31
32 public AndroidZoomVideoSDKVideoHelper VideoSDKVideoHelper
33 {
34 get { return _videoSDKVideoHelper; }
35 }
36#elif UNITY_STANDALONE_WIN
37 private WindowsZoomVideoSDKVideoHelper _videoSDKVideoHelper = null;
38 public ZMVideoSDKVideoHelper(WindowsZoomVideoSDKVideoHelper videoSDKVideoHelper)
39 {
40 _videoSDKVideoHelper = videoSDKVideoHelper;
41 }
42#endif
43
48 public void StartVideo(Action<ZMVideoSDKErrors> callback)
49 {
50 _videoSDKVideoHelper.StartVideo(callback);
51 }
52
57 public void StopVideo(Action<ZMVideoSDKErrors> callback)
58 {
59 _videoSDKVideoHelper.StopVideo(callback);
60 }
61
67 public void RotateMyVideo(ZMVideoRotation rotation, Action<bool> callback)
68 {
69 _videoSDKVideoHelper.RotateMyVideo(rotation, callback);
70 }
71
76 public void SwitchCamera(Action<bool> callback)
77 {
78 _videoSDKVideoHelper.SwitchCamera(callback);
79 }
80
85 public uint GetNumberOfCameras()
86 {
87 return _videoSDKVideoHelper.GetNumberOfCameras();
88 }
89
94 public List<ZMVideoSDKCameraDevice> GetCameraList()
95 {
96 return _videoSDKVideoHelper.GetCameraList();
97 }
98
106 public (ZMVideoSDKErrors, bool) CanControlCamera(string deviceID)
107 {
108 return _videoSDKVideoHelper.CanControlCamera(deviceID);
109 }
110
118 public ZMVideoSDKErrors TurnCameraLeft(uint range, string deviceID)
119 {
120 return _videoSDKVideoHelper.TurnCameraLeft(range, deviceID);
121 }
122
130 public ZMVideoSDKErrors TurnCameraRight(uint range, string deviceID)
131 {
132 return _videoSDKVideoHelper.TurnCameraRight(range, deviceID);
133 }
134
142 public ZMVideoSDKErrors TurnCameraUp(uint range, string deviceID)
143 {
144 return _videoSDKVideoHelper.TurnCameraUp(range, deviceID);
145 }
146
154 public ZMVideoSDKErrors TurnCameraDown(uint range, string deviceID)
155 {
156 return _videoSDKVideoHelper.TurnCameraDown(range, deviceID);
157 }
158
166 public ZMVideoSDKErrors ZoomCameraIn(uint range, string deviceID)
167 {
168 return _videoSDKVideoHelper.ZoomCameraIn(range, deviceID);
169 }
170
178 public ZMVideoSDKErrors ZoomCameraOut(uint range, string deviceID)
179 {
180 return _videoSDKVideoHelper.ZoomCameraOut(range, deviceID);
181 }
182
189 public void SetVideoQualityPreference(ZMVideoSDKPreferenceSetting preferenceSetting, Action<ZMVideoSDKErrors> callback)
190 {
191 _videoSDKVideoHelper.SetVideoQualityPreference(preferenceSetting, callback);
192 }
193
201 public bool EnableMultiStreamVideo(string cameraDeviceID, string customDeviceName)
202 {
203 return _videoSDKVideoHelper.EnableMultiStreamVideo(cameraDeviceID, customDeviceName);
204 }
205
211 public bool DisableMultiStreamVideo(string cameraDeviceID)
212 {
213 return _videoSDKVideoHelper.DisableMultiStreamVideo(cameraDeviceID);
214 }
215
221 public string GetDeviceIDByMyPipe(ZMVideoSDKRawDataPipe zmVideoSDKRawDataPipe)
222 {
223 return _videoSDKVideoHelper.GetDeviceIDByMyPipe(zmVideoSDKRawDataPipe);
224 }
225
226 /* todo
227 - (ZMVideoSDKErrors)startVideoPreview:(id<IZMVideoSDKRawDataPipeDelegate>)listener deviceID:(NSString*)cameraDeviceID;
228 - (ZMVideoSDKErrors)stopVideoPreview:(id<IZMVideoSDKRawDataPipeDelegate>)listener;
229 */
230
235 public bool IsMyVideoMirrored()
236 {
237 return _videoSDKVideoHelper.IsMyVideoMirrored();
238 }
239
245 {
246 return _videoSDKVideoHelper.IsOriginalAspectRatioEnabled();
247 }
248
255 public void EnableOriginalAspectRatio(bool bEnabled, Action<bool> callback)
256 {
257 _videoSDKVideoHelper.EnableOriginalAspectRatio(bEnabled, callback);
258 }
259
265 public bool SelectCamera(string cameraDeviceID)
266 {
267 return _videoSDKVideoHelper.SelectCamera(cameraDeviceID);
268 }
269
270}
ZMVideoSDKErrors
ZMVideoRotation
Interface for user to subscribe@unSubscribe video raw data. ZMVideoSDKUser#GetVideoPipe().
An interface to control video and manage cameras during a video session. See ZMVideoSDK#GetVideoHelpe...
void StopVideo(Action< ZMVideoSDKErrors > callback)
Call this method to stop sending local video data from the camera.
ZMVideoSDKErrors ZoomCameraIn(uint range, string deviceID)
Zoom the camera in.
ZMVideoSDKErrors TurnCameraUp(uint range, string deviceID)
Tilt the camera up.
void StartVideo(Action< ZMVideoSDKErrors > callback)
Call this method to start sending local video data from the camera.
ZMVideoSDKErrors TurnCameraLeft(uint range, string deviceID)
Pan the camera to the left.
ZMVideoSDKErrors ZoomCameraOut(uint range, string deviceID)
Zoom the camera out.
ZMVideoSDKErrors TurnCameraRight(uint range, string deviceID)
Pan the camera to the right.
List< ZMVideoSDKCameraDevice > GetCameraList()
Returns a collection of camera devices available to share the video as an object of type WebCamDevice...
bool IsOriginalAspectRatioEnabled()
Check if original aspect ratio is enabled.
void SwitchCamera(Action< bool > callback)
Switch to the next available camera.
void SetVideoQualityPreference(ZMVideoSDKPreferenceSetting preferenceSetting, Action< ZMVideoSDKErrors > callback)
Automatically adjust user's video resolution and frame-rate.
bool DisableMultiStreamVideo(string cameraDeviceID)
Disable multiple stream video.
uint GetNumberOfCameras()
Returns number of cameras available to share the video.
void RotateMyVideo(ZMVideoRotation rotation, Action< bool > callback)
Call this method to rotate the video when the device is rotated.
bool SelectCamera(string cameraDeviceID)
This function is used to select the camera device.
bool CanControlCamera(string deviceID)
string GetDeviceIDByMyPipe(ZMVideoSDKRawDataPipe zmVideoSDKRawDataPipe)
Get the device ID associated with my multi-camera pipe.
ZMVideoSDKErrors
Check whether the current user has permission to control the camera.
bool EnableMultiStreamVideo(string cameraDeviceID, string customDeviceName)
Enable multiple stream video if you have multiple cameras and other participants can see multiple vid...
void EnableOriginalAspectRatio(bool bEnabled, Action< bool > callback)
This function is used to set the aspect ratio of the video sent out.
bool IsMyVideoMirrored()
Check if my video is mirrored.
ZMVideoSDKErrors TurnCameraDown(uint range, string deviceID)
Tilt the camera down.