PetroFrolov / vast-video-js

VAST-Ad plugin for HTML5 by video.js
79 stars 33 forks source link

Does it support VAST wrapper? #21

Open ghost opened 11 years ago

ghost commented 11 years ago

Does it support VAST wrapper? If it does, can you give me an example? Thanks very much! You did a real nice work!

blueone1 commented 11 years ago

I also wonder if it supports Doubleclick For Publishers Ad Server www.google.com/dfp/sb - anyone know?

PetroFrolov commented 11 years ago

Hi! No, it isn't support wrapper because there is a lot of crossdomains requests.

blueone1 commented 11 years ago

Anyone know about Google/Doubleclick DFP ad server compatibility?

On Friday, July 12, 2013, petro.frolov wrote:

Hi! No, it isn't support wrapper because there is a lot of crossdomains requests.

— Reply to this email directly or view it on GitHubhttps://github.com/PetroFrolov/vast-video-js/issues/21#issuecomment-20865284 .

PetroFrolov commented 11 years ago

It is different technology https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/ads?hl=us

Anyone know about Google/Doubleclick DFP ad server compatibility?

blueone1 commented 11 years ago

I don't think it is - they support VAST tags, but I know this plugin had to be modified to support OpenX - how about with Google DART/DFP?

From: https://support.google.com/dfp_premium/answer/1711021?hl=en

VAST (Video Ad Serving Template): VAST is the IAB's standardized format for tracking video ads. DFP Video uses VAST to display ads, so your video player and ad response must be VAST compliant. To verify this, you can use the VAST Inspector. (In order to be IAB-compliant, every tag in a VAST chain must point directly to VAST XML. HTTP redirects are not supported.)

On Fri, Jul 12, 2013 at 10:02 AM, petro.frolov notifications@github.com wrote:

It is different technology https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/ads?hl=us

Anyone know about Google/Doubleclick DFP ad server compatibility?

Reply to this email directly or view it on GitHub.

PetroFrolov commented 10 years ago

I didn't find any examples so I ca't say about DFP. I'll try if you send me ad-response by DFP protocol (I suppose it'll be an xml).

kastashov commented 10 years ago

Yes it supports DFP.

At first, I was using this config:

var voptions = {
 ads: {
    'skipAd': {
    'enabled': false,
    'timeOut': 1
    },
    'servers'  : [
    {
         <?php
            $urlref = 'http://www.mydomain.com'. $_SERVER['REQUEST_URI'];
            $url = "http://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/{code_here}/Post-roll&ciu_szs&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=" . $urlref . "&correlator=".time();
            echo "'apiAddress': '{$url}',";
         ?>
    }
    ], 
    'schedule' : [
    {
        'position' : 'post-roll',
    }
    ]
}
};

But then realized that JS wouldn't make a direct request to a different server, so I made a "proxy" PHP script to do the trick for me. The config now looks like this:

var voptions = {
 ads: {
    'skipAd': {
    'enabled': false,
    'timeOut': 1
    },
    'servers'  : [
    {
         'apiAddress': '/js/video/getzone.php'
    }
    ], 
    'schedule' : [
    {
        'position' : 'post-roll',
    }
    ]
}
};

Contents of the getzone.php file:

<?php

$urlref = (!empty($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : "http://www.mydomain.com"; $urlref = urlencode($urlref);

$urlget = "http://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/{code_here}/Post-roll&ciu_szs&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=" . $urlref . "&correlator=".time();

echo file_get_contents($urlget);

kastashov commented 10 years ago

I found DFP much more suitable than OpenX, since it encodes the video into several formats, the whole thing should in theory be browser-independent.

P.S. Please dont distract Petro much from fixing the problem with pre-rolls in IE, I'm impatiently waiting for the fix! :-)

kastashov commented 10 years ago

The only thing with DFP and the proxy script which I haven't resolved by the moment is that DFP would probably lose its geotargeting functionality (since all requests will be coming from the web server itself) which is not of much trouble for me, but if anyone has a say how to address this, would be much appreciated.

blueone1 commented 10 years ago

Thanks Kasatashov... which problem w/ IE do you have IE 8 or 9?

Also, for DFP, it's pretty strange to even get started with DFP. Do you know of any links that make it clear how to setup DFP for Video Ads? I'd like to use it, it's free up to 400k impressions.

DFP actually encodes the video? See, for me, I have an actual network link from spotxchange.com and have to get it into DFP and then get the DFP code into the VAST plugin somehow.. =/

ghost commented 10 years ago

I have read the VAST 2.0 spec. It mentioned the solution of cross-domain issue. The solution is to add a access-allow-origin header in ad server side, then xmlHttpRequest can request other servers. So I guess cross-domain is not an issue in the future. It would be very appreciated if you finish the Wrapper issue

PetroFrolov commented 10 years ago

I think that I'll add wrappers when I have more free time.

ruffrazo commented 10 years ago

Hi PetroFrolov & Kastashov,

I was wondering if one of you can help me out with the DFP implementation for videojs?

Grtz