![]() 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/-45b79ed9/ |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Volume Control Test</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
background: #1a1a1a;
color: white;
}
.test-section {
margin: 20px 0;
padding: 20px;
border: 1px solid #333;
border-radius: 8px;
}
.test-button {
background: #667eea;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
margin: 5px;
}
.result {
margin-top: 10px;
padding: 10px;
background: #2d2d2d;
border-radius: 5px;
white-space: pre-wrap;
}
.error {
background: #e53e3e;
color: white;
}
.success {
background: #38a169;
color: white;
}
</style>
</head>
<body>
<h1>š Volume Control Test</h1>
<div class="test-section">
<h2>1. Volume Button Element Test</h2>
<button class="test-button" onclick="testVolumeButton()">Test Volume Button</button>
<div id="volume-button-result" class="result"></div>
</div>
<div class="test-section">
<h2>2. Volume Slider Element Test</h2>
<button class="test-button" onclick="testVolumeSlider()">Test Volume Slider</button>
<div id="volume-slider-result" class="result"></div>
</div>
<div class="test-section">
<h2>3. Volume Functions Test</h2>
<button class="test-button" onclick="testVolumeFunctions()">Test Volume Functions</button>
<div id="volume-functions-result" class="result"></div>
</div>
<div class="test-section">
<h2>4. Manual Volume Test</h2>
<button class="test-button" onclick="testManualVolume()">Test Manual Volume</button>
<div id="manual-volume-result" class="result"></div>
</div>
<script>
function testVolumeButton() {
const result = document.getElementById('volume-button-result');
result.innerHTML = 'Testing...';
const volumeBtn = document.getElementById('playerVolumeBtn');
if (volumeBtn) {
result.innerHTML = 'ā
Volume button found\n';
result.innerHTML += 'ID: ' + volumeBtn.id + '\n';
result.innerHTML += 'Classes: ' + volumeBtn.className + '\n';
result.innerHTML += 'Clickable: ' + (volumeBtn.onclick !== null || volumeBtn.addEventListener !== undefined) + '\n';
result.className = 'result success';
} else {
result.innerHTML = 'ā Volume button NOT found\n';
result.innerHTML += 'Available elements with "volume" in ID: ' +
Array.from(document.querySelectorAll('[id*="volume"]')).map(el => el.id).join(', ') + '\n';
result.className = 'result error';
}
}
function testVolumeSlider() {
const result = document.getElementById('volume-slider-result');
result.innerHTML = 'Testing...';
const volumeSlider = document.getElementById('playerVolumeSlider');
if (volumeSlider) {
result.innerHTML = 'ā
Volume slider found\n';
result.innerHTML += 'ID: ' + volumeSlider.id + '\n';
result.innerHTML += 'Type: ' + volumeSlider.type + '\n';
result.innerHTML += 'Min: ' + volumeSlider.min + '\n';
result.innerHTML += 'Max: ' + volumeSlider.max + '\n';
result.innerHTML += 'Value: ' + volumeSlider.value + '\n';
result.className = 'result success';
} else {
result.innerHTML = 'ā Volume slider NOT found\n';
result.innerHTML += 'Available input elements: ' +
Array.from(document.querySelectorAll('input')).map(el => el.id).join(', ') + '\n';
result.className = 'result error';
}
}
function testVolumeFunctions() {
const result = document.getElementById('volume-functions-result');
result.innerHTML = 'Testing...';
let functionsFound = 0;
let totalFunctions = 2;
if (typeof toggleVolumeSlider === 'function') {
result.innerHTML = 'ā
toggleVolumeSlider function found\n';
functionsFound++;
} else {
result.innerHTML = 'ā toggleVolumeSlider function NOT found\n';
}
if (typeof updateVolume === 'function') {
result.innerHTML += 'ā
updateVolume function found\n';
functionsFound++;
} else {
result.innerHTML += 'ā updateVolume function NOT found\n';
}
if (functionsFound === totalFunctions) {
result.innerHTML += '\nā
All volume functions found!';
result.className = 'result success';
} else {
result.innerHTML += '\nā Some volume functions missing!';
result.className = 'result error';
}
}
function testManualVolume() {
const result = document.getElementById('manual-volume-result');
result.innerHTML = 'Testing...';
const volumeBtn = document.getElementById('playerVolumeBtn');
const volumeSlider = document.getElementById('playerVolumeSlider');
if (volumeBtn && volumeSlider) {
// Test clicking the volume button
try {
volumeBtn.click();
result.innerHTML = 'ā
Volume button click successful\n';
// Test changing volume
const originalValue = volumeSlider.value;
volumeSlider.value = 25;
volumeSlider.dispatchEvent(new Event('input'));
result.innerHTML += 'ā
Volume slider change successful\n';
result.innerHTML += 'Changed from ' + originalValue + ' to ' + volumeSlider.value + '\n';
// Test clicking volume button again
volumeBtn.click();
result.innerHTML += 'ā
Volume button toggle successful\n';
result.className = 'result success';
} catch (error) {
result.innerHTML = 'ā Error testing volume: ' + error.message;
result.className = 'result error';
}
} else {
result.innerHTML = 'ā Volume elements not found for manual test';
result.className = 'result error';
}
}
// Auto-test on load
window.addEventListener('load', function() {
setTimeout(() => {
testVolumeButton();
testVolumeSlider();
testVolumeFunctions();
}, 2000);
});
</script>
<!-- Include the global player -->
<?php include 'global_player.php'; ?>
</body>
</html>