1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +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]); }, [file, current, setPlaying, onProgress]);
console.log({ progress });
return ( return (
<div onClick={onPlay} className={classNames(styles.wrap, { playing })}> <div onClick={onPlay} className={classNames(styles.wrap, { playing })}>
<div className={styles.playpause}> <div className={styles.playpause}>

View file

@ -11,7 +11,10 @@ interface IProps {
onChange: (current: number) => void; onChange: (current: number) => void;
} }
const ImageSwitcher: FC<IProps> = ({ total, current, onChange, loaded }) => ( const ImageSwitcher: FC<IProps> = ({ total, current, onChange, loaded }) => {
if (total <= 1) return null;
return (
<div className={styles.wrap}> <div className={styles.wrap}>
<div className={styles.switcher}> <div className={styles.switcher}>
{range(0, total).map(item => ( {range(0, total).map(item => (
@ -23,6 +26,7 @@ const ImageSwitcher: FC<IProps> = ({ total, current, onChange, loaded }) => (
))} ))}
</div> </div>
</div> </div>
); );
};
export { ImageSwitcher }; export { ImageSwitcher };

View file

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