Skip to content

Allow WebUSB in sketch preview #1927

Closed
@pelikhan

Description

@pelikhan

Nature of issue?

  • Existing feature enhancement

Details about the bug:

  • Web browser and version: Chrome/Edge 90+
  • Operating System: Windows/Mac

Feature enhancement details:

The p5 web editor allows Web Serial in the preview window. However some devices, like the micro:bit use WebUSB instead. I was wondering if it would be possible to allow web-usb as well.

Activity

welcome

welcome commented on Sep 13, 2021

@welcome

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

pelikhan

pelikhan commented on Sep 14, 2021

@pelikhan
Author

Similar fox to #1924

Add usb

catarak

catarak commented on Sep 14, 2021

@catarak
Member

Thanks for the suggestion! Is the fix as simple as adding web-usb to the allow list?

pelikhan

pelikhan commented on Sep 14, 2021

@pelikhan
Author

Adding usb should be enough (https://web.dev/usb/#feature-policy).

You can see a demo of p5js using WebUSB from codesandbox.io at https://codesandbox.io/s/dnyd9?file=/sketch.js . It uses our p5.jacdac library (https://microsoft.github.io/jacdac-docs/clients/p5js/) ... and a micro:bit v2.

pelikhan

pelikhan commented on Sep 15, 2021

@pelikhan
Author

(i am also preparing a submission for this library, working on the image)

added a commit that references this issue on Sep 20, 2021

[#1927] Update allow list in iframe with usb and others

added a commit that references this issue on Sep 21, 2021

Merge pull request #1929 from processing/feature/usb

fb0c9dd
pelikhan

pelikhan commented on Oct 6, 2021

@pelikhan
Author

All working now! No drivers needed thanks to WebUSB...
p5sliders

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @pelikhan@catarak

      Issue actions

        Allow WebUSB in sketch preview · Issue #1927 · processing/p5.js-web-editor