Step 2.1: Set Up a Sample Web Player
Although you’ll build a web player later in the integration process (specifically, in Step 5: Build Your Web Player), for now, download a sample web player project to get started and observe the Alexa directives sent to your Lambda. The sample web player includes initiation of video content, basic playback controls, and integration with Alexa Video JavaScript Library. You can download the sample web player here: To set up the sample web player:- Download the sample_web_player.zip and unzip the files.
- If you don’t already have Node JS and npm on your system, install them.
- From the command line, browse to the sample web player directory.
-
Run the following:
-
Then run:
-
Upload the web player onto a web server.
For this sample setup, you can also use the following web player URL:
https://amzndevresources.com/video-skills-kit/sample-web-player/sample_web_player/index.html. This URL simply provides the default web player code in an S3 bucket that is configured as a static website. As desired, update the Web Player URI in the video skill configuration that you performed in Step 1.4: Finish Setting Up Your Video Skill in Step 1.
Step 2.2: Activate the Video Skill on Your Multimodal Device
Now that you’ve set up a video skill and Lambda function, it’s time to test your skill and observe the directives Alexa sends to your Lambda function. For this testing, you will need an actual multimodal device, such as an Echo Show.Step 2.3: Enable Your Skill on an Alexa Device
To test your skill on an Alexa-enabled device:-
Set up and register your multimodal device using the same developer account you used to create your video skill. Note the following:
- If your device is already registered to another user, do a factory reset and register it with your developer account. (Or you can see Deregister a Device to deregister it through amazon.com.)
- You will need the Alexa smartphone app to complete the device setup. If you don’t already have this app, download it and sign in with your developer account.
- Set up your multimodal device (e.g., Echo Show) with your developer account. See Set Up Your Echo Device with a Screen for details.
- Make sure both your Alexa smartphone app and Echo Show device are on the same wifi network.
- Open the Alexa smartphone app on your phone and sign in with the same developer account.
-
Tap Devices
in the bottom navigation bar and then select All Devices. Confirm that your Echo device appears in your app.
The smartphone app can be a bit slow, so if the app doesn’t seem to respond immediately when you press a button, be patient. This slowness will be addressed in an upcoming release.
Your list of devices in the Alexa smartphone app
-
From the app’s home screen, tap the menu button (upper-left corner)
, then tap Settings, then tap TV & Video. Scroll down the list and identify any skills that say “Enabled” under them. If a skill says “Enabled,” click on that skill and then click Disable Skill, so that no TV & Video skills are enabled. (Otherwise, the other skills could interfere with your testing.)
Then click the back arrow at the top to return to the list of TV & Video skills.
Disabling video skills
-
Scroll down the list and look for the video skill you created earlier. It will appear at the bottom. Click the plus button next to your video skill.

Video skills in the Alexa app
-
After clicking your skill to view its details, click Link Your Alexa Device.
A new page opens up in your browser that indicates your skill has been successfully linked.

Your skill has been successfully linked
-
Close this notification window by clicking the X in the upper-left corner of your app. When you close the window, the Alexa app shows the skills linked to your device.
(You can click Save if you want — it’s not necessary.) If you click the back button to go out to the TV & Video skills, you’ll see the word “Enabled” next to your skill:

Your list of linked devices
You’re done with configurations in the Alexa smartphone app. You can click the home button or just close the app.
Your enabled skill. In this example, the name of the enabled skill is "Hawaii Echo".
Step 2.4: Test Your Skill
-
Now that your video skill is associated with your device, turn to your multimodal device and say, “Alexa, go to Video Home.”
The logo image asset for your video skill should appear:
Your video skill logo appears on Video Home
-
Tap on your video skill logo with your finger. This initiates an Alexa
GetDisplayableItemsdirective to get browsable items from the catalog associated with your video skill. Alexa returns a result from your catalog. For example, if you’re using the catalog “hawaii_us” (a sample catalog with Creative Commons assets), the device would show the following:Alexa is now sending directives to your Lambda, and you can see this interaction in Cloudwatch.A thumbnail from your catalog
-
Say to your multimodal device, “Alexa, play the movie Big Buck Bunny.”
The video should play on the device. This content URL is hard-coded into the response’s
playbackContextTokenfor the sample Lambda.Big Buck Bunny playing on Echo Show
Step 2.5: View the Directives Sent to Cloudwatch
When you say phrases to your Alexa-enabled device, these phrases get processed and converted into directives. Directives are information blocks (formatted in JSON) sent from Alexa to your Lambda for processing. You can view the directives that Alexa sends to your Lambda function through Cloudwatch. Cloudwatch is an AWS service that collects monitoring and operational data for Lambda (and other services) in the form of logs, metrics, and events. Each time your Lambda function receives directives from Alexa, you can view the directives and other logs in Cloudwatch. To view the directives received by your Lambda function in Cloudwatch:-
You can navigate to Cloudwatch in two ways:
-
Option 1: From your Lambda function in AWS, click the Monitoring tab. Then click the View logs in Cloudwatch button. This takes you directly to the logs for the Lambda function you were viewing.

