Giter VIP home page Giter VIP logo

flowplayer-vpaid's Introduction

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

  1. Create a flowplayer instance like you normally would.
  2. Invoke the attach method to listen for the vpaid_js event.
  3. When the event is fired, a vpaid container will overlap the video when the user attempts to play the video.
  4. 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

flowplayer-vpaid's People

Contributors

parisholley avatar

Watchers

James Cloos avatar Radosław Gniado avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.