WebUSB
WebUSB copied to clipboard
Collab
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:

Any ideas?
Christian
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.
Same thing with Chrome:

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