thatguystone / flowplayer-ima

A simple Interactive Media Ads plugin for FP
GNU General Public License v3.0
24 stars 8 forks source link

VAST pre-roll playing in small window simultanously with main clip #2

Closed adammada closed 11 years ago

adammada commented 11 years ago

I'm trying to use your plugin to play pre-roll, using google example tag:

https://developers.google.com/interactive-media-ads/docs/vastinspector

http://ad.doubleclick.net/pfadx/N270.132652.1516607168321/B3442378.3;dcadv=1379578;sz=0x0;ord=79879;dcmt=text/xml

But it just starts to play ad together with main clip, and ad area is smaller than flowplayer area. What is proper form to use it?

thatguystone commented 11 years ago

Which version of flowplayer are you using? And could you paste in your flowplayer config?

adammada commented 11 years ago

Sorry, for not giving more details:

flowplayer config:

flowplayer( "a.flowplayer", "/js/assets/flowplayer/flowplayer.commercial-3.2.16.swf", { key: "#$c3ed5658c4f45549dae", clip: { scaling: "fit" }, debug: true, plugins: { ima: { url: "/js/assets/flowplayer/flowplayer.ima-3.2.7.swf" } }, onLoad: function() { this.getPlugin("ima")._fireEvent("onUpdate"); this.getPlugin("ima").playAd("http://ad.doubleclick.net/pfadx/N270.132652.1516607168321/B3442378.3;dcadv=1379578;sz=0x0;ord=79879;dcmt=text/xml"); }
} );

flowplayer with splash image, so video is runned after cliking on img. screen

And how it looks in screen.

thatguystone commented 11 years ago

I'm starting to realize how woefully out of date my documentation is. I'll give it an update. In the meantime, give this config a shot:

flowplayer( "a.flowplayer", "http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf", {
    key: "#$c3ed5658c4f45549dae",
    clip: {
        scaling: "fit"
    },

    debug: true,

    plugins: {
        ima: {
            url: "/js/assets/flowplayer/flowplayer.ima-3.2.7.swf"
        }
    },

    playlist: [
        {
            provider: 'ima',
            url: 'http://ad.doubleclick.net/pfadx/N270.132652.1516607168321/B3442378.3;dcadv=1379578;sz=0x0;ord=79879;dcmt=text/xml'
        },
        {
            url: 'http://pseudo01.hddn.com/vod/demo.flowplayervod/Extremists.flv'
        }
    ]
});

The this.getPlugin("ima").playAd function is for forcing FP to play an ad, and it will play over everything. Providing the ad as a clip in a playlist makes it function like you would expect.

adammada commented 11 years ago

It works! Thank you. And about documentation:

Provides basic support for VAST ads. You can only give it a URL to some VAST xml, and it will play whatever it finds in there.

This means only pre-rolls, right? What if in VAST will be something more, like "mid-roll" ?

thatguystone commented 11 years ago

As longs as it's part of a flowplayer playlist, it should work the same.

OmahaMetro commented 11 years ago

Anyone got this to work with Drupal 7.0?

thatguystone commented 11 years ago

I've never actually worked with Drupal, but why wouldn't this work with Drupal? What's going wrong with it?