html5 qunit | flash qunit
- // Within VAST config we pass the custom macro:
- 'vast': {
- 'numPreroll':"1",
- 'prerollUrl': localPath + 'targetAds.php?target={myAdTarget.target}' ,
- 'loadAdsOnPlay': true
- ...
- }
- // Within the button click handler we set the custom property)
- 'readyCallback': function( playerId ){
- var kdp = $('#' + playerId )[0];
- $('#targetHotel').click(function(){
- kdp.setKDPAttribute('myAdTarget', 'target', 'hotel');
- });
- $('#targetHooro').click(function(){
- kdp.setKDPAttribute('myAdTarget', 'target', 'hooroo');
- })
- }