Disable Audio Recording

This article shows how to stop the audio recording when a video is captured.

  1. Add the control to the logical tree of the view and subscribe to its Loaded event. Then, set its AutoStart property to False.

    Example 1: Defining RadWebCam

        <telerik:RadWebCam x:Name="radWebCam" AutoStart="False" Loaded="RadWebcam_Loaded"/> 
    
  2. 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.

    Example 2: Starting the camera manually

        private void RadWebcam_Loaded(object sender, RoutedEventArgs e) 
        {        
            ReadOnlyCollection<MediaFoundationDeviceInfo> videoDevices = RadWebCam.GetVideoCaptureDevices();             
            ReadOnlyCollection<MediaFoundationVideoFormatInfo> videoFormats = RadWebCam.GetVideoFormats(videoDevices[0]); 
            this.radWebCam.Initialize(videoDevices[0], videoFormats[0], null); 
            this.radWebCam.Start(); 
        } 
    

    See Also

  3. Getting Started
  4. Recording Video
  5. Media Information
In this article
Not finding the help you need? Improve this article