unindel / open-video-ads

Automatically exported from code.google.com/p/open-video-ads
0 stars 0 forks source link

Resume doesn't work in Flowplayer with OpenVideoAds plugin for clips added via addClip or setPlaylist #228

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Create a page with player like this:

<html>
<head>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/flowplayer-3.1.4.js"></script>
</head>

<body>

<div id="container">
    <div id="player"></div>
</div>

<script type="text/javascript">
var the_playlist = [
    {
        "url": "http://tv.hnet.ru/plasma/video/a/Amazoniya.mp4",
        "duration": 5076.16,
        "title": 'Amazone'
    }
];

var player_config = {

    onLoad: function() {
        $.each(the_playlist, function(key, val) { $f().addClip(val); });
    },

    clip: {
        scaling: "fit",
        provider: "lighttpd",
        bufferLength: 1,
        autoPlay: true,

    },

    canvas: {
        backgroundColor: '#000000',
        backgroundGradient: 'none'
    },

    plugins: {
        lighttpd: {
            url: 'flowplayer.pseudostreaming-3.1.3.swf'
        },
        controls: {
            url: 'flowplayer.controls-3.1.5.swf',
            playlist: true,
            stop: true,
            autoHide: 'always'
        }
    }
};

player_config.plugins.openAdStreamer = {
    'url': 'OpenAdStreamer.swf',

    "ads": {
        "playOnce": true,
        'allowPlaylistControl': true,
        'autoStart': true,

        "servers": [
            {
               "type": "OpenX",
               "apiAddress": "http://ad.nsib.ru/www/delivery/fc.php",
               "allowAdRepetition": true
            }
        ],
        "schedule": [
            {
                "zone": "36",
                "position": "pre-roll",
                "player": {
                    "metaData": false,
                    "scaling": "fit"
                }
            }
        ]
    }
};

// Flowplayer installation with Flashembed configuration
$f("player", {

    // our Flash component
    src: "flowplayer-3.1.5.swf",

    // we need at least this Flash version
    version: [9, 115],

    // older versions will see a custom message
    onFail: function()  {
        document.getElementById("player").innerHTML =
            "<a href=\"http://get.adobe.com/flashplayer/\">Get latest Adobe
Flash Player.</a>";
    }

    // here is our third argument which is the Flowplayer configuration
}, player_config);
</script>
</body>
</html>

2. Press play.
3. When the advertising ends and the clip begins, press pause.
4. Try to unpause.

Unpause (resume) doesn't work. And clicking on resume button fires onPause
event instead of onResume. $f().pause() and $f().resume() doesn't work well
too.

Original issue reported on code.google.com by peter.ad...@gmail.com on 6 May 2010 at 7:10

GoogleCodeExporter commented 9 years ago
Can I ask - which version of the Open Ad Streamer are you running?  (is it 
0.5.0 RC2) - I'll look into this if you 
can confirm the version... 

Original comment by paul.sch...@gmail.com on 13 May 2010 at 9:33