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

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

问题描述

是否有适用于 Windows Phone 8 的 API 允许接收耳机事件,例如当用户按下播放/停止按钮时?我会对这些事件感兴趣,以便在我的应用程序中做出相应的反应.

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.

问候,

推荐答案

如果此时您正在控制设备上的音频/视频(通过 MediaElementBackgroundAudioPlayer),然后播放/暂停事件将通过 MediaElementBackgroundAudioPlayer 在您的代码中引发.

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天全站免登陆