Socket
Book a DemoInstallSign in
Socket

flowplayer-vpaid

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flowplayer-vpaid

VPAID 2.0 (Flash/JS) support within Flowplayer 6 HTML

1.3.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

flowplayer-vpaid

VPAID 2.0 (Flash/JS) support within Flowplayer 6 HTML

Note: This project is a work in progress and may not fulfill all of the VPAID 2.0 spec yet.

Behavior

  • Create a flowplayer instance like you normally would.
  • Invoke the attach method to listen for the vpaid_js event.
  • When the event is fired, a vpaid container will overlap the video when the user attempts to play the video.
  • After the vpaid container is closed/skipped/etc, it will disappear and the video will start.

Usage

If you do not want to fire the vpaid_js event your self (because you parsed your own VAST response), consider using the flowplayer-vast project.

Note: SWFObject is required to show flash creatives and you will need to host the VPAIDFlash.swf file.

var container = document.getElementById('div');

var player = flowplayer(container);

fpvpaid.attach({
    container: container,
    player: player,
    swfVpaid: '//domain.com/VPAIDFlash.swf',
    swfObject: '//domain.com/swfobject.js'
});

player.trigger('vpaid_js', [{
    src: 'http://site.com/file.js',
    attributes: '',
    tracker: {} // should be a DMVAST.tracker instance from the vast-client-js project
}]);

player.trigger('vpaid_swf', [{
    src: 'http://site.com/file.swf',
    attributes: '',
    tracker: {} // should be a DMVAST.tracker instance from the vast-client-js project
}]);

Changelog

  • 1.3.0: Update build to expose code as "fpvpaid" global variable when using dist/ files directly
  • 1.2.8: Hide overlay after ad is loaded
  • 1.2.7: Have to show overlay prior to init otherwise it can fail viewability tests
  • 1.2.6: Timeout if ad is never loaded
  • 1.2.5: Support autoplay and trigger events on player
  • 1.2.4: fix case sensitivity
  • 1.2.3: Play video on ad error
  • 1.2.2: Fix parameters and add timeout if unit doesn't play in time
  • 1.2.1: Preload vPAID ad to prevent delay on play
  • 1.2.0: API change, lazy load swfobject, edge cases and styling
  • 1.1.1: Ability to timeout if ad hasn't loaded
  • 1.1.0: Flash support
  • 1.0.2: Fix iframe showing under play button
  • 1.0.1: Dependency tweaks for easier downstream builds
  • 1.0.0: Initial release

Keywords

video

FAQs

Package last updated on 03 Feb 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.