Run the sample project. You will observe the following error:
Here is the code snippet:
public RadForm1()
{
InitializeComponent();
this.radWebCam1.AutoStart = false;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
ReadOnlyCollection<MediaFoundationDeviceInfo> videoDevices = RadWebCam.GetVideoCaptureDevices();
ReadOnlyCollection<MediaFoundationVideoFormatInfo> videoFormats = RadWebCam.GetVideoFormats(videoDevices[0], true);
ReadOnlyCollection<MediaFoundationDeviceInfo> audioDevices = RadWebCam.GetAudioCaptureDevices();
radWebCam1.Initialize(videoDevices[0], videoFormats[0], audioDevices[0]);
}
protected override void OnShown(EventArgs e)
{
base.OnShown(e);
radWebCam1.Start();
}
Note: It worked in 2022.1.222.40.