diff options
author | 2017-10-16 20:43:05 -0700 | |
---|---|---|
committer | 2017-10-16 20:43:20 -0700 | |
commit | a6d08a5739649adabc574b016ef7cf192b997fa2 (patch) | |
tree | d26b38dd514493cb4c66996c4afb3c00ce487a28 | |
parent | f5dc724681b735f6645f58fc66d365ef4e9db4d2 (diff) |
@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm-rw-r--r-- binding/afm-mediaplayer-binding.c 7
1 files changed, 6 insertions, 1 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c index cac0f23..56213cb 100644 --- a/binding/afm-mediaplayer-binding.c +++ b/binding/afm-mediaplayer-binding.c @@ -290,6 +290,7 @@ static void controls(struct afb_req request) const char *value = afb_req_value(request, "value"); const char *position = afb_req_value(request, "position"); int cmd = get_command_index(value); + json_object *jresp = NULL; if (!value) { afb_req_fail(request, "failed", "no value was passed"); @@ -301,12 +302,16 @@ static void controls(struct afb_req request) switch (cmd) { case PLAY_CMD: + jresp = json_object_new_object(); gst_element_set_state(data.playbin, GST_STATE_PLAYING); data.playing = TRUE; + json_object_object_add(jresp, "playing", json_object_new_boolean(TRUE)); break; case PAUSE_CMD: + jresp = json_object_new_object(); gst_element_set_state(data.playbin, GST_STATE_PAUSED); data.playing = FALSE; + json_object_object_add(jresp, "playing", json_object_new_boolean(FALSE)); break; case PREVIOUS_CMD: case NEXT_CMD: @@ -368,7 +373,7 @@ static void controls(struct afb_req request) return; } - afb_req_success(request, NULL, NULL); + afb_req_success(request, jresp, NULL); pthread_mutex_unlock(&mutex); } |