2

有没有办法使用 nodejs actions sdk 在指定时间段内播放媒体对象?

例如在下面的代码中,文件下面的代码是 1 分 42 秒。但是假设我有一个 60 分钟长的文件,我希望能够将一个参数传递给将指定播放持续时间的对象,该持续时间将小于总持续时间。

function yourFunctionHandler(agent) {
    let conv = agent.conv();
    conv.ask(new SimpleResponse("Here is a funky Jazz tune"));
    conv.ask(new Suggestions(['suggestion 1', 'suggestion 2']));
    conv.close(new MediaObject({
      name: 'Jazz in Paris',
      url: 'https://storage.googleapis.com/automotive-media/Jazz_In_Paris.mp3',
      description: 'A funky Jazz tune',
      icon: new Image({
        url: 'https://storage.googleapis.com/automotive-media/album_art.jpg',
        alt: 'Media icon',
      }),
    }));   }
4

1 回答 1

2

No, there is currently no way to limit the playback from a Media Response to a limited time, to specify a start point in the media, or to specify an end point in the media.

于 2018-12-27T22:42:42.803 回答