Firefox OS/Vaani/Music: Difference between revisions

Line 142: Line 142:
== Proposal 2: not JSON-LD ==
== Proposal 2: not JSON-LD ==


Unlike proposal 1, proposal 2 is based on connection channel instead of actions. We group actions which will be called with the same channel. This design looks simpler and no JSON-LD or schema.org data introduced to manifest.webapp.
Unlike proposal 1, proposal 2 is based on communication channel instead of actions. We group actions which will be called with the same channel. This design looks simpler and no JSON-LD or schema.org data introduced to manifest.webapp.


An app who supports custom command should put the following section in manifest.webapp
An app who supports custom command should put the following section in manifest.webapp, which is for IAC mechanism:
 
    "custom_commands": [{
        "iac-channel": "media-controller",
        "potentialAction": ["PlayAction", "StopAction"]
      }]
 
 
In the future, we should create an API for Vaani. Vaani can open app while it wants to send message to them. In this version, we don't need iac-channel field and let Vaani to open the app to predefined url.


     "custom_commands": [{
     "custom_commands": [{
        "channel": "media-controller",
         "(optional)name": "Music Player",
         "(optional)name": "Music Player",
         "(optional)description": "Control your music playing with voice",
         "(optional)description": "Control your music playing with voice",
         "launch-path": "index.html",
         "launch-path": "index.html",
         "supported-action": ["PlayAction", "StopAction"]
         "potentialAction": ["PlayAction", "StopAction"]
       }]
       }]


Confirmed users
209

edits