Code Library

Layers Overview

· By Media La Vista

Layers are the building blocks of jSignage content. Every visual element is a layer with position, size, timing, and effects.

All Layer Types

Basic Layers

ConstructorDescriptionDetails
$.media()Auto-detect media type (preferred)Media Layers
$.video()Video + optional audioMedia Layers
$.image()Static bitmap or vectorMedia Layers
$.textArea()Rectangular text regionText Layers
$.g()Group container

Advanced Layers

ConstructorDescriptionDetails
$.playlist()Sequential media playbackPlaylists
$.slideshow()Custom-layout slides via renderToSVGSlideshows
$.fitTextArea()Auto-sized textText Layers
$.headlineTextArea()Single headline, max fontText Layers
$.scrollingTextArea()Scrolling textText Layers
$.table()Data tableTables

Interactive Layers

ConstructorDescriptionDetails
$.multiPage()Programmatic page switchingInteractive
$.carousel()Swipeable carouselInteractive
$.popup()Modal popupInteractive
$.pushButton()Interactive buttonInteractive

Common Attributes

AttributeDescriptionDefault
left, topPosition (px or %)0
width, heightSize (px or %)'100%'
beginStart time (seconds)0
durDuration (seconds, 'media', 'indefinite')depends
repeatCountNumber of repetitions1
opacityLayer opacity (0–1)1
frameFrame decoration objectFrame Decoration

Common Functions

MethodDescription
.addTo('svg')Add to the root SVG element
.show() / .hide()Visibility toggle
.begin() / .end()Timeline control
.fadeIn() / .fadeOut()Effects

Multi-Zone Layout Example

$(function() {
  $('svg').add([
    // Main video area (75% width, 80% height)
    $.video({
      id: 'main', left: '25%', height: '80%',
      href: 'content.mp4'}),
    // Left sidebar - image playlist
    $.playlist({
      id: 'leftbar', width: '25%', height: '100%',
      data: ['ad1.jpg', 'ad2.jpg', 'ad3.jpg'],
      repeatDur: 'indefinite', defaultDur: 5
    }),
    // Bottom news bar
    $.textArea({
      id: 'newsbar', top: '80%', left: '25%', width: '50%',
      frame: { frameColor: 'black', backColor: 'grey'}
    }).text("Welcome to jSignage")
  ]);
});

Chaining

All layer methods return the layer object, enabling chaining:

$.textArea({ fontSize: 60, dur: 5 })
  .text("Hello World")
  .fadeIn({ dur: '1s'})
  .fadeOut({ dur: '0.5s'})
  .addTo('svg');
SpinetiX Wiki Reference
All 30+ layer types, common attributes (position, size, timing), and functions.

Need Help With Your Project?

Media La Vista provides Tier 1–3 local support across the Middle East. 10-minute response for Partner Club members.

This page is available in English only
هذه الصفحة متوفرة باللغة الإنجليزية فقط
NS
Media La Vista support
Typically replies natively
مرحباً بكم في دعم SpinetiX عبر واتساب

كيف يمكنني مساعدتكم في حلول اللوحات الرقمية، أو البنية التحتية AV/IT، أو منتجات SpinetiX؟
Hello and welcome to SpinetiX Support on WhatsApp.

How can I help you with digital signage solutions, AV/IT infrastructure, or SpinetiX products?