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

player fixes

This commit is contained in:
Fedor Katurov 2019-10-13 19:15:21 +07:00
parent f445882a61
commit 63a616875c
3 changed files with 16 additions and 15 deletions

View file

@ -75,8 +75,6 @@ const AudioPlayerUnconnected = ({
};
}, [file, current, setPlaying, onProgress]);
console.log({ progress });
return (
<div onClick={onPlay} className={classNames(styles.wrap, { playing })}>
<div className={styles.playpause}>

View file

@ -11,18 +11,22 @@ interface IProps {
onChange: (current: number) => void;
}
const ImageSwitcher: FC<IProps> = ({ total, current, onChange, loaded }) => (
<div className={styles.wrap}>
<div className={styles.switcher}>
{range(0, total).map(item => (
<div
className={classNames({ is_active: item === current, is_loaded: loaded[item] })}
key={item}
onClick={() => onChange(item)}
/>
))}
const ImageSwitcher: FC<IProps> = ({ total, current, onChange, loaded }) => {
if (total <= 1) return null;
return (
<div className={styles.wrap}>
<div className={styles.switcher}>
{range(0, total).map(item => (
<div
className={classNames({ is_active: item === current, is_loaded: loaded[item] })}
key={item}
onClick={() => onChange(item)}
/>
))}
</div>
</div>
</div>
);
);
};
export { ImageSwitcher };

View file

@ -19,7 +19,6 @@ function pauseSaga() {
function seekSaga({ seek }: ReturnType<typeof playerSeek>) {
Player.jumpToPercent(seek * 100);
console.log(seek * 100);
}
export default function* playerSaga() {