1

This was working until a recent firmware update. Since then the stream starts playing and then stops almost immediately.

handlerInput.responseBuilder
      .speak(`starting ${stream.metadata.title}`)
      .addAudioPlayerPlayDirective('REPLACE_ALL', stream.url, stream.token, 0, null, stream.metadata);

    return handlerInput.responseBuilder
RamPrakash
  • 1,687
  • 3
  • 20
  • 25
jblanco813
  • 11
  • 1
  • Maybe a codec support change? You could try encoding your audio source in a different codec to help isolate if it is a codec issue or not. Which Echo device? https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/recommended-media-support.html – Mark Foster Jan 20 '20 at 02:32

1 Answers1

0

The common issues with audioplayer interfaces is the strict audio requirements, this looks the reason of your issue. Make sure to follow all the requirements for audio stream:

-Audio file must be hosted at an Internet-accessible HTTPS endpoint on port 443.
-The web server must present a valid and trusted SSL certificate. Self-signed certificates are not allowed (really important).Many content hosting services provide this. For example, you could host your files at a service such as Amazon Simple Storage Service (Amazon S3) (an Amazon Web Services offering).
-If the stream is a playlist container that references additional streams, each stream within the playlist must also be hosted at an Internet-accessible HTTPS endpoint on 443 with a valid and trusted SSL certificate.
-The supported formats for the audio file include AAC/MP4, MP3, PLS, M3U/M3U8, and HLS. Bitrates: 16kbps to 384 kbps.

This information can be found on the official documentation below: https://developer.amazon.com/en-US/docs/alexa/custom-skills/audioplayer-interface-reference.html#audio-stream-requirements

There is an AudioPlayer sample skill which actually streams from a radio station already to which you can refer. That can be found here: https://github.com/alexa-samples/skill-sample-nodejs-audio-player

You will need to change the url stream and add your own.

Ilyt_A
  • 248
  • 8