Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Help:
Jeroen Flash Player
elygen



Joined: 22 Feb 2007
Posts: 637

Posted: 04/28/08 18:36 
How do we use the Jeroen Flash Player? Is there a new smarty tag?


_________________
~ Todd
=================
Happy Jamrooming
New Jersey
www.bandarray.com
Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 04/28/08 18:46 
No smarty tags as yet.

I do have this working though, you can see it here:
http://www.sefjam.com/index.php?t=browse_song

For multiple players on one page you will need the javascript (swfobject.js) and the imagefile (player-image.jpg).

What it does is place an image on the page for each player, when the player is clicked it is replaced with the mediaplayer. It isn't ready yet as the link to forward to adobe for an updated player isn't working in Safari (hence the href="#") but that seems to be an adobe ting.

If you need to get this working now, the code behind it is this:

SteveX:
In summary:
http://www.sefjam.com/index.php?t=browse_song

/images/player-image.jpg is a screenshot of the player which is replaced when clicked.

/include/js/swfobject.js is v1.5

Added beneath the song ranking row tpl:

Code
 </tr><tr><td colspan="4">
<div id="placeholder_{$SONG_ID}">
<a href="#"><img src="/images/player-image.jpg" border="0" onclick="createPlayer('placeholder_{$SONG_ID}', '{$SONG_HIFI_PLAY_URL|jr_urlencode|jr_replace:"amp%3B":""}%26type%3Dxspf', '/images/player-image.jpg', true)"></a>
</div>
</td>


in jr_overall_header:

Code
<script type="text/javascript" src="{$JAMROOM_URL}/include/js/swfobject.js"></script>
{literal}
<script type="text/javascript">
var currentPlayer=null;
var currentFile;
var currentImage;

function removeOldPlayer() {
   document.getElementById(currentPlayer).innerHTML = '<img src="'+currentImage+'" border="0" onclick="createPlayer(\''+currentPlayer+'\', \''+currentFile+'\', \''+currentImage+'\', true)">';
}

function createPlayer(thePlace, theFile, theImage, go) {
   if (currentPlayer!=null) { removeOldPlayer(); }

   currentPlayer=thePlace;
   currentFile=theFile;
   currentImage=theImage;

   var s = new SWFObject("/include/flash/mediaplayer.swf","playerID","200","20","8");
   s.addParam("allowfullscreen","false");
   s.addVariable("file",theFile);
   s.addVariable("width","200");
   s.addVariable("height","20");
   s.addVariable("overstretch","fit");
   s.addVariable("image",theImage);
   s.addVariable("showicons","false");
   if (go) { s.addVariable("autostart","true"); }

   s.write(thePlace);
}
</script>
{/literal}



_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
elygen



Joined: 22 Feb 2007
Posts: 637

Posted: 04/28/08 18:59 
I had actually gotten this player to work quite a while ago(http://www.moneymanagementxl.com at bottom of index page) but had to alter the play.php file each time a new update was released so i have been waiting a long time for it to be a part of jamroom. So i guess i can keep on trucking the way i have in the past but not have to change the play.php file.

Although i love how you have that page with the screen shot that turn into real players. I'm going to have to find a way to use it.

Thanks


_________________
~ Todd
=================
Happy Jamrooming
New Jersey
www.bandarray.com
Back to top
mapyaboy



Joined: 14 Aug 2006
Posts: 600

Posted: 06/06/08 15:39 

elygen:
I had actually gotten this player to work quite a while ago(http://www.moneymanagementxl.com at bottom of index page) but had to alter the play.php file each time a new update was released so i have been waiting a long time for it to be a part of jamroom. So i guess i can keep on trucking the way i have in the past but not have to change the play.php file.

Although i love how you have that page with the screen shot that turn into real players. I'm going to have to find a way to use it.

Thanks

What was the modification on play.php for this to work?

Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 06/06/08 17:56 
Using the code I posted above there is no modification to play.php.

The example I linked to is no longer there as I just keep sefjam updated with the current set of files and overwrite any experiments or examples, but the code should still be good.


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 06/06/08 20:25 
The {jr_flash_player} smarty function supports the Jeroen Player - use the keyword "jeroen" for the player_type.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Help

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.