Package

## Interface VideoController

- All Implemented Interfaces:

      public interface VideoController

  Interface for controlling different video settings. An `VideoController` object is only valid while the SinchClient is started. As soon as the SinchClient is stopped, this object is invalidated and must not be used.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract Unit` | `setResizeBehaviour(VideoScalingType type)` | Controls how the remote view will resize to fit the view.
    `abstract Unit` | `setLocalVideoResizeBehaviour(VideoScalingType type)` | Controls how the local view will resize to fit the view.
    `abstract Unit` | `toggleCaptureDevicePosition()` | Toggles the capture device position.
    `abstract Unit` | `setRemoteVideoFrameListener(RemoteVideoFrameListener listener)` | Sets a listener for the remote video frames.
    `abstract Unit` | `setLocalVideoFrameListener(LocalVideoFrameListener listener)` | Sets a listener for the local video frames.
    `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.
    `abstract Unit` | `setTorchMode(Boolean enabled)` | Enables / disables flash torch mode during current video session.
    `abstract View` | `getLocalView()` |
    `abstract View` | `getRemoteView()` |
    `abstract Integer` | `getCaptureDevicePosition()` | The current device facing position, one of Camera.CameraInfo.CAMERA_FACING_FRONT or Camera.CameraInfo.CAMERA_FACING_BACK
    `abstract Unit` | `setCaptureDevicePosition(Integer captureDevicePosition)` | The current device facing position, one of Camera.CameraInfo.CAMERA_FACING_FRONT or Camera.CameraInfo.CAMERA_FACING_BACK

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

  - ### 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