mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
AudioPlayer initial
This commit is contained in:
parent
d1e369f723
commit
f66825a9ea
12 changed files with 190 additions and 26 deletions
|
@ -8,8 +8,7 @@ import assocPath from 'ramda/es/assocPath';
|
|||
import append from 'ramda/es/append';
|
||||
import reduce from 'ramda/es/reduce';
|
||||
import { UPLOAD_TYPES } from '~/redux/uploads/constants';
|
||||
import { Player } from '~/utils/player';
|
||||
import classNames from 'classnames';
|
||||
import { AudioPlayer } from '~/components/media/AudioPlayer';
|
||||
|
||||
type IProps = HTMLAttributes<HTMLDivElement> & {
|
||||
is_empty?: boolean;
|
||||
|
@ -65,16 +64,7 @@ const Comment: FC<IProps> = ({ comment, is_empty, is_same, is_loading, className
|
|||
{groupped.audio && (
|
||||
<div className={styles.audios}>
|
||||
{groupped.audio.map(file => (
|
||||
<div
|
||||
key={file.id}
|
||||
onClick={() => {
|
||||
Player.set(getURL(file));
|
||||
Player.load();
|
||||
Player.play();
|
||||
}}
|
||||
>
|
||||
{file.name}
|
||||
</div>
|
||||
<AudioPlayer key={file.id} file={file} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue