简体   繁体   English

UWP TimedMetadataTrack事件未触发

[英]UWP TimedMetadataTrack Events are not firing

I can not seem to get the a TimedMetadataTrack object to fire the events CueEntered or CueExited for SpeechCue events. 我似乎无法获取TimedMetadataTrack对象来为SpeechCue事件触发事件CueEntered或CueExited。

Any thoughts? 有什么想法吗?

So, apparently this line is needed when registering for IMediaCue.CueEntered and IMedia.CueExited events (at least the SpeechCue implementation of the interface): 因此,在注册IMediaCue.CueEntered和IMedia.CueExited事件(至少是接口的SpeechCue实现)时,显然需要以下行:

((Windows.Media.Playback.MediaPlaybackItem)item).TimedMetadataTracks.SetPresentationMode((uint)index, Windows.Media.Playback.TimedMetadataTrackPresentationMode.ApplicationPresented);

This line is required to exactly allow the system to send the CueEntered and CueExited events that are being listened for. 需要此行才能完全允许系统发送正在侦听的CueEntered和CueExited事件。

Yet again, another case of Microsoft not fully documenting things in their API Documentation or Code Examples. 再一次,Microsoft在API文档或代码示例中未完全记录事物的另一种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM