Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Is it possible to set endOffset to media object ? #18

Open
lhanusiak-tcp opened this issue Dec 11, 2020 · 1 comment
Open

Is it possible to set endOffset to media object ? #18

lhanusiak-tcp opened this issue Dec 11, 2020 · 1 comment

Comments

@lhanusiak-tcp
Copy link

lhanusiak-tcp commented Dec 11, 2020

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'.  
  }));
@Fleker
Copy link
Member

Fleker commented Dec 14, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants