大网数据广告活动
Web 标准与前端开发

USBAlternateInterface

· 52CE 我爱测

The `USBAlternateInterface` interface of the WebUSB API provides information about a particular configuration of an interface provided by the USB device. An interface includes one or more alternate settings which can configure a set of endpoints based on the operating mode of the

WebUSB API

The USBAlternateInterface interface of the WebUSB API provides information about a particular configuration of an interface provided by the USB device. An interface includes one or more alternate settings which can configure a set of endpoints based on the operating mode of the device.

Constructor

  • USBAlternateInterface.USBAlternateInterface
    • : Creates a new USBAlternateInterface object which will be populated with information about the alternate interface of the provided USBInterface with the given alternate setting number.

Instance properties

  • USBAlternateInterface.alternateSetting
    • : Returns the alternate setting number of this interface. This is equal to the bAlternateSetting field of the interface descriptor defining this interface.
  • USBAlternateInterface.interfaceClass
    • : Returns the class of this interface. This is equal to the bInterfaceClass field of the interface descriptor defining this interface. Standardized values for this field are defined by the USB Implementers Forum. A value of 0xFF indicates a vendor-defined interface.
  • USBAlternateInterface.interfaceSubclass
    • : Returns the subclass of this interface. This is equal to the bInterfaceSubClass field of the interface descriptor defining this interface. The meaning of this value depends on the interfaceClass field.
  • USBAlternateInterface.interfaceProtocol
    • : Returns the protocol supported by this interface. This is equal to the bInterfaceProtocol field of the interface descriptor defining this interface. The meaning of this value depends on the interfaceClass and interfaceSubclass fields.
  • USBAlternateInterface.interfaceName
    • : Returns the name of the interface, if one is provided by the device. This is the value of the string descriptor with the index specified by the iInterface field of the interface descriptor defining this interface.
  • USBAlternateInterface.endpoints
    • : Returns an array containing instances of the USBEndpoint interface describing each of the endpoints that are part of this interface.

Specifications

Browser compatibility

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。