Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

AdSolution disables HD addon

4 replies [Last post]
Reply

I am running ClipBucket v2.5.1, JWPlayer5

This is my swfobj code:

if(!function_exists('jw_player5'))
{
        function jw_player5($data)
        {
                $vdata = $data['vdetails'];
                global $swfobj;

                $vid_file = get_video_file($vdata,$no_video,false);
                if($vid_file)
                {
                        $hd = $data['hq'];

                        $swfobj->width = $data['width'];
                        $swfobj->height = $data['height'];
                        $swfobj->playerFile = PLAYER_URL.'/jw_player_5/player.swf';
                        $swfobj->DivId = $data['player_div'] ? $data['player_div'] : config('player_div_id');
                $swfobj->FlashObj();
                $swfobj->addParam('allowfullscreen','true');
                $swfobj->addParam('allowscriptaccess','always');
                $swfobj->addParam('wmode','opaque');
                $swfobj->addVar('stretching','fill');
                $swfobj->addVar('image',getthumb($vdata,'big'));
                $swfobj->addVar('plugins', 'ltas');
                $swfobj->addVar('autostart','false');
                $swfobj->addVar('ltas.cc','lwbarbzzjslngul');
                $swfobj->addVar('skin', PLAYER_URL.'/jw_player_5/skins/fs40.zip');
                $swfobj->addVar('plugins', PLAYER_URL.'/jw_player_5/plugins/hd.swf');

            $sd_file    = get_video_file($vdata,true,true);
            $hd_file    = get_hq_video_file($vdata);

            if(strlen($hd_file))
            {
                $swfobj->addVar('hd.file', $hd_file);
            }
            if($hd == 'yes')
            {
                $file = $hd_file;
                $swfobj->addVar('hd.state', true);
            }
            else
            {
                $file = $sd_file;
                $swfobj->addVar('hd.state', false);
            }

            $swfobj->addVar('file',$file);

                        $swfobj->CreatePlayer();
                        return $swfobj->code;
                }else
                        return false;
        }

        add_js(array('swfobject.obj.js'=>'global'));
        register_actions_play_video('jw_player5');
}

I can comment out the ltas parts, and HD works fine. Uncomment, and there is no HD option in the player, but the ads work fine.

Am I putting things in the wrong order? What am I doing wrong?

Reply

Actually, that was backwards.

I comment out the HD and ads work, otherwise I have HD and no ads.

Reply

Anyone have any ideas?

Reply

Alright, to FlowPlayer I go, then.

Reply

Daniel,

Please give us more than 24 hours to answer your questions on the forum-- especially when you're posting comments over the weekend. We're only in the office from Monday-Friday.

The issue you have is that you can't use two "plugins" variables like that.

$swfobj->addVar('plugins', 'ltas');
$swfobj->addVar('plugins', PLAYER_URL.'/jw_player_5/plugins/hd.swf');

Instead, do $swfobj->addVar('plugins', 'ltas,hd');

This information can be found here: http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/10629/using-jw-player-plugins#...

Best,

Darjan

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options