sinch-rtc

# VideoController

interface VideoController

Entry point for controlling different video settings. A VideoController object is only valid while the connected SinchClient is started. As soon as the SinchClient is stopped, this object is invalidated and must not be used.

## Functions

setLocalVideoFrameListener
Link copied to clipboard
abstract fun setLocalVideoFrameListener(listener: LocalVideoFrameListener?)

Sets a listener for the local video frames. If listener is set, frames are not sent to remote side directly. Instead, LocalVideoFrameListener is called, and processed frame should be returned via ProcessedVideoFrameListener interface.

setLocalVideoResizeBehaviour
Link copied to clipboard
abstract fun setLocalVideoResizeBehaviour(type: VideoScalingType)

Controls how the local video will resize to fit the view. The default behaviour is VideoScalingType.ASPECT_FIT.

setLocalVideoZOrder
Link copied to clipboard
abstract fun setLocalVideoZOrder(onTopOfRemoteView: Boolean)

Sets whether local video (preview from camera) should be rendered on top of remote video view (default behaviour) or vice versa in case views are overlapping.

setRemoteVideoFrameListener
Link copied to clipboard
abstract fun setRemoteVideoFrameListener(listener: RemoteVideoFrameListener?)

Sets a listener for the remote video frames. Blocks rendering. In-place modification of provided I420 frame would affect rendering. If heavy operation is required, which does not affect rendering, e.g. saving screen-shot in JPEG - spawn a work thread and work with a copy of the frame. See VideoUtils for I420 into NV21 conversion.

setResizeBehaviour
Link copied to clipboard
abstract fun setResizeBehaviour(type: VideoScalingType)

Controls how the remote video will resize to fit the view. The default behaviour is VideoScalingType.ASPECT_FIT.

setTorchMode
Link copied to clipboard
abstract fun setTorchMode(enabled: Boolean)

Enables / disables flash torch mode during current video session. Might be ignored if not available.

toggleCaptureDevicePosition
Link copied to clipboard
abstract fun toggleCaptureDevicePosition()

Toggles the capture device position. If current facing position is Camera.CameraInfo.CAMERA_FACING_FRONT, sets it to Camera.CameraInfo.CAMERA_FACING_BACK. If current facing position is Camera.CameraInfo.CAMERA_FACING_BACK, sets it to Camera.CameraInfo.CAMERA_FACING_FRONT.

## Properties

captureDevicePosition
Link copied to clipboard
abstract var captureDevicePosition: Int

The current device facing position, one of Camera.CameraInfo.CAMERA_FACING_FRONT or Camera.CameraInfo.CAMERA_FACING_BACK.

localView
Link copied to clipboard
abstract val localView: View?

A View containing the local user's camera preview.

remoteView
Link copied to clipboard
abstract val remoteView: View?

A View containing the remote user's camera feed.