You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def play_later(url, card_data, response_builder):
"""Play the stream later.
https://developer.amazon.com/docs/custom-skills/audioplayer-interface-reference.html#play
REPLACE_ENQUEUED: Replace all streams in the queue. This does not impact the currently playing stream.
"""
# type: (str, Dict, ResponseFactory) -> Response
if card_data:
# Using URL as token as they are all unique
response_builder.add_directive(
PlayDirective(
play_behavior=PlayBehavior.REPLACE_ENQUEUED,
audio_item=AudioItem(
stream=Stream(
token=url,
url=url,
offset_in_milliseconds=0,
expected_previous_token=None),
metadata=add_screen_background(card_data)))
).set_should_end_session(True)
return response_builder.response
The above function will return an invalid response if card_data is empty. The function should still return a valid response.
The text was updated successfully, but these errors were encountered:
The above function will return an invalid response if
card_data
is empty. The function should still return a valid response.The text was updated successfully, but these errors were encountered: