Screensaver configuration - resoai/TileBoard GitHub Wiki

screensaver is an optional object in global CONFIG

May have next fields:

  • timeout in seconds
  • slidesTimeout timeout between slides
  • styles object of js-css styles
  • slides array of slides objects
  • leftBottom, leftTop, rightBottom, rightTop - optional arrays with SCREENSAVER_ITEMS

SCREENSAVER_ITEMS is similar (basically the same) to HEADER_ITEMS from the header. Read more https://github.com/resoai/TileBoard/wiki/Header-configuration

slides - array of slides object. Each object should have bg field for the bg image. styles, leftBottom, leftTop, rightBottom, rightTop are also supported for any slide.

So you basically can have global SCREENSAVER_ITEMS for every slides, or different items for different slides.

Example


{
   timeout: 300, 
   slidesTimeout: 10,
   styles: { fontSize: '40px' },
   leftBottom: [{ type: SCREENSAVER_ITEMS.DATETIME }],
   slides: [
      { bg: 'images/bg1.jpeg' },
      {
         bg: 'images/bg2.png',
         rightTop: [ // put text to the 2nd slide
            {
               type: SCREENSAVER_ITEMS.CUSTOM_HTML,
               html: 'Welcome to the <b>TileBoard</b>',
               styles: { fontSize: '40px' }
            }
         ]
      },
      { bg: 'images/bg3.jpg' }
   ]
}

Global functions

Also there're global function to start and hide screensaver window.showScreensaver() and window.hideScreensaver()