Before you follow the steps below, make sure you have the
Lightning-CLI installed globally only your system
npm install -g @lightningjs/cli
Link the SDK to the App by running
npm link
import BLAd from 'bl-lightning-sdk'
- Added FocusableList support
- Added DynamicComponent support
- Added conversion v2 creative support
- Added Timeouts for requests
- Fixed some issues with wrong values in analytics
- Fixed bugs on Geo locator creative
- Fixed fadeout animation for frame ads
- Modularized creatives into their respective components
- Dynamic carousel and trivia logic now uses FocusableList component
- Switched setting the background in frame ads from the container src to an appended sub view
- Migrated to XHR instead of fetch
- Removed _template() methods
- Removed unused, commented or duplicated code
const BLdataUrl =
'//....../lightning.json'
const advertiserInfo = {
configId: '1018',
applicationName: 'THIS IS YOUR APP NAME',
advertisingIdentifier: 'YOU NEED TO GENERATE THIS IF APPLICABLE',
applicationVersion: 'YOU-POPULATE-THIS',
deviceName: 'YOU NEED TO POPULATE THIS',
}
export default class App extends Lightning.Component {
static _template() {
return {
w: 1920,
h: 1080,
BLAd: {
type: BLAd,
alpha: 0,
},
}
}
_init() {
// pass the advertiserInfo
this.tag('BLAd').BL_client(advertiserInfo)
// initialize the ad with
this.tag('BLAd').BL_init(BLdataUrl)
//
// destroy the ad with
this.tag("BLAd").destroyAd();
}
}