Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Help around player.php  (Read 5210 times)

0 Members and 1 Guest are viewing this topic.

hama

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 229
Help around player.php
« on: April 15, 2005, 02:53:50 pm »

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!  :)

Code: [Select]
<?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
« Last Edit: April 22, 2005, 12:17:35 am by GauGau »
Logged
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!

foulu

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
Re: Help around player.php
« Reply #1 on: April 16, 2005, 11:04:19 am »

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

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Help around player.php
« Reply #2 on: April 16, 2005, 01:53:15 pm »

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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 229
Re: Help around player.php
« Reply #3 on: April 21, 2005, 10:49:11 pm »


rphMedia solved the problem. Thanks!  :)

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

--> "Done8)
Logged
Get up, stand up, stand up for your rights! - Get up, stand up, don't give up the fight!
Pages: [1]   Go Up
 

Page created in 0.044 seconds with 19 queries.