mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-20 07:10:40 -07:00
fix: don't reset audio player when unmuting during playback
This commit is contained in:
@@ -20,7 +20,9 @@ export function unlockAudioContext() {
|
|||||||
audioUnlocked = true;
|
audioUnlocked = true;
|
||||||
|
|
||||||
// Unlock WaveSurfer's internal audio element
|
// Unlock WaveSurfer's internal audio element
|
||||||
if (sharedWaveSurfer) {
|
// Skip if already playing — the context is already unlocked and the
|
||||||
|
// play/pause/reset dance would destroy the active playback.
|
||||||
|
if (sharedWaveSurfer && !sharedWaveSurfer.isPlaying()) {
|
||||||
const media = sharedWaveSurfer.getMediaElement();
|
const media = sharedWaveSurfer.getMediaElement();
|
||||||
if (media) {
|
if (media) {
|
||||||
media.muted = true;
|
media.muted = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user