added pause button

This commit is contained in:
erew123 authored and GitHub committed 2024-01-01 21:43:23 +00:00
1 parent ba1328311c
commit b28ecaf43e
1 file changed
+9
@@ -293,6 +293,7 @@
<div class="action-buttons">
<button onclick="generateTTS()">Generate TTS</button>
<button onclick="togglePausePlayback()">Pause/Resume Playback</button>
<button onclick="stopPlayback()">Stop Playback</button>
<button onclick="previewVoice()">Preview Voice</button>
</div>
@@ -501,6 +502,14 @@
};
}
}
function togglePausePlayback() {
if (audioElement.paused) {
audioElement.play();
} else {
audioElement.pause();
}
}
function toggleThemeMode() {
// Retrieve the value of the selected option for themeMode from the dropdown