Flash player - the JW jeroen wijering player instead of xspf

Announcements and description of general changes in kPlaylist

Flash player - the JW jeroen wijering player instead of xspf

Postby Toy Sun » Thu Jan 10, 2008 5:25 am

http://www.jeroenwijering.com/

Frankly, I think the JW flashplayer is better than the xspf player (scrollbar and progressbar). Has anyone been able to use this one instead of xspf, and if so, how do you do it? Should be easy because JW player is also looking for an xspf playlist.

thanks,

John
Toy Sun
 
Posts: 19
Joined: Sun Dec 10, 2006 3:47 am

Postby jmelhus » Fri Jan 11, 2008 10:49 pm

.......or lacy morrow's version of xspf: http://www.lacymorrow.com/test/ :)
jmelhus
 
Posts: 128
Joined: Sat Jan 01, 2005 1:10 pm

Coool!

Postby Toy Sun » Sat Jan 12, 2008 4:00 am

It looks like his player will give me the progressbar I wanted. I tried to get it a few days ago and his server was down

Thanks for the help!

J
Toy Sun
 
Posts: 19
Joined: Sun Dec 10, 2006 3:47 am

Postby Quicksilver » Mon Jan 14, 2008 10:00 pm

Morrow's player is very neat. I'm curious though, I can't seem to get skins to work when loading from kPlaylist (except for the default iPod looking theme). If I manually load the URL, it works fine.

Naturally, I had to go into the kPlaylist code and add a variable into the URL construction for the skin_url value, but that doesn't seem to work for me. Any thoughts?
Quicksilver
 
Posts: 17
Joined: Tue Oct 30, 2007 9:24 pm

Postby Quicksilver » Mon Jan 14, 2008 10:02 pm

Ha, nevermind, making skin_url=/kplaylist/morrow/iTunes/ instead of skin_url=iTunes/ did it.
Quicksilver
 
Posts: 17
Joined: Tue Oct 30, 2007 9:24 pm

Postby jmelhus » Tue Jan 15, 2008 12:15 am

maybe you can post a simple guide on how to use lacy's version of xspf? And also how to use different skins... :)
jmelhus
 
Posts: 128
Joined: Sat Jan 01, 2005 1:10 pm

Me Too

Postby Toy Sun » Tue Jan 15, 2008 5:10 am

Yes, would appreciate very much some guidelines on how to do this...

Really, I'd love the JW player, but 'till then....

thanks,

John
Toy Sun
 
Posts: 19
Joined: Sun Dec 10, 2006 3:47 am

Postby Quicksilver » Tue Jan 15, 2008 6:19 pm

Here is how I did it.

Step one: If you haven't already, create a file named kpconfig.php and put it in the root of your kplaylist install directory. This will make your life much easier in general for upgrades if you keep up on the dev releases.

Step two: Upload the player you want to use to the kplaylist install directory. For Lacy's, I made a folder called "morrow/", though you could also make one just called "players/" if you want to test several. That would keep things neat and tidy.

Step three: Open up kpconfig.php and add a line for the player-
Code: Select all
$cfg['xspf_url'] = 'morrow/xspf_jukebox.swf';


Step four: We want to create a new config variable that we can use to set things like skins or other variables for whatever player you want to use. So, add a new line and put in -
Code: Select all
$cfg['xspf_opt'] = 'skin_url=morrow/iTunes/&no_continue=false&';

Note the trailing & in the value. If you don't want to set any options, you can set this to null and/or leave the value out of step six.

Step five (optional): Add any other customized settings to this file. window_x and window_y are good ones. I also created two more that are xspf_x and xspf_y that are set to window_x and window_y minus 20 respectively to control the flash player and popup window sizes. My total kpconfig.php looks like this -
Code: Select all
<?php
$cfg['frontbulletinchars'] = 120;
$cfg['enablegetid3'] = 1;
$cfg['uploadselections'] = 24;
$cfg['numberlogins'] = 1;
$cfg['livestreamajax'] = true;
$cfg['window_x'] = 420;
$cfg['window_y'] = 220;
$cfg['xspf_x'] = $cfg['window_x'] - 20;
$cfg['xspf_y'] = $cfg['window_y'] - 20;
$cfg['xspf_url'] = 'morrow/xspf_jukebox.swf';
$cfg['xspf_opt'] = 'skin_url=morrow/iTunes/&no_continue=false&';
$cfg['xspf_enable'] = true;
?>


Step six: Open up your kplaylist file and look near line 14123 for the function flashhtml(). Change -
Code: Select all
$link = $cfg['xspf_url'].'?autoplay=true&amp;autoload=true&amp;playlist_url='.urlencode($playlist);

