assistant-conversation-nodejs
assistant-conversation-nodejs copied to clipboard
Is it possible to set endOffset to media object ?
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'.
}));
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.