AxWindowsMediaPlayer 对象的 MediaCollectionAttributeStringAdded 事件
[与此页面关联的功能(Windows 媒体播放器 SDK)是旧版功能。 它已被 MediaPlayer 取代。 MediaPlayer 已针对Windows 10和Windows 11进行了优化。 Microsoft 强烈建议新代码尽可能使用 MediaPlayer 而不是 Windows 媒体播放器 SDK。 如果可能,Microsoft 建议重写使用旧 API 的现有代码以使用新 API。]
将属性值添加到库时,将发生 MediaCollectionAttributeStringAdded 事件。
[C#]
private void player_MediaCollectionAttributeStringAdded(
object sender,
_WMPOCXEvents_MediaCollectionAttributeStringAddedEvent e
)
[Visual Basic]
Private Sub player_MediaCollectionAttributeStringAdded(
sender As Object,
e As _WMPOCXEvents_MediaCollectionAttributeStringAddedEvent
) Handles player.MediaCollectionAttributeStringAdded
事件数据
与此事件关联的处理程序的类型为 AxWMPLib._WMPOCXEvents_MediaCollectionAttributeStringAddedEventHandler。 此处理程序接收 AxWMPLib._WMPOCXEvents_MediaCollectionAttributeStringAddedEvent 类型的参数,其中包含与此事件相关的以下属性。
属性 | 说明 |
---|---|
bstrAttribName | System.StringSpecifing the name of the attribute. 有关Windows 媒体播放器支持的属性的信息,请参阅属性参考。 |
bstrAttribVal | System.StringSpecifing 属性的值。 |
备注
将媒体项添加到库时,其元数据将添加到媒体集合中,并且会为每个添加的属性触发此事件。
要求
要求 | 值 |
---|---|
版本 |
Windows 媒体播放器 9 系列或更高版本 |
命名空间 |
AxWMPLib |
程序集 |
|
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