Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vpaid-html5-client

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vpaid-html5-client

VPAID HTML5

  • 0.1.14
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
608
decreased by-10.98%
Maintainers
4
Weekly downloads
 
Created
Source

VPAIDHTML5Client

bitHound Score Code Climate Test Coverage Build Status devDependency Status

About

JS iframe wrapper for VPAID.

VPAID or Video Player Ad-Serving Interface Definition, establishes a common interface between video players and ad units, enabling a rich interactive in-stream ad experience.

The goals of VPAIDHTML5Client are:

  • common interface for VPAID in different technologies HTML5 and FLASH.
  • handle how to load the VPAID adUnit
  • be a simple and "stupid" implementation of VPAID

check videosjs-vast-vpaid if you need VPAID in videojs

JS

The project uses:

TODO

  • test how will work with a real ad in the demo and test
  • try to use the slot element inside the iframe to see if the ad's will not mess the css of the page
  • validate better if the postmessage and iframe works across browsers

Running the project

  • install nodejs and gulp
  • npm install to install all dependencies
  • gulp serve or npm start to start build script and a demo page should be open in default browser
  • gulp to watch, bundle and run tests
  • npm test or gulp test:ci task used by the server
  • gulp deploy:demo task used to update githubpage with demo and bin

Example of the usage


var vpaid = new VPAIDHTML5Client(el, video, {});
vpaid.loadAdUnit('vpaidAdURL.js', onLoad);

function onLoad(err, adUnit) {
    if (err) return;

    adUnit.subscribe('AdLoaded', onInit);
    adUnit.subscribe('AdStarted', onStart);

    adUnit.handshakeVersion('2.0', onHandShake);

    function onHandShake(error, result) {
        adUnit.initAd(480, 360, 'normal', -1, {AdParameters: currentAd.adParameters}, {});
    }

    function onInit() {
        adUnit.startAd();
    }

    function onStart() {
        console.log('-> AdStarted');
    }

}

License

licensed under the MIT License, Version 2.0. View the license file

Copyright © 2015 MailOnline

Keywords

FAQs

Package last updated on 13 May 2016

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