Angular directive

sra-laps-banner source template

This widget displays a TV style banner title and lap counter with sponsor images. By default, the session type is displayed as the title. The default sponsor is SIMRacingApps. To change either, create a file called "LapsBanner.json" in the "Documents/SIMRacingApps" folder with the following entries.
{
  "title":            "TALLADEGA 500",
  "fontSize":         "100%",
  "sponsorImageUrls": ["Sponsors/Sponsor1.png","Sponsors/Sponsor2.png","sra"],
  "sponsorSeconds":   [60,120,60]
}
In the example, the sponsor logos is an array of files that are stored in the "Documents/SIMRacingApps/Sponsors" folder. The ratio of a sponsor file should be 4x1. The default window size calculates that to be 200x50 pixels, but it will scale up and down. Each sponsor can have their own display time using the seconds array. The first sponsor will be displayed for 60 seconds, the second for 120 seconds, then start over. You can add more sponsors and seconds to display as needed. Any image that cannot be found will be replaced with the stock SRA logo.

Example list of the files.

   Documents\SIMRacingApps\LapsBanner.json
   Documents\SIMRacingApps\Sponsors\Sponsor1.png
   Documents\SIMRacingApps\Sponsors\Sponsor2.png

Example:

<sra-laps-banner></sra-laps-banner>
Image goes here

Dependencies:
NameTypeDescription
data-sra-args-title-filename string The name of the file to read the title and sponsors from. Defaults to "LapsBanner".
data-sra-args-show-estimated boolean If true, shows the estimated time remaining. Default is false, will only show time remaining if not estimated.
data-sra-args-by-class boolean If true estimated laps are based on the REFERENCE car's class. Default is false.
data-sra-args-interval integer The interval, in milliseconds, that this widget will update from the server. Default is 500.