we are currently playing around with newly launched https://developers.google.com/actions/reference/rest/Shared.Types/AppResponse#mediaresponse
According to documentation we will receive a final Response after media is finished playing. This works well in simulator but on mobile devices and speakers it works intermittently
We only get this call back 2 or 3 times and sometimes never get it on either devices. As it works few times we are sure it's just google engine but want to make sure we are not doing anything wrong ourselves.
I am using my own backend and have our engine (Action SDK). I am expecting this response when playback finishes, but I only get this intermittently:
{
"user": {
"userId": "user-id",
"accessToken": "access-token",
"locale": "en-US",
"lastSeen": "2018-03-18T17:44:51Z"
},
"conversation": {
"conversationId": "1521395430917",
"type": "ACTIVE",
"conversationToken": "42"
},
"inputs": [{
"intent": "actions.intent.MEDIA_STATUS",
"rawInputs": [{}],
"arguments": [{
"name": "MEDIA_STATUS",
"extension": {
"@type": "type.googleapis.com/google.actions.v2.MediaStatus",
"status": "FINISHED"
}
}]
}],
"surface": {
"capabilities": [
{"name": "actions.capability.SCREEN_OUTPUT"},
{"name": "actions.capability.AUDIO_OUTPUT"},
{"name": "actions.capability.WEB_BROWSER"},
{"name": "actions.capability.MEDIA_RESPONSE_AUDIO"}
]
},
"isInSandbox": true,
"availableSurfaces": [
{"capabilities": [
{"name": "actions.capability.SCREEN_OUTPUT"}, {"name": "actions.capability.AUDIO_OUTPUT"}
]}
]
}
That does appear to be a bug on Google's end. You should fill out a support form and specify
- Your project id
- That this is a bug report
- That this is with the Action SDK
- That you are not receiving the MEDIA_STATUS event when you are expecting it to
- Exactly what it sounds like from the user side (what does the user hear? The audio ends and then what?)
来源:https://stackoverflow.com/questions/49360353/google-action-mediaresponse-not-working-on-some-devices