React-player: [Youtube] Video start time

Created on 24 Oct 2016  路  3Comments  路  Source: cookpete/react-player

There is a way to set video start time?

Most helpful comment

@CookPete how can i set such params not for youtube but for any other source?

All 3 comments

You can use youtube's start time parameter:

<ReactPlayer url='https://youtu.be/qv6UVOQ0F44?t=33' />

You can use t or start, you can also use the m and s format:

<ReactPlayer url='https://youtu.be/qv6UVOQ0F44?start=1m33s' />

or pass a start player param:

<ReactPlayer
  url='https://youtu.be/qv6UVOQ0F44'
  youtubeConfig={{
    playerVars: {
      start: 33
    }
  }}
/>

@CookPete how can i set such params not for youtube but for any other source?

@againksy For players that support start params, it is usually a case of passing in the start parameter into the config prop. The exact config to use depends on what player you are using, but there is a list of config options here and a list of the APIs used here.

Alternatively just wait for onReady and then call seekTo on the player instance.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrcoles picture mrcoles  路  5Comments

MDrooker picture MDrooker  路  6Comments

johnking picture johnking  路  4Comments

samuelbriole picture samuelbriole  路  5Comments

denishrana09 picture denishrana09  路  3Comments