Conduit API
Case Study
Web Page API -> AddRadioStation
 
This function is used to add a radio station to Online Radio Player component located on the toolbar.
 
AddRadioStation(name,
url,
ContantType,
mediaType,
uniqueComponentID)
 
Parameter Description Range Type
name The radio station's name not null or empty string
url The URL of the radio station feed not null or empty string
ContantType The type of player:
1. MP- The radio station is Media Player
2. REAL- The radio station is Real Player
not null or empty string
mediaType The type of media:
1. STREAM- The URL is a link to a live stream
2. XML_FEED- The URL is a link to an XML feed (e.g. a podcast)
not null or empty string
uniqueComponentID The station's unique ID. If the parameter is left empty, a unique ID is automatically created not null or empty string
 
An object that contains the following fields:
Field Name Description Type
returnValue Indicates whether the operation was successful.
True - The function adds a radio station to the toolbar successfully
False - The radio station is not added to the toolbar. Check the value of the errorCode to determine the specific reason for the function failure
boolean
errorCode
Specific error code. See Error Code Table for additional information.
int
 
*Notice: API methods must be invoked after the web page has triggered the "onload" event.
 
The following example contains two buttons. Clicking on the first button will insert a radio station item to the Conduit demo toolbar; clicking on the second button will insert a podcast station to the Conduit demo toolbar.