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

Loop when player is running #257

Merged
merged 2 commits into from
Oct 24, 2017

Conversation

SkinyMonkey
Copy link
Contributor

I need the loop option to be activable even if the player is already playing.

I updated demo accordingly to test if you want to check it.

Thank you for this great component by the way!

src/demo/App.js Outdated
@@ -132,7 +137,7 @@ export default class App extends Component {
onPause={this.onPause}
onBuffer={() => console.log('onBuffer')}
onSeek={e => console.log('onSeek', e)}
onEnded={() => this.setState({ playing: false })}
onEnded={() => this.setState({ playing: loop ? true : false })}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless ternary, 'don't know what I was thinking about.

@cookpete
Copy link
Owner

I like the idea, but don't forget to run npm run lint before commiting.

@SkinyMonkey
Copy link
Contributor Author

Sorry for that, It should be fixed now.

@cookpete cookpete merged commit abd2096 into cookpete:master Oct 24, 2017
@cookpete
Copy link
Owner

Nice work 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants