aboutsummaryrefslogtreecommitdiffstats
path: root/binding/afm-mediaplayer-binding.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/afm-mediaplayer-binding.c')
-rw-r--r--binding/afm-mediaplayer-binding.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c
index 495353d..b2e73d9 100644
--- a/binding/afm-mediaplayer-binding.c
+++ b/binding/afm-mediaplayer-binding.c
@@ -1021,7 +1021,10 @@ static void onevent(afb_api_t api, const char *event, struct json_object *object
if (!strcmp(uid, "event.media.next")) {
if(data.playing) {
g_mutex_lock(&mutex);
- seek_track(NEXT_CMD);
+ if (!data.avrcp_connected)
+ seek_track(NEXT_CMD);
+ else
+ AFB_WARNING("currently '%s' not supported for AVRCP controls", uid);
g_mutex_unlock(&mutex);
json_object_get(object);
@@ -1030,7 +1033,10 @@ static void onevent(afb_api_t api, const char *event, struct json_object *object
} else if (!strcmp(uid, "event.media.previous")) {
if(data.playing) {
g_mutex_lock(&mutex);
- seek_track(PREVIOUS_CMD);
+ if (!data.avrcp_connected)
+ seek_track(PREVIOUS_CMD);
+ else
+ AFB_WARNING("currently %s not supported for AVRCP controls", uid);
g_mutex_unlock(&mutex);
json_object_get(object);