JSignage:PlaylistTutorial4

From SpinetiX Support Wiki

Jump to: navigation, search

Description

Automatic playlist of all the medias in a directory

  • Automatic playlist.
  • The list of media files is computed rather then hard-coded in the script.

Source code

var list = [];
for ( var i=1; i<18; i++ )
  list.push( 'media/Monet_4_3/' + i + '.jpg' );

$.playlist({
  left: 240,
  top: 60,
  width: 800,
  height: 600,
  data: list,
  defaultDur: 3,
  defaultTransition: $.crossFade(),
  repeatCount: 'indefinite'
}).addTo( 'svg' );

Preview

This page was last modified on 9 August 2017, at 16:18.