Skip to content

Fix the hack to support TypedArray #3

@galvesribeiro

Description

@galvesribeiro

This package is basically send/receive calls using byte[] which is translated on the JS side to Uint8Array.

Currently Blazor fail to deserialize Uint8Array to byte[] on the C# side. We are tracking an issue on Blazor repo here https://github.com/aspnet/Blazor/issues/1618 and as soon as it get fixed, we should update this component since the current implementation is not efficient.

For now we are translating the response buffer to a regular array by using this hack: https://github.com/BlazorExtensions/WebUSB/blob/master/src/Blazor.Extensions.WebUSB.JS/src/USBManager.ts#L181

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions