# HG changeset patch # User John "Elwin" Edwards # Date 1340203319 25200 # Node ID a077f9f84052296e5da4c9cbead37ebebcd4ed60 # Parent 7793ad53b90f2368365076c79a8fed2a6fd3bb93 RLG-Web client: adjust polling for watching. The ajaxterm state machine assumed data appears in response to user actions, which is not true when watching. It now uses different sets of parameters for playing and watching. diff -r 7793ad53b90f -r a077f9f84052 rlgterm.js --- a/rlgterm.js Wed Jun 20 07:37:15 2012 -0700 +++ b/rlgterm.js Wed Jun 20 07:41:59 2012 -0700 @@ -27,13 +27,20 @@ this.set(4000); this.state++; } - else if (this.state < 8) { - this.set(15000); - this.state++; + else if (session.playing) { + if (this.state < 8) { + this.set(15000); + this.state++; + } + else { + /* It's been over a minute. Stop polling. */ + this.clear(); + } } else { - /* It's been over a minute. Stop polling. */ - this.clear(); + /* If watching, it can't stop polling entirely, because there + * are no POST events to start it up again. */ + this.set(10000); } }, posted: function (wasdata) {