Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very low sound on IOS #18

Open
UrbanMediaDK opened this issue Jul 31, 2022 · 0 comments
Open

Very low sound on IOS #18

UrbanMediaDK opened this issue Jul 31, 2022 · 0 comments

Comments

@UrbanMediaDK
Copy link

Very nice work and easy to use. Everything is working fine except that the sound level is very low on mobile (Tested safari and chrome on IOS) but it's perfect on desktop (Chrome, FF, Safari). I get the same result trying the demo setup.

First i thought it was the recording, but after a lot of research I found that the recording it self is fine. The problem is when i play the recorded audio without refreshing the browser the sound is very low. If i refresh the browser the sound is perfect.

What is really weird is if i write an alert() in the stopRecording() function, the sound plays perfect even without refreshing the browser.

Testet in IOS - Safari, could this be a IOS bug?

function stopRecording() {
rec.stop();

gumStream.getTracks().forEach(function(track) {
    if (track.readyState == 'live' && track.kind === 'audio'){
        track.stop();
    }
});

alert('Recording is complete');

rec.exportWAV(handleRecording);
}

It's a bit like safari don't release or end the getUserMedia() and as long as that is 'on' the audio.play(); has low sound. Maybe the alert() changes browser focus and therefore it works(?)

I would really like to avoid having an alert there but don't know how this can be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant