Firefox OS/Remote Control: Difference between revisions
Luke-chang (talk | contribs) |
Luke-chang (talk | contribs) |
||
| Line 64: | Line 64: | ||
keycode: <a specified key to be pressed after the string inputted, integer> | keycode: <a specified key to be pressed after the string inputted, integer> | ||
} | } | ||
} | |||
==== Custom Events ==== | |||
{ | |||
type: 'custom', | |||
action: <custom action name, string>, | |||
... | |||
} | } | ||
Revision as of 10:01, 26 October 2015
Introduction
Meta Bug: bug 1205939
UX & Visual Spec
UX: https://drive.google.com/folderview?id=0B5RN80W56Ga9Qkp1Mm5TTlNMTlE&usp=drive_web
Architecture Designs
Ajax Protocol
Touch Events
{
type: 'touchstart',
detail: {
width: <touch panel width, integer, in pixels>,
height: <touch panel height, integer, in pixels>,
identifier: <A simple unique identifier for server to distinguish touch events between different clients, string>
}
}
{
type: 'touchmove',
detail: {
dx: <dx between current point and starting point, integer, in pixels>,
dy: <dy between current point and starting point, integer, in pixels>,
identifier: <should be identical with "touchstart">,
duration: <duration from "touchstart", integer, in milliseconds>
}
}
{
type: 'touchend',
detail: {
dx: <same as "touchmove">,
dy: <same as "touchmove">,
identifier: <should be identical with "touchstart">,
duration: <same as "touchmove">,
swipe: <the gesture within this touch, string, should be "left", "right", "up" and "down">
}
}
Scroll Events
There are "scrollstart", "scrollmove" and "scrollend" events which details are all identical with corresponding touch events above.
Key Events
{
type: 'keypress',
detail: <KeyEvent constant, string, sush as "DOM_VK_RETURN">
}
Input Events
{
type: 'input',
detail: {
clear: <whether to clear the entire string in the current focused input field, boolean>,
string: <new string to append, string>,
keycode: <a specified key to be pressed after the string inputted, integer>
}
}
Custom Events
{
type: 'custom',
action: <custom action name, string>,
...
}
Pairing
Meta Bug: bug 1207996
Flowchart
First Time Connection
Enter PIN Code
Resume Connection
Dismiss Pairing
Protocol
from client to server via AJAX
{
pincode: <pincode>
}
response when success
{
verified: true,
uuid: <uuid>
}
reponse when error
{
verified: false,
reason: 'expired' / 'invalid'
}
internal events at server side
{
type: 'mozChromeRemoteControlEvent',
detail: {
action: 'pin-created',
pincode: <pincode>
}
}
{
type: 'mozChromeRemoteControlEvent',
detail: {
action: 'pin-destroyed'
}
}
{
type: 'mozContentEvent',
detail: {
type: 'remote-control-pin-dismissed',
detail: {
reason: 'timeout' / 'manually'
}
}
}
Secure Connection
To protect private data between user and TV, we provide a secure connection which refers to SSL and jCryption. Here is the concept:
- Client requests RSA public key from TV.
- Client sends symmetric key and PIN code (if any) to TV, encrypted with public key.
- TV decrypts symmetric key with private key
- TV generates an UUID, encrypts with symmetric key then sends 2 UUIDs to client, one is encrypted the other is not.
- Client decrypts UUID with symmetric key, confirm UUID
- Begin remote control with symmetric key.
Goal of Remote Control is to create an easy to use way for every device, we hide public key exchange at the background. User doesn't need to input a long URL with public key nor scan QRCode. Everything is done automatically without interrupting user experience.
Bug Status
Top blockers of bug 1205939 - [TV][2.5][meta][TV side] Remote Control
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 406 [1] => Not Acceptable ) ) 1
Top blockers of bug 1207971 - [TV 2.5][meta] Provide a TV remote control app
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 406 [1] => Not Acceptable ) ) 1
Top blockers of bug 1208006 - [TV 2.5][meta] Implement a client-side page for TV remote control
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 406 [1] => Not Acceptable ) ) 1
Top blockers of bug 1212385 - [TV 2.5][meta] Remote Control features in Smart System
Bugzilla query error
Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 406 [1] => Not Acceptable ) ) 1