Viewing Cloudwatch logs for your Lambda function
- Option 2: Click the Services menu in AWS’s top navigation and select Cloudwatch. Click Logs in the left sidebar. By default, a log appears named after your Lambda function. Select the log containing your Lambda function.
-
Option 1: From your Lambda function in AWS, click the Monitoring tab. Then click the View logs in Cloudwatch button. This takes you directly to the logs for the Lambda function you were viewing.
- Select the latest Log Stream for your logs.
-
Look for a log message that says
Interaction starts. This is the start of the logs for an event that contains a request from Alexa and a response from your Lambda. The sample Lambda code prefaces each event with this message, so this note will appear multiple times.
Cloudwatch logs
-
Expand a log message that contains
Alexa Request: GetPlayableItems. There are actually multiple interactions going on here, someGetDisplayableItemsdirectives and otherGetPlayableItems. First, when when you press your video skill’s logo, this triggers anGetDisplayableItemsdirective from Alexa, but without any specifics about the requested media. Your Lambda responds with items you want the multimodal device to show there. The items are displayed within a browse template provided by multimodal devices. Next, when you say, “Alexa, play the movie Big Buck Bunny,” this triggers aGetPlayableItemsdirective from Alexa. This request contains apayloadwith anentitiesblock with the video the user requested (value: Big Buck Bunny). Try to locate this particular log with the valueBig Buck Bunnyin Cloudwatch. Alexa Directive: GetPlayableItemsWhen users make requests to play movies, Alexa interprets this as a Quick Play scenario and first sends aGetPlayableItemsdirective. Thepayloadin this directive contains the value that Alexa thinks the user is asking for:"value": "Big Buck Bunny". At this point, normally your Lambda code might perform lookups or other queries to figure out what media the user is really asking for. Alexa has just done the job of parsing the user’s utterances into a structured payload for you to handle. If the user had said something more general, such as “Avengers,” you might have to clarify which Avengers movie the user really wants. Or if the user had said, “Play Mozart in the Jungle,” you would need to clarify which season and episode. Your Lambda returns aGetPlayableItemsResponseresponse to Alexa containing all titles in your catalog that match the user’s request. (In the sample Lambda, the response is pre-defined rather than dynamically queried through some backend service.) Expand theLamba Response: GetPlayableItemsResponselog message (under theAlexa Request: GetPlayableItems) to see themediaIdentifierfor the requested media: Lambda Response: GetPlayableItemsResponseIn this case, there’s just onemediaIdentifier, but other scenarios might return more matching titles. At this point, Alexa could ask the user which title the user wants to play. After Alexa knows the right media to play, so it sends another request to your Lambda. This request is aGetPlayableItemsMetadatadirective. This directive asks for the metadata (metadata includes runtime, user’s progress, and other external metadata) for the media returned in your Lambda’sGetPlayableItemsResponse: Alexa Directive: GetPlayableItemsMetadataYour Lambda then performs lookups to gather metadata about this specific video and returns the information in aGetPlayableItemsMetadataResponse: Lambda Response: GetPlayableItemsMetadataResponseNotice theplaybackContextTokenvalue returned here. This value, which is an object containing both astreamUrland atitleparameter) contains a URL to play the video. The multimodal device will send thisplaybackContextTokento your web player, and your web player will begin playing the video. As you can see, the interactions on multimodal devices are quite different from those in the Fire TV app integration. In the Fire TV app integration, your Lambda function sent a brief success message back to Alexa but nothing more. However, with the multimodal device implementation, after your backend services retrieve the right information, you do actually send a detailed response back to Alexa. There are multiple calls back and forth with requests and responses.

