JSignage:RSSTutorial2
From SpinetiX Support Wiki
Description
Simple text bar
- The text ticker is great for variable size text from external sources, but its legibility is poor.
- The text bar provides for easy to read and less intrusive display of text, and more options in the formatting and transitions.
- It handles variable size content by scrolling automatically up if the text does not fit on the number of lines specified.
Source code
var uri = 'http://download.spinetix.com/content/jSignage/tutorial/media/science.rss';
$.get( uri, function( rssFeed ) {
// Parse the feed into an array of news items. Each one is an object with a title and a description property.
// You can supply your own custom parse here if the data source is not RSS formatted.
var rss = $.parseRSS( rssFeed );
$.textBar({
top: '80%',
height: '20%',
frame: { backColor: '#0000FF', backOpacity: 0.5, padding: "0 0 16 16" },
data: rss,
lines: 2,
textAlign: 'start',
fill: 'white',
renderToText: function() {
return this.title;
},
repeatCount: 'indefinite'
}).addTo('svg');
}, 'text' );