Class Index | File Index

Classes


Class TMediaData

The TMediaData object is used to manage track and advertisement metadata.
Basic functions are to:


Defined in: <class.mediadata.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Construct a new TMediaData object.
Field Summary
Field Attributes Field Name and Description
 
The URL where cover pictures are stored online.
 
The maximum number of media items to store in the history array.
 
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.
Method Summary
Method Attributes Method Name and Description
 
Retrieve current advertisement.
 
Retrieve last advertisement processed.
 
getMediaHistory(limit, mediatypes)
Retrieve items from history array.
Class Detail
TMediaData()
Construct a new TMediaData object.
Field Detail
{string} coverpicture_url
The URL where cover pictures are stored online.

{int} history_max
The maximum number of media items to store in the history array.
Default Value:
20

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

{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.
Method Detail
{array} getCurrentAd()
Retrieve current advertisement.
Returns:
{array} Mediadata array of CURRENT advertisement. Null if none or advertisemented ended.

{array} getLastAd()
Retrieve last advertisement processed.
Returns:
{array} Mediadata array of last advertisement processed. Null if none were processed yet.

{array} getMediaHistory(limit, mediatypes)
Retrieve items from history array.
var md = new TMetaData();
var list = md.getMediaHistory(10,"A,S,N");
for(i = 0; i < list.length; i++)
	alert('songtype: '+list[i]['songtype']+', title:'+list[i]['title']);
Parameters:
{int} limit
The maximum number of items to return.
{string} mediatypes
Comma-delimited list of mediatypes (songtype) to return. Default is A,S
Returns:
{array} List of media items as array.

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