Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for end parameter #217

Closed
danny-toi opened this issue Jul 26, 2017 · 1 comment
Closed

Support for end parameter #217

danny-toi opened this issue Jul 26, 2017 · 1 comment

Comments

@danny-toi
Copy link

The YouTube Embedded Player supports a end parameter, which specifies the time when the player should stop playing the video.

Now the library supports a start parameter and I wonder if it was intentional to drop the support for end parameter.

@cookpete
Copy link
Owner

The library supports whatever the Youtube iframe API supports. The library did not drop support for end, it just does not work correctly with the API.

It does seem to work when using playerVars, which can be injected via youtubeConfig:

// Play video from 00:20 to 00:40
<ReactPlayer
  playing
  controls
  url='https://www.youtube.com/watch?v=Mh5LY4Mz15o'
  youtubeConfig={{ playerVars: { start: 20, end: 40 }}}
/>

From #152 (comment)

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

No branches or pull requests

2 participants