Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. USBAlternateInterface

USBAlternateInterface

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

Note: This feature is available inWeb Workers.

TheUSBAlternateInterface interface of theWebUSB 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()Experimental

Creates a newUSBAlternateInterface object which will be populated with information about the alternate interface of the providedUSBInterface with the given alternate setting number.

Instance properties

USBAlternateInterface.alternateSettingRead onlyExperimental

Returns the alternate setting number of this interface. This is equal to thebAlternateSetting field of the interface descriptor defining this interface.

USBAlternateInterface.interfaceClassRead onlyExperimental

Returns the class of this interface. This is equal to thebInterfaceClass field of the interface descriptor defining this interface.Standardized values for this field are defined by the USB Implementers Forum. A value of0xFF indicates a vendor-defined interface.

USBAlternateInterface.interfaceSubclassRead onlyExperimental

Returns the subclass of this interface. This is equal to thebInterfaceSubClass field of the interface descriptor defining this interface. The meaning of this value depends on theinterfaceClass field.

USBAlternateInterface.interfaceProtocolRead onlyExperimental

Returns the protocol supported by this interface. This is equal to thebInterfaceProtocol field of the interface descriptor defining this interface. The meaning of this value depends on theinterfaceClass andinterfaceSubclass fields.

USBAlternateInterface.interfaceNameRead onlyExperimental

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 theiInterface field of the interface descriptor defining this interface.

USBAlternateInterface.endpointsRead onlyExperimental

Returns an array containing instances of theUSBEndpoint interface describing each of the endpoints that are part of this interface.

Specifications

Specification
WebUSB API
# usbalternateinterface

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp