You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On mac computer, the oninputreport event has been registered, but the data cannot be received when it is sent for the first time. Only the second time it is sent can the data be received. Continuous one success and one failure
#117
Open
erixyuan opened this issue
Oct 12, 2023
· 2 comments
The oninputreport event has been registered, but the data cannot be received when it is sent for the first time. Only the second time it is sent can the data be received. Continuous one success and one failure;
The text was updated successfully, but these errors were encountered:
erixyuan
changed the title
The oninputreport event has been registered, but the data cannot be received when it is sent for the first time. Only the second time it is sent can the data be received. Continuous one success and one failure
On mac computer, the oninputreport event has been registered, but the data cannot be received when it is sent for the first time. Only the second time it is sent can the data be received. Continuous one success and one failure
Oct 12, 2023
Does it work if you set device.oninputreport before calling device.open()?
device.oninputreport = ({device, reportId, data}) => {
console.log(`Input report ${reportId} from ${device.productName}:`, new Uint8Array(data.buffer));
};
await device.open();
It is a hardware device developed by ourselves. There is no abnormality in Chrome communication on Windows. This abnormality only occurs on Mac. The first time the data is sent, it cannot be received and returned, only the second time. I tried your way of writing and the result is the same.
Another phenomenon is that when sending for the first time, receiving data fails. The second time you send it, you receive the result of the first time.
The oninputreport event has been registered, but the data cannot be received when it is sent for the first time. Only the second time it is sent can the data be received. Continuous one success and one failure;
The text was updated successfully, but these errors were encountered: