USBConfiguration

Limited availability

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

安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

WebUSB APIUSBConfiguration インターフェイスは、USB デバイスの特定のコンフィギュレーションおよびそれがサポートするインターフェイスの情報を提供します。

コンストラクター

USBConfiguration() Experimental

渡された USBDevice の指定のコンフィギュレーション番号のコンフィギュレーションの情報が格納された新しい USBConfiguration オブジェクトを生成します。

インスタンスプロパティ

USBConfiguration.configurationValue 読取専用 Experimental

このコンフィギュレーションのコンフィギュレーション番号を返します。これはデバイスによって提供されたこのコンフィギュレーションを定義しているコンフィギュレーションディスクリプターの bConfigurationValue フィールドと一致します。

USBConfiguration.configurationName 読取専用 Experimental

デバイスによって提供されたこのコンフィギュレーションを説明する名前を返します。これはこのコンフィギュレーションを定義しているコンフィギュレーションディスクリプターの iConfiguration フィールドで提供されるインデックスのストリングディスクリプターの値と一致します。

USBConfiguration.interfaces 読取専用 Experimental

このコンフィギュレーションが対応しているそれぞれのインターフェイスを表す USBInterface のインスタンスが格納された配列を返します。

仕様書

Specification
WebUSB API
# usbconfiguration-interface

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
USBConfiguration
Experimental
USBConfiguration() constructor
Experimental
configurationName
Experimental
configurationValue
Experimental
interfaces
Experimental
Available in workers
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
Has more compatibility info.