Google\handler.js events -- known behavior?

google-assistant

#1

I know Google internally handles audio-playback things like stop, pause, andresume, so we don’t (and can’t) get events for those operations.

However, I’m a bit confused about how, or whether, it handles next and previous.

When I say next, I’m getting GoogleAction.Finished. Now, admittedly, we happen to have implemented that as “advance to the next episode”, on the assumption that we were going to get that event when we reached the end of playback – but that’s a rather backhanded way to implement Next.

And when I say previous… as far as I can tell so far, I’m not getting any events at all, though I may (?) be restarting playback of this MP3.

Is that really the way the Jovo podcast player example (which I adapted this code from) is supposed to work on Google Assistant? I can work around it by always saying “Ask to…”, as I have to for the custom intents specific to my application, but if Google can’t handle non-prefixed commands correctly it probably shouldn’t be accepting them…

(Basically, do I grumble at Google, at you folks, do I ask you folks to grumble at Google, or is the Google support just inadequate for my application?)

((I’m also getting a surprising number of Google requests mis-routed to DateIntent, which may be a weakness in DialogFlow.))

======================================================
The answer appears to be that Google can provide events when MediaResponses have FINISHED, PAUSED, STOPPED, and FAILED. The Jovo sample podcast player only supports the last. It isn’t at all clear whether Jovo is routing PAUSED and STOPPED to FINISHED internally, or if it’s throwing away PAUSED and STOPPED and only giving us the co-occurring FINISHED.

Either way, PLEASE change Jovo to let us create our own bindings for these events! I can’t imagine it would be difficult, since you’re already handling FINISHED. You could code it so the current behavior remains the default unless we do provide bindings, if you’re worried about the change breaking existing users.

Re the rest of my question: As far as I can tell, NEXT being taken as FINISHED is a hardwired Google behavior, and Google really doesn’t have default support for PREVIOUS. They do support RESTART as a hardwired command, but I don’t know whether that generates any events.

So, yeah, Google Assistant’s non-prefixed context-sensitive command support is a lot thinner than Alexa’s. My Google users will just have to accept saying “ask [mySkillName] to…” rather than having the shortcuts, unless Google exposes a way to let us define our own non-prefixed/context-sensitive commands.

Well, that’s one reason I’m putting this onto GitHub; hopefully some expert Google Assistant coders will see it and help us figure out how to do it better.

==============================================
And apparently, the additional Google media status events may not be available if we’re using Dialogflow. We apparently need to upgrade to the newer grammar engine (I forget its name) if we want these.

That being the case, it would have been nice if the Jovo samples had been updated to not send us down the Dialogflow path… Oh Well. Yet another thing I’m going to have to rewrite.