webviewx icon indicating copy to clipboard operation
webviewx copied to clipboard

Microphone and camera doesn't work

Open 3h5t4tvz8etx1op2 opened this issue 4 years ago • 5 comments

Hey! I'm trying to open a jitsi meeting inside an WebViewX:

WebViewX(
    webSpecificParams: WebSpecificParams(additionalAllowOptions: [
        'camera',
        'microphone',
    ]),
    initialMediaPlaybackPolicy: AutoMediaPlaybackPolicy.alwaysAllow,
    initialContent: this.widget.url, // https://meet.jit.si/somerandomtext
    initialSourceType: SourceType.url,
    onWebViewCreated: (controller) => webviewController = controller,
    height: maxHeight,
    width: maxWidth,
);

This is what I get on web: Screenshot from 2021-12-30 13-59-55 And this is what I get on mobile (android): Screenshot from 2021-12-30 14-01-07 None of that want to work.

I have added the following to AndroidManifest.xml

    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.CAMERA"/>

3h5t4tvz8etx1op2 avatar Dec 30 '21 19:12 3h5t4tvz8etx1op2

Looks like this doesn't work on web ether,

I'm looking into using IFrames directly since this might be a Flutter issue , will update this ticket if I find anything

Mylab6 avatar Feb 11 '22 05:02 Mylab6

So it looks like if you instead use html as the source type it works, so this shouldn't be hard to work around or fix at least on web.

Mylab6 avatar Feb 11 '22 05:02 Mylab6

Looks like this works fine on Flutter Web if your on an Android phone using Chrome.

Overall this is an amazing plugin, thank you !

Mylab6 avatar Feb 11 '22 07:02 Mylab6

@Mylab6 Can you elaborate more on how you solve the issue on Flutter web. Because running in Chrome on windows I got the same error as 3h5t4tvz8etx1op2 described in the ticket.

wer-mathurin avatar Apr 08 '22 17:04 wer-mathurin

I never got it working on Windows, only on an Android phone which is closer to my projects needs.

Mylab6 avatar Apr 09 '22 00:04 Mylab6