的Windows Phone 8的耳机控件的事件API [英] Windows Phone 8 API for Headset control events

查看:196
本文介绍了的Windows Phone 8的耳机控件的事件API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有的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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