You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To begin using video with Calling, you will need to know how to manage devices. Devices allow you to control what transmits Audio and Video to the call.
12
11
13
-
`DeviceManager` lets you enumerate local devices that can be used in a call to transmit your audio/video streams. It also allows you to request permission from a user to access their microphone and camera using the native browser API.
12
+
To use video with Calling, you need to manage devices. Using devices enables you to control what transmits Audio and Video to the call.
14
13
15
-
You can access `deviceManager` by calling `callClient.getDeviceManager()` method.
14
+
The `DeviceManager` object enables you to enumerate local devices to use in a call to transmit your audio/video streams. It also enables you to request permission from a user to access their microphone and camera using the native browser API.
15
+
16
+
To access `deviceManager`, call the `callClient.getDeviceManager()` method.
You can use `DeviceManager` and `Renderer` to begin rendering streams from your local camera. This stream won't be sent to other participants; it's a local preview feed. This is an asynchronous action.
34
+
You can use `DeviceManager` and `Renderer` to begin rendering streams from your local camera. This stream isn't sent to other participants. It's a local preview feed. Rendering a stream is an asynchronous action.
34
35
35
36
```java
36
37
VideoDeviceInfo videoDevice =<get-video-device>; // See the `Enumerate local devices` topic above
@@ -53,16 +54,14 @@ layout.addView(uiView);
53
54
```
54
55
55
56
## Place a 1:1 call with video camera
57
+
56
58
> [!WARNING]
57
-
> Currently only one outgoing local video stream is supported
58
-
To place a call with video you have to enumerate local cameras using the `deviceManager``getCameras` API.
59
-
Once you select a desired camera, use it to construct a `LocalVideoStream` instance and pass it into `videoOptions`
60
-
as an item in the `localVideoStream` array to a `call` method.
61
-
Once the call connects it will automatically start sending a video stream from the selected camera to other participant(s).
59
+
> Currently only one outgoing local video stream is supported. To place a call with video, you must enumerate local cameras using the `deviceManager``getCameras` API.
60
+
> Once you select a camera, use it to construct a `LocalVideoStream` instance and pass it into `videoOptions` as an item in the `localVideoStream` array to a `call` method. Once the call connects, it automatically starts sending a video stream from the selected camera to other participants.
62
61
63
62
> [!NOTE]
64
-
> Due to privacy concerns, video will not be shared to the call if it is not being previewed locally.
65
-
See [Local camera preview](#local-camera-preview) for more details.
63
+
> Due to privacy concerns, video isn't shared to the call if it isn't previewed locally.
64
+
> For more information, see [Local camera preview](#local-camera-preview).
66
65
67
66
```java
68
67
VideoDeviceInfo desiredCamera =<get-video-device>; // See the `Enumerate local devices` topic above
To start a video, you have to enumerate cameras using the `getCameraList`API on `deviceManager` object. Then create a new instance of `LocalVideoStream` passing the desired camera, and pass it in the `startVideo` API as an argument:
94
+
To start a video, you must enumerate cameras using the `getCameraList`operation on `deviceManager` object. Then create a new instance of `LocalVideoStream` passing the desired camera, and pass it in the `startVideo` API as an argument:
96
95
97
96
```java
98
97
VideoDeviceInfo desiredCamera =<get-video-device>; // See the `Enumerate local devices` topic above
@@ -142,7 +141,7 @@ To render a `RemoteVideoStream` from a remote participant, you have to subscribe
142
141
143
142
Within the event, the change of `isAvailable` property to true indicates that remote participant is currently sending a stream. Once that happens, create new instance of a `Renderer`, then create a new `RendererView` using asynchronous `createView` API and attach `view.target` anywhere in the UI of your application.
144
143
145
-
Whenever availability of a remote stream changes you can choose to destroy the whole Renderer, a specific `RendererView` or keep them, but this will result in displaying blank video frame.
144
+
Whenever availability of a remote stream changes you can choose to destroy the whole `Renderer`, a specific `RendererView` or keep them, but results in displaying blank video frame.
* Create a `VideoStreamRendererView` instance that can be later attached in the application UI to render remote video stream.
187
-
```java
188
-
// Create a view for a video stream
189
-
VideoStreamRendererView.createView()
190
-
```
191
-
* Dispose renderer and all `VideoStreamRendererView` associated with this renderer. To be called when you have removed all associated views from the UI.
192
-
```java
193
-
VideoStreamRenderer.dispose()
194
-
```
188
+
The `Renderer` object uses the following methods.
195
189
196
-
*`StreamSize` - size (width/height) of a remote video stream
The created RendererView can then be attached to the application UI using the following snippet:
222
+
213
223
```java
214
224
layout.addView(rendererView);
215
225
```
216
226
217
-
You can later update the scaling mode by invoking `updateScalingMode` API on the RendererView object with one of ScalingMode.CROP | ScalingMode.FIT as an argument.
218
-
```java
219
-
// Update the scale mode for this view.
220
-
rendererView.updateScalingMode(ScalingMode.CROP)
227
+
You can later update the scaling mode using the `updateScalingMode` operation on the `RendererView` object with an argument of either `ScalingMode.CROP` or `ScalingMode.FIT`.
To begin using video with Calling, you will need to know how to manage devices. Devices allow you to control what transmits Audio and Video to the call.
12
11
13
-
`DeviceManager` lets you enumerate local devices that can be used in a call to transmit audio or video streams. It also allows you to request permission from a user to access a microphone or camera. You can access `deviceManager` on the `callClient` object.
12
+
To begin using video with Calling, you need to know how to manage devices. Devices enable you to control what transmits Audio and Video to the call.
13
+
14
+
`DeviceManager` lets you enumerate local devices that can be used in a call to transmit audio or video streams. It also enables you to request permission from a user to access a microphone or camera. You can access `deviceManager` on the `callClient` object.
14
15
15
16
```swift
16
17
self.callClient!.getDeviceManager { (deviceManager, error) in
You can use `Renderer` to begin rendering a stream from your local camera. This stream won't be sent to other participants; it's a local preview feed. This is an asynchronous action.
38
+
You can use `Renderer` to begin rendering a stream from your local camera. This stream isn't to other participants; it's a local preview feed. This is an asynchronous action.
38
39
39
40
```swift
40
41
let camera: VideoDeviceInfo =self.deviceManager!.cameras.first!
0 commit comments