Friday, October 16, 2020

JMRI WebThrottle on Steroids

I'm toying with integrating a video view into the JMRI Web Throttle. This is currently very much a proof of concept. After an evening of messing with JavaScript, which I haven't done in many years, it's working reasonably well. The throttle pane is the box on the left (or on the right, depending on personal preferences). The video window is in the middle under the function buttons. The function buttons are basically useless for a remote operator. You can't see the locomotive and you can't hear it either.

The idea is to use this interface for remote operations in situations where I want to limit which locomotives remote operators are able to control, e.g. in a Virtual Open House setup. This is to limit potential abuse by visitors from the Internet, where it is easy to hide. Since it is difficult to kick people off a public Web site without shutting it down for everyone, I'd like to avoid giving people full control of the layout through the Withrottle API. The Web Throttle is nice because it only gives access to locomotives that are included in the JMRI engine roster. By controlling what's in the roster, I can control which engines are shown to to remote operators.

The video stream currently comes directly from the camera. I need to find a way to proxy the video stream to the engineer to mimize lag, while providing an overview of what's going on for everybody else.

No comments: