![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/.cursor-server/data/User/History/-54d5a2ab/ |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Community Debug Test</title>
<style>
body {
background: #0a0a0a;
color: white;
font-family: Arial, sans-serif;
padding: 2rem;
}
.test-btn {
padding: 1rem 2rem;
margin: 0.5rem;
background: #667eea;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
}
.debug-info {
background: rgba(255,255,255,0.1);
padding: 2rem;
border-radius: 8px;
margin: 2rem 0;
font-family: monospace;
white-space: pre-wrap;
}
</style>
</head>
<body>
<h1>🎵 Community Debug Test</h1>
<div>
<button onclick="testPlayTrack()" class="test-btn">🎵 Test Play Track</button>
<button onclick="checkGlobalPlayer()" class="test-btn">🔍 Check Global Player</button>
<button onclick="testCommunityPlayTrack()" class="test-btn">🎵 Test Community PlayTrack</button>
</div>
<div id="debugInfo" class="debug-info">Loading...</div>
<script>
function checkGlobalPlayer() {
console.log('🎵 Checking global player...');
const info = {
'enhancedGlobalPlayer exists': !!window.enhancedGlobalPlayer,
'globalPlayerReady': !!window.globalPlayerReady,
'playTrack function': !!(window.enhancedGlobalPlayer && window.enhancedGlobalPlayer.playTrack),
'showPlayer function': !!(window.enhancedGlobalPlayer && window.enhancedGlobalPlayer.showPlayer),
'loadPlaylist function': !!(window.enhancedGlobalPlayer && window.enhancedGlobalPlayer.loadPlaylist),
'waitForGlobalPlayer function': !!window.waitForGlobalPlayer,
'Player element exists': !!document.getElementById('enhancedGlobalPlayer'),
'Audio element exists': !!document.getElementById('globalAudioElement')
};
const debugDiv = document.getElementById('debugInfo');
debugDiv.innerHTML = Object.entries(info)
.map(([key, value]) => `${key}: ${value ? '✅' : '❌'}`)
.join('\n');
console.log('🎵 Player status:', info);
if (window.enhancedGlobalPlayer) {
console.log('🎵 Available functions:', Object.keys(window.enhancedGlobalPlayer));
}
}
function testPlayTrack() {
console.log('🎵 Testing playTrack...');
if (window.enhancedGlobalPlayer && typeof window.enhancedGlobalPlayer.playTrack === 'function') {
try {
window.enhancedGlobalPlayer.playTrack(
'https://apiboxfiles.erweima.ai/MjE4OGJiZWMtNDRkMi00OTYwLTkyZGYtNWExMjQ1OTlkMGQx.mp3',
'Boundaries in Bloom',
'Charles D',
48
);
console.log('✅ Global player playTrack successful');
alert('✅ Global player playTrack successful!');
} catch (error) {
console.error('❌ Global player playTrack failed:', error);
alert('❌ Global player playTrack failed: ' + error.message);
}
} else {
console.error('❌ Global player playTrack not available');
alert('❌ Global player playTrack not available');
}
}
function testCommunityPlayTrack() {
console.log('🎵 Testing community playTrack function...');
// Test the community page's playTrack function
if (typeof playTrack === 'function') {
try {
playTrack(
'https://apiboxfiles.erweima.ai/MjE4OGJiZWMtNDRkMi00OTYwLTkyZGYtNWExMjQ1OTlkMGQx.mp3',
'Boundaries in Bloom',
'Charles D',
48
);
console.log('✅ Community playTrack successful');
alert('✅ Community playTrack successful!');
} catch (error) {
console.error('❌ Community playTrack failed:', error);
alert('❌ Community playTrack failed: ' + error.message);
}
} else {
console.error('❌ Community playTrack function not available');
alert('❌ Community playTrack function not available');
}
}
// Check immediately
checkGlobalPlayer();
// Check when DOM is loaded
document.addEventListener('DOMContentLoaded', function() {
console.log('🎵 DOM loaded');
setTimeout(checkGlobalPlayer, 1000);
});
// Check when page is fully loaded
window.addEventListener('load', function() {
console.log('🎵 Page fully loaded');
setTimeout(checkGlobalPlayer, 2000);
});
// Monitor for global player
let checkCount = 0;
const maxChecks = 20;
const checkInterval = setInterval(() => {
checkCount++;
console.log(`🎵 Check ${checkCount}: Global player status`);
if (window.enhancedGlobalPlayer) {
console.log('✅ Global player detected!');
clearInterval(checkInterval);
checkGlobalPlayer();
} else if (checkCount >= maxChecks) {
console.error('❌ Global player not detected after maximum checks');
clearInterval(checkInterval);
checkGlobalPlayer();
}
}, 500);
</script>
<!-- Include global player -->
<?php include 'global_player.php'; ?>
</body>
</html>