jasonelle-archive / jasonelle-v2

🛸 🏘️ Jasonelle issues, releases, discussions and wiki repository.
https://jasonelle.com
Mozilla Public License 2.0
422 stars 58 forks source link

Audio permission not working #92

Open rodrigohgpontes opened 4 years ago

rodrigohgpontes commented 4 years ago

Hello, first, thanks for the project! It is great, helping a lot with porting my web app to native.

So, my problem is that I am still getting a permission error for audio recording, even after uncommenting the relevant permissions on AndroidManifest.xlm

I added all these permissions for audio recording the user's voice: <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.WAKE_LOCK" />

But I still get a permission error running on Android Studio:

W/cr_media: Requires MODIFY_AUDIO_SETTINGS and RECORD_AUDIO. No audio device will be available for recording

I am using HTML5 navigator.mediaDevices.getUserMedia({ audio: true }) to record the audio

clsource commented 4 years ago

Hello. Thanks!.

I'll see what can be done for testing this :)

rodrigohgpontes commented 4 years ago

@clsource an update: if I manually give permission to the application to use the microphone, that error goes away, but I get another one: a DOMException for Permission Denied.

I am using this JSON to load my web app:

"body": {
      "background": {
        "type": "html",
        "URL": "<my web app URL>",
        "action": {
          "type": "$default"
        }
      }
    }

Does it create an <iframe> inside the WebView? If it does, I would still have to add allow="camera; microphone" to the <iframe> tag. How would I do it?

Thanks!

blueone1 commented 2 years ago

@rodrigohgpontes Hi Rodrigo! Did you ever find a fix to this? Would you mind posting your process for this as I would love to use the microphone for audio calls using Twilio!