Loop
The Loop engine shows other content in a continuous loop. This is a fundamental component that can be used to create more sophisticated channel content by nesting loops, using references and shuffling.
loop:- image: picture.png duration: 3- video: video.mp4- color: red duration: 2loop: shuffle: cycle content: - image: picture.png duration: 3 - video: video.mp4 - color: red duration: 2Properties
Section titled “Properties”content shorthand required
Section titled “content ”Type: content engine[]
Description: List of content to loop. Can be any content that TVS can display. When using the shorthand syntax, the list of content is specified directly under the loop key without the content property.
shuffle
Section titled “shuffle”Type: random | cycle | false
Added in version: 5.0.0
Whether to shuffle the content in the loop. If set to random, the content will be displayed in a random order. If set to cycle, the content will be displayed in a random order but will ensure that all items are shown once before any item is repeated. If set to false, the content will be displayed in the order it is defined.
Type: number, 1 or greater
Added in version: 5.5.0
Limits the number of items from the content list to include in the loop.
By default we don’t apply a limit. If set to a number less than the total number of items, only that many items will be randomly selected from the content list to be included in the loop.
This is useful when combined with shuffle to create a pool of content to choose from; for example, using shuffle: random and limit: 1 will grab one random piece of content whenever the loop is displayed.
Nest this loop inside another loop and now you’ve created, for instance, an ad pool that will display a random ad from the loop each time it’s shown. Say you make that a ref then you can reuse it whenever you’d like to show an ad!