Giter Club home page Giter Club logo

videojs-vast-vpaid's Introduction

videojs-vast-vpaid plugin

Build Status Code Climate Test Coverage

This plugin allows videojs to monetise its videos. To do so, it implements the VAST and VPAID specifications from IAB.

Currently we support VAST and VPAID Flash and HTML5 preroll ads, we will add more VAST ad types as we need them.


Integration with video.js 4 and 5

To integrate the plugin with videoJs you need to:

1- Add all files from MailOnline/videojs-vast-vpaid/RELEASE/bin to some path in your server

2- If you don't have videoJs, add it's scripts and stylesheet to your page

<!-- Video.js 4 -->
<link href="http://vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.12/video.js"></script>

or

<!-- Video.js 5 -->
<link href="http://vjs.zencdn.net/5.4.6/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/5.4.6/video.js"></script>

3- After videoJs add the plugin script stylesheet

<!-- Common -->
<link href="/path/to/videojs.vast.vpaid.min.css" rel="stylesheet">

and the videojs version specific plugin

<!-- Video.js 4 -->
<script src="/path/to/videojs_4.vast.vpaid.min.js"></script>

or

<!-- Video.js 5 -->
<script src="/path/to/videojs_5.vast.vpaid.min.js"></script>

if you need to support older browsers that don't support ES5 add this to your page before the plugin script

<script src="/path/to/es5-shim.js"></script>

if you need to support ie8 add this after the es5-shim.js script

<script src="/path/to/ie8fix.js"></script>

4- Create you own ads plugin to pass an add media tag to the plugin

Below you have a simple ads-setup-plugin

videojs.plugin('ads-setup', function (opts) {
    var player = this;
    var adsCancelTimeout = 3000;

    var vastAd = player.vastClient({
      //Media tag URL
      adTagUrl: "http://pubads.g.doubleclick.net/gampad/ads?env=....",
      playAdAlways: true,
      //Note: As requested we set the preroll timeout at the same place than the adsCancelTimeout
      adCancelTimeout: adsCancelTimeout,
      adsEnabled: !!options.adsEnabled
    });
});

You can also configure the vast plugin using the data-setup attribute

<video id="example_video_1" class="video-js vjs-default-skin"
    controls preload="auto" width="640" height="264"
    poster="http://vjs.zencdn.net/v/oceans.png"
    data-setup='{
      "plugins": {
      "vastClient": {
        "adTagUrl": "http://pubads.g.doubleclick.net/gampad/ads?env=....",
        "adCancelTimeout": 5000,
        "adsEnabled": true
        }
      }
    }'>
  <source src="http://vjs.zencdn.net/v/oceans.mp4" type='video/mp4'/>
  <source src="http://vjs.zencdn.net/v/oceans.webm" type='video/webm'/>
  <source src="http://vjs.zencdn.net/v/oceans.ogv" type='video/ogg'/>
  <p class="vjs-no-js">
    To view this video please enable JavaScript, and consider upgrading to a web browser that
    <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
  </p>
</video>

Migration from videojs-vast-vpaid 0.1 to 1.0

if you will still use videojs version 4 you need to

  • download the new bin folder
  • replace, in your pages, videojs-vast-vpaid.jswith videojs_4.vast.vpaid.js ( or videojs-vast-vpaid.min.js with videojs_4.vast.vpaid.min.js if you were using the minified version)
  • replace, in your pages, videojs-vast-vpaid.css with videojs.vast.vpaid.css ( or videojs-vast-vpaid.min.css with videojs.vast.vpaid.min.css if you were using the minified version)

if you want to update to videojs 5 just follow the instruction in the Integration with video.js 4 and 5 chapter


Options

adTagUrl

Use it to pass the ad media tag, it can be a string containing the Media tag url or a function that will return the Media tag whenever called; On initialization, the plugin will call the function and store the returned Media tag to request the VAST/VPAID ads

// Hardcoded Media Tag
var vastAd = player.vastClient({
    adTagUrl: "http://pubads.g.doubleclick.net/gampad/ads?env=....",
    ...
});
//Dynamic Media Tag
var vastAd = player.vastClient({
    adTagUrl: getAdsUrl,
    ...
});

