WebUSB icon indicating copy to clipboard operation
WebUSB copied to clipboard

Collab

Open MelbourneDeveloper opened this issue 4 years ago • 3 comments
trafficstars

Hi,

Really stoked to find this library. Let's collaborate. This is my framework. I'd like to write an implementation for it using your library.

https://github.com/MelbourneDeveloper/Device.Net

I'm currently trying to get your library working.

Code:

@page "/counter"
@inject IUSB usb

<h1>Counter</h1>

<p>Current count: @currentCount</p>

<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>

@code {

    [Inject] private IUSB _usb { get; set; }

    private int currentCount = 0;

    private async Task IncrementCount()
    {
        await _usb.Initialize();
        var devices = await _usb.GetDevices();
        currentCount = devices.Count();
    }
}

But I get this error: image

Any ideas?

Christian

MelbourneDeveloper avatar Feb 01 '21 09:02 MelbourneDeveloper

we are looking on a better way to automatically register to Connect/Disconnect events

I've spent a lot of time on this topic and I'd like to share with you some possible approaches.

MelbourneDeveloper avatar Feb 01 '21 09:02 MelbourneDeveloper

Same thing with Chrome:

image

MelbourneDeveloper avatar Feb 01 '21 09:02 MelbourneDeveloper

The test is app sort of working, so that's good!

image

MelbourneDeveloper avatar Feb 01 '21 09:02 MelbourneDeveloper