Handle subscription of messages in the webapp.

Messages larger than a threshold are split and reassembled due to the
size limit in webrtc. Threshold may have to be adjusted somewhere between
64KiB and 256KiB.

This also includes a basic handler for a ping message and a more
advanced image handler.

Change-Id: If66acfb1bb84e9d3ff686994a94b1480cb70b2aa
diff --git a/y2020/vision/BUILD b/y2020/vision/BUILD
index 2e3723d..fa30531 100644
--- a/y2020/vision/BUILD
+++ b/y2020/vision/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
 load("//aos:config.bzl", "aos_config")
 
 flatbuffer_cc_library(
@@ -36,3 +36,9 @@
         "//aos/events:shm_event_loop",
     ],
 )
+
+flatbuffer_ts_library(
+    name = "vision_ts_fbs",
+    srcs = ["vision.fbs"],
+    visibility = ["//y2020:__subpackages__"],
+)
diff --git a/y2020/vision/vision.fbs b/y2020/vision/vision.fbs
index 66f695b..b8d8bd9 100644
--- a/y2020/vision/vision.fbs
+++ b/y2020/vision/vision.fbs
@@ -14,7 +14,7 @@
   // The number of columns in the image.
   cols:int;
   // The image data.
-  data:[byte];
+  data:[ubyte];
   // Timestamp when the frame was captured.
   monotonic_timestamp_ns:long;
   realtime_timestamp_ns:long;