Requests access for all possible capture devices (audio or video) that are available on the client system.
Assembly: System.Windows (in System.Windows.dll)
Return ValueType: System.Boolean
true if the user grants device access based on their response to the access request dialog prompt, or if the request is automatically granted in some circumstances. false if the user does not grant access or if the request is denied by other factors. See Remarks.
Client user permission to access the captures from available devices is scoped by sites in domains, and must be enabled by calls to and a resulting affirmation in the request access dialog by the user. Calls must be made separately for each session and must be requested again if a session ends and a new session begins. The Silverlight configuration dialog enables setting which device (if any) is reported as the default to all enabled sites, but requesting user permission is a separate dialog that your application potentially invokes through the call.
Calling should be done from the context of a user-initiated event. If a call is made that is not from a user-initiated context, no exception is thrown. However, the dialog is not displayed in this case. The return value will still return results of any previously granted access request or other condition in this case, but otherwise the call is a no-op.
So long as the call is made from a user-initiated context, calling potentially blocks the Silverlight UI thread, because it often presents an end user modal dialog in Silverlight to the client user and that dialog runs on the UI thread.
You must have user-affirmed permission for this session / domain if you call capture-related APIs that carry or generate specific capture information (for example, CaptureSource.Start). Lack of user permission causes the called API to error or throw an exception (InvalidOperationException or possibly others).
An affirmation in the Silverlight request access dialog enables both audio and video capture. There is no feature available for enabling audio but not video, or vice versa.
The following additional consideration affects the behavior of and whether the request access dialog box displays to a client user at run time:
If the client is the Silverlight developer runtime, the request access dialog box never displays; access is considered granted for all sites and returns true.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.