Sections
The optional sections option sets the sections rendered by the library.
Type definition
type SectionConfig = {
limit: number;
order: 1 | -1;
state: 'live' | 'preShow' | 'replay';
tag: string;
title?: string;
};
Options
limit
Limit the number of shows displayed in the show listing.
order
Set the order of shows in the show listing to ascending (1) or descending (-1).
state
Set the show state for the show listing to either list currently streamed shows (live), upcoming shows (preShow) or conducted shows (replay).
tag
Provide an optional tag, e.g. to indiciate the state of a show.
title
Set the title for the show listing.
Example
// one show that is currently live
window.LiSA.library.configs.push({
sections: [{ limit: 1, order: -1, state: 'live' }],
});
// 3 upcoming shows, with custom title
window.LiSA.library.configs.push({
sections: [{ limit: 3, order: 1, state: 'preShow', title: 'What\'s next' }],
});
// 25 recorded shows, with custom tag and title
window.LiSA.library.configs.push({
sections: [{ limit: 25, order: -1, state: 'preShow', tag: 'Replay', title: 'What you have missed' }],
});
You can either combine multiple sections into one library or create multiple, separate libraries. The usage example shows three separate libraries with one section each.
Default value
By default, LiSA Library contains three sections:
Currently live shows — Max. 3 entries in descending order. Upcoming shows — Max. 5 entries in ascending order. Recent shows — Max. 10 entries in descending order.
export const DEFAULT: SectionConfig[] = [
{ limit: 3, order: -1, state: 'live', tag: 'LIVE', title: 'Currently live' },
{ limit: 5, order: 1, state: 'preShow', tag: 'UPCOMING', title: 'Upcoming shows' },
{ limit: 10, order: -1, state: 'replay', tag: 'RECORDED', title: 'Recent shows' },
];
Omitting any listing
In case you want don't want any show listing to appear, e.g. when you want the stage player only, please set the sections value to an empty array.
Last updated