Player APIs
From SpinetiX Support Wiki
Introduction
In computer programming, an application programming interface (API) is a set of subroutine definitions, communication protocols and tools for building software. In general terms, it is a set of clearly defined methods of communication among various components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer.
Just as a graphical user interface (GUI) makes it easier for people to use programs, application programming interfaces make it easier for developers to use certain technologies in building applications. An API simplifies programming by abstracting the underlying implementation and only exposing objects or actions the developer needs.
Player APIs
The APIs available on SpinetiX players are detailed below.
APIs for remote control and monitoring
- RPC API for remote management and monitoring.
- Configuration API for local and remote player configuration.
- Pull Mode for remote distribution of content.
- Status API for getting the current status of the player (operating status, device stats, screen display settings, storage details, etc.) or snapshot of the content being rendered.
- Web Storage REST API for reading and writing variables (i.e., localStorage data) onto the player from external clients through HTTP(S) calls.
- Shared Variables Network API to remotely update Shared Variables or trigger UI events.
JavaScript APIs
See more details about the supported JavaScript APIs.
High level APIs
- jSignage API to simplify writing JavaScript code for animations, interactivity & event handling, DOM traversal & manipulation, Ajax calls, data feed parsing etc.
- jSignage Graph API for generating charts and gauges graphs.
- jSignage QR code API for generating QR code graphics.
- Shared Variables JavaScript API for access to Shared Variables framework for real-time data exchange.
- Web Storage API for permanent storage of structured data on the client side (HMP, Elementi).
Low level APIs
- SVG Tiny 1.2 Micro DOM (uDOM) API for generating SVG content.
- JavaScript COM API for interacting with devices connected to the player via the serial port.
- USB I/O API for interacting with USB devices that comply to the HID specification.
- Node.js API for creating UDP and TCP sockets and servers.
- HTMLImageElement API for querying information about the dimensions of graphic resources.
- XMLHttpRequest Level 1 API for transferring data between a client and a server.
- HTML Canvas 2D Context API to draw and manipulate graphics on a canvas drawing surface.