| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
HTML5 WebUSB API implementation for Microsoft Blazor
Blazor Extensions are a set of packages with the goal of adding useful things to Blazor.
This package wraps HTML5 WebUSB APIs.
Install-Package Blazor.Extensions.WebUSB
public void ConfigureServices(IServiceCollection services)
{
services.UseWebUSB(); // Makes IUSB available to the DI container
}@using Blazor.Extensions.WebUSB@inject IUSB usbAnd then use the usb object to interact with connected USB devices thru your Blazor application.
Define a property of type IUSB and mark it as [Injectable]:
[Inject] private IUSB _usb { get; set; }Then use the _usb variable to interact with the connected USB devices.
Note: For now, you have to call await IUSB.Initialize() once in your application. This is a temporary requirement and we are looking on a better way to automatically register to Connect/Disconnect events.
Please feel free to use the component, open issues, fix bugs or provide feedback.
The following people are the maintainers of the Blazor Extensions projects:
| Back | FazBrowse Home | New Git URL |