Class adways.iab.vast.Loader
Extends: adways.event.EventDispatcherLoader class description
adways.iab.vast.Loader
(
)
public
addEventListener
( kind, callback, [instance=null], [priority=0], [useWeakReference=false]
)
public
Parameters:
-
kind
<Constant>kind of the event to listen -
callback
<FUNCTION>function called when the event is fired -
[instance=null]
<Object> optionalcallback's instance. Useful when the callback is binded to an object:Class = function () {}; Class.prototype.callback = function () {}; var a = new Class(); aDispatcher.addEventListener(AN_EVENT_KIND, a.callback, a);
-
[priority=0]
<Number> optionalpriority -
[useWeakReference=false]
<Boolean> optionalnot yet used
instance==null
, the callback should be accessible from the global context and be a "static" method. Exemple:namespaceA.subnamespace.myCallback = function (event) { ... }; aDispatcher.addEventListener(AN_EVENT_KIND, namespaceA.subnamespace.myCallback);
getCompanions
( [depth=-1]
)
public
Returns Companion ads associated to this loader.
Parameters:
-
[depth=-1]
<Number> optionallevel of depth to find associated ads, -1 means all.
array of companion.
getDelegateBuilderClassname
(
)
public
Returns the delegate builder class name.
delegate builder class name.
getDelegateBuilderURL
(
)
public
Returns the delegate builder url.
delegate builder url.
getLinears
( [depth=-1]
)
public
Returns Linear ads associated to this loader.
Parameters:
-
[depth=-1]
<Number> optionallevel of depth to find associated ads, -1 means all.
array of linear ads.
getNonLinears
( [depth=-1]
)
public
Returns Non-linear ads associated to this loader.
Parameters:
-
[depth=-1]
<Number> optionallevel of depth to find associated ads, -1 means all.
array of non-linear ads.
getPlayerClass
(
)
public
Returns the player class.
player class.
getRendererSize
(
)
public
Returns ad render size.
two entry number array with width and height.
getSlot
(
)
public
Returns the slot.
slot.
getVAST_URL
(
)
public
Returns the VAST url.
VAST url.
getVAST_XML
(
)
public
Returns the vast xml file.
vast xml file.
getVASTFileState
(
)
public
Returns the loader vast xml file state.
vast xml file state.
getVideoSlot
(
)
public
Returns the video slot. (old getPlayerAPI)
main video player API pointer.
getWrapped
( [depth=-1]
)
public
Returns Wrappers associated to this loader.
Parameters:
-
[depth=-1]
<Number> optionallevel of depth to find associated ads, -1 means all.
array of wrappers.
hasEventListener
( kind, callback, [instance=null]
)
public
Parameters:
-
kind
<Constant>the event's kind -
callback
<FUNCTION>the listener's function -
[instance=null]
<Object> optionalthe listener callback's instance
nbEventListeners
( kind
)
public
Parameters:
-
kind
<Constant>the event's kind
removeAllEventListeners
(
)
public
removeEventListener
( kind, callback, [instance=null]
)
public
Parameters:
-
kind
<Constant>kind of the event to listen -
callback
<FUNCTION>function called when the event is fired -
[instance=null]
<Object> optionalcallback's instance
requestVAST
( [VAST_URL='']
)
public
Requests the VAST file.
Parameters:
-
[VAST_URL='']
<String> optional
- 1: request launched
- -1: arguments error: no vast URL to request
- -2: arguments error: videoSlot is not set
- -3: arguments error: playerClass is not set and delegateBuilderURL or delegateBuilderClassname are not set
- -4: arguments error: vastFileState is not URL_CHANGED
setDelegateBuilderClassname
( name
)
public
Set the delegate builder class name.
Parameters:
-
name
<String>delegate builder class name.
- 1: delegate builder class name set with success
- 0: current delegate builder class name is the same as the new one
- -1: arguments error: not enough arguments
- -2: arguments error: arguments[0] is not a string
- -3: arguments error: vastFileState is neither vastFileStates.EMPTY empty nor vastFileStates.URL_CHANGED
setDelegateBuilderURL
( url
)
public
Set the delegate builder url.
Parameters:
-
url
<String>delegate builder url.
- 1: delegate builder url set with success
- 0: current delegate builder url is the same as the new one
- -1: arguments error: not enough arguments
- -2: arguments error: arguments[0] is not a string
- -3: arguments error: vastFileState is neither vastFileStates.EMPTY empty nor vastFileStates.URL_CHANGED
setPlayerClass
( playerClass
)
public
Set the player class.
Parameters:
-
playerClass
<String>player class identifier.
- 1: player class set with success
- 0: current player class is the same as the new one
- -1: arguments error: not enough arguments
- -2: arguments error: arguments[0] is not a string
- -3: arguments error: vastFileState is neither vastFileStates.EMPTY empty nor vastFileStates.URL_CHANGED
setRendererSize
( width, height
)
public
Set the ad render size.
Parameters:
-
width
<Number>ad width.
-
height
<Number>ad height.
- 1: render size set with success
- 0: render size is the same as the new one
- -1: arguments error: not enough arguments
- -2: arguments error: arguments[0] is not a number
- -3: arguments error: arguments[1] is not a number
- -3: arguments error: vastFileState is neither vastFileStates.EMPTY empty nor vastFileStates.URL_CHANGED
setSlot
( slot
)
public
Set the slot that will be transmit to the VPAID object.
Parameters:
-
slot
<DOMElement>slot that will be transmit to the VPAID object.
- 1: slot set with success
- 0: current slot is the same as the new one
- -1: arguments error: not enough arguments
- -2: arguments error: arguments[0] is not a object
- -3: arguments error: vastFileState is neither vastFileStates.EMPTY empty nor vastFileStates.URL_CHANGED
setVAST_URL
( url
)
public
Set the VAST url.
Parameters:
-
url
<String>VAST url to request.
- 1: VAST url set with success
- 0: current VAST url is the same as the new one
- -1: arguments error: not enough arguments
- -2: arguments error: arguments[0] is not a string
- -3: arguments error: vastFileState is neither vastFileStates.EMPTY empty nor vastFileStates.URL_CHANGED
setVideoSlot
( videoSlot
)
public
Set the main video Player API. (old setPlayerAPI)
Parameters:
-
videoSlot
<Object>Main video player API pointer.
- 1: videoSlot set with success
- 0: current videoSlot is the same as the new one
- -1: arguments error: not enough arguments
- -2: arguments error: arguments[0] is not an object
- -3: arguments error: vastFileState is neither vastFileStates.EMPTY empty nor vastFileStates.URL_CHANGED