I am trying to add an intent to alexa skill that can play video courses. I am facing an issue and need your help with that.
Here, My video URL is not the direct link for the video file but it is an API URL that Streams media content that matches the streaming white list, if it’s not in the white list it will return a Json object. Requires security token to be passed in Authorization header or Cookie. White listed extensions are: .webm, .avi, .mp4, .3gp, .flv, .mov, .jpg, .pdf, .docx
Also, I am trying to see if I can play the video from the place where user stopped in the previous run.
I tried the below code, but I am getting the error "Here is your video. Sorry, something went wrong".
const VIDEO_URL = 'https://abcd.net/apis/VideoID/content', VIDEO_TITLE = "main title", VIDEO_SUBTITLE = "Sub title"
handlerInput.responseBuilder.addVideoAppLaunchDirective(VIDEO_URL, VIDEO_TITLE, VIDEO_SUBTITLE);
return handlerInput.responseBuilder.speak('Here is your video').getResponse();
How can I pass access token in Authorization header or Cookie while passing video URL in this case ? Or, how should I proceed to play this video on echo show ? Can you please give me example code ?