assistant-conversation-nodejs icon indicating copy to clipboard operation
assistant-conversation-nodejs copied to clipboard

How to disable seeking on media response?

Open shivan opened this issue 5 years ago • 17 comments

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.

shivan avatar Dec 04 '20 07:12 shivan

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.

Fleker avatar Dec 04 '20 16:12 Fleker

@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 avatar Dec 04 '20 17:12 shivan

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 :-(

shivan avatar Dec 16 '20 07:12 shivan

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

Fleker avatar Dec 16 '20 19:12 Fleker

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.

shivan avatar Dec 17 '20 08:12 shivan

TuneIn to my knowledge actually streams radio live.

Fleker avatar Dec 17 '20 18:12 Fleker

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

shivan avatar Dec 18 '20 08:12 shivan

What developer support are you looking for?

Fleker avatar Dec 18 '20 18:12 Fleker

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. :-(

shivan avatar Dec 19 '20 09:12 shivan

I've filed a ticket internally.

Fleker avatar Dec 23 '20 18:12 Fleker

Any news here?

shivan avatar Feb 09 '21 09:02 shivan

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 avatar Feb 10 '21 07:02 shivan

@Fleker do you have any status update on that?

shivan avatar Apr 15 '21 15:04 shivan

I don't have an update to share.

Fleker avatar Apr 16 '21 16:04 Fleker

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.

shivan avatar Sep 01 '21 13:09 shivan

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,

taycaldwell avatar Oct 13 '21 18:10 taycaldwell

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?

shivan avatar Oct 20 '21 16:10 shivan