New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vpaid-ad

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vpaid-ad

VPAID ad class for extending purposes.

  • 2.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-11.11%
Maintainers
1
Weekly downloads
 
Created
Source

vpaid-ad

VPAID ad class for extending purposes.

Build Status npm version js-standard-style bitHound Score Greenkeeper badge codecov

This is a reference implementation of VPAID ad. Feel free to extend this to suit your needs. It implements the most basic set of VPAID methods.

Installing using npm

npm i --save vpaid-ad

Usage

You can extend it using this way:

const Linear = require('vpaid-ad/src/linear')
class VpaidAd extends Linear {
  initAd (width, height, viewMode, desiredBitrate, creativeData, environmentVars) {
  	// Do something
    super.initAd(
      width,
      height,
      viewMode,
      desiredBitrate,
      creativeData,
      environmentVars
    )
  }
}

window.getVPAIDAd = function () {
  return new VpaidAd()
}

Your player can then call:

vpaid = window.getVPAIDAd()
vpaid.subscribe(...)

clickThru

There's a special clickThru method that you can use:

vpaid.clickThru({
  url: 'https://example.com',
  id: 'my-id',
  playerHandles: true
})

The above function emits the parameters as both an object and as an array.

As an array:

["https://example.com", "my-id", true]

As an object:

{
  "url": "https://example.com",
  "id": "my-id",
  "playerHandles": true
}

Resources

Keywords

FAQs

Package last updated on 10 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc