Stack Overflow: A New Way for Developers to Get Support for Alexa

Now you can find Alexa-specific tags and topics in the AWS Collective on Stack Overflow. Ask questions and get help from badged experts and the Alexa developer community!

question

newuser-c27b02d7-20bc-4b65-b3c0-8458a3ab5b41 avatar image

Alexa APL skill sporadically has trouble loading video

We maintain a skill (https://www.amazon.com/EarthCam/dp/B07HCPJN35) that allows live streams to be called up from various places around the world - originally we used VideoApp for the video player, but when APL became available we switched to that instead since it gave a bit more control over the look (including allowing a watermark to be displayed).


Sometime after that (don't have the exact timing, unfortunately, but I don't believe it was happening within the first couple of months the skill was updated), said skill began having issues with intermittently refusing to return a stream when called up, instead simply showing the black background of the APL document for the video player until the skill times out.

Since no explicit Alexa or device error is returned, and it acts similarly to what happens when the stream takes a short while to load in (just without that 'loading in' part), I believe this issue is specific to the stream call itself rather than a breaking error happening in the APL document.

It usually tends to happen after calling up a number of different camera streams in a row, or after running a particular stream for a while, but there doesn't seem to be any hard-and-fast rules about what seems to cause the problem. And once the skill times out or is explicitly closed, and is restarted, the streams will start working again.


Here's a generalized version of the APL video document - let us know if you want a more specific version sent privately (or the skill id):

https://gist.github.com/Kram42/bf2ebc54c4591695643224b207c9159d


Would there be any possibility of something being caused by calling up a number of APL video documents in a row (or running one for a while) - don't know if something from the older documents or streams would remain in memory and cause a slowdown over time? We're also looking into whether there might be something between the Alexa device and our streaming server that might be causing the issue.

alexa skills kitaplvideo
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Alexander Martin avatar image
Alexander Martin answered

Hi,


I've skimmed your APL document and found a few errors, for example: "type": "sendEvent", correct would be "SendEvent", also the properties background-color and align-text do not exist in the context of APL, correct would be backgroundColor and textAlign, but these errors should not be your main problem because the document can be loaded in principle. In APL there is the disallowVideo environment variable: https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-video.html#devices-that-dont-support-video here you can check if video playback is generally possible on the device, but you can also check the same in your skill backend via the context.Viewport.video property: https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-interface.html#video-properties


Do you hear the speech output that you perform via the SpeakItem command in your onMount handler before you start the video? What do your DataSources/Transformers look like?


Regards,

Alex

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.