]> git.example.dev Git - binbsis50-sm.git/commitdiff
added: simple song file preview
author2weiEmu <saalbach.robert@outlook.de>
Fri, 19 Jun 2026 14:08:34 +0000 (16:08 +0200)
committer2weiEmu <saalbach.robert@outlook.de>
Fri, 19 Jun 2026 14:08:34 +0000 (16:08 +0200)
public/css/index.css
public/js/index.js
testing/songs/null [moved from testing/songs/A touch of class.m4a with 100% similarity]

index 03a85cebab0ea49dcb5266a1fda18bb8107e6012..c618f2a90b53516774b24c2c1f0287be59b599cb 100644 (file)
@@ -119,6 +119,7 @@ button {
        margin: 20px 15px 20px 15px;
        padding: 20px 0 20px 0;
        border-radius: 10px;
+       justify-content: space-between;
 
        * {
                margin: auto 15px auto 15px;
index d724d98c1c963e365626fcbcdb9b8f3a31b5e990..3f6721d92c17f706381461f846f4ae8b58b98569 100644 (file)
@@ -44,7 +44,16 @@ function NewSongFileElement(songFileName) {
 
        songFileElement.addEventListener("click", (_) => { renameSongFile(songFileName) })      
 
+       let audioPreview = document.createElement("audio")
+       audioPreview.controls = true
+
+       let audioSource = document.createElement("source")
+       audioSource.src = "binb.sis50.nl/songs/" + songFileName // TODO: hardcoded
+
+       audioPreview.appendChild(audioSource)
+
        songFileElement.appendChild(songFileNameP)
+       songFileElement.appendChild(audioPreview)
 
        return songFileElement
 }