bst icon indicating copy to clipboard operation
bst copied to clipboard

audioPlayer token not passed through on some events

Open joecaine opened this issue 5 years ago • 0 comments

Description:

We use the Audio Player in our skill. The Audio Player token is an important part of our application state that we use to implement playlist functionality.

Whereas the token is passed through on subsequent requests correctly for AMAZON.NextIntent requests for example, it is not on AudioPlayer.PlaybackNearlyFinished and PlaybackController.NextCommandIssued (that I know of) when writing bespoken unit tests.

As a result our skill throws an error internally.

I appreciate that most skills don't use the AudioPlayer API so it would be good to know if this is something we can expect to see fixed.

Environment:

  • Version: ^2.4.88
  • Node version: 12.18.3

Steps To Reproduce

This works:

- test: Next
- LaunchRequest:
- AMAZON.NextIntent:
  - response.directives[0].type: AudioPlayer.Play
  - response.directives[0].playBehavior: REPLACE_ALL
  - response.directives[0].audioItem.stream.token: "1234"
  - sessionEnded: true

This does not work:

- test: PlaybackNearlyFinished
- LaunchRequest:
- AudioPlayer.PlaybackNearlyFinished:
  - response.directives[0].type: AudioPlayer.Play
  - response.directives[0].playBehavior: REPLACE_ALL
  - response.directives[0].audioItem.stream.token: "1234"
  - sessionEnded: true

Expected behavior

The audio player token is passed through on all request types on bespoken unit tests

Actual behavior

The token is only passed into subsequent requests on certain request types

joecaine avatar Dec 09 '20 11:12 joecaine