InputDeviceInfo

The InputDeviceInfo interface of the Media Capture and Streams API gives access to the capabilities of the input device that it represents. Available only in secure contexts.

MDN Reference

Properties

Link copied to clipboard
open external val deviceId: String

The deviceId read-only property of the MediaDeviceInfo interface returns a string that is an identifier for the represented device and is persisted across sessions.

Link copied to clipboard
open external val groupId: String

The groupId read-only property of the MediaDeviceInfo interface returns a string that is a group identifier.

Link copied to clipboard
open external val kind: MediaDeviceKind

The kind read-only property of the MediaDeviceInfo interface returns an enumerated value, that is either "videoinput", "audioinput" or "audiooutput".

Link copied to clipboard
open external val label: String

The label read-only property of the MediaDeviceInfo interface returns a string describing this device (for example "External USB Webcam").

Functions

Link copied to clipboard

The getCapabilities() method of the InputDeviceInfo interface returns a MediaTrackCapabilities object describing the primary audio or video track of the device's MediaStream.

Link copied to clipboard
open external fun toJSON(): JsAny

The toJSON() method of the MediaDeviceInfo interface returns a JSON-serializable plain object representing the MediaDeviceInfo object.