Skip to content

slide_player:

This is a config file reference. Click for instructions.

This page is reference material which explains every setting and option for this section of an MPF yaml config file. See the instructions for config files for formatting and other details. See our guide to config file examples for more examples of real configs in action.

Valid in
machine config files YES ✅
mode config files NO 🚫
shows & show files YES ✅

The slide_player: section of your config is where you configure slides to be shown (or removed) based on events being posted.

This is an example:

#! slides:
#!   slide1: []
#!   slide2: []
#!   slide3: []
slide_player:
  event1: slide1
  event2: slide2
  event3: slide3

See Slide player for details.

Optional settings

The following sections are optional in the slide_player: section of your config. (If you don't include them, the default will be used).

action:

Single value, type: one of the following options: play, remove. Default: play

play

: Makes the slide active. Note that the actual slide shown on a display will be whichever active slide has the highest priority, so depending on what other slides are active, this action might not technically show the slide.

Also note that if a transition is specified (either in the slide
definition or the `transition:` section here, then than transition
will be used when showing this slide.

remove

: Removes the slide from the list of active slides. If this slide is the highest priority slide that's currently showing, then the next-highest priority slide will be shown in its place.

If a `transition_out:` setting is used, then that transition will be
used here.

For example, to remove slide1 when the event remove_slide_1 is posted:

#! slides:
#!   slide1: []
slide_player:
  remove_slide_1:           # event name
    slide1:                 # slide name
      action: remove

You can also specify a transition for the removal, like this:

#! slides:
#!   slide1: []
slide_player:
  remove_slide_1:           # event name
    slide1:                 # slide name
      action: remove
      transition: fade

background_color:

Single value, type: color (color name, hex, or list of values 0-255). Default: 000000ff

Help us write it!

This section is unwritten or needs an update or edit. Can you help write it? Get your name in lights and geeky pinball bragging rights! Hit the magic sparkly wand to the right of the title to see this page source on GitHub. Then add/edit and submit your change. It's easy!


expire:

Single value, type: time string (secs) (Instructions for entering time strings). Defaults to empty.

Specifies that this slide should automatically be removed after the time has passed. When it's removed, whichever slide is the next-highest priority will be shown.

The expiration timer starts immediately, so if the slide you're displaying here doesn't end up being shown because it's not the highest-priority slide, the timer is still running in the background, and the slide will still be removed when the timer expires.

If a transition_out: is specified, it will be applied when the slide expires:

slides:
  base:
    widgets:
      - type: text
        text: BASE SLIDE
        color: ff0000
        font_size: 100
  expire_slide:
    widgets:
      - type: text
        text: EXPIRE 5s
        color: purple
        y: 66%
    expire: 5s
    transition_out:
      type: wipe
      duration: 5s
slide_player:
  mc_reset_complete.1: expire_slide
  mc_reset_complete.2: base

force:

Single value, type: boolean (true/false). Default: false

Forces this slide to be shown, even if it's not the highest priority. Note that if you add or remove a slide and the priority list is recalculated, whichever slide is the highest priority will be shown. This force: option is sort of a one-time thing. Really you should use priorities to control which slides are shown.

priority:

Single value, type: int_or_token. Defaults to empty.

An adjustment to the priority of the slide that will be shown.

In MPF, all slides have a priority. Only one slide is show on a display at a time, and the slide with the highest priority is automatically shown. If that slide is removed, the next-highest priority slide is shown.

If you have a slide_player: section in a mode-based config file, then slides shown will automatically have the priority of the mode. (slide_player: sections from your machine-wide config file use priority 0.) However you can adjust the priority of a slide (up or down) by adding a priority: setting with a positive or negative value.

If a slide is being shown as part of a show, the slide will have the priority set to whatever the priority of the show is (which itself is also the priority of the mode unless you adjust it)

show:

Single value, type: boolean (true/false). Default: true

Specifies whether this slide should be shown. (It will only be shown if it's the highest priority slide for that display.) If you set show: false, then the slide will be created and added to the display's collection of slides, but it won't be shown.

Note that if you add or remove a slide and the priority list is recalculated, whichever slide is the highest priority will be shown. This show: option is sort of a one-time thing. Really you should use priorities to control which slides are shown.

slide:

Single value, type: string. Defaults to empty.

You can specify the slide name here (instead of as key for the complete player). There are reasons to use this but you won't need it in most cases.

target:

Single value, type: string. Defaults to empty.

Specifies the display target this slide will be shown on. If you do not specify a target, then the slide will be shown on the default display.

In MPF, display targets are the names of the displays themselves. However there is also a slide_frame widget (literally a widget which you add to a slide which holds other slides, kind of line picture-in-picture). When you add a slide_frame to a slide, you give it a name, and that name is added to the list of valid targets.

So really the target: here is either the name of a display, or the name of a slide_frame where you want this slide to be displayed.

tokens:

One or more sub-entries. Each in the format of string : string

Help us write it!

This section is unwritten or needs an update or edit. Can you help write it? Get your name in lights and geeky pinball bragging rights! Hit the magic sparkly wand to the right of the title to see this page source on GitHub. Then add/edit and submit your change. It's easy!


transition:

Unknown type. See description below.

Note that you can also configure a transition when the slide is defined in the slides: section of your config if you want to use the same transition every time for a slide and don't want to always have to define it here.

If you specify a transition in both places, the transition in the slide_player or show will take precedence.

transition_out:

Unknown type. See description below.

Note that you can add a transition out to the slide player when a slide is shown, and it will be "attached" to the slide and used when that slide is removed (either with the slide player or when a new slide is created with a higher priority than it).

slides:
  base:
    widgets:
      - type: text
        text: BASE SLIDE
        color: ff0000
        font_size: 100
  top_slide:
    widgets:
      - type: text
        text: TOP SLIDE
        color: purple
        y: 66%

slide_player:
  mc_reset_complete.1: top_slide
  mc_reset_complete.2: base
  mc_reset_complete.3:
    top_slide:
      action: remove
      transition:
        type: fade
        duration: 3s

Or you can specify a transition out when you remove the slide (with action: remove).

There can only be one transition between slides, so if an outgoing slide has a transition out set, and an incoming slide has a transition set, then the incoming transition will take precedence.

widgets:

Unknown type. See description below.

Help us write it!

This section is unwritten or needs an update or edit. Can you help write it? Get your name in lights and geeky pinball bragging rights! Hit the magic sparkly wand to the right of the title to see this page source on GitHub. Then add/edit and submit your change. It's easy!


Help us write it!

This section is unwritten or needs an update or edit. Can you help write it? Get your name in lights and geeky pinball bragging rights! Hit the magic sparkly wand to the right of the title to see this page source on GitHub. Then add/edit and submit your change. It's easy!



Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results