modified: templates/playerselect.html
modified: templates/quiz_multiplayer.html
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user