From 583f5c46d57802eb1d905b8346a02355503f78c2 Mon Sep 17 00:00:00 2001
From: SimolZimol <70102430+SimolZimol@users.noreply.github.com>
Date: Sat, 7 Jun 2025 01:29:54 +0200
Subject: [PATCH] modified: templates/playerselect.html
modified: templates/quiz_multiplayer.html
---
templates/playerselect.html | 4 ++--
templates/quiz_multiplayer.html | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/templates/playerselect.html b/templates/playerselect.html
index e4c492c..2a3bf5f 100644
--- a/templates/playerselect.html
+++ b/templates/playerselect.html
@@ -62,13 +62,13 @@
{{ translations['quiz_title'] }} – Player Selection
diff --git a/templates/quiz_multiplayer.html b/templates/quiz_multiplayer.html
index ecf54ad..edbc68e 100644
--- a/templates/quiz_multiplayer.html
+++ b/templates/quiz_multiplayer.html
@@ -94,7 +94,7 @@ function startMultiplayer(e) {
localStorage.setItem('quizify_multiplayer_current', 0);
document.getElementById('multiplayerPopup').style.display = 'none';
updateMultiplayerUI();
- quizifyReady();
+ quizifyReady(); // Musik und Quiz jetzt starten!
}
window.addEventListener('DOMContentLoaded', function() {
fillPlayerFields();
@@ -257,6 +257,8 @@ function switchGameMode(mode) {
function setOption(key, value) { localStorage.setItem(key, value); }
function getOption(key, defaultValue) { return localStorage.getItem(key) || defaultValue; }
+// KEIN quizifyReady oder Musikstart im window.onload!
+// Nur UI initialisieren:
window.onload = function() {
const playDuration = getOption('playDuration', '0');
const sel = document.getElementById('playDuration');
@@ -276,8 +278,8 @@ window.onload = function() {
updateMultiplayerUI();
};
+// Musikstart und Quiz erst nach Namensbestätigung!
function quizifyReady() {
- // Musik abspielen
if (window.spotifyPlayer && window.spotifyPlayer._options && window.spotifyPlayer._options.getOAuthToken) {
const device_id = document.getElementById('device_id').value;
const playDuration = getPlayDuration();