Brad
Brad

Reputation: 163291

Instantiating MediaDeviceInfo results in 'Illegal constructor'

Is it possible to instantiate my own instance of MediaDeviceInfo? Both of these fail:

new MediaDeviceInfo();

new MediaDeviceInfo({
  deviceId: 'Brad Test',
  groupId: 'Brad Test',
  kind: 'audioinput',
  label: 'Brad Test'
});

Uncaught TypeError: Illegal constructor

Upvotes: 0

Views: 300

Answers (1)

Kaiido
Kaiido

Reputation: 136638

No, there is no constructor defined on the interface: https://w3c.github.io/mediacapture-main/#device-info

Upvotes: 3

Related Questions