Skip to content

me.colab_run() does not handle microphone permissions for a web component #1152

Open
@williamito

Description

@williamito

Describe the bug
I am trying to create a web component to handle microphone input. I have code that works when mesop is run from a command line but fails when run in colab.

To Reproduce
This code correctly requests microphone permission when run directly. In Colab I get a silent error, seen in the screenshot below. The only addition in colab is adding !pip install mesop as the first cell.

Screenshots
Image

Workaround

Colab seems to be doing something fancy to identify when to ask permissions. If I run the following code in a different cell first I can trigger the microphone request flow, and then I think things work?

%%javascript
navigator.mediaDevices.getUserMedia({audio: true});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions