actions-on-google / assistant-conversation-nodejs

A developer friendly way to fulfill Actions SDK handlers for the Google Assistant
https://actions-on-google.github.io/assistant-conversation-nodejs
Apache License 2.0
104 stars 38 forks source link

How to disable seeking on media response? #17

Open shivan opened 4 years ago

shivan commented 4 years ago

How can I disable seeking on media responses? So the user cannot seek forward/backwards in the current playing track?

This is how I currently do it:

conv.add(new Media({
        mediaObjects: [{
        name: 'Trance Track 1',
        description: 'Media description',
        url: 'https://my-url.de/Trance1.mp3',
        image: {
          large: new Image({
            url: 'https://somewhere/whateverimage.jpg',
            alt: 'my image here'
          })
        }
    }],
        mediaType: MediaType.Audio,
        optionalMediaControls: [OptionalMediaControl.Paused, OptionalMediaControl.Stopped],
        startOffset: '0s'
    }));

I didn't find anything in the documentations on https://developers.google.com/assistant/conversational/prompts-media

Also didn't find anything on stackoverflow and didn't get any answer on stackoverflow, yet: https://stackoverflow.com/questions/65039702/how-to-disable-manual-seeking-on-google-actions-assistant-conversations-media

So my last option is to ask here.

Fleker commented 4 years ago

Is there a strict need for the user to be unable to seek? Potentially you can use a livestream of an mp3 rather than a static media file, which would make the content play as if it was live.

shivan commented 4 years ago

@Fleker, yes, there is a strict need, as it will be an action for a radio station but the files are static media files.

shivan commented 3 years ago

Any news here? Or any other suggestions than streaming? Because seeking by code at the start should be possible, but not by the user. This is because it simulates radio streaming and should start at the same offset where the current "stream" is.

I also asked here: https://stackoverflow.com/questions/65039702/how-to-disable-manual-seeking-on-google-actions-assistant-conversations-media

But no solution, yet :-(

Fleker commented 3 years ago

From my understanding sending a standard media file will always show seeking.

shivan commented 3 years ago

But how does tunein and the others solve this - do all a "real" stream? For example SWR1 - there is no "live" icon like on tunein so is this still a stream?

We would really need to disable seeking, as this is a licensing limitation.

Fleker commented 3 years ago

TuneIn to my knowledge actually streams radio live.

shivan commented 3 years ago

Mhm... what can I do? As far as I know, there is no Developer Support contact mail address.

Fleker commented 3 years ago

What developer support are you looking for?

shivan commented 3 years ago

Like amazon is providing direct support for alexa skill developers in a ticketing system. Which such a support I was able to solve several problems with alexa already. For example devices behaving different or other problems.

Because without being able to disable seeking we cannot use google assistant. :-(

Fleker commented 3 years ago

I've filed a ticket internally.

shivan commented 3 years ago

Any news here?

shivan commented 3 years ago

Additionally I would need to disallow "next" (and "previous"). As skipping to the next track must be prevented, too. (later I should be able to enable track skipping but with a very complex rule set)

shivan commented 3 years ago

@Fleker do you have any status update on that?

Fleker commented 3 years ago

I don't have an update to share.

shivan commented 3 years ago

Hello @Fleker , and now? How could we get forward here?

Streaming isn't an alternative, as it has two problems: 1) Metadata for changing tracks will not be shown 2) the player uses "Content-Length" as stream length, this cannot be disabled.

It would be nice to hear from you.

taycaldwell commented 3 years ago

Hello @shivan,

Unfortunately, the Media response API does not support the features you are requesting (i.e. disable seeking, prevent skip track, skip track w/ complex rule set, etc.).

To get a full overview on what features Media response provides, as well as it's limitations, please refer to our documentation: https://developers.google.com/assistant/conversational/prompts-media

As @Fleker mentioned previously, we have filed tickets for the feature requests you are suggesting here and in https://github.com/actions-on-google/assistant-conversation-nodejs/issues/31.

Best,

shivan commented 3 years ago

Thanks for your answer. Would be nice to have those features implemented.

@Fleker or @taycaldwell How does spotify work? As they have skipping policies (only x skips left), they seem to have a possibility to interact with the skipping intent by code. How is this done?