• Hi,

    The chatbot with mic functionality works well in Safari (iOS), but when Safari is inside a webview (from an iOS app), and it’s the second time I use the mic on the app, the app crashes. Even if I close the app to use the mic again with the chatbot, it crashes everytime.

    So I’m pretty sure it’s some uncompatibility with mic permissions, between the permission management from the plugin and the permission management of the iOS app. Like a conflict when the permission is checked/asked twice.

    Regards,

Viewing 1 replies (of 1 total)
  • Thread Starter trustmedias

    (@trustmedias)

    What do you think of this potential solution ?

    function isInWebView() {
    return /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent);
    }

    async function checkMicrophonePermission() {
    if (isInWebView()) { console.log('Skipping microphone check in WebView'); return; }
    //... Rest of the code.
    }

    I don’t know if skipping completely is good for the check, but I think it could be appropriate, as the iOS app normally checks the mic permission itself.

    • This reply was modified 1 year, 6 months ago by trustmedias.
Viewing 1 replies (of 1 total)
  • The topic ‘WebView crash (iOS) when using mic with chatbot’ is closed to new replies.