Configuring slide cyclers
A slide cycler (not to be confused with a sign cycler) combines slides from one or more galleries and cycles through them at a specified rate. It does not choose one slide in particular; for that, you'll want to use a slide view, which depends on a slide cycler.
The main purpose of a slide cycler is to allow multiple slide views to be synchronized, so they can:
- Advance at the same time
- Show (or avoid showing) the same slide on multiple displays if desired
Slide cyclers also allow specifying weights for each gallery, so you can ensure more relevant content is displayed more frequently.
Slide cyclers are configured within the slide_cyclers section of awesign.yaml. An example configuration looks like
this:
slide_cyclers:
- name: hallway_cycler
seconds_per_slide: 10
ordering_method: random
galleries:
- davis_third_floor_hallways
- name: everything_cycler
seconds_per_slide: 5.5
ordering_method: database
galleries:
- davis_third_floor_hallways
- ai_research_spotlight
- another_gallery
gallery_options:
davis_third_floor_hallways:
weight: 0.3
weight_mode: random_drop
nameis a unique name for the slide cycler. You can refer to this cycler in other sections of the config, such as slide views, using this nameseconds_per_slideis the number of seconds between slide advances. It can be an integer or float.- Regardless of this value, slides will not advance more precisely than 0.1 seconds. E.g.,
1.23becomes1.3.
- Regardless of this value, slides will not advance more precisely than 0.1 seconds. E.g.,
ordering_methoddetermines how the slides will be sorted. The options are:database: Slides will be consistently ordered in the natural order returned from the database without any sorting appliedrandom: Slides will randomly be shuffled each time the cycler reaches the end. This means there's a chance of the same slide being shown twice in a row.- Additional ordering methods may be added in the future
galleriesis a list of gallery names to include in this slide cycler, as configured in galleries. All the slides from these galleries will be combined into one cycler.gallery_optionsis an optional section where you can provide extra settings on a per-gallery basis within the slide cycler. You can specify only the galleries you want to tweak within this section; you don't need to include all of them. Within each gallery:weight(optional) is a float or int usually (but not always) between0.0and1.0. The way the weight is applied depends on theweight mode(below).weight_mode(optional) sets which algorithm is used to weigh the slides in the gallery. See Weight modes below for all options and more details.
Gallery weights
Galleries within a slide cycler can be weighted in different ways to reduce how frequently certain slides are shown.
In order for weights to have any effect, both the weight and the weight_mode must be configured for any particular
galleries in the gallery_options section of the slide cycler. The basic configuration is described above.
By default, without configuring weighting, every "live" slide* from each gallery is included in every cycle. These valid slides that could be currently shown are referred to as "candidates."
* (We're talking about current and approved slides. A pending, denied, cancelled, expired, or future slide will never be included in a slide cycler.)
Any galleries that are added to gallery_options without being included in galleries will be ignored.
Weight modes
The weight_mode field specifies which algorithm is used for applying gallery weights.
- "random_drop" - each slide from the specified gallery has a random chance of being removed from each cycle.
- Slides in a gallery with a lower
weight(closer to zero) have a lower chance of being shown during each cycle. - E.g., if a gallery has a weight of
0.3, each slide from that gallery has a 30% chance of being shown during a cycle. weightvalues of0.0or lower mean the slide will never be shown; you should instead remove the gallery from the slide cycler configuration.weightvalues of1.0or higher mean the slide will always be shown; there is no need to configure weighting.
- Slides in a gallery with a lower
- "max_slides" - a hard limit on the number of slides from the specified gallery that will be shown during each
cycle.
- E.g., if a gallery has a weight of
5, then at most 5 slides will be shown from that gallery during a particular cycle. - The
weightshould be an integer; float values will be rounded to the nearest integer. weightvalues of effectively0or smaller will never show slides from the specified gallery; you should instead remove the gallery from the slide cycler configuration.
- E.g., if a gallery has a weight of
- More modes may be added in the future
If there are slide candidates, but weighting removes all of them, a completely random candidate will be added to the slide cycler for that cycle.