A mouse hover event and its position can be send to interact with the score. The coordinates of the mouse are in pixels, with top left corner of coordinate (0, 0). The data should be a position in an image previously retrieved with a get message. The score may be modified and its current version number is increased. When a request is sent, a event to leave the previous mouse hover position and a event to enter the new mouse hover position are created.
With http server
The POST method is used to send mouse hover event. The request must have a entity-body with the entities x and y which contains the mouse coordinates. The path of the request is serverUrl/hover.
Example:
<html>
<body>
<form action="serverUrl/hover" method="post">
<input type="text" name="x" value="152" />
<input type="text" name="y" value="354" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
With websocket server
Example:
var hoverJsonObject = { id : 8954, method : "hover", x : 152, y : 354 };
exampleSocket.send(JSON.stringify(hoverJsonObject));
In case of success : a response with a code 200 (“Success”) and no response body.
With websocket server
Example: { id: "45612", status: "ERROR", "error" : "unknown object type: xxxx" }
The response is asynchronous, other messages can be received before the response.