feat: audio player

This commit is contained in:
Alejandro Gomez 2023-01-26 19:30:07 +01:00
parent 9307f270b7
commit 17e298d5a9
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817
2 changed files with 6 additions and 1 deletions

View File

@ -52,7 +52,7 @@
margin: 20px;
}
.text img, .text video, .text iframe {
.text img, .text video, .text iframe, .text audio {
max-width: 100%;
max-height: 500px;
margin: 10px auto;

View File

@ -41,6 +41,11 @@ function transformHttpLink(a: string, pref: UserPreferences) {
case "webp": {
return <img key={url.toString()} src={url.toString()} />;
}
case "wav":
case "mp3":
case "ogg": {
return <audio key={url.toString()} src={url.toString()} controls />
}
case "mp4":
case "mov":
case "mkv":