Spaces:
Runtime error
Runtime error
Update public/script.js
Browse files- public/script.js +3 -3
public/script.js
CHANGED
|
@@ -148,10 +148,10 @@ function setupCustomAudioPlayer() {
|
|
| 148 |
document.getElementById('play-pause-btn').addEventListener('click', function() {
|
| 149 |
if (audio.paused) {
|
| 150 |
audio.play();
|
| 151 |
-
this.textContent = '
|
| 152 |
} else {
|
| 153 |
audio.pause();
|
| 154 |
-
this.textContent = '
|
| 155 |
}
|
| 156 |
});
|
| 157 |
|
|
@@ -170,7 +170,7 @@ function setupCustomAudioPlayer() {
|
|
| 170 |
// Mute toggle
|
| 171 |
document.getElementById('mute-btn').addEventListener('click', function() {
|
| 172 |
audio.muted = !audio.muted;
|
| 173 |
-
this.textContent = audio.muted ? '
|
| 174 |
});
|
| 175 |
|
| 176 |
// Volume control
|
|
|
|
| 148 |
document.getElementById('play-pause-btn').addEventListener('click', function() {
|
| 149 |
if (audio.paused) {
|
| 150 |
audio.play();
|
| 151 |
+
this.textContent = '❙❙'; // Update button text to "❙❙"
|
| 152 |
} else {
|
| 153 |
audio.pause();
|
| 154 |
+
this.textContent = '▶'; // Update button text to "▶"
|
| 155 |
}
|
| 156 |
});
|
| 157 |
|
|
|
|
| 170 |
// Mute toggle
|
| 171 |
document.getElementById('mute-btn').addEventListener('click', function() {
|
| 172 |
audio.muted = !audio.muted;
|
| 173 |
+
this.textContent = audio.muted ? '🔊' : '🔇'; // Update button text based on mute state
|
| 174 |
});
|
| 175 |
|
| 176 |
// Volume control
|