to
Code: Select all
$link = $cfg['xspf_url'].'?'.$cfg['xspf_opt'].'autoplay=true&amp;autoload=true&amp;playlist_url='.urlencode($playlist);


Step seven (optional): On lines 14126 and 14131 you can change the height and width values to be -
Code: Select all
height="<?php echo $cfg['xspf_y']; ?>" width="<?php echo $cfg['xspf_x']; ?>"


That should do it, I think. I always note the changes I make to the file in a separate mods.php file, so that after I upgrade, I can add the modifications back real easily.
Quicksilver
 
Posts: 17
Joined: Tue Oct 30, 2007 9:24 pm

Postby Quicksilver » Tue Jan 15, 2008 10:01 pm

I just submitted some updated source code to them that has all the necessary changes and variables added in, we'll see if they put it to use in the next dev release.
Quicksilver
 
Posts: 17
Joined: Tue Oct 30, 2007 9:24 pm

Postby bartsidee » Fri Jan 18, 2008 2:02 pm

Quicksilver>
There is already a topic on the integration of Lacy Morrows flash player and all off it skin features in Kplaylist. Click the following link for more details:
http://www.kplaylist.net/forum/viewtopic.php?t=2069&postdays=0&postorder=asc&start=15
bartsidee
 
Posts: 19
Joined: Thu Nov 29, 2007 7:22 pm

JW Flash Player

Postby Toy Sun » Fri Jan 25, 2008 6:18 pm

I got the Morrow Player to work, thanks for the posts, everyone - Still think the JW Player is better- anyone help me get that going?

Appreciated,

John
Toy Sun
 
Posts: 19
Joined: Sun Dec 10, 2006 3:47 am

JW flashplayer

Postby Hefeslug » Sat Jan 26, 2008 7:30 pm

John

This is what I did to get JW flashplayer working. Works in both IE and Firefox

First I Downloaded JW newest player "FLV MEDIA PLAYER 3.14"
then put the "mediaplayer.swf" in the "xspf" folder. Then put the "swfobject.js" in the same folder as the "index.php"
Then changed these lines in the "kpconfig.php"

from this

Code: Select all
// size of window for "external" player
$cfg['window_x'] = 420;
$cfg['window_y'] = 220;
// edit this to suit your setup
$cfg['xspf_url'] = 'http://your site info.com/kplay/xspf/xspf_player.swf';
// enable xspf? Make sure the URL above works.


TO THIS

Code: Select all
$cfg['window_x'] = 420 ;
$cfg['window_y'] = 470;
// edit this to suit your setup
$cfg['xspf_url'] = 'xspf/mediaplayer.swf';
// enable xspf? Make sure the URL above works.

NOTE: on the above line "$cfg['xspf_url'] = 'xspf/mediaplayer.swf';" in the code, leave the "http://your site info.com" off of it. The reason is if you have it set as "http://your site info.com" and you go to your site via "http://WWW.your site info.com" the file will not play with 'FireFox'. It works fine with IE. Weird, took me 2 days to figure that out.

Then in the "index.php"
I changed

this

