iSpring.Preloaders Interface

The Preloaders Interface represents a collection of available player preloaders. It provides the information about preloadre and allows adding customized preloaders. The Preloaders Interface exposes the following properties and methods.

Table 1. Properties
Property Value Type Access Default value Property description
Count int Read only   Returns number of preloaders in the collection
Table 2. Methods
Method Method description
Preloader Item(object preloaderIndex)

Returns the Preloader interface representing a preloader with a given preloader index. The preloaderIndex parameter can be one of the following types:

  • an integer value specifying preloader order number. Note: order number is 1-based
  • a string specifying preloader name, id or alias. Preloader id and name are specified in the .xml XML files in the {iSpringSDK installation folder}\players\preloaders folder.

Note: This is a default method of the Preloaders interface so it can be omitted in some programming languages such as Visual Basic or C#. See the Samples section for more details.

void Load(string path) Loads additional player preloader or preloaders from the specified path. Note: if the path parameter is a folder name, it will be searched for *.xml files. If the path parameter is a file name, the specified preloader file name will be loaded.


The following samples illustrate typical tasks which can be performed using the Preloaders interface.

C# sample

PresentationConverter pc = new PresentationConverter();
Preloaders Preloaders = pc.Preloaders;

// the following ways can be used to access individual Preloaders of the collection
Preloader preloader1 = Preloaders[1];
Preloader preloader2 = Preloaders.Item(2);
Preloader flowerPreloader = Preloaders["Flower"];

// load one preloader file
Preloaders.Load("c:\\my Preloaders\\preloader1.xml");

// load preloader files using wildcard
Preloaders.Load("c:\\all Preloaders\\preloader*.xml");

// load all .preloader files in c:\myPreloaders folder

// Enumerate the installed Preloaders
foreach (Preloader preloader in preloader){    Console.WriteLine(        "Preloader \t" + "name: \"" + preloader.Name + "\", id: \"" + preloader.Id + "\"\n");}

VB.NET sample:

Dim pc as new PresentationConverter()

' the following ways can be used to access individual Preloaders of the Preloaders collection
Dim Preloaders as Preloaders = pc.Preloaders
Dim preloader1 as Preloader = Preloaders(1)
Dim preloader2 as Preloader = Preloaders(2)
Dim flowerPreloader as Preloader = Preloaders("Flower")

// load one preloader file
Preloaders.Load("c:\my Preloaders\preloader1.xml")

// load preloader files using wildcard
Preloaders.Load("c:\all Preloaders\preloader*.xml")

// load all .preloader files in c:\myPreloaders folder