function getAdsUrl() {
    return "http://pubads.g.doubleclick.net/gampad/ads?env=....";
}

url (deprecated)

This option is deprecated and you should use adTagUrl instead Use it to pass the ad media tag, it can be a string containing the Media tag url

// Hardcoded Media Tag
var vastAd = player.vastClient({
    url: "http://pubads.g.doubleclick.net/gampad/ads?env=....",
    ...
});
//Dynamic Media Tag
var vastAd = player.vastClient({
    url: getAdsUrl,
    ...
});

function getAdsUrl() {
    return "http://pubads.g.doubleclick.net/gampad/ads?env=....";
}

adTagXML

You can now do the VAST xml request on your own with our shinny new adTagXML option. All you need to do is to pass the request fn as the adTagXML option when you initialize the plugin. See below for an example

var vastAd = player.vastClient({
    adTagXML: requestVASTXML,
    ...
});

function requestVASTXML(callback) {
    //The setTimeout below is to simulate asynchrony
    setTimeout(function(){
        callback(null, '<VAST version="3.0"><Ad><Inline>...</Inline></Ad></VAST>');
    }, 0);
}

As you can see the requestVASTXML function above expects a node like error-first-callback that needs to be called whenever we are ready to serve the VAST XML. If you had any error executing the request, you need to pass it as the first argument of the callback and if there was no error pass null as the first argument and the VAST XML string as the second argument.

playAdAlways

Flag to indicate if we must play an ad whenever possible. If set to true the plugin will play an ad every time the user watches a new video or replays the actual video. Defaults to false

adCancelTimeout

Number of milliseconds for the ad to start before canceling it. Defaults to 3000ms

adsEnabled

Flag to enable/disable the ads. Defaults to true

autoResize

Flag to enable resize of the adUnit on window's resize and orientationchange events. This is useful for responsive players. Defaults to true

vpaidFlashLoaderPath

Path to the vpaidFlashloader swf file. Defaults to '/VPAIDFlash.swf'

preferredTech

Option to tell the plugin what type of mediaFile to open first. By default, the plugin will load the first supported mediaFile. This is a way to ensure HTML5 is loaded even if a .swf is the first option in the MediaFiles array. Defaults to undefined

Available Options:

flash which will attempt to load available application/x-shockwave-flash -or-

html5 which will attempt to load available application/javascript

You can also pass in the mimeType itself if you'd like to be more explicit.

verbosity

verbosity of console logging; Defaults to 0

  • 0 - error
  • 1 - error, warn
  • 2 - error, warn, info
  • 3 - error, warn, info, log
  • 4 - error, warn, info, log, debug

Returned object

An invocation to player.vastClient({...}) returns and object that with some helper functions that allow you to dynamically enable or disable the vast plugin, or check if it is enabled.

var vastPlugin = player.vastClient({
    adTagUrl: getAdsUrl,
    playAdAlways: true,
    //Note: As requested we set the preroll timeout at the same place than the adsCancelTimeout
    adCancelTimeout: adsCancelTimeout,
    adsEnabled: !!options.adsEnabled
});

player.on('reset', function () {
    if (!vastPlugin.isEnabled()) {
        vastPlugin.enable();
    } else {
        vastAd.disable();
    }
});

isEnabled()

This function returns true if the player is enabled and false otherwise.

enable()

Enables the VAST plugin

disable()

Disables the plugin

adUnit

If there is an ad playing (after the vast.adStart event) it will contain an obj like the one below:

player.vast.adUnit= {
    type: {string} <== The possible types are 'VAST' or 'VPAID'
    pauseAd: {function} <== Pauses the ad unit
    resumeAd: {function} <== Resumes the ad unit
    getSrc: {function} <== Returns the MediaFile instance used to play the ad
}

Otherwise it will be null or undefined

player.vast

The returned object described above it is also published as a player property so that you can use it anywhere as long as you have access to the player instance.

player.vastClient({
    adTagUrl: getAdsUrl,
    playAdAlways: true,
    //Note: As requested we set the preroll timeout at the same place than the adsCancelTimeout
    adCancelTimeout: adsCancelTimeout,
    adsEnabled: !!options.adsEnabled
    });

