Music for your site - Page 2 Music for your site - Page 2
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Music for your site

Started by rphMedia, October 23, 2004, 06:27:44 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

hama


Quote
music itself is worldwide :-) Variety is the spice of life etc :-)

Yes, that's right! I'll have a look at your radio stations in a few days or weeks and maybe I'll find some for my website.

Have a good (clubbing) time!

hama
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

itrends

I should note that I have already changed my setup. I am no longer using frames, but instead a flash based player which loads in a pop up windows with playlist etc.

I am just figuring out how to stream a radio station stream into the player too so I can keep all the functionlity.

I would love your feedback on the new player.

rphMedia

Quote from: itrends on November 27, 2004, 03:42:34 PM
hey all, thought you may be interested in my implementation of a music player which works on the entire site

Appreciate the thread hijack.  You really should've started a new thread. It's starting to get conveluted.

hama

Yes, I think we solved the problem "music for your website".

Other possibilities to implement music in a website should be discussed in a new thread.

hama
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

itrends

Agreed, however when I first posted it was using the code that was provided at the start of this thread but implemented using Frames instead of an Iframe which removed the "scroll bar" problem. It was only afterwards that the new player (flash based) was implemented. No offence or thread hijacking intended :-(

rphMedia

#25
Takin' a poll here.  I've implemented an "embed" tag to the WMP plugin on the page.  You guys with Firefox browser, can you check and tell me if you can see the media player now and if it plays?

*removed old link

Thanks

PS - edit, there's a link to send a Christmas E-Card at the site.  Be my guest.  They're very basic as I'm just testing the Flash/PHP integration, but from my tests, it's working quite well so far.  Happy Holidays to everyone here!

Casper

Yes, the media player is there, and it plays the music.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Tranz


nol33t

#28
Quote from: hama on November 25, 2004, 03:13:44 PM

Removing the scrollbar doesn't help.


"<iframe src='index.php' width='100%' height='100%' frameborder='0' scroll='no' name='myInlineFrame'>Your browser doesn't seem to support 'frames'</iframe>";


Here's a printscreen of my problem:

Hi,
For those who got the same problem with Firefox (Ron fyi on your website the player is now indeed actually workin but the double scrollbar is still there),
the easiest solution is to set the height value of the <iframe> tag in pixel and not %, and to a value bigger than the height of the dynamically generated page, so:
- it takes a couple of tries to find the good one ( it you set it to a too high one your page will be way too long..)
- on some really long pages other than the index, like the configuration page, it could still show up if e.g.:
  (size index page) < (height chosen) < (size configuration page)
- if you add some content on your main page, you could have to adjust it again...

- BUT at least the double scroll does NOT SHOW UP ANYMORE ON THE MAIN PAGE  ;D (and it's late and i couldn't go to sleep without solvin' that one  :D)

Regards,
matt

P.S.: since i like IE users too ;)...for this solution to work with Firefox AND IE, you got to add scroll=yes in the <body> tag, and scroll=no in the <iframe> one

rphMedia

#29
Good troubleshooting nol33t, but I've since found that this works every time -

<html>
<head>
<title>Our Online Photo Album</title>
</head>
<body bgcolor="#000000" topmargin="0px" leftmargin="0px" rightmargin="0px" bottommargin="0px" scroll="no">
<iframe src="index.php" width="100%" height="90%" frameborder="0" scrolling="auto" name="myInlineFrame">
Your browser doesn't seem to support "frames"</iframe>
<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="WMP1" Style="border-style: none; border-width: 0; margin: 0" width="100%" height="10%">
<param name="URL" value="your music here">
<param name="AutoStart"    value=false>
<param name="AutoRewind"   value=true>
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" width="100%" height="9%" src="your music here" ShowDisplay="0" showcontrols="1">
</object>
</body>
</html>


In essense, just change the embed tag to 9% (for some reason, Firefox doesn't like 100% height - adds scroll anyway).  This way, it looks perfect in IE, and a small bottom border occurs in Firefox, but absolutely no more double-scroll, no matter what the res/window size. Thanks for testing everyone.

nol33t

#30
you sure ??? cuz i checked on your site (--edit: link removed on rphMedia request) and with firefox the player looks weird now and the double scroll is still here...
url of what i did if you want to compare http://nol33t.free.fr/cpg/


rphMedia

#31
Quote from: nol33t on December 16, 2004, 06:29:49 PM
you sure ??? cuz i checked on your site (*removed old link) and with firefox the player looks weird now and the double scroll is still here...
url of what i did if you want to compare http://nol33t.free.fr/cpg/



I've been updating (3 of my sites) as you were writing that, so try it again.

*removed old links

I've also fixed some Firefox/css at my site and Firefox/Flash transparency issues. It's all coming together to satisfy both browsers.

PS, got all my mods there, looks good!

hama


I can't fix my player.php-firefox-problem ... works good with Internet Explorer, only black with Firefox ...  :-\\

It has something to do with "embedded" I know but my player.php looks a little bit crazy. I don't know which lines I can delete and where I have to put in the embedded tags.

Maybe somebody can help me a bit.

This is my player.php:


<?php
echo "<html>";
echo 
"<head>";
echo 
"<title>OST-Gallery</title>";
#echo "<link rel='stylesheet' href='themes/default/style.css'>";
echo "</head>";
echo 
"<body bgcolor='#000000' marginwidth='0' marginleft='0' topmargin='0' leftmargin='0' rightmargin='0' scroll='no'>";
echo 
"<div align='center'>";
echo 
"<table width='100%' height='92%' cellspacing='0' cellpading='0'>";
echo 
"<tr>";
echo 
"<td>";
echo 
"<iframe src='index.php' width='100%' height='100%' frameborder='0' scrolling='auto' name='myInlineFrame'>Your browser doesn't seem to support 'frames'</iframe>";
echo 
"</td>";
echo 
"</tr>";
echo 
"</table>";
echo 
"<object id='mediaPlayer' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' align='center' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject' viewastext width='100%' height='67'>";
echo 
"<param name='loop' value='true'>";
echo 
"<param name='FileName' value='$radiostation'>";
echo 
"<param name='ShowStatusBar' value='true'>";
echo 
"<param name='animationatStart' value='false'>";
echo 
"<param name='transparentatStart' value='false'>";
echo 
"<param name='autoStart' value='true'>";
echo 
"<param name='showControls' value='true'>";
echo 
"<param name='volume' value='-200'>";
#echo "<object classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' id='WMP1' Style='border-style: none; border-width: 0; margin: 0' width='100%' height='60'>";
#echo "<param name='URL' value='$radiostation'>";
#echo "<param name='AutoStart' value=false>";
#echo "<param name='AutoRewind' value=true>";
//<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" width="100%" height="9%" enablecontextmenu="0" src="http://radio.msn.com/asx/generate.aspx?type=genre&amp;id=10002389" ShowDisplay="0" showcontrols="1"></embed>
echo "</object>";
echo 
"</div>";
echo 
"</body>";
echo 
"</html>";
?>



If somebody is interested, I have an anycontent-solution for "music for your site" where one part is visible for every gallery visitor and an additional part only for registered and logged in users (Casper helped me a bit).  :)

Here is this anycontent.php:


<?php
/*
$Id: anycontent.php,v 1.7 2004/03/16 09:26:18 gaugau Exp $
*/

if (USER_ID) {

starttable("100%""Sounds :-)"2);

echo 
"<tr><td class='tableb' colspan='2' align='center'><br><b>Ein bisschen Sound gefällig?</b></br><br>";
echo 
"</td></tr>";
echo 
"<tr><td class='tableb' width='50%' align='center'><br>";
echo 
"<form action='player.php' method='post' target='_top'>";
echo 
"<select size='1' name='radiostation'>";
echo 
"<option selected>Radios - Bitte wählen ...</option>";
echo 
"<option value='http://www.web-radio.com/stream.cfm?id=11489'>Radio Groove (USA, 32 KBit/s)</option>";
echo 
"<option value='http://www.radiopilatus.ch/sound/high.asx'>Radio Pilatus (48 KBit/s)</option>";
echo 
"<option value='http://asx.skypro.tv/asx/radio-drs/virus.asx'>Radio Virus (40 KBit/s)</option>";
echo 
"</select>&nbsp;<input type='submit' value='Play!' name='Play!'>";
echo 
"</form>";
echo 
"</td>";

echo 
"<td class='tableb' width='50%' align='center'><br>";
echo 
"<form action='player.php' method='post' target='_top'>";
echo 
"<select size='1' name='radiostation'>";
echo 
"<option selected>Songs - Bitte wählen ...</option>";
echo 
"<option value='http://www.yourdomain.ch/sounds/title.mp3'>Title</option>";
echo 
"<option value='http://www.yourdomain.ch/sounds/title.mp3'>Title</option>";
echo 
"<option value='http://www.yourdomain.ch/sounds/title.mp3'>Title</option>";
echo 
"</select>&nbsp;<input type='submit' value='Play!' name='Play!'>";
echo 
"</form>";
echo 
"</td></tr>";

endtable();

} else {

starttable("100%""Sounds :-)"2);

echo 
"<tr><td class='tableb' colspan='2' align='center'><br><b>Ein bisschen Sound gefällig?</b></br><br>";
echo 
"</td></tr>";
echo 
"<tr><td class='tableb' width='100%' align='center'><br>";
echo 
"<form action='player.php' method='post' target='_top'>";
echo 
"<select size='1' name='radiostation'>";
echo 
"<option selected>Radios - Bitte wählen ...</option>";
echo 
"<option value='http://www.web-radio.com/stream.cfm?id=11489'>Radio Groove (USA, 32 KBit/s)</option>";
echo 
"<option value='http://www.radiopilatus.ch/sound/high.asx'>Radio Pilatus (48 KBit/s)</option>";
echo 
"<option value='http://asx.skypro.tv/asx/radio-drs/virus.asx'>Radio Virus (40 KBit/s)</option>";
echo 
"</select>&nbsp;<input type='submit' value='Play!' name='Play!'>";
echo 
"</form>";
echo 
"</td>";

endtable();

}

?>

<br />


The "Music for your website"-anycontent in action: http://www.dorfschule.ch/copper/index.php (visible radio stations for everybody, more after login: test test)

hama
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

rphMedia

hama,

You're obviously trying to make this too hard and it's so easy.  If you click on my website and view the source, it should get you started.  Works in IE and Firefox.  I didn't go thru your code in detail, lots of stuff there that isn't really needed.  Understand that when you echo html, you can continue without all the line breaks.  You are correct in that it needs an embed tag, but I can't see where you went astray (no time to analyze right now :)).  Any questions, fire them at me - I'll be around off and on.


hama

Quote from: rphMedia on February 17, 2005, 09:00:25 PM
hama,

You're obviously trying to make this too hard and it's so easy.  

I'll try it again, on your website it looks really easy ...

hama
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

gtwar3

Yeah so I am more than a noob and can't figure any of this out. I have a photo gallery and the link is http://gtwar3.com/ then the link to the photo gallery but i have no clue how or where or what the iframe is, where to put it or anything .... can someone help me with a tard proof way of doing this please! thanks  ???

rphMedia

#36
Here's a new code for a dropdown menu if desired.  Works in all browsers (as far as I know - IE / FF for sure).  Modify the urls to your liking.

Enjoy!

<HTML>
<HEAD>
<title>Your Title</title>
<script type="text/javascript"><!--
function song(){
document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('cancion').value+"' name='music' width='100%' height='45' controltype='2' showcontrols='1' showstatusbar='0' AutoStart='true'></embed>";
}
//-->
</script>
</head>
<body bgcolor="#E1E4F2" topmargin="0px" rightmargin="0px" bottommargin="0px" leftmargin="0px" scroll="no">
<center><iframe src="index.php" width="100%" height="92%" frameborder="0" allowtransparency="true" scrolling="auto" name="myInlineFrame"></center>
Your browser doesn't seem to support "frames"</iframe>
<div align="center">
 <center>
 <table border="0" cellpadding="0" cellspacing="0" width="100%">
   <tr>
     <td width="28%" valign="middle" align="center">
<select  id="cancion" onchange="song()" size="1">
<OPTION selected>::::::::::::: Choose Your Music Here :::::::::::::</OPTION>        
     <OPTION value=http://radio.msn.com/asx/generate.aspx?type=genre&id=10002389>New Age</OPTION>
     <OPTION value=http://radio.msn.com/asx/generate.aspx?type=genre&id=10002399>Pop</OPTION>
     <OPTION value=http://radio.msn.com/asx/generate.aspx?type=genre&id=10002392>Jazz</OPTION>
     <OPTION value=http://radio.msn.com/asx/generate.aspx?type=genre&id=10002364>Country</OPTION>
     <OPTION value=http://radio.msn.com/asx/generate.aspx?type=genre&id=10002378>Rock</OPTION></SELECT></td>
     <td width="72%" valign="bottom" align="center">
<span id="music1"><embed type="application/x-mplayer2" id="music" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" width="100%" height="45" enablecontextmenu="0" src="" ShowDisplay="0" showcontrols="1">
    </td>
   </tr>
 </table>
 </center>
</div>
</body>
</html>


You can see it here




Nik

rph, that code works perfectly.

gtwar3, copy rph's code and paste it into notepad. save as "index.html" and upload to the parent directory of CopperMine. point your browser to CopperMine's directory and you should be good to go. if not, make sure your browser is loading index.html and NOT index.php

rphMedia


Nik

rph, once i start playing a station in Firefox i can't change to a different station... it sticks to the first station no matter what. do you know a way around this? it works fine in IE...