MediaPermissionAudio MediaPermissionAudio MediaPermissionAudio MediaPermissionAudio Enum

定义

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

public enum class MediaPermissionAudio
public enum MediaPermissionAudio
type MediaPermissionAudio = 
Public Enum MediaPermissionAudio
继承
MediaPermissionAudioMediaPermissionAudioMediaPermissionAudioMediaPermissionAudio

字段

AllAudio AllAudio AllAudio AllAudio 3

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

NoAudio NoAudio NoAudio NoAudio 0

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

SafeAudio SafeAudio SafeAudio SafeAudio 2

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

SiteOfOriginAudio SiteOfOriginAudio SiteOfOriginAudio SiteOfOriginAudio 1

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

示例

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

注解

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

适用于