react-jPlayer icon indicating copy to clipboard operation
react-jPlayer copied to clipboard

Best way to "Stop" playback?

Open jfbloom22 opened this issue 7 years ago • 1 comments

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.

jfbloom22 avatar Apr 18 '18 15:04 jfbloom22

This is the best way to stop.

A stop method that does this would be useful.

MartinDawson avatar May 04 '18 08:05 MartinDawson