player.on('reset', function () {
    if (!player.vast.isEnabled()) {
        player.vast.enable();
    } else {
        player.vast.disable();
    }
});

Plugin events

The plugin does trigger some events that can be used for tracking or debugging.

vast.firstPlay

Fired when the user first plays a video or if the playAdAlways option is set to true every time the user replays the same video

vast.adStart

Fired when the ad starts playing

vast.adSkip

Fired when the a vast ad gets skiped

vast.adError

Fired whenever there is an error with the ad. The error itself gets added to the event object in the property 'error'.

vast.adsCancel

Fired whenever the ads are canceled due to an error or because the plugin is not enabled.

vast.contentStart

Fired whenever the video content starts playing

vast.contentEnd

Fired when the video content ends.

vast.reset

Trigger the 'vast.reset' event whenever you want to reset the plugin. Beware that if an ad is playing it will be canceled.


Running the plugin

If you want to run the plugin you need to clone the repo into your local environment

git clone [email protected]:MailOnline/videojs-vast-vpaid.git

and install the dependencies

$ cd videojs-vast-vpaid
$ npm install
$ bower install

after installing the dependencies you are ready to go. If you want to see the available build tasks, run

$ gulp

Welcome to MailOnline's new
____   ____.__     .___                     __          ____   ____                  __    ____   ____                .__     .___
\   \ /   /|__|  __| _/  ____    ____      |__|  ______ \   \ /   /_____     _______/  |_  \   \ /   /______  _____   |__|  __| _/
 \   Y   / |  | / __ | _/ __ \  /  _ \     |  | /  ___/  \   Y   / \__  \   /  ___/\   __\  \   Y   / \____ \ \__  \  |  | / __ |
  \     /  |  |/ /_/ | \  ___/ (  <_> )    |  | \___ \    \     /   / __ \_ \___ \  |  |     \     /  |  |_> > / __ \_|  |/ /_/ |
   \___/   |__|\____ |  \___  > \____/ /\__|  |/____  >    \___/   (____  //____  > |__|      \___/   |   __/ (____  /|__|\____ |
                    \/      \/         \______|     \/                  \/      \/                    |__|         \/          \/

###### Below, you have the list of all the available build tasks ########
╔═════════════════════════╤════════════════════════════════════════════════════════════════════════════════╗
║ Name                    │ Description                                                                    ║
╟─────────────────────────┼────────────────────────────────────────────────────────────────────────────────╢
║ start                   │ Starts dev server and watch task                                               ║
╟─────────────────────────┼────────────────────────────────────────────────────────────────────────────────╢
║ deploy-demo             │ Builds the demo and deploys it to github pages                                 ║
╟─────────────────────────┼────────────────────────────────────────────────────────────────────────────────╢
║ watch                   │ watches for changes on the plugin files and executes the appropriate tasks     ║
╟─────────────────────────┼────────────────────────────────────────────────────────────────────────────────╢
║ build                   │ This task builds the plugin                                                    ║
╟─────────────────────────┼────────────────────────────────────────────────────────────────────────────────╢
║ build-demo              │ Builds the demo                                                                ║
╟─────────────────────────┼────────────────────────────────────────────────────────────────────────────────╢
║ ci-test                 │ Starts karma test and generates test code coverage, to be used by CI Server    ║
╟─────────────────────────┼────────────────────────────────────────────────────────────────────────────────╢
║ test                    │ Starts karma and test the player                                               ║
╚═════════════════════════╧════════════════════════════════════════════════════════════════════════════════╝

NOTE: if a task is run with '--env production' it will execute the build task for production. Minifying scripts and so on

Which will show you a table with the main build tasks. If you want start the demo locally just run:

$ gulp start

and open the following link into your browser http://localhost:8086


License

videojs-vast-vpaid plugin is licensed under the MIT License, Version 2.0. View the license file

Copyright (c) 2015 MailOnline

videojs-vast-vpaid's People

Contributors

alex-phillips avatar brokenmass avatar carpasse avatar fabioroger avatar fetz avatar joshmadewell avatar lpender avatar qpre avatar sanex3339 avatar sithmel avatar tommyh avatar wmcmurray avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

videojs-vast-vpaid's Issues

ad-label not showing

Hi,

Great plugin!
However I cannot get the ad-label / skip / black poster div to show in my setup.
Can anyone see what I am missing:

Test link: http://cdn.vidcore.com/v3/play/CDrbepJG

Config:

videojs("video", {}, function(){
    this.vastClient({
        //Media tag URL
        url: "[TAG]",
        playAdAlways: true,
        adsEnabled: true,
        vpaidFlashLoaderPath: '/path/to/VPAIDFlash.swf'
    });
});

Clickthrough event with HTML5 Vpaid

Using this plugin, if you click an add that is loaded using the HTML5Tech that nothing happens when a user clicks the ad.

I'm currently working on making a PR for this but wanted to make the issue known in the event that this is something you are all aware of.

HTML5 Liverail Example:
https://ad4.liverail.com/?LR_PUBLISHER_ID=1331&LR_SCHEMA=vast2-vpaid&LR_FORMAT=application/javascript

FLASH Liverail Example
https://ad4.liverail.com/?LR_PUBLISHER_ID=1331&LR_SCHEMA=vast2-vpaid

Ad not playing with preload option set to "none"

Hello,

I tried to change videojs' preload option to "auto" (via changing videoTag variable in createVideoEl function in demo_bundle.js). As a result when I hit "play" button preloader animation is starting, and after a timeout ad is canceled and content video starts playing. At that time I can see an exception thrown:

AD ERROR: VAST Error: timeout while waiting for the video to start playing

If I disable ads, content video starts playing almost immediatly. I tried to set larger timeout intervals without any success.

VAST Error: on VASTClient.buildVastTree

Hi! Getting this error on any VAST/VPAID XML when I try to play Ad:

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The video could not be loaded, either because the server or network failed or because the format is not supported

Console output:

AD ERROR: VAST Error: on VASTClient.buildVastTree, error parsing xml z {message: "VAST Error: on VASTClient.buildVastTree, error parsing xml", code: 100}code: 100message: "VAST Error: on VASTClient.buildVastTree, error parsing xml"stack: (...)__proto__: Error
    at http://MYDOMAIN.com/videojs/vpaid/videojs-vast-vpaid.min.js:2:29160
    at http://MYDOMAIN.com/videojs/vpaid/videojs-vast-vpaid.min.js:3:6281name: "VAST Error"stack: (...)get stack: ()arguments: nullcaller: nulllength: 0name: ""prototype: aK__proto__: ()<function scope>No Scopesset stack: ()arguments: nullcaller: nulllength: 1name: ""prototype: aN__proto__: ()<function scope>__proto__: DefineError.aTconstructor: Error()message: ""name: "Error"toString: toString()__proto__: Object__defineGetter__: __defineGetter__()__defineSetter__: __defineSetter__()__lookupGetter__: __lookupGetter__()__lookupSetter__: __lookupSetter__()constructor: Object()hasOwnProperty: hasOwnProperty()isPrototypeOf: isPrototypeOf()propertyIsEnumerable: propertyIsEnumerable()toLocaleString: toLocaleString()toString: toString()valueOf: valueOf()get __proto__: get __proto__()set __proto__: set __proto__() undefined

Any ideas how to fix this?

Bypass CORS via Flash

On your demo page you say:
"Some ad's will throw "VAST Error: on VASTClient.requestVastXML, HTTP request error with status '-1'", because that adServer is not setting the http access control header, the reason why some video player's are able to play the ad's in firefox because they do the request by flash bypassing the browser".

I was wondering if you're working on adding this, or if you possibly know how it's being done (or have a link to a resource of how it can be done).

Looking at actionscript docs for "security.allowDomain"...
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001490.html
..it says (regarding SWF versions):
Version 5. No cross-domain scripting restrictions.
Version 6. Cross-domain scripting security is introduced.

So I'm guessing I need to build a Version 5 or lower SWF? I'm new to Flash/Actionscript.

Thanks

Muting VPAID Ads

Update: never mind, I realize this is impossible as swfs of ads are not related to the player

How does code get into ./bin

I saw that gulp build seem to create the ./dev directory, how does the code then get released into ./bin? Is it manually copied?

Pre-roll ad is not displaying before video

When I update the form with my VAST/VPAID tag on this site, it shows my ad and works, but when I download the files and implement on my site, then no pre-roll ad shows, and video plays shortly after a blank screen. Where do I need to put the ad tag without sending it through the form on this page, and if there is an example without all of the inputs on this page that will work too

Sourcecode for VPAIDFlash.swf ?

Hi, I've been tested this plug in for a while and on the demo link it looks all great.

But when I try to do a minimum setup, following the instructions gives me a bit issue with the Play/Pause Ad. and it seems like not every VPAID call back (e.g. AdClickThru) is getting connected by this plugin?

I am wondering is it possible to also include the ActionScripts for the VPAIDFlash.swf so that I could perform some debug by myself?

Specific VPAID.js not working (does work with other players)

Hey guys,

I am trying to test this tag with your player:

<?xml version="1.0" encoding="utf-8"?>
<VAST version="2.0">
<Ad id="219971059">
    <InLine>
        <AdSystem version="1.0">OPTIMATIC</AdSystem>
        <AdTitle>VPAID WRAPPER</AdTitle>
        <Impression/>
        <Creatives>
            <Creative sequence="1" id="219971059">
                <Linear>
                    <Duration>00:00:15</Duration>
                    <MediaFiles>
                        <MediaFile delivery="progressive" bitrate="0" width="400" height="300" type="application/javascript" apiFramework="VPAID">
                            <![CDATA[http://dev.testing.optimatic.com/optivpaid/optivpaid.js]]>
                        </MediaFile>
                    </MediaFiles>
                    <AdParameters>
                        <![CDATA[
{"adID":"q145a541html5","zone":"vpaidjstesting","page_title":"[INSERT_PAGE_TITLE]","page_url":"","videoURL":"", "videoTitle":"", "videoDesc":"", "videoID":"", "videoAssetURL":"", "videoHeight":"", "videoWidth":""}
]]>
                    </AdParameters>
                </Linear>
            </Creative>
            <Creative sequence="1" id="219971059">
                <CompanionAds>
                    <Companion width="300" height="250" id="11112">
                        <HTMLResource>
                            <![CDATA[
<div id="shell_bucket" style="width:300px,height:250px;"><div id="cb_medrect1_div" style="width: 300px; height: 250px;"><iframe name="cb_medrect1_frame" id="cb_medrect1_frame" src="http://cdn.optimatic.com/iframe.html" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" allowtransparency="true" width="300" height="250"></iframe></div></div>
]]>
                        </HTMLResource>
                    </Companion>
                </CompanionAds>
            </Creative>
        </Creatives>
    </InLine>
</Ad>
</VAST>

If I use it here:
http://ryanthompson591.github.io/vpaidExamples/

It works.

However with your player, it doesn't work (http://dev.testing.optimatic.com/optivpaid/examples/vpaid/outputXML.ashx?f=optimatic-vpaid.xml&cb=1441894815241&pageURL=http%3A%2F%test.com%2Fsrn-optimatic.html&pageTitle=&zone=test)

Any ideas?

Cheers

Release Process -- Should we use RELEASE branch or master?

Hey Guys,

We have a few changes to the repo that we maintain ourselves because they are most likely features that you don't want added.

As such, when a release is made, we pull down your repo and manually merge the release into our copy of the repo. I noticed that there is RELEASE branch with the latest release and that it's 15 ahead of master. Is this the branch we should pull down moving forward?

I guess worth asking is: would you guys be open to implementing the ability to call stopAd from the browser? I think I mentioned this before and @Fetz mentioned you would not be implementing it but that I could look at how skipAd was implemented to do it myself. We've gone ahead and done this.

The reason we needed stopAd is because some our publishers require the ability for a user to close an ad after N seconds. VPAID spec requires us to call stopAd because the browser has stopped displaying the ad.

Update non-working instructions

I quickly wanted to test-drive the vast-vpaid plugin, but somehow I stranded on the way.

The documentation starts with "1.- Add all files from bin to some path in your server". But on GitHub I only see a single file "es5-shim.js", I would have expected a "videojs-vast-plugin.min.js".

Then I scrolled down to read "Running the plugin" and did "npm install" and "bower install", but still there is no "videojs-vast-plugin.min.js" file to be found locally.

What am I missing? Are the instructions incomplete?

Viewability Issue?

Hey guys,

I am seeing something weird with the player. I have ran some tests using real LiveRail demand, and it seems that the player produces less ad impressions there our in house player (which is 100% flash based).

The main issue with your player seems to be related to viewability. It seems that LiveRail for some reason seems to think the player is not viewable.

For example, if you use the LiveRail test tag on your demo, you will see a request (not the first one) to liverail's domain, with POST data containing several LR_ vars.

One of them is this:
LR_VIEWABLE:2

If you use the same tag on JW Player (here http://demo.jwplayer.com/ad-tester/), you will see
LR_VIEWABLE:1

Could it be something in the styling? It looks like for some reason on some cases LiveRail considers the player not viewable and thus it produces less ad impressions.

Cheers,
Or

SpotX VPAID Tags Don't Work

Feature: Prefetching

Hi guys!

Just wanted to ask if you could imagine the plugin to provide a prefetch option. What I would need is an event to be dispatched when an ad is available. The following code is automatically playing the ad. This is happening in a local scope, so the only way to interact would be like copy & paste all the stuff.

Thing is, I am currently working an a click to play solution, in which I need to know if an ad is available. Otherwise I do not want to have the player showing up.

The steps would be:

  • fetch vast response -> dispatch event
  • do whatever you like when event is fired
  • trigger playAd manually

This is the code where automation is done:
https://github.com/MailOnline/videojs-vast-vpaid/blob/master/src/ads/videojs.vast.js#L206

  function playPrerollAd(callback) {
    async.waterfall([
      getVastResponse,
      playAd
    ], callback);
  }

Thank you in advance!

allow demo page to autoload a vastTag by queryString to simplify sharing

Currently when fixing issue or commenting about an vastTag we have to do ask the user to:

  • go to demopage
  • select vast/vpaid tag
  • type tag (or paste the tag)
  • press update
  • press play

If we implement the autoLoad vastTag

example:

http://mailonline.github.io/videojs-vast-vpaid?vastTag=http%3A%2F%2Fdev.testing.optimatic.com%2Foptivpaid%2Fexamples%2Fvpaid%2FoutputXML.ashx%3Ff%3Doptimatic-vpaid.xml

then the user only needs to:

  • go to demopage
  • press play

Specific VPAID not working (does work with jwplayer)

I wanted to test some VPAID examples from http://www.advertserve.com/blog/2013/08/mid-post-roll-video-ads/ and turn out the following url does not work:
http://tester.advertserve.com/servlet/vast2/media?mid=123&pid=0&random=__random-number__#sthash.1Oe79f7T.dpuf

It does work with jwplayer and flowplayer.
looks like the response returns, but the ad is not running.

Getting the current src (of the Ad Unit)

Hey guys,

Any chance you could add the adUnit object something like a source property that would indicate the source of the video ad currently playing (e.g. coolAd.flv)?

Cheers

video.dev.js to video.js

Videojs vast vpaid plugin works with video.dev.js. I want it working with video.js the production version.
is it possible?

Typo in the README.md

Hi,

Seems there is no files like videojs-vast-plugin.css and videojs-vast-plugin.min.js in the bin folder. Do you mean videojs-vast-vpaid.css and videojs-vast-vpaid.min.js?

Screenshot

Resume button not working on first click when using iPhone + VPAID HTML

-- resume ad only works on the second click, first click actually tries to pause (when it is already paused)

  1. Open iPhone device or xcode simulator.
  2. In the demo page, load the VPAID HTML5 innovid test tag.
  3. Press on the play button -> the ad will take full screen and start playing.
  4. Click on "Done" in the top left corner
  5. Click on the yellow play button to resume the ad
  • also, the native play button will not working anymore.

VPAID plugin show me an error message

Hi, I'm tried to play VPAID files but didn't work, it retirned an error message "VAST Error: on VPAIDAdUnitWrapper, the passed VPAI…Unit does not fully implement the VPAID interface". I'm tried with many VPAID files but it's the same message, What can be the problem?

Improve the release process

  • change to from carlos account to mailonline account the release
  • fix duplicated release
  • when released do npm publish automatically
  • remove from the main branch the bin files

Skip button

Is it possible to always show the skip button for all kinds of ads?

JS errors on first run

Hi,
interesting project! By following your instructions literally, I'm getting three JS errors on chrome:

Uncaught ReferenceError: vjs is not defined(anonymous function) @ videojs-vast-vpaid.js:2748(anonymous function) @ videojs-vast-vpaid.js:4823
vpaid.html:7 Uncaught ReferenceError: vjs is not defined(anonymous function) @ vpaid.html:7
video.js:59 Uncaught TypeError: this[a] is not a function

My head looks like this:

<script src="http://vjs.zencdn.net/4.12/video.js"></script>
<script src="videojs-vast-vpaid.js"></script>
<link href="http://vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
<link href="https://raw.githubusercontent.com/MailOnline/videojs-vast-vpaid/master/bin/videojs-vast-vpaid.css" rel="stylesheet">

Some build issues

Hi guys,

Tried to pull this from master to test out locally, but I'm running into some issues.

  • In src/ads/vpaid/VPAIDFlashTech.js, line 27, there is a reference to an object that is not defined anywhere in the code (VPAIDFLASHClient - note the upper case). Any ideas?
  • I had to download video-js.css, xhook.js, swfobject.js, video.dev.js and the vjs fonts from your live demo page (they were not included under the same directories in the master branch)

Cheers,
Or

Firefox Workaround to cross domain issues

I am familiar with the cross domain issues with firefox.
I brought it to the attention of one of our partners and they gave me an example of their html5 player working in firefox and I thought I would share it with your team.

The main difference i see is that their player does not make an OPTION request to their server before making the GET request for the vast ad. Your plugin seems to (in firefox) make an OPTION request. Their server does set the headers correctly on GET requests, but the OPTIONS request is what is failing. Is there a way to avoid the OPTIONS request? Perhaps by setting the content-type to XML or some other means?

Here is an example:
http://dev.testing.optimatic.com/optivpaid/examples/lkqd/

The test ad tag in question is:
http://dev.testing.optimatic.com/optivpaid/examples/vpaid/outputXML.ashx?f=optimatic-vpaid.xml&cb=1444926557

regards,
Bob Kolo

videojs-vast-vpaid together with videojs-youtube: neither ad nor content is played

videojs-vast-vpaid with a locally hosted content video works great with vast and vpaid swf advertisements, thanks for the great work.

Issue

I've tried to setup videojs-vast-vpaid with videojs-youtube as a tech provider. When hitting the play button, nothing happens. Neither the ad is playing nor the content.

  • If I comment out the videojs-vast--vpaid plugin, the youtube video is played correctly.
  • If I comment out the youtube techOrder and use a local video (but not the videojs-vast-vpaid plugin), the ad plays correctly.

Does anybody have some suggestions to get this working?

Example

https://gist.github.com/derdeka/f6d47ae8c8c0d52b7bb5

bower.json

{
  "name": "videojstest2",
  "version": "0.0.1",
  "dependencies": {
    "videojs-vast-vpaid": "~0.0.38",
    "es5-shim": "~4.1.10",
    "xhook": "~1.3.0",
    "videojs": "~4.12.12",
    "normalize-css": "~3.0.3",
    "videojs-youtube": "~1.2.12"
  }
}

VPAID integration not working

I am checking your example for VPAID ad but it is not working. Always it is saying timeout. Please let me know how can i check if VPAID ad is working with this plugin.

Pausing the VPAID ad programatically

Hi guys,

Did you implement a JS API in your plugin to communicate with the VPAID object? for example, if I want to pause the VPAID ad programmatically - how do I do that?

If I click the ad, and then I want to resume it by calling play, it seems that calling player.play() triggers the playing of the content, not the ad.

Cheers,
Or

Fix the deploy of project

The way the scripts are if we do gulp release without updating the dependencies we will release the old code.

We are not testing in the tests if we have all the dependencies in bin

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.