Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
The transferIn() method of the USBDevice interface returns a Promise that resolves with a USBInTransferResult when bulk or interrupt data is received from the USB device.
transferIn(endpointNumber, length)endpointNumberThe number of a device-specific endpoint (buffer).
lengthThe maximum number of bytes that will be read back from the device. The actual data is in the USBInTransferResult in the resolved Promise.
A Promise that resolves with a USBInTransferResult.