Class Index | File Index

Classes


Class TDoItAll

The doitall object is used as a controller and container of many other worker objects. It provides a single object which can be used to manage 99% of the functionality exposed by the SDK.
Defined in: <class.doitall.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Construct a new TDoItAll object, however ALWAYS use the global doitall object instance.
Field Summary
Field Attributes Field Name and Description
 
If TRUE, object will try and display advertisements automatically.
 
Instance of TDataPoller.
 
If TRUE, the system will load the standard debug test suite that will help you test your player Some examples: ?debug=Y&sid=123&pid=123
 
If TRUE, loads station name, description and other station details upon calling Start() method.
 
Instance of TMediaData.
 
Subscribe to the onAds event to handle ONLY songtype=A metadata (i.e.
 
Subscribe to the onData event to handle any new metadata that arrives.
 
Subscribe to the onHistoryLoaded event to be notified once all history data has been loaded.
 
Subscribe to the onMedia event to handle ONLY songtype=S metadata (i.e.
 
The onRestore event is fired once the current showing sync-advertisements times out.
 
Subscribe to the onStationData event to be notified once Station Information has been loaded.
 
The onVideoBegin event is fired once a video advertisement is about to start playing.
 
The onVideoEnd event is fired once a video advertisement ends.
 
If TRUE, the system will try and read some settings from the query string.
 
Instance of TPlayer.
 
If TRUE, History list will be filled with recently played tracks upon calling Start() method.
 
StreamAds station's publisherID (Also known as StreamAds pid or StreamAds stationID).
 
SpacialNet stationID (Also known as AudioRealm stationID).
 
Instance of TStreamAds.
 
Specify the time (in milliseconds) to wait after an advertisement before we clear all sync content (i.e.
 
If TRUE, loads track metadata via "polling" method.
 
Enable the playback of localized content (Mostly advertisements).
Method Summary
Method Attributes Method Name and Description
 
RegisterSyncFrames(frameCover, frameBanner, frameText)
Register IFRAME areas where advertisements can be displayed.
 
RegisterSyncIDs(idCover, idBanner, idText)
Register DIV or SPAN areas where advertisements can be displayed.
 
Register DIV or SPAN area where video advertisements can be displayed.
 
Starts all the working functionality.
Class Detail
TDoItAll()
Construct a new TDoItAll object, however ALWAYS use the global doitall object instance. No need to construct your own instances.
Field Detail
{bool} autoDisplayAds
If TRUE, object will try and display advertisements automatically. Requires that the appropriate advertisement areas are registered via #RegisterSyncFrames, #RegisterSyncIDs and #RegisterVideoArea.
Default Value:
true

{TDataPoller} datapoller
Instance of TDataPoller.

{bool} loadDebug
If TRUE, the system will load the standard debug test suite that will help you test your player Some examples: ?debug=Y&sid=123&pid=123
Default Value:
false

{bool} loadStationInfo
If TRUE, loads station name, description and other station details upon calling Start() method. Requires a valid #stationID to work. Fires onStationData event once fully loaded.
Default Value:
false

{TMediaData} mediadata
Instance of TMediaData.

{YUI_EVENT} onAds
Subscribe to the onAds event to handle ONLY songtype=A metadata (i.e. advertisements) that arrive.
Arguments passed back to the event handler function are:

{YUI_EVENT} onData
Subscribe to the onData event to handle any new metadata that arrives.
Arguments passed back to the event handler function are:
See:
TMediaData#onData

{YUI_EVENT} onHistoryLoaded
Subscribe to the onHistoryLoaded event to be notified once all history data has been loaded.
No arguments are passed back to event handler function.
See:
#preloadHistory
TMediaData#onHistoryLoaded

{YUI_EVENT} onMedia
Subscribe to the onMedia event to handle ONLY songtype=S metadata (i.e. normal tracks) that arrive.
Arguments passed back to the event handler function are:

{YUI_EVENT} onRestore
The onRestore event is fired once the current showing sync-advertisements times out. Subscribe to this event to be notified when you can safely reclaim the advertisement areas to display your own custom content again.
No arguments are passed back to event handler function.

{YUI_EVENT} onStationData
Subscribe to the onStationData event to be notified once Station Information has been loaded.
Arguments passed back to the event handler function are:
See:
#loadStationInfo

{YUI_EVENT} onVideoBegin
The onVideoBegin event is fired once a video advertisement is about to start playing. Most applications will need to subscribe to this event to make sure the video area is visible. (See #RegisterVideoArea)
Arguments passed back to the event handler function are:

{YUI_EVENT} onVideoEnd
The onVideoEnd event is fired once a video advertisement ends. Most applications will need to subscribe to dispose of the video area or make it invisible. (See #RegisterVideoArea)
No arguments are passed back to event handler function.

{bool} parseQueryStr
If TRUE, the system will try and read some settings from the query string. Some examples: ?debug=y&sid=123&pid=123
Default Value:
true

{TPlayer} player
Instance of TPlayer.

{bool} preloadHistory
If TRUE, History list will be filled with recently played tracks upon calling Start() method. Requires a valid #stationID to work. Fires onHistoryLoaded event once fully loaded.
Default Value:
false

{int} publisherID
StreamAds station's publisherID (Also known as StreamAds pid or StreamAds stationID). Note: Not to be confused with SpacialNet, AudioRealm or Hydra stationIDs! See #stationID.

{int} stationID
SpacialNet stationID (Also known as AudioRealm stationID). Note: Not to be confused with StreamAds publisherID or Hydra stationID! See #publisherID.

{TStreamAds} streamads
Instance of TStreamAds.

{int} timeoutPadding
Specify the time (in milliseconds) to wait after an advertisement before we clear all sync content (i.e. banners, textads) This is the time we wait before onRestore event is triggered. Note: The total wait time is: Wait = Duration of advertisements + timeoutPadding
Default Value:
180000

{bool} useDataPoller
If TRUE, loads track metadata via "polling" method. This is usually only done if metadata can not be obtained via some other method, i.e. in-stream scripts or metadata channels on servers. Requires a valid #publisherID, and potentially #stationID to work. Fires #onData, #onMedia and #onAds events depending on the media type returned.
Default Value:
false

{bool} useLocalMedia
Enable the playback of localized content (Mostly advertisements).
Default Value:
false
Method Detail
RegisterSyncFrames(frameCover, frameBanner, frameText)
Register IFRAME areas where advertisements can be displayed. This is really only a proxy function, calling doitall.streamads.RegisterSyncFrames() to do the actual work. Make sure to pass NULL for any areas you do not wish to register.
Parameters:
{string} frameCover
The IFrame DOM object ID where the "cover" sync banner must be displayed.
{string} frameBanner
The IFrame DOM object ID where the "banner" sync banner must be displayed.
{string} frameText
The IFrame DOM object ID where the "text" sync banner must be displayed.
See:

RegisterSyncIDs(idCover, idBanner, idText)
Register DIV or SPAN areas where advertisements can be displayed. This is really only a proxy function, calling doitall.streamads.RegisterSyncIDs() to do the actual work. Make sure to pass NULL for any areas you do not wish to register.
Parameters:
{string} idCover
The DIV/SPAN DOM object ID where the "cover" sync banner must be displayed.
{string} idBanner
The DIV/SPAN DOM object ID where the "banner" sync banner must be displayed.
{string} idText
The DIV/SPAN DOM object ID where the "text" sync banner must be displayed.
See:

RegisterVideoArea(idVideo)
Register DIV or SPAN area where video advertisements can be displayed. This is really only a proxy function, calling doitall.localmedia.RegisterVideoArea() to do the actual work.
Parameters:
{string} idVideo
The DIV/SPAN DOM object ID where any videos may be displayed.
See:

Start()
Starts all the working functionality. This method should only be called AFTER the doitall object is fully configured.

©2008 - Spacial Audio Solutions, LLC
Documentation generated by JsDoc Toolkit 2.0.2 on Mon Apr 20 2009 17:57:05 GMT+0200 (SAST)