1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

refactored playerbar component

This commit is contained in:
Fedor Katurov 2021-11-21 17:31:50 +07:00
parent 6ca4c514bf
commit df217b41f7
9 changed files with 78 additions and 53 deletions

View file

@ -1,11 +1,11 @@
import { takeLatest, put, fork, race, take, delay, call, select } from 'redux-saga/effects';
import { PLAYER_ACTIONS, PLAYER_STATES } from './constants';
import { call, delay, fork, put, race, select, take, takeLatest } from 'redux-saga/effects';
import { PLAYER_ACTIONS, PlayerState } from './constants';
import {
playerSetFile,
playerSeek,
playerSetStatus,
playerGetYoutubeInfo,
playerSeek,
playerSet,
playerSetFile,
playerSetStatus,
} from './actions';
import { Player } from '~/utils/player';
import { getURL } from '~/utils/dom';
@ -41,7 +41,7 @@ function seekSaga({ seek }: ReturnType<typeof playerSeek>) {
}
function* stoppedSaga() {
yield put(playerSetStatus(PLAYER_STATES.UNSET));
yield put(playerSetStatus(PlayerState.UNSET));
yield put(playerSetFile(undefined));
}