Alexa video with APL


#1

I have an application that plays podcast and show videos with APL. i can access the media player throught this.$alexaSkill.$audioPlayer and play/stop it and some other stuff in the respective PauseIntent and ResumeIntent, But I’m not able to do the same with video as I don’t have an object to access the video player.
I have try accesing the video object on the apl docuement and repaint the controls and everything for stop. It works but when resuming the video starts over because autoplay = true is setted in order to change the pause toggle button.
Does anyone has an idea on how to accomplish the apl video to behaves as the audio player?


#2

I worked on an APL project two years ago with very low-level video components.

As far as I remember, APL commands would work here: https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-commands-media.html


#3

Hello Alex. thanks for the reply. Yeah I can access the the intent when I say pause or resume.
The thing is that I dont have an object to pause at that point or to resume. So the question is now. I have to send the command for example:
{
“type”: “ControlMedia”,
“componentId”: “myAudioPlayer”,
“command”: “pause”
}
? or how does this works?
If I have to send this event how do I implement this on jovo? send request maybe?


#4

I think it’s:

 this.$alexaSkill!.addAPLCommands('token', [
      {
           "type": "ControlMedia",
           "componentId": "myAudioPlayer",
           "command": "pause"
      }
])

#5

Hey Alex. I tried to use the above example, but seems to not work for me, I have a few questions about it.
Does the token needs to be Dynamic?
The video player has an id, I’m using it, I’m also watching the requests on the logs:

{
    "version": "1.0",
    "response": {
        "directives": [
            {
                "type": "Alexa.Presentation.APL.ExecuteCommands",
                "token": "token",
                "commands": [
                    {
                        "type": "ControlMedia",
                        "componentId": "videoPlayerId",
                        "command": "pause"
                    }
                ]
            }
        ]
    },
    "sessionAttributes": {}
}

But the video simply continues and is never paused.