react-jPlayer
react-jPlayer copied to clipboard
Best way to "Stop" playback?
Intention is to stop playback and reset the playhead back to the beginning. I started off dispatching two actions:
dispatch(actions.setPlayHead(id, .1));
dispatch(actions.pause(id));
This worked the first time I called it but failed subsequent times. See my other issue about this: https://github.com/jplayer/react-jPlayer/issues/13
What ended up working great:
dispatch(actions.pause(id, 0));
Is this the best way to "Stop"? Suggestion: Perhaps a built in "Stop" component would be nice.
This is the best way to stop.
A stop method that does this would be useful.