mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
removed player reducer, migrated to CRA 5
This commit is contained in:
parent
88f8fe21f7
commit
558e8f8a4f
211 changed files with 7131 additions and 10318 deletions
|
@ -1,19 +1,20 @@
|
|||
import React, { VFC } from 'react';
|
||||
import { PlayerBar } from '~/components/bars/PlayerBar';
|
||||
import { usePlayer } from '~/hooks/player/usePlayer';
|
||||
import React, { VFC } from "react";
|
||||
import { PlayerBar } from "~/components/bars/PlayerBar";
|
||||
import { useAudioPlayer } from "~/utils/providers/AudioPlayerProvider";
|
||||
|
||||
interface PlayerViewProps {}
|
||||
|
||||
const PlayerView: VFC<PlayerViewProps> = () => {
|
||||
const { status, file, onPlayerSeek, onPlayerStop, onPlayerPause, onPlayerPlay } = usePlayer();
|
||||
const { file, play, toPercent: seek, stop, pause, status, progress } = useAudioPlayer();
|
||||
|
||||
return (
|
||||
<PlayerBar
|
||||
progress={progress}
|
||||
status={status}
|
||||
playerPlay={onPlayerPlay}
|
||||
playerPause={onPlayerPause}
|
||||
playerSeek={onPlayerSeek}
|
||||
playerStop={onPlayerStop}
|
||||
playerPlay={play}
|
||||
playerPause={pause}
|
||||
playerSeek={seek}
|
||||
playerStop={stop}
|
||||
file={file}
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue