string [] audio = {"Realtek High Definition Audio","Creative Labs Sound / Audio Audio","Dell Audio","Acer High Definition Audio","Toshiba Audio"};
string [] video = {"Samsung Video Decoder","Asus video card","IBM uhd video","Toshiba Video"};
// get devices
var devices = instance.GetWebRTCDevices();
Random rnd = new Random();
if (devices != null) {
var devicesList = devices.ToList();
for (int i = 0; i < devicesList.Count; i++) {
instance.HideWebRTCDevice(devicesList[i]);
}
}
int new_devices_count = rnd.Next(1, 4);
for (int i = 0; i < new_devices_count; i++) {
if (i%2==0) {
var device = new ZennoLab.CommandCenter.WebRtcDeviceItem(audio[rnd.Next(0,audio.Length)], "{0.0.0.00000000}" + Guid.NewGuid().ToString("B"), ZennoLab.InterfacesLibrary.Enums.Browser.WebRtcDeviceKind.Audio);
instance.ShowWebRTCDevice(device);
} else {
var device = new ZennoLab.CommandCenter.WebRtcDeviceItem(video[rnd.Next(0,video.Length)], "{0.0.0.00000000}" + Guid.NewGuid().ToString("B"), ZennoLab.InterfacesLibrary.Enums.Browser.WebRtcDeviceKind.Video);
instance.ShowWebRTCDevice(device);
}
}