summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-01-10 13:47:06 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-01-10 16:03:34 -0800
commitd76a25b3be19d78cdb0d3204c486ac2d1706cac9 (patch)
treed0616ffa9ddd19e55a73862cf0fa33dde164d24b /README.md
parente1d1561cd7061e5c2d72507e3ab367f94ed655d4 (diff)
binding: mediaplayer: add binding documentation
Add initial documentation for agl-service-mediaplayer service Bug-AGL: SPEC-1245 Change-Id: I3f9b6b4fd584a0530006d9a0a726c0eb32fed885 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md80
1 files changed, 80 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..664f73b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,80 @@
+# MediaPlayer Service
+
+## Overview
+
+MediaPlayer service controls playback of media from a playlist using one provided from
+*agl-service-mediascanner* and reports status via events.
+
+## Verbs
+
+| Name | Description | JSON Parameters |
+|:-------------------|:----------------------------------------|:------------------------------------------------|
+| subscribe | subscribe to respectice events | *Request:* {"value": "playlist"} |
+| unsubscribe | unsubscribe to respective events | *Request:* {"value": "playlist"} |
+| controls | controls for media playback | See **MediaPlayer Controls** section |
+| metadata | get current metadata of selected media | See **metadata Reporting** section |
+| playlist | get current playlist of media | See **playlist JSON Response** section |
+
+### MediaPlayer Controls
+
+Media playback can be controlled with sending on the following action commands within a JSON request within
+the parameter of *value* (i.e. *{"value": "play"}*)
+
+| Name | Description | JSON Request Example |
+|:----------------|:----------------------------------------------------------|:--------------------------------------------|
+| play | start playing media | {"value": "play} |
+| pause | stop playing media | {"value": "pause"} |
+| previous | skip to previous item in playlist | {"value": "previous"} |
+| next | skip to next item in playlist | {"value": "next"} |
+| seek | seek position (in milliseconds) within current track | {"value": "seek", "position": 50000} |
+| fast-forward | seek forward (in milliseconds) within current track | {"value": "fast-forward", "position": 2000} |
+| rewind | seek backward (in milliseconds) within current track | {"value": "rewind", "position": 2000} |
+| pick-track | select media item in playlist via index number | {"value": "pick-track", "index": 4} |
+| volume | set volume 0-100% for media stream | {"value": "volume, "volume": 40} |
+
+### metadata Reporting
+
+JSON response for *metadata* request parameters
+
+| Name | Description |
+|:------------|----------------------------------------------------|
+| index | index number within playlist |
+| duration | length of track in milliseconds |
+| position | current position in milliseconds |
+| volume | current volume in percent |
+| path | path to media on filesystem |
+| title | title for current track |
+| album | album name for current track |
+| artist | artist name for current track |
+| genre | genre type for current track |
+| image | *(optional)* base64 encoded data URI for album art |
+
+### playlist JSON Response
+
+JSON response is an array of playlist entries with the parameter name of *list*.
+
+| Name | Description |
+|:------------|-------------------------------------------------|
+| index | index number within playlist |
+| duration | *(optional)* length of track in milliseconds |
+| path | path to media on filesystem |
+| title | title for playlist entry |
+| album | album name for playlist entry |
+| artist | artist name for playlist entry |
+| genre | genre type for playlist entry |
+
+## Events
+
+| Name | Description |
+|--------------------|:---------------------------------------------|
+| playlist | event that reports playlist changes |
+| metadata | event that reports playback status |
+
+### playlist Event Notes
+
+JSON response data is an array of the same fields documented in **playlist JSON Response** section
+
+### metadata Event Notes
+
+JSON response data is the same fields documented in **metadata Reporting** section *with the exception
+of album art due to performance issues*
lor: #f8f8f2 } /* Text.Whitespace */ .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sa { color: #e6db74 } /* Literal.String.Affix */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */