Help around player.php Help around player.php
 

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

Help around player.php

Started by hama, April 15, 2005, 02:53:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hama

With the following code, a windows media player starts in an iframe. I couldn't get that work without corrupt the design of my website. I give up. Last night I thought and thought and .. now I have an idea in my head but I can't realize it by code. I'd like that the code opens a new very little window, just with a small media player in it. If then somebody want's to listen music, this window will open and it can minimized.

The player should work with Internet Explorer and Firefox. I tried with player check but in Firefox only the player opens but doesn't start.

Has someone energy to help? Payment could be by amazon (DVD or something like that). Thanks!  :)

<?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>";

## PLAYER CHECK
if (eregi('MSIE',$HTTP_USER_AGENT)) {
        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>";
}
else  {
        echo 
"<embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' width='100%' height='70' enablecontextmenu='0' src='' ShowDisplay='0' showcontrols='1'>";
}
## PLAYER CHECK

#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 "</div>";

echo 
"</body>";

echo 
"</html>";

?>


Sorry about the "messy" code. It's hand made ... I tried, deleted, tried again and at the end that was result.  ;)

At the moment you can start the music here: http://www.orst.ch/copper/index.php. By choosing a radio station the player opens and it should the open in a new window ...

Thanks

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

foulu

i can help you

fist add two function to script.js

function popup(url,target)
{
   w = screen.width*(3/4);
   h = screen.height*(3/4);
   l = (screen.width-w)/2;
   t = (screen.height-h)/2;
   widthHeight = "width="+w+",height="+h+",left="+l+",top="+t+",menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,location=no";
   window.open(url,target,widthHeight);
   return true
}

function openurl(oForm)
{
  s = oForm.url.value;
  popup(s,'chatroom');
}

to open popup (just an expample of use):

<form method="POST" onsubmit="return openlink(this)">
  <input name="url" type="text" value="link.php">
  <input type="submit" class="button" value="Go">
</form>

to open an link.php as a popup window when submit form (link.php), you can modify it for your own use.

rphMedia

hama, you don't need to resort to a popup.  I think I've found the problem with the scrollbar issue. Check your PM's :)

hama


rphMedia solved the problem. Thanks!  :)

--> http://www.orst.ch/copper/index.php

--> "Done8)
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!