Learn how to use the Google Action Media Response with Jovo.
The Google Action Media Response allows you to play audio content, which is longer than the 240 seconds SSML limit. While using the Media Response, you lose control of the
start over commands, since Google handles these themselves, without your app even receiving the request.
You can access the Media Response features in two ways:
You can check out the official documentation here.
Google Conversational Actions expect a MediaResponse object, which will be shown inside a media card:
Optionally, you can also provide an array of media response objects to
To send the response, you can use either
this.ask(), which have both different use cases.
If you use
this.tell() it will be handled as a final response and you won't receive a callback regarding the media status.
this.ask() on the other hand will keep the session open, so you can receive the callback, but it forces you to add Suggestion Chips to your response.
If you want to access the current progress of the media playback, use
During or after the media plays, your Jovo app can receive the media status as a directive, which have to be placed in either the
'MEDIARESPONSE' or the
'AUDIOPLAYER' directive of your handler.