fix videos

This commit is contained in:
Leafy :3 2025-02-07 20:11:33 +01:00
parent c447768ecf
commit a2e1b6f735

View file

@ -19,6 +19,15 @@
},
computed: {
mediaTag() {
if (!this.src) return 'img'
const extension = this.src.split('.').pop().toLowerCase()
if (['mp4', 'webm', 'ogg'].includes(extension)) {
return 'video'
}
if (['mp3', 'wav', 'ogg', 'aac'].includes(extension)) {
return 'audio'
}
return 'img'
},
proxyUrl() {