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

simple audio player

This commit is contained in:
Fedor Katurov 2019-10-11 13:51:14 +07:00
parent c11e281965
commit 5cad13b417
5 changed files with 70 additions and 9 deletions

View file

@ -54,7 +54,14 @@ const Comment: FC<IProps> = ({ comment, is_empty, is_loading, className, photo,
{groupped.audio && (
<div className={styles.audios}>
{groupped.audio.map(file => (
<div key={file.id} onClick={() => Player.setSrc(getURL(file.url))}>
<div
key={file.id}
onClick={() => {
Player.set(getURL(file.url));
Player.load();
Player.play();
}}
>
{file.name}
</div>
))}