servo_media_streams/device_monitor.rs
1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5#[derive(Clone, Copy, Debug)]
6pub enum MediaDeviceKind {
7 AudioInput,
8 AudioOutput,
9 VideoInput,
10}
11
12#[derive(Clone, Debug)]
13pub struct MediaDeviceInfo {
14 pub device_id: String,
15 pub kind: MediaDeviceKind,
16 pub label: String,
17}
18
19pub trait MediaDeviceMonitor {
20 fn enumerate_devices(&self) -> Option<Vec<MediaDeviceInfo>>;
21}