问题描述
有没有的Windows Phone 8的API,它允许接收耳机事件,例如当用户presses播放/停止按钮?我有兴趣在这些事件中我的应用程序做出相应的反应。
Is there an API for Windows Phone 8 which allows to receive headset events, such as when a user presses the play/stop button? I would be interested in these events to react in my application accordingly.
问候,
推荐答案
(通过的MediaElement
如果你是在这一点上的音频/设备上的视频控制或 BackgroundAudioPlayer
),然后播放/暂停活动将在你的code提高通过的MediaElement
或 BackgroundAudioPlayer
。
If you are in control of the audio/video on the device at this point (via MediaElement
or BackgroundAudioPlayer
), then play/pause events will be raised in your code via MediaElement
or BackgroundAudioPlayer
.
如果您是不是在音频/视频的控制,那么就不可能捕获这些事件
If you are not in control of the audio/video, then it is not possible to capture these events.
这篇关于的Windows Phone 8的耳机控件的事件API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!