Class TStreamAds
The TStreamAds exposes various methods that are used to manage and display StreamAds advertisement content.
Defined in: <class.streamads.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Construct a new TStreamAds object.
|
| Field Attributes | Field Name and Description |
|---|---|
|
Automatically clears an area if no valid sync-content can be displayed in that area.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
TStreamAds.BuildClickURL(media)
Build an URL that can be used to visit advertiser's website from available metadata.
|
|
DisplayInFrame(anIFrame, media, areatype)
Display advertisement in specified IFRANE object
|
|
|
DisplayInID(anID, media, areatype)
Display advertisement in specified DOM object (DIV or SPAN)
|
|
|
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.
|
|
|
SyncToFrames(adz)
Display available sync-content in registered IFRAMES.
|
|
|
SyncToIDs(adz)
Display available sync-content in registered ID objects.
|
|
| <static> |
TStreamAds.VisitAdvertiser(media)
Open a new browser window to the advertiser's website.
|
Field Detail
{bool}
autocleandisplay
Automatically clears an area if no valid sync-content can be displayed in that area.
i.e. if you only have a cover-ad in the sync-content, then the text and banner areas will be cleared.
- Default Value:
- true
Method Detail
<static>
TStreamAds.BuildClickURL(media)
Build an URL that can be used to visit advertiser's website from available metadata.
- Parameters:
- {array} media
- Array containing advertisement metadata.
DisplayInFrame(anIFrame, media, areatype)
Display advertisement in specified IFRANE object
- Parameters:
- {string/DOM_Object} anIFrame
- DOM object or object ID of IFRAME in which to display advertisement.
- {array} media
- Advertisement metadata.
- {string} areatype
- Can be one of 3 options: banner, cover, text.
DisplayInID(anID, media, areatype)
Display advertisement in specified DOM object (DIV or SPAN)
- Parameters:
- {string/DOM_Object} anID
- DOM object or object ID in which to display advertisement.
- {array} media
- Advertisement metadata.
- {string} areatype
- Can be one of 3 options: banner, cover, text.
RegisterSyncFrames(frameCover, frameBanner, frameText)
Register IFRAME areas where advertisements can be displayed.
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.
RegisterSyncIDs(idCover, idBanner, idText)
Register DIV or SPAN areas where advertisements can be displayed.
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.
SyncToFrames(adz)
Display available sync-content in registered IFRAMES.
- Parameters:
- {array} adz
- Advertisement metadata.
- See:
- #RegisterSyncFrames
SyncToIDs(adz)
Display available sync-content in registered ID objects.
- Parameters:
- {array} adz
- Advertisement metadata.
- See:
- #RegisterSyncIDs
<static>
TStreamAds.VisitAdvertiser(media)
Open a new browser window to the advertiser's website.
- Parameters:
- {array} media
- Array containing advertisement metadata.