<?sphp $this->text('pagetitle') ?>
 
Home of the Squeezebox™ & Transporter® network music players.

PluginScreenSavers

From SqueezeboxWiki

Jump to: navigation, search

You can turn any plugin into a custom screensaver by registering your plugin as a screensaver. The plugin should be used to give the user any settings options or to set the screensaver as active or reset to default. You can register the screensaver using the following subroutine:

sub screenSaver { 
    Slim::Buttons::Common::addSaver( 
        SCREENSAVER.saverModeName', 
        getScreensaverFunctions(), 
        \&setScreensaverMode, 
        \&leaveScreensaverMode, 
        string('PLUGIN_SCREENSAVER_NAME') 
    ); 
}
Change this to provide a unique name for your screensaver. Using the prefix"SCREENSAVER" will indicate to the server that your mode is of the screensaverclass, and match the IR mappings from the [screensaver] section of Default.map
This subroutine, just like getFunctions points to the function has for the screensaver mode.
subroutine just like setMode to initialize anything you need for the screensaver mode.
subroutine to execute before the mode exits
  • string('SCREENSAVER_NAME')
SCREENSAVER_NAME should be change to a unique identifier for your pluginname. This can be the same as your plugin, or something different. This allowsfor future nationalisation for the other languages supported by SlimServer

Next Page