PlayToConnectionErrorEventArgs.Code 属性

定义

获取“播放到”连接错误的错误代码。

public:
 property PlayToConnectionError Code { PlayToConnectionError get(); };
/// [get: Windows.Foundation.Metadata.Deprecated("PlayToConnectionErrorEventArgs may be altered or unavailable for releases after Windows 10. Instead, use CastingConnectionErrorOccurredEventArgs.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
PlayToConnectionError Code();
/// [get: Windows.Foundation.Metadata.Deprecated("PlayToConnectionErrorEventArgs may be altered or unavailable for releases after Windows 10. Instead, use CastingConnectionErrorOccurredEventArgs.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
PlayToConnectionError Code();
public PlayToConnectionError Code { [Windows.Foundation.Metadata.Deprecated("PlayToConnectionErrorEventArgs may be altered or unavailable for releases after Windows 10. Instead, use CastingConnectionErrorOccurredEventArgs.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] get; }
public PlayToConnectionError Code { [Windows.Foundation.Metadata.Deprecated("PlayToConnectionErrorEventArgs may be altered or unavailable for releases after Windows 10. Instead, use CastingConnectionErrorOccurredEventArgs.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] get; }
var playToConnectionError = playToConnectionErrorEventArgs.code;
Public ReadOnly Property Code As PlayToConnectionError

属性值

“播放到”连接错误的错误代码。

属性

注解

在 Windows 8UWP 应用中,代码始终设置为 DeviceError

在 Windows 8.1UWP 应用中,Code 设置为 DeviceErrorProtectedPlaybackFailed。 这使应用能够确定故障是否与内容的媒体保护状态相关。 应用可以继续播放播放列表中的下一项,也可以停止播放。 应用还可以使用此新的 Code 值从播放列表中删除所有受保护的音乐。

适用于

另请参阅