-
- All Implemented Interfaces:
public interface VideoControllerInterface for controlling different video settings. An
VideoControllerobject is only valid while the 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 view will resize to fit the view. abstract UnitsetLocalVideoResizeBehaviour(VideoScalingType type)Controls how the local view 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 remove 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()abstract ViewgetRemoteView()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 view 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 view 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- 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 @param 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- 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 remove 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()
-
getRemoteView
abstract View getRemoteView()
-
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
-
-
-
-