From 1ef98569623b58f8b4e2b5863cea02bfb1e91a98 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Thu, 21 Nov 2024 22:38:22 +0000
Subject: [PATCH] 'Hier spielen' berichtigt

---
 www/js/app.js |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/www/js/app.js b/www/js/app.js
index a22f03f..fafbd3d 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -620,15 +620,12 @@
         //const titelElem = new Audio(titel);        
         self.audioElem = new Audio(titelUrl);
         self.audioElem.addEventListener("ended", self.nextTrack);
-        self.audioCtx = new (window.AudioContext || window.webkitAudioContext)();
-        const track = self.audioCtx.createMediaElementSource(self.audioElem);
-        track.connect(self.audioCtx.destination);
         self.audioElem.play();
-        self.playState = 'play';        
+        self.playState = 'play'; 
       }
     });
   };
-  
+
   this.getTitelFromJSONObj = function(titelObj) {
     //const audioElements = document.querySelectorAll('.entity-eintrag');
     const host = 'http://' + window.location.host + '/tango';
@@ -727,6 +724,11 @@
     self.http_delete('api/alist/' + plname + '/' + index,'', function(responseText) {
       // DELETE	http://localhost:9090/mz/api/alist/liste1/0
       //self.meldung_mit_timeout(responseText, 1500);
+      if(self.playingList === plname) {
+        if(self.playingIndex > index) {
+          --self.playingIndex;
+        }
+      }
       self.titel_liste();
     });
     

--
Gitblit v1.9.3