From 44563ca380ca5b6caf2ebc2b696605570bba7730 Mon Sep 17 00:00:00 2001 From: Karthik Palaniappan Date: Wed, 18 May 2016 03:04:17 -0400 Subject: [PATCH] Warn about slow links with toast notifications (#2) --- index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/index.html b/index.html index 5213252..c0d5835 100644 --- a/index.html +++ b/index.html @@ -121,6 +121,13 @@ feed: feed.id error: console.error onmessage: (msg, jsep) -> + if msg["videoroom"] == "event" + console.log("TODO: do we care about this event?", msg) + else if msg["videoroom"] == "slow_link" + toastr.warning("Slow connection (remote stream " + feed.display + ")", JSON.stringify(msg["videoroom"])) + else + console.log("Unhandled event", msg) + if jsep remote_feed.createAnswer jsep: jsep @@ -186,6 +193,10 @@ console.log "TODO: handle detaching streams" else if msg["videoroom"] == "error" console.error msg["error"] + else if msg["videoroom"] == "slow_link" + toastr.warning("Slow connection (local stream)", JSON.stringify(msg["videoroom"]["current-bitrate"])) + else + console.error("Unhandled event", msg) if jsep plugin_handle.handleRemoteJsep