WebUSB API保护的接口类错误 [英] WebUSB API protected interface class error
问题描述
我正在尝试将WebUSB api与Chrome 67结合使用.一个月前,以下代码可以正常工作.我不确定是否更改了某些内容或丢失了某些内容.当我尝试声明该接口时,发生了我现在得到的错误.
I'm trying to use the WebUSB api with Chrome 67. The following code was working a month ago. I'm not sure if something is changed or if I missing something. The error I'm getting now is occurring when I'm trying to claim the interface.
错误消息如下:DOMException: The requested interface implements a protected class.
和An attempt to claim a USB device interface has been blocked because it implements a protected interface class.
window.setInterval(function() {
navigator.usb.getDevices({ filters: [{ vendorId: 0x0b67 }]
}).then(function(devices) {
device = devices[0];
return device.open();
}).then(function() {
return device.selectConfiguration(1);
}).then(function() {
return device.claimInterface(0);
}).then(function() {
return device.transferIn(1, 6);
我找不到有关该错误的任何信息,我们将不胜感激.
I can't find any information about the error, any information would be appreciated.
推荐答案
我在这里宣布了此更改:
I announced this change here:
https://groups .google.com/a/chromium.org/forum/#!msg/blink-dev/LZXocaeCwDw/GLfAffGLAAAJ
这篇关于WebUSB API保护的接口类错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!