Code: Select all
               $this->data .= '<track>'.$this->crlf;
               $this->data .= '<location>'.$url.'</location>'.$this->crlf;
               $this->data .= '<creator>'.$f2->id3['artist'].'</creator>'.$this->crlf;
               $this->data .= '<album>'.$f2->id3['album'].'</album>'.$this->crlf;
               $this->data .= '<title>'.$f2->gentitle(array('title')).'</title>'.$this->crlf;
               $this->data .= '<annotation>'.$f2->gentitle(array('artist', 'title')).'</annotation>'.$this->crlf;
               $this->data .= '<duration>'.vernum($f2->id3['lengths']).'</duration>'.$this->crlf;
               $kpi = new kpimage(false, $f2->drive, $f2->relativepath);
               if ($kpi->find())
               {
                  $kpi->resize();
                  $imgurl = $kpi->geturl(true);
               } else $imgurl = '';
               $this->data .= '<image>'.$imgurl.'</image>'.$this->crlf;
               $this->data .= '<info></info>'.$this->crlf;
               $this->data .= '</track>'.$this->crlf;
            }
         }
      }
   }
   function flashhtml()
   {
      global $setctl, $phpenv, $u_cookieid, $u_id, $cfg;
      kprintheader('', 0, 0);
      $playlist = $setctl->get('streamurl').$phpenv['streamlocation'];
      $playlist .= '?templist='.$u_id.'&amp;c='.$u_cookieid.'&file='.lzero(getrand(1,999999),6).'.xml';
      $link = $cfg['xspf_url'].'?autoplay=true&amp;autoload=true&amp;playlist_url='.urlencode($playlist);
      ?>
      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="200" id="xspf_player" align="middle">
      <param name="allowScriptAccess" value="sameDomain" />
      <param name="movie" value="<?php echo $link; ?>" />
      <param name="quality" value="high" />
      <param name="bgcolor" value="#101010" />
      <embed src="<?php echo $link; ?>" quality="high" bgcolor="#e6e6e6" width="400" height="200" name="xspf_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
      </object>
      <?php
      kprintend();



TO THIS

Code: Select all
               $this->data .= '<track>'.$this->crlf;
               $this->data .= '<title>'.$f2->gentitle(array('title')).'</title>'.$this->crlf;
               $this->data .= '<creator>'.$f2->id3['artist'].'</creator>'.$this->crlf;
               $this->data .= '<location>'.$url.'</location>'.$this->crlf;
               $this->data .= '</track>'.$this->crlf;
            }
         }
      }
   }
   function flashhtml()
   {
      global $setctl, $phpenv, $u_cookieid, $u_id, $cfg;
      kprintheader('', 0, 0);
      $playlist = $setctl->get('streamurl').$phpenv['streamlocation'];
      $playlist .= '?templist='.$u_id.'&amp;c='.$u_cookieid.'&file='.lzero(getrand(1,999999),6).'.xml';
      $link = $cfg['xspf_url'].'?file='.urlencode($playlist);
      ?>
<head>


<script type="text/javascript" src="swfobject.js"></script>


</head>
<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
var s1 = new SWFObject('<?php echo $link; ?>','mpl','400','450','7');
  s1.addParam('allowscriptaccess','always');
  s1.addParam('allowfullscreen','true');
  s1.addVariable('height','450');
  s1.addVariable('width','400');
  s1.addVariable('logo','pic.png');
  s1.addVariable('displayheight','300');
  s1.addVariable('autostart','true');
  s1.addVariable('repeat','list');
  s1.addVariable('shuffle','false');
  s1.addVariable("backcolor","0x000000");
  s1.addVariable("frontcolor","0xCCCCCC");
  s1.addVariable("lightcolor","0x996600");
  s1.write('player1');
</script>
      <?php
      kprintend();


The Player sizes and "s1.addVariable('XXXXXX'.'XXXXXX);" you need to set to your liking.

Here is a screen shot of the setup in this post

Image

Hope this helps you get it going.
It also works on FLV's
Right now I am trying to get a DIVX code working.

Hefeslug
Hefeslug
 
Posts: 2
Joined: Fri Jan 25, 2008 8:23 pm

Thank you!

Postby Toy Sun » Mon Jan 28, 2008 6:20 pm

I'm going to get this going today - really appreciate the help. Your screenshot looks great, your site looks interesting - can we view it?

thanks again,

John
Toy Sun
 
Posts: 19
Joined: Sun Dec 10, 2006 3:47 am

Doesn't work... specific error..

Postby Toy Sun » Tue Jan 29, 2008 6:53 am

Hi,
I get the following error:

Parse error: syntax error, unexpected T_STRING in /usr/www/users/toysun/kplaylist/index.php on line 14092

14092 is the second line of code that you suggested I replace:

 $this->data .= '<title>'.$f2->gentitle(array('title')).'</title>'.$this->crlf;

Any idea what is wrong?

thanks,

John
Toy Sun
 
Posts: 19
Joined: Sun Dec 10, 2006 3:47 am

JW Player

Postby Hefeslug » Sun Feb 03, 2008 9:20 am

ToySun

First try it with out changing any of this lines.
Code: Select all
               $this->data .= '<track>'.$this->crlf;
               $this->data .= '<location>'.$url.'</location>'.$this->crlf;
               $this->data .= '<creator>'.$f2->id3['artist'].'</creator>'.$this->crlf;
               $this->data .= '<album>'.$f2->id3['album'].'</album>'.$this->crlf;
               $this->data .= '<title>'.$f2->gentitle(array('title')).'</title>'.$this->crlf;
               $this->data .= '<annotation>'.$f2->gentitle(array('artist', 'title')).'</annotation>'.$this->crlf;
               $this->data .= '<duration>'.vernum($f2->id3['lengths']).'</duration>'.$this->crlf;
               $kpi = new kpimage(false, $f2->drive, $f2->relativepath);
               if ($kpi->find())
               {
                  $kpi->resize();
                  $imgurl = $kpi->geturl(true);
               } else $imgurl = '';
               $this->data .= '<image>'.$imgurl.'</image>'.$this->crlf;
               $this->data .= '<info></info>'.$this->crlf;
               $this->data .= '</track>'.$this->crlf;


But all I did there was
Image


On my "index.php" that is line 11128


PM me and I will give you the url to the web site.

thanks
Hefeslug
 
Posts: 2
Joined: Fri Jan 25, 2008 8:23 pm

Next

Return to Announcement



cron