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:
parent
f445882a61
commit
63a616875c
3 changed files with 16 additions and 15 deletions
|
@ -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}>
|
||||||
|
|
|
@ -11,18 +11,22 @@ 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 }) => {
|
||||||
<div className={styles.wrap}>
|
if (total <= 1) return null;
|
||||||
<div className={styles.switcher}>
|
|
||||||
{range(0, total).map(item => (
|
return (
|
||||||
<div
|
<div className={styles.wrap}>
|
||||||
className={classNames({ is_active: item === current, is_loaded: loaded[item] })}
|
<div className={styles.switcher}>
|
||||||
key={item}
|
{range(0, total).map(item => (
|
||||||
onClick={() => onChange(item)}
|
<div
|
||||||
/>
|
className={classNames({ is_active: item === current, is_loaded: loaded[item] })}
|
||||||
))}
|
key={item}
|
||||||
|
onClick={() => onChange(item)}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
);
|
};
|
||||||
|
|
||||||
export { ImageSwitcher };
|
export { ImageSwitcher };
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue