mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 09:09:01 +00:00
Fix seek forward
This commit is contained in:
parent
f8db895737
commit
d795e10f1c
1 changed files with 5 additions and 4 deletions
|
|
@ -150,11 +150,12 @@ export function previous() {
|
|||
|
||||
export function seekForward(seconds) {
|
||||
return function(dispatch, getState) {
|
||||
const { media } = getState();
|
||||
const { timeElapsed, length } = media;
|
||||
const { timeElapsed, length } = getState().media;
|
||||
const newTimeElapsed = timeElapsed + seconds;
|
||||
const newPercentComplete = newTimeElapsed / length;
|
||||
dispatch({ type: SEEK_TO_PERCENT_COMPLETE, percent: newPercentComplete });
|
||||
dispatch({
|
||||
type: SEEK_TO_PERCENT_COMPLETE,
|
||||
percent: newTimeElapsed / length * 100
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue