Skip to content

Very low sound on IOS #18

@UrbanMediaDK

Description

@UrbanMediaDK

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions