7 Controller "API" - lebaston100/htmlOverlayFramework GitHub Wiki
The controller enables you to easily communicate with all the clients. They are available on the controller side through communicator.js
sendCommand(command, content);
Sends a command to all connected controller and clients
- command: Something to seperate your request. (Text or json object/array)
- content: The content to send. (Text or json object/array)
changeElementContent(id, newContent);
Changes the content of the object(e.g. changing text in a div or span)
- id: The id of the element to change
- newContent: The new content to change to (html tags supported)
getInput(id);
Reads the input of an html <input>
object
-
id: The id of the
<input>
object to read
doConnect();
Connect to the Server. This should not be needed because the controller automatically connects when loading the page.
doDisconnect();
Disconnect from the Server