@uppy/audio
Version:
Uppy plugin that records audio using the device’s microphone.
7 lines (6 loc) • 569 B
JavaScript
import { jsx as _jsx } from "preact/jsx-runtime";
export default ({ currentDeviceId, audioSources, onChangeSource, }) => {
return (_jsx("div", { className: "uppy-Audio-videoSource", children: _jsx("select", { className: "uppy-u-reset uppy-Audio-audioSource-select", onChange: (event) => {
onChangeSource(event.target.value);
}, children: audioSources.map((audioSource) => (_jsx("option", { value: audioSource.deviceId, selected: audioSource.deviceId === currentDeviceId, children: audioSource.label }, audioSource.deviceId))) }) }));
};