bl-lightning-sdk

1.3.2-a • Public • Published

BrightLine Lightning JS SDK

Getting started

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

import BLAd from 'bl-lightning-sdk'

Release notes

- 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

Example

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();
  }
}

Dependents (0)

Package Sidebar

Install

npm i bl-lightning-sdk

Weekly Downloads

69

Version

1.3.2-a

License

ISC

Unpacked Size

222 kB

Total Files

18

Last publish

Collaborators

  • brightline