Mic permission in manifest version 3

310 views
Skip to first unread message

Joy Gupta

unread,
Jun 9, 2023, 2:19:38 AM6/9/23
to Chromium Extensions
Hi team,
I have currently implemented screen recording feature in mv3. For this I am asking user to select screen/tab on a separate page that is opened by extension itself. I did this because if I use tabCapture method, it will auto stop the recording once the URL gets changed. In the same manner I want to capture user's audio. 

I tried most of the things like passing audio : true while asking user to select screen 
navigator.mediaDevices.getUserMedia({
    audio: true,
    video: {
        mandatory: {
            chromeMediaSource: 'desktop',
            chromeMediaSourceId: desktopId,
            minWidth: 1280,
            maxWidth: 1280,
            minHeight: 720,
            maxHeight: 720,
        },
    },
}, gotStream, getUserMediaError);

also
navigator.mediaDevices.getUserMedia({
        audio: {
            mandatory: {
                chromeMediaSource: 'desktop',
                chromeMediaSourceId: desktopId,
            },
        },
        video: {
            mandatory: {
                chromeMediaSource: 'desktop',
                chromeMediaSourceId: desktopId,
                minWidth: 1280,
                maxWidth: 1280,
                minHeight: 720,
                maxHeight: 720,
            },
        },
    },
    gotStream,
    getUserMediaError
);
but nothing works out for me. 
Is there any way to get this done in mv3?

Patrick Kettner

unread,
Jun 19, 2023, 3:20:17 PM6/19/23
to Joy Gupta, Chromium Extensions
Sadly this is a long running bug. Workarounds are possible, but it really depends on the situation. Are the users expected to be within a controlled environment? You could load content inside of a frame, and use getUserMedia on the parent window that you control from the extension?

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/b4eabd3b-cc74-44d0-a436-23f1bdd4b263n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages