SignageNode Docs
Introduction
This page contains technical information required to configure SignageNode to display multimedia.
SignageNode uses a JSON structure internally to define how items should be displayed on the screen. It is not necessary to learn this structure for simple use cases because tools automatically generate it, however, for more advanced digital signage an understanding of how to build a TDJ playlist is essential. This page will introduce the basics.
Terminology
Term | Description |
---|---|
TDJ | Tile Definition JSON. Used to define what displays on the screen. |
Item | Basic element that can be drawn to the screen. E.g. image, video or web page. |
Tile | A rectangular area suitable for displaying an item. |
Player | Processes an item and creates a texture suitable for drawing to a tile. |
Playlist | A list of items that play one after another sequentially. |
Controller | Reads items from a playlist, creates players and sequentially updates a tile. |
Composite | A special item that can create and update multiple tiles at the same time. |
Layer | A surface for drawing a top level playlist. Overlapping layers update tiles concurrently using controllers to generate the final screen output. |
Items
An item defines what is drawn to a tile. Example items:
- Image
- Video
- Web page
- Text
The item object TDJ must include a player
to be used to render the item and additional data for example a uri
pointing to the location of the data.
Media that does not have an inherent duration, for example images, requires duration
to be specified. This value is in seconds.
Web pages and other items that have a variable output resolutions require pixelWidth
and pixelHeight
to be defined. The resolution
specified by the item is independent of the display resolution and scaling is automatic.
See built in players.
Image item
{
"player": "ImagePlayer",
"data": {
"label": "Funny dog",
"duration": "10.0",
"uri": "http://example.com/dog.jpg"
}
}
Web page item
{
"player": "WebViewPlayer",
"data": {
"label": "Web page",
"pixelWidth": "1920",
"pixelHeight": "1080",
"uri": "http://example.com/"
}
}
{ "player": "WebViewPlayer", "data": { "label": "Web page", "pixelWidth": "1920", "pixelHeight": "1080", "uri": "http://example.com/" } }
Video item
{
"player": "VideoPlayer",
"data": {
"label": "Funny cat video",
"uri": "http://example.com/cat.mp4"
}
}
Text item
{
"player": "TextPlayer",
"data": {
"label": "Text",
"pixelWidth": "1920",
"pixelHeight": "1080",
"text": "HelloWorld!"
}
}
{ "player": "TextPlayer", "data": { "label": "Text", "pixelWidth": "1920", "pixelHeight": "1080", "text": "HelloWorld!" } }
Tiles
A tile specifies a list of items to play sequentially and positioning information.
The tile object TDJ must include a list of items
to display.
Margins can be used to position the tile. Margins are values between 0 and 1 relative to the screen size (or outer tile size when in a composite). This example displays the tile 10% from left and right edges and 5% from top and bottom. By default all margins are zero.
Items are drawn to OpenGL textures and rendered inside the tile. The scaling used to fit an item into an area defined by a tile
can be specified by scaleMode
in each item data. This is used when aspect ratios differ. Scale modes include:
- border - Display a border around the non-fitting item. (Color can be set by
background
value) - crop - Make the item fit by filling the tile and cropping excess pixels.
- stretch - Distort the aspect ratio of the item to match the tile dimensions.
- pan - Performs crop but moves the item right or down while the item plays to show the full area.
Tile displaying a dog image followed by a cat video
{
"data": {
"marginLeft": "0.1",
"marginRight": "0.1",
"marginTop": "0.05",
"marginBottom": "0.05"
},
"items": [
{
"player": "ImagePlayer",
"data": {
"label": "Funny dog",
"scaleMode": "pan",
"duration": "10.0",
"uri": "http://example.com/dog.jpg"
}
},
{
"player": "VideoPlayer",
"data": {
"label": "Funny cat video",
"uri": "http://example.com/cat.mp4"
}
}
]
}
Composites
A composite item defines a list of tiles to display at the same time. A CompositePlayer
is used to display the tiles.
The composite object TDJ must include a list of tiles
to display. A duration should also be specified.
A composite acts like a wrapper to display multiple internal tiles as if they are a single item. This means a composite can contain tiles that contain additional composites. This hierarchical, grouping structure makes complicated display arrangements possible.
Items within each tile are loaded and prepared concurrently because each tile has its own independent controller.
Composite displaying a dog image next to a cat video
{
"player": "CompositePlayer",
"data": {
"label": "Dog and cat composite",
"duration": "10.0"
},
"tiles": [
{
"data": {
"marginRight": "0.5"
},
"items": [
{
"player": "ImagePlayer",
"data": {
"label": "Funny dog",
"duration": "10.0",
"uri": "http://example.com/dog.jpg"
}
}
]
},
{
"data": {
"marginLeft": "0.5"
},
"items": [
{
"player": "VideoPlayer",
"data": {
"label": "Funny cat video",
"uri": "http://example.com/cat.mp4"
}
}
]
}
]
}
Playlists and Layers
A playlist is a list of items that should display sequentially on a layer.
The TDJ for a playlist is analogous to that of a tile. The data object can specify margins and
can include a loop
value to define what happens after the last item in a list.
SignageNode supports 4 layers that each progress through an independent playlist. Layers are placed on top of one another and use the full resolution of the screen. Tile positioning and transparency in the layers makes it possible for each layer to contribute to the final output.
Playlist for a layer
{
"data": {
"loop": "true",
"marginTop": "0.05"
},
"items": [
...
]
}
Standard Players
Player | Description | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ImagePlayer | Displays an image. For example JPEG.
|
||||||||||||||||||||||||||
ExoPlayer | Plays a video. For example MP4. Uses ExoPlayer to decode video frames.
|
||||||||||||||||||||||||||
WebViewPlayer | Displays a web page.
|
||||||||||||||||||||||||||
TextPlayer | Displays text. Attempts to fit text into the pixel size of item using minTextSize and maxTextSize as hints.
|
||||||||||||||||||||||||||
VastPlayer | Fetches VAST XML, parses and displays one or more media items.
|
||||||||||||||||||||||||||
CompositePlayer | Renders multiple internal items to multiple tiles. See Composites. |
Additional player properties
Property | Description |
---|---|
duration |
Number of seconds to display the item before progressing to the next item in a list. 9.51 |
label |
A text label or name for the item. A label can be used for displaying on screen or for reviewing playback state. |
transitionShader |
Transition animation applied when the item starts playing. fade |
transitionDuration |
Number of seconds to play the transition animation. 2.5 |
scaleMode |
How to fit the item when aspect ratio differs from tile. border crop stretch pan |
background |
A background color to display when item does not match tile aspect ratio or has transparency.#FF996699 |
horizontalAlign |
Horizontal alignment when item does not match tile aspect ratio and scaleMode=border . Default center. left right |
verticalAlign |
Vertical alignment when item does not match tile aspect ratio and scaleMode=border . Default middle. top bottom |
flipHorizontal |
Flip the item horizontally. Useful to create virtual mirror for CameraPlayer. true false |
flipVertical |
Flip the item vertically. top bottom |
imageRotate |
Rotate the item. Used when camera rotation differs from pixel data. 0 90 180 270 |
shader |
Shader to apply additional processing. filmgrain saturation sharpen blur opacity greenscreen blackscreen |
shaderConfig |
Additional properties for the shader. 0.5 |
impressionCallbackAddress |
Address to send a HTTP GET request when the item starts playing. Can be used for remote impression counting. |
Special player properties
Special player properties that manipulate other active tiles. Useful to hide, resize and reposition tiles on other layers when special content displays.
Property | Description |
---|---|
fullscreen |
Removes main layer margins to force an item to display fullscreen and hides layers 1 and 2.
Use in main layer item data only. false true |
layer0MarginTop |
Applies additional top margin to the active tile in the main layer. Use in layer 1 and 2 item data only. |
layer0MarginRight |
Applies additional right margin to the active tile in the main layer. Use in layer 1 and 2 item data only. |
layer0MarginBottom |
Applies additional bottom margin to the active tile in the main layer. Use in layer 1 and 2 item data only. |
layer0MarginLeft |
Applies additional left margin to the active tile in the main layer. Use in layer 1 and 2 item data only. |
layer1MarginTop |
Applies additional top margin to the active tile in layer 1. Use in layer 2 item data only. |
layer1MarginRight |
Applies additional right margin to the active tile in layer 1. Use in layer 2 item data only. |
layer1MarginBottom |
Applies additional bottom margin to the active tile in layer 1. Use in layer 2 item data only. |
layer1MarginLeft |
Applies additional left margin to the active tile in layer 1. Use in layer 2 item data only. |
Custom Players
Player | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AdminAddressPlayer | Displays the administration address as text.
|
||||||||||||||||
AdvertCountdownPlayer | Displays period in minutes and seconds until the next item that is not an advert will display.
Displays if the current item includes ad=true in item data. Calculates and displays the delay until the next item without ad=true in item data.
|
||||||||||||||||
AndroidMediaPlayer | Plays videos using Android default media player. Deprecated, please use ExoPlayer. | ||||||||||||||||
AnimatedGifPlayer | Plays an animated GIF. Please note that the standard ImagePlayer only plays first frame of a GIF.
|
||||||||||||||||
BitmapPlayer | Internal component for displaying an in memory bitmap image. Used by QRCodePlayer. | ||||||||||||||||
BlankPlayer | Displays nothing. Used to create delays and colored backgrounds. | ||||||||||||||||
CameraPlayer | Displays live video from a connected camera.
|
||||||||||||||||
DigitalClockPlayer | Displays the current time and date.
|
||||||||||||||||
DynamicControlsPlayer | Positions and displays HorizontalControlsPlayer, SimpleControlsPlayer and AdminPlayer on the edges of the screen. | ||||||||||||||||
AndroidMediaPlayer | Plays videos using Android default media player. Deprecated, please use ExoPlayer. | ||||||||||||||||
ExoPlayerCaptionsPlayer | Used by ExoPlayer to display captions. An item using this player should be positioned in a layer above video items. | ||||||||||||||||
FramedSequencePlayer | Support for displaying a second sequence linked to TargetR stacks platform. | ||||||||||||||||
GooglePhotoPlayer | Displays photos from a Google photos account. (Deprecated) | ||||||||||||||||
HorizontalControlsPlayer | Displays playback information and playback position as a horizontal slider. Interactive. | ||||||||||||||||
IntroBlankingPlayer | Internal component for delaying displaying programme information. | ||||||||||||||||
HlsExoPlayer | Plays a HTTP Live Stream. Uses ExoPlayer to decode frames.
|
||||||||||||||||
IntroPlayer | Uses MovingPlayer to move programme information on and off the screen. The timing will be automatically set from main layer. | ||||||||||||||||
LiveImagePlayer | Plays a live streaming MJPEG feed served using multipart/x-mixed-replace .
|
||||||||||||||||
MediaRssPlayer | Reads a media RSS feed and displays the image as a background with the title and description above.
|
||||||||||||||||
MosaicPlayer | Works like CompositePlayer but only supports a single item in each tile. Only a single thread is used to load all items. | ||||||||||||||||
MovingPlayer | Dynamically moves internal tiles on screen and off screen.
|
||||||||||||||||
PlaylistDataPlayer | Displays data stored in the active or next item TDJ in the main layer as text.
|
||||||||||||||||
PlaylistImagePlayer | Fetches an address in the active or next item TDJ and displays using ImagePlayer.
|
||||||||||||||||
PlaylistQrCodePlayer | Displays data stored in the active or next item TDJ in the main layer as a QR code.
|
||||||||||||||||
PopupPlayer | Alias for MovingPlayer. | ||||||||||||||||
ProgressBarPlayer | Displays a simple bar representing the progress through the active item in the main layer. | ||||||||||||||||
QrCodePlayer | Displays a QR code.
|
||||||||||||||||
RssHeadlinePlayer | Reads an RSS feed and displays the title of each item as text one by one. Also supports TextPlayer data to format text.
|
||||||||||||||||
RssPlayer | Reads an RSS feed and displays a composite of text on left and panning web page on the right.
|
||||||||||||||||
ScrollingTextPlayer | Uses TiledTextPlayer to display a long string of text on the screen and progressively moves it to the left.
|
||||||||||||||||
ScrollingRssPlayer | Extends ScrollingTextPlayer to read from an RSS feed and scroll the titles of items.
|
||||||||||||||||
SimpleControlsPlayer | Displays buttons for previous, pause/play and next to control main layer. Used for presentations. | ||||||||||||||||
AdminPlayer | Displays a QR code that links to the admin interface and status infromation vertically. | ||||||||||||||||
StatusPlayer | Displays current status including framerate data transferred from internet, lan, cache and error count horizontally. | ||||||||||||||||
TextBlockPlayer | Displays a nicely spaced title and description. Used by RssPlayer.
|
||||||||||||||||
TextDataPlayer | TextPlayer designed to dynamically update (for macros). Does not auto scale text.
|
||||||||||||||||
TiledTextPlayer | A single tile of text. Used by ScrollingTextPlayer. | ||||||||||||||||
TwitterCompositePlayer | Displays image and tweets from Twitter.
|
||||||||||||||||
TwitterImagePlayer | Displays images from Twitter.
|
||||||||||||||||
TwitterTextPlayer | Displays text from Twitter.
|
Macros
Data values can be dynamically populated at runtime using macros.
Macros automatically replace variable names in square brackets with player data. This is useful to refer to data that is not in the TDJ and updated independently.
To replace static values with dynamic values, create a property with the same name followed by Macro
.
For example, text for the TextPlayer could be automatically display buildingName
from player data using the following player property:
"textMacro": "Welcome to [buildingName]"
This would make it possible to use the same playlist on multiple devices, but set buildingName
differently in the device data.
Transitions
Transition animations play when a new item starts playback. SignageNode captures what is displayed in the tile area on the same layer immediately before playing the new item. An OpenGL shader is then used to progressively change from the captured pixel data to the new pixel data.
To apply a 2.5 second fade between items, add the following data to the new item:
"transitionShader": "fade", "transitionDuration": "2.5"
If no shader or duration is specified, SignageNode will use a random shader from those selected in settings.
Available transitions
Transition | GLSL shader name |
---|---|
Angular | angular |
Bounce | bounce |
Bow Tie Horizontal | bow_tie_horizontal |
Bow Tie Vertical | bow_tie_vertical |
Burn | burn |
Butterfly Wave Scrawler | butterfly_wave_scrawler |
Cannabis Leaf | cannabis_leaf |
Circle | circle |
Circle Crop | circle_crop |
Circle Open | circle_open |
Colour Phase | colour_phase |
Colour Distance | color_distance |
Crazy Parametric Fun | crazy_parametric_fun |
Cross Hatch | cross_hatch |
Cross Warp | cross_warp |
Cross Zoom | cross_zoom |
Cube | cube |
Directional | directional |
Directional Warp | directional_warp |
Directional Wipe | directional_wipe |
Doom Screen Transition | doom_screen_transition |
Doorway | doorway |
Dreamy | dreamy |
Dreamy Zoom | dreamy_zoom |
Fade | fade |
Fade Black | fade_colour |
Fade Grayscale | fade_gray_scale |
Fly Eye | fly_eye |
Glitch Displace | glitch_displace |
Glitch Memories | glitch_memories |
Grid Flip | grid_flip |
Heart | heart |
Hexagonalize | hexagonalize |
Inverted Page Curl | inverted_page_curl |
Kaleidoscope | kaleidoscope |
Linear Blur | linear_blur |
Luminance Melt | luminance_melt |
Morph | morph |
Mosaic | mosaic |
Multiply Blend | multiply_blend |
Perlin | perlin |
Pinwheel | pin_wheel |
Pixelize | pixelize |
Polar Function | polar_function |
Polka Dots Curtain | polka_dots_curtain |
Radial | radial |
Random Squares | random_squares |
Ripple | ripple |
Rotate Scale Fade | rotate_scale_fade |
Simple Zoom | simple_zoom |
Squares Wire | squares_wire |
Squeeze | squeeze |
StereoViewer | stereo_viewer |
Swap | swap |
Swirl | swirl |
Tangent Motion Blur | tangent_motion_blur |
Undulating Burn Out | undulating_burn_out |
Water Drop | water_drop |
Wind | wind |
Window Blinds | window_blinds |
Window Slice | window_slice |
Wipe Down | wipe_down |
Wipe Left | wipe_left |
Wipe Right | wipe_right |
Wipe Up | wipe_up |
Zoom In Circles | zoom_in_circles |
Transitions included under MIT license. GitHub Repository. Online preview.