riddhiman commited on
Commit
7c98df5
·
verified ·
1 Parent(s): 5cea959

Update public/script.js

Browse files
Files changed (1) hide show
  1. 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 = 'Pause'; // Update button text to "Pause"
152
  } else {
153
  audio.pause();
154
- this.textContent = 'Play'; // Update button text to "Play"
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 ? 'Unmute' : 'Mute'; // Update button text based on mute state
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