Disable Audio Recording
This article shows how to stop the audio recording in two steps when a video is captured:
- Add a RadWebCam to the form and subscribe to its Form.Load event. Then, set its AutoStart property to false.
- In the event handler, get the camera device and video format, and call the Initialize method of the control. To disable the audio, set the last parameter ("audioDevice") of the Initialize method to null. Then start the camera.
ReadOnlyCollection<MediaFoundationDeviceInfo> videoDevices = RadWebCam.GetVideoCaptureDevices();
ReadOnlyCollection<MediaFoundationVideoFormatInfo> videoFormats = RadWebCam.GetVideoFormats(videoDevices[0]);
this.radWebCam1.Initialize(videoDevices[0], videoFormats[0], null);
this.radWebCam1.Start();
Dim videoDevices As ReadOnlyCollection(Of MediaFoundationDeviceInfo) = RadWebCam.GetVideoCaptureDevices()
Dim videoFormats As ReadOnlyCollection(Of MediaFoundationVideoFormatInfo) = RadWebCam.GetVideoFormats(videoDevices(0))
Me.RadWebCam1.Initialize(videoDevices(0), videoFormats(0), Nothing)
Me.RadWebCam1.Start()