WebUSB API protected interface class error

北城以北 提交于 2019-12-06 01:41:24

问题


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.

The error messages are as follows: DOMException: The requested interface implements a protected class. and 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.


回答1:


I announced this change here:

https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/LZXocaeCwDw/GLfAffGLAAAJ



来源:https://stackoverflow.com/questions/50591991/webusb-api-protected-interface-class-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!