Interface VideoController
-
- All Implemented Interfaces:
public interface VideoControllerEntry 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.
-
-
Method Summary
Modifier and Type Method Description abstract UnitsetResizeBehaviour(VideoScalingType type)Controls how the remote video will resize to fit the view. abstract UnitsetLocalVideoResizeBehaviour(VideoScalingType type)Controls how the local video will resize to fit the view. abstract UnittoggleCaptureDevicePosition()Toggles the capture device position. abstract UnitsetRemoteVideoFrameListener(RemoteVideoFrameListener listener)Sets a listener for the remote video frames. abstract UnitsetLocalVideoFrameListener(LocalVideoFrameListener listener)Sets a listener for the local video frames. abstract UnitsetLocalVideoZOrder(Boolean onTopOfRemoteView)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. abstract UnitsetTorchMode(Boolean enabled)Enables / disables flash torch mode during current video session. abstract ViewgetLocalView()A View containing the local user's camera preview. abstract ViewgetRemoteView()A View containing the remote user's camera feed. abstract IntegergetCaptureDevicePosition()The current device facing position, one of Camera.CameraInfo.CAMERA_FACING_FRONT or Camera.CameraInfo.CAMERA_FACING_BACK. abstract UnitsetCaptureDevicePosition(Integer captureDevicePosition)The current device facing position, one of Camera.CameraInfo.CAMERA_FACING_FRONT or Camera.CameraInfo.CAMERA_FACING_BACK. -
-
Method Detail
-
setResizeBehaviour
abstract Unit setResizeBehaviour(VideoScalingType type)
Controls how the remote video will resize to fit the view. The default behaviour is VideoScalingType.ASPECT_FIT.
- Parameters:
type- The scaling type.
-
setLocalVideoResizeBehaviour
abstract Unit setLocalVideoResizeBehaviour(VideoScalingType type)
Controls how the local video will resize to fit the view. The default behaviour is VideoScalingType.ASPECT_FIT.
- Parameters:
type- The scaling type
-
toggleCaptureDevicePosition
abstract Unit 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.
-
setRemoteVideoFrameListener
abstract Unit setRemoteVideoFrameListener(RemoteVideoFrameListener listener)
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.
IMPORTANT: set to null when listener is no longer needed - it will increase performance by eliminating otherwise necessary conversion from captured texture-based frame into memory buffer-backed I420 frame.
- Parameters:
listener- Listener that will be called on each frame from the remote video stream or null to remove any previously assigned listeners.
-
setLocalVideoFrameListener
abstract Unit setLocalVideoFrameListener(LocalVideoFrameListener listener)
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.
- Parameters:
listener- Listener that will be called on each frame captured from camera or null to remove any previously assigned listeners.
-
setLocalVideoZOrder
abstract Unit setLocalVideoZOrder(Boolean onTopOfRemoteView)
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.
- Parameters:
onTopOfRemoteView- If set to false will make remove video rendered on top of preview.
-
setTorchMode
abstract Unit setTorchMode(Boolean enabled)
Enables / disables flash torch mode during current video session. Might be ignored if not available.
- Parameters:
enabled- Sets flash torch mode ON if true.
-
getLocalView
abstract View getLocalView()
A View containing the local user's camera preview.
-
getRemoteView
abstract View getRemoteView()
A View containing the remote user's camera feed.
-
getCaptureDevicePosition
abstract Integer getCaptureDevicePosition()
The current device facing position, one of Camera.CameraInfo.CAMERA_FACING_FRONT or Camera.CameraInfo.CAMERA_FACING_BACK.
-
setCaptureDevicePosition
abstract Unit setCaptureDevicePosition(Integer captureDevicePosition)
The current device facing position, one of Camera.CameraInfo.CAMERA_FACING_FRONT or Camera.CameraInfo.CAMERA_FACING_BACK.
-
-
-
-