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

Is it possible to set endOffset to media object ?

Open lhanusiak-tcp opened this issue 5 years ago • 1 comments

Hi, Let we say, that we have a long file to play. I would like to instruct device in order to play media in specify range for e.g: from 5s to 55s. I can set startOffset to 5s but it I could not find a way how to set endOffset on media object. Is it possible ?

conv.add(new Media({
    mediaObjects: [
      {
        name: 'Media name',
        description: 'Media description',
        url: 'https://storage.googleapis.com/automotive-media/Jazz_In_Paris.mp3',
        image: {
          large: JAZZ_IN_PARIS_IMAGE,
        }
      }
    ],
    mediaType: 'AUDIO',
    optionalMediaControls: ['PAUSED', 'STOPPED'],
    startOffset: '5.0000001s'.
//    endOffset:  '55.0000001s'.  
  }));

lhanusiak-tcp avatar Dec 11 '20 12:12 lhanusiak-tcp

There is no way, using the media player, to set an end offset. However, you can use SSML to set the beginning and ending of an audio clip.

Fleker avatar Dec 14 '20 18:12 Fleker