Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the hack to support TypedArray #3

Open
galvesribeiro opened this issue Oct 28, 2018 · 0 comments
Open

Fix the hack to support TypedArray #3

galvesribeiro opened this issue Oct 28, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@galvesribeiro
Copy link
Member

galvesribeiro commented Oct 28, 2018

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

@galvesribeiro galvesribeiro added the enhancement New feature or request label Oct 28, 2018
@galvesribeiro galvesribeiro self-assigned this Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant