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

[Youtube] Video start and end time #152

Closed
lapinskicho opened this issue Feb 14, 2017 · 2 comments
Closed

[Youtube] Video start and end time #152

lapinskicho opened this issue Feb 14, 2017 · 2 comments

Comments

@lapinskicho
Copy link

Thanks for your work.

For Youtube player, looks like it is not taking the end time from either youtubeConfig.playerVars.end or from the URL (e.g. https://www.youtube.com/v/qv6UVOQ0F44?end=40).

Also I tried the example you gave at issue #115,

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

works but using youtubeConfig does not work.

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

But as the video end time won't work either way, a fix will be appreciated. Thanks.

@cookpete
Copy link
Owner

I've just pushed what I thought would fix this in 0.14.2 but it looks like start still isn't working when put in playerVars. However, combining both now works for me:

<ReactPlayer
  playing
  controls
  url='https://www.youtube.com/watch?v=Mh5LY4Mz15o?start=20s'
  youtubeConfig={{ playerVars: { end: 40 }}}
/>

I don't think end in the URL is supported, as it doesn't seem to work for regular youtube URLs in the same way that start does (eg https://www.youtube.com/watch?v=qv6UVOQ0F44&end=20)

@lapinskicho
Copy link
Author

Thanks.

The end parameter works, but the URL needs to be like this:

https://www.youtube.com/v/qv6UVOQ0F44?start=30&end=31

or

https://www.youtube.com/embed/qv6UVOQ0F44?start=30&end=31

david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue Dec 23, 2018
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue May 23, 2020
albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
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