MediaPermissionAudio 枚举

定义

注意

Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}

指定音频的权限级别。Specifies the permission level for audio.

public enum class 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}")]
public enum MediaPermissionAudio
type 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 = 
Public Enum MediaPermissionAudio
继承
MediaPermissionAudio
属性

字段

AllAudio 3

允许播放不受限制音频的权限。Permission that allows unrestricted audio playback.

NoAudio 0

拒绝播放所有音频的权限。Permission that denies all audio playback.

SafeAudio 2

允许播放安全、有限制音频的权限,该权限包括拒绝对图像文件的流访问。Permission that allows safe, limited audio playback, which includes denying stream access to the image file.

SiteOfOriginAudio 1

只允许对位于应用程序源站点的文件进行音频播放的权限。Permission that only allows audio playback of files that are located at the application's site of origin.

示例

下面的代码示例演示属性的用法 AudioThe 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

注解

使用此枚举设置类的 MediaPermissionAudio 属性 MediaPermissionUse this enumeration to set the MediaPermissionAudio property of the MediaPermission class. 默认值为 SafeAudio。The default is SafeAudio.

适用于