mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-26 03:35:19 +00:00
22 lines
626 B
JavaScript
22 lines
626 B
JavaScript
import { h } from 'preact'
|
|
|
|
export default ({ currentDeviceId, audioSources, onChangeSource }) => {
|
|
return (
|
|
<div className="uppy-Audio-videoSource">
|
|
<select
|
|
className="uppy-u-reset uppy-Audio-audioSource-select"
|
|
onChange={(event) => { onChangeSource(event.target.value) }}
|
|
>
|
|
{audioSources.map((audioSource) => (
|
|
<option
|
|
key={audioSource.deviceId}
|
|
value={audioSource.deviceId}
|
|
selected={audioSource.deviceId === currentDeviceId}
|
|
>
|
|
{audioSource.label}
|
|
</option>
|
|
))}
|
|
</select>
|
|
</div>
|
|
)
|
|
}
|