public interface

# Videos

com.google.android.gms.games.video.Videos

## Class Overview

Entry point for video functionality.

## Summary

Nested Classes
interface | Videos.CaptureAvailableResult | Result delivered when capture availability is returned by `isCaptureAvailable(GoogleApiClient, int)`.
interface | Videos.CaptureCapabilitiesResult | Result delivered when capture capabilities is returned by `getCaptureCapabilities(GoogleApiClient)`.
interface | Videos.CaptureOverlayStateListener | Listener that will notify about key user interactions with the overlay, such as starting/stopping capture or dismissing the overlay.
interface | Videos.CaptureStateResult | Result delivered when the capture state is returned by `getCaptureState()`.

Constants
int | CAPTURE_OVERLAY_STATE_CAPTURE_STARTED | State used to indicate that the user has initiated capture via the capture overlay.
int | CAPTURE_OVERLAY_STATE_CAPTURE_STOPPED | State used to indicate that the user has stopped capturing via the capture overlay.
int | CAPTURE_OVERLAY_STATE_DISMISSED | State used to indicate that the user has dismissed the capture overlay and it is no longer visible.
int | CAPTURE_OVERLAY_STATE_SHOWN | State used to indicate that the capture overlay is drawn on the screen and visible to the user.

Public Methods
abstract PendingResult<Videos.CaptureCapabilitiesResult> | getCaptureCapabilities(GoogleApiClient apiClient) Fetch the video capabilities of the service, whether the mic or front-facing camera are supported, if the service can write to external storage, and what capture modes and quality levels are available.
abstract Intent | getCaptureOverlayIntent(GoogleApiClient apiClient) Return an intent to launch the capture overlay.
abstract PendingResult<Videos.CaptureStateResult> | getCaptureState(GoogleApiClient apiClient) Fetch the current state of the capture service.
abstract PendingResult<Videos.CaptureAvailableResult> | isCaptureAvailable(GoogleApiClient apiClient, int captureMode) Fetch if the capture service is already in use or not.
abstract boolean | isCaptureSupported(GoogleApiClient apiClient) Synchronous simple check to determine if the device supports capture.
abstract void | registerCaptureOverlayStateChangedListener(GoogleApiClient apiClient, Videos.CaptureOverlayStateListener listener) Register a listener to listen for changes to the overlay state launched by `getCaptureOverlayIntent(GoogleApiClient)`.
abstract void | unregisterCaptureOverlayStateChangedListener(GoogleApiClient apiClient) Unregisters this client's overlay state update listener, if any.

## Constants

#### public static final int CAPTURE_OVERLAY_STATE_CAPTURE_STARTED

State used to indicate that the user has initiated capture via the capture overlay.

Constant Value: 2 (0x00000002)

#### public static final int CAPTURE_OVERLAY_STATE_CAPTURE_STOPPED

State used to indicate that the user has stopped capturing via the capture overlay.

Constant Value: 3 (0x00000003)

#### public static final int CAPTURE_OVERLAY_STATE_DISMISSED

State used to indicate that the user has dismissed the capture overlay and it is no longer visible.

Constant Value: 4 (0x00000004)

#### public static final int CAPTURE_OVERLAY_STATE_SHOWN

State used to indicate that the capture overlay is drawn on the screen and visible to the user.

Constant Value: 1 (0x00000001)

## Public Methods

#### public abstract PendingResult<Videos.CaptureCapabilitiesResult> getCaptureCapabilities (GoogleApiClient apiClient)

Fetch the video capabilities of the service, whether the mic or front-facing camera are supported, if the service can write to external storage, and what capture modes and quality levels are available.

Required API: `API`
Required Scopes: `SCOPE_GAMES`

##### Parameters

apiClient | The `GoogleApiClient` to service the call.

##### Returns

- `PendingResult` to access the data when available.

#### public abstract Intent getCaptureOverlayIntent (GoogleApiClient apiClient)

Return an intent to launch the capture overlay. This will automatically handle any necessary resolution intents.

Required API: `API`
Required Scopes: `SCOPE_GAMES`

##### Parameters

apiClient | The `GoogleApiClient` to service the call.

##### Returns

- `PendingResult` to access the data when available.

#### public abstract PendingResult<Videos.CaptureStateResult> getCaptureState (GoogleApiClient apiClient)

Fetch the current state of the capture service. This will inform about whether the capture overlay is visible, if the overlay is actively being used to capture, and a much more. See `CaptureState` for more details.

Required API: `API`
Required Scopes: `SCOPE_GAMES`

##### Parameters

apiClient | The `GoogleApiClient` to service the call.

##### Returns

- `PendingResult` to access the data when available.

#### public abstract PendingResult<Videos.CaptureAvailableResult> isCaptureAvailable (GoogleApiClient apiClient, int captureMode)

Fetch if the capture service is already in use or not. Use this call to check if a start capture api call will return `STATUS_VIDEO_ALREADY_CAPTURING`. If this return true, then its safe to start capturing.

Do not use this call to check if capture is supported, instead use `isCaptureSupported(GoogleApiClient)` or `getCaptureCapabilities(GoogleApiClient)`.

Required API: `API`
Required Scopes: `SCOPE_GAMES`

##### Parameters

apiClient | The `GoogleApiClient` to service the call.
captureMode | The mode to check availability of. Valid choices are `CAPTURE_MODE_FILE` and `CAPTURE_MODE_STREAM`.

##### Returns

- `PendingResult` to access the data when available.

#### public abstract boolean isCaptureSupported (GoogleApiClient apiClient)

Synchronous simple check to determine if the device supports capture.

Required API: `API`
Required Scopes: `SCOPE_GAMES`

##### Parameters

apiClient | The `GoogleApiClient` to service the call.

##### Returns

- Whether the device supports capture or not.

#### public abstract void registerCaptureOverlayStateChangedListener (GoogleApiClient apiClient, Videos.CaptureOverlayStateListener listener)

Register a listener to listen for changes to the overlay state launched by `getCaptureOverlayIntent(GoogleApiClient)`.

Note that only one overlay state listener may be active at a time. Calling this method while another overlay state listener was previously registered will replace the original listener with the new one.

Required API: `API`
Required Scopes: `SCOPE_GAMES`

##### Parameters

apiClient | The `GoogleApiClient` to service the call.
listener | The listener that is called when the overlay state changes.

#### public abstract void unregisterCaptureOverlayStateChangedListener (GoogleApiClient apiClient)

Unregisters this client's overlay state update listener, if any.

Required API: `API`
Required Scopes: `SCOPE_GAMES`

##### Parameters

apiClient | The `GoogleApiClient` to service the call.