VideoInputDevice.js 1.0 KB

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