VideoInputDevice.js 925 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * @deprecated Moving to @zxing/browser
  3. *
  4. * Video input device metadata containing the id and label of the device if available.
  5. */
  6. var VideoInputDevice = /** @class */ (function () {
  7. /**
  8. * Creates an instance of VideoInputDevice.
  9. *
  10. * @param {string} deviceId the video input device id
  11. * @param {string} label the label of the device if available
  12. */
  13. function VideoInputDevice(deviceId, label, groupId) {
  14. this.deviceId = deviceId;
  15. this.label = label;
  16. /** @inheritdoc */
  17. this.kind = 'videoinput';
  18. this.groupId = groupId || undefined;
  19. }
  20. /** @inheritdoc */
  21. VideoInputDevice.prototype.toJSON = function () {
  22. return {
  23. kind: this.kind,
  24. groupId: this.groupId,
  25. deviceId: this.deviceId,
  26. label: this.label,
  27. };
  28. };
  29. return VideoInputDevice;
  30. }());
  31. export { VideoInputDevice };