UNPKG

@fakes/media-devices

Version:

A interactive fake implementation of MediaDevices interface in the browser for testing

26 lines (25 loc) 861 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.anySpeaker = exports.anyMicrophone = exports.anyCamera = exports.anyDevice = void 0; const anyDevice = (override = {}) => { return { deviceId: 'stand-in-device-id', groupId: 'stand-in-group-id', kind: 'videoinput', label: 'Acme Device (HD)', ...override, }; }; exports.anyDevice = anyDevice; const anyCamera = (override = {}) => { return exports.anyDevice({ ...override, kind: 'videoinput' }); }; exports.anyCamera = anyCamera; const anyMicrophone = (override = {}) => { return exports.anyDevice({ ...override, kind: 'audioinput' }); }; exports.anyMicrophone = anyMicrophone; const anySpeaker = (override = {}) => { return exports.anyDevice({ ...override, kind: 'audiooutput' }); }; exports.anySpeaker = anySpeaker;