ערוך

שתף באמצעות


MediaPermissionAudio Enum

Definition

Caution

Code Access Security is not supported or honored by the runtime.

Specifies the permission level for audio.

public enum class MediaPermissionAudio
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public enum MediaPermissionAudio
public enum MediaPermissionAudio
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type MediaPermissionAudio = 
type MediaPermissionAudio = 
Public Enum MediaPermissionAudio
Inheritance
MediaPermissionAudio
Attributes

Fields

Name Value Description
NoAudio 0

Permission that denies all audio playback.

SiteOfOriginAudio 1

Permission that only allows audio playback of files that are located at the application's site of origin.

SafeAudio 2

Permission that allows safe, limited audio playback, which includes denying stream access to the image file.

AllAudio 3

Permission that allows unrestricted audio playback.

Examples

The following code example shows the use of the Audio property.

[MediaPermissionAttribute(SecurityAction.Demand, Audio = MediaPermissionAudio.SiteOfOriginAudio)]
<MediaPermissionAttribute(SecurityAction.Demand, Audio:=MediaPermissionAudio.SiteOfOriginAudio)>
Public Sub Method04()
End Sub

Remarks

Caution

Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.

Use this enumeration to set the MediaPermissionAudio property of the MediaPermission class. The default is SafeAudio.

Applies to