Hello guys, welcome to the 23rd session of create custom access key using AWS lambda function tutorial for beginners. In this session we will see how to use video app to write this in our Alexa skill. We do have dot launched directive is used to streaming native video files in English or sport devices. Like audio player in video, we need to specify the URL of the video file. There are certain limitations for the video file such as it should be accessible via HTTPS. Currently, it supports only mp4 or Astra 264 codec.
Maximum resolution it can support is 1200 and 80 pixels. However, it does not support 4k. This video can contain playback controls titles and subtitle we can pause, resume stop and close commands, which will send a request to pose intent top intent reserve intent Better switch to Visual Studio code and modify whiskey. I'm going to add new intent named show video. To execute this intent user may say show video or play video. Let us create a new handler listen to it for a show video intent.
Also create constant for speech and my video player for the title and my favorite track details in the subtitle. Again, I have used s3 bucket to upload the video file Let's face it you are you responsible to generate a response? Use ad video app launch direct your method to add video directly. It will take three parameters video URL, title, and subtitle. here and generating video of directive without checking for supported interfaces. We must need to check that current device supports video playback or not.
For this, we need to check in index dot system dot device dot supported interfaces dot video app if it does not support video and display the message your device does not support video playback and register this handler. Now save the file and deploy a reskin. The need to enable video of interface for this key this interaction model Let us test it in simulator back over ski send requests to show video intent. However we got device does not support the message. The reason for this is that in request object it does not contains video I properties supported interface even after enabling, so we must need to test it in Ico show or spot. I have only ico.pi will be unable to show you it in device.
We do have directive is used to play video on the device. There are several restrictions for supported video format. We need to check for video after Supported interfaces. If the device supports it, then use add video app launch directory method and pass URL of the video file and option title and subtitle for creating metadata object. Thanks for watching this video. If you have any doubts, please feel free to contact me Have a nice day.