AVS Device SDK Video Device Control
This page provides information to implement and use video device control (VDC) with the Alexa Voice Service (AVS) Device SDK. For code and full implementation details, see the AVS Device SDK on GitHub or the AVS Device SDK API references.
Video device control allows users to control devices and consume video content without invoking a specific skill. For example, the customer can ask Alexa the following without specifying a video device or content provider:
Alexa, play Jack Ryan.
Alexa, start recording.
A VDC-enabled device supports the following actions:
- Search and play video content
- Control playback
- Navigate playback
- Record currently playing content
- Schedule a recording in the future
- Launch an application or a GUI shortcut
- Tune to a specific channel on their entertainment device
You can read more about the interfaces that allow controlling a video experience on the following pages:
Enable VDC in the IPC Server Sample App
VDC is an optional feature in the IPC Server Sample App, and is disabled by default.
To enable VDC capabilities, you should use the same set of CMake parameters when building the AVS Device SDK and the IPC Server Sample App.
-DENABLE_ALL_VIDEO_CONTROLLERS=ON CMake parameter is a blanket parameter that adds all the VDC capabilities. You can also use CMake parameters individually to enable the
ChannelController capabilities. You can specify which capabilities to add by setting the appropriate parameters. For example,
Use all controllers except the
-DENABLE_ALL_VIDEO_CONTROLLERS=ON \ -DVIDEO_CONTROLLERS_ALEXA_KEYPAD_CONTROLLER=OFF
-DVIDEO_CONTROLLERS_ALEXA_LAUNCHER=ON \ -DVIDEO_CONTROLLERS_ALEXA_RECORD_CONTROLLER=ON
The sample CMake command to build the AVS Device SDK and IPC Server Sample App with all the VDC capabilities is as follows.
cmake [absolute path to source] ... -DENABLE_ALL_VIDEO_CONTROLLERS=ON
For each VDC controller capability agent, the AVS Decice SDK provides an API contract. By implementing this interface in an endpoint handler, you can build a video device that's capable of performing an action when the device is invoked by the corresponding capability agent.
The following diagram shows the role of the endpoint handler. The endpoint handler is registered with the capability agent, and its methods are called from within the capability agent when your device receives a directive. Depending on the contract, the endpoint handler is also responsible for notifying the capability agent when user interaction such as using a remote control changes the application state.
For example, by implementing the
RemoteVideoPlayerInterfaces, the video device can start playing a video when the
AlexaRemoteVideoPlayer capability agent receives the
SearchAndPlay directive. A sample stub implementation is available on Github.
Another example is about using the interface for a state change observer for the
AlexaLauncher. You can implement the
AlexaLauncherObserverInterface methods in the observer registered with the endpoint handler.
Integrate VDC with a video device
For example, to build a device that launches applications and handles video playback including search, play, pause, resume, and stop, you could integrate the
- Use the
Launcherto open the device Settings or applications, such as Prime Video.
- Use the
RemoteVideoPlayerto search and play content.
- Use the
PlaybackControllerto pause, play, fast forward, rewind, stop, resume and start over content. By enabling the
PlaybackStateReporter, your device can report the current playback state (
STOPPED) of the video device to Alexa.
PlaybackController endpoint handler interfaces. For the
RemoteVideoPlayer, update the
getConfiguration method to return the appropriate configuration. This consists of the supported directives, entity types and catalog information. For more details about the
RemoteVideoPlayer configuration, refer to the Configurations object in the