rejetto forum

Online player for HFS

0 Members and 1 Guest are viewing this topic.

Offline bearking

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
not in a new pop
first
Quote
bear.js
Quote
var MediaTemp=new Array()
function MediaShow(strType,strID,strURL,intWidth,intHeight)
{
   var tmpstr
   if (MediaTemp[strID]==undefined) MediaTemp[strID]=false; else MediaTemp[strID]=!MediaTemp[strID];
   if(MediaTemp[strID]){
         if ( document.all )   {
               document.getElementById(strID).outerHTML = '<div id="'+strID+'"></div>'
         }
         else
         {
               document.getElementById(strID).innerHTML = ''
         }

      document.images[strID+"_img"].src="http://hostURL/images/play.gif"       
      document.getElementById(strID+"_text").innerHTML="open player"   
   }else{
      document.images[strID+"_img"].src="http://hostURL/images/stop.gif"       
      document.getElementById(strID+"_text").innerHTML="close player"
      switch(strType){
         case "swf":
            tmpstr='<div style="height:6px;overflow:hidden"></div><object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+intWidth+'" height="'+intHeight+'"><param name="movie" value="'+strURL+'" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="'+strURL+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+intWidth+'" height="'+intHeight+'" /></object>';
            break;
            case "wma":
            tmpstr='<div style="height:6px;overflow:hidden"></div><object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"  id="MediaPlayer" width="450" height="70"><param name=""howStatusBar" value="-1"><param name="AutoStart" value="False"><param name="Filename" value="'+strURL+'"></object>';
            break;
         case "wmv":
            tmpstr='<div style="height:6px;overflow:hidden"></div><object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" type="application/x-oleobject" standby="Loading..." width="'+intWidth+'" height="'+intHeight+'"><param name="FileName" VALUE="'+strURL+'" /><param name="ShowStatusBar" value="-1" /><param name="AutoStart" value="true" /><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="'+strURL+'" autostart="true" width="'+intWidth+'" height="'+intHeight+'" /></object>';
            break;
         case "rm":
            tmpstr='<div style="height:6px;overflow:hidden"></div><object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+intWidth+'" height="'+intHeight+'"><param name="SRC" value="'+strURL+'" /><param name="CONTROLS" VALUE="ImageWindow" /><param name="CONSOLE" value="one" /><param name="AUTOSTART" value="true" /><embed src="'+strURL+'" nojava="true" controls="ImageWindow" console="one" width="'+intWidth+'" height="'+intHeight+'"></object>'+
                '<br/><object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+intWidth+'" height="32" /><param name="CONTROLS" value="StatusBar" /><param name="AUTOSTART" value="true" /><param name="CONSOLE" value="one" /><embed src="'+strURL+'" nojava="true" controls="StatusBar" console="one" width="'+intWidth+'" height="24" /></object>'+'<br /><object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+intWidth+'" height="32" /><param name="CONTROLS" value="ControlPanel" /><param name="AUTOSTART" value="true" /><param name="CONSOLE" value="one" /><embed src="'+strURL+'" nojava="true" controls="ControlPanel" console="one" width="'+intWidth+'" height="24" autostart="true" loop="false" /></object>';
            break;
         case "ra":
            tmpstr='<div style="height:6px;overflow:hidden"></div><object classid="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" id="RAOCX" width="450" height="60"><param name="_ExtentX" value="6694"><param name="_ExtentY" value="1588"><param name="AUTOSTART" value="true"><param name="SHUFFLE" value="0"><param name="PREFETCH" value="0"><param name="NOLABELS" value="0"><param name="SRC" value="'+strURL+'"><param name="CONTROLS" value="StatusBar,ControlPanel"><param name="LOOP" value="0"><param name="NUMLOOP" value="0"><param name="CENTER" value="0"><param name="MAINTAINASPECT" value="0"><param name="BACKGROUNDCOLOR" value="#000000"><embed src="'+strURL+'" width="450" autostart="true" height="60"></embed></object>';
            break;
         case "qt":
            tmpstr='<div style="height:6px;overflow:hidden"></div><embed src="'+strURL+'" autoplay="true" loop="false" controller="true" playeveryframe="false" cache="false" scale="TOFIT" bgcolor="#000000" kioskmode="false" targetcache="false" pluginspage="http://www.apple.com/quicktime/" />';
      }
      document.getElementById(strID).innerHTML = tmpstr;
   }
      document.getElementById(strID+"_href").blur()
}



and add to HFS


Code: [Select]
[file.rm]
<tr>
<td>
%new%
<a href="%item-url%">
<img src="/~img_file" />
 %item-name%
</a>
%comment%
<td align=right>
%item-size%
<td align=right>
%item-modified%
<td align=right>
%item-dl-count%
<td align=right>
<table border='0' cellpadding='0' align="center">
<SCRIPT src="http://%host%/player/bear.js" type=text/javascript></SCRIPT>
<A id=temp%item-size-b%_href href="javascript:MediaShow('[color=red]rm[/color]','temp%item-size-b%','http://%host%%folder%%item-name%','400','300')">
<IMG style="MARGIN: 0px 3px -2px 0px" alt="" src="http://%host%/images/play.gif" border=0 name=temp%item-size-b%_img>
<SPAN id=temp%item-size-b%_text>player</SPAN></A>
</table></td><tr><td><DIV id=temp%item-size-b%></DIV></td></tr>

i can not find %item-type%
so another type must add[file.xxx] same as [file.rm]
ps.  play.gif&stop.gif please download in internet .i can't upload attachments
displace bear.js http://hosturl/ to your %hosturl%
« Last Edit: January 10, 2008, 02:01:18 PM by That_Stevens_Guy »


Offline bearking

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
on a new pop page player
Code: [Select]
[file.wmv=file.mpg]
<tr>
<td>
%new%
<a href="%item-url%">
<img src="/~img_file" />
 %item-name%
</a>
%comment%
<td align=right>
%item-size%
<td align=right>
%item-modified%
<td align=right>
%item-dl-count%
<td align=right>
    <!-- begin embedded WindowsMedia file... -->
      <table border='0' cellpadding='0' align="center">
      <tr><td>
               <a href="http://%host%/player/wma.htm?song_id=http://%host%%folder%%item-name%" target="_blank">play<a/>
</td></tr>
</td></tr></table>

Code: [Select]
[file.rm=file.rmvb]
<tr>
<td>
%new%
<a href="%item-url%">
<img src="/~img_file" />
 %item-name%
</a>
%comment%
<td align=right>
%item-size%
<td align=right>
%item-modified%
<td align=right>
%item-dl-count%
<td align=right>
    <!-- begin embedded WindowsMedia file... -->
      <table border='0' cellpadding='0' align="center">
      <tr><td>
               <a href="http://%host%/player/real.htm?real_id=http://%host%%folder%%item-name%" target="_blank">play<a/>
</td></tr>
</td></tr></table>

wma.htm
Code: [Select]
<HTML><head> <TITLE>wma</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META content=0 name=CustomerID>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>
TD {
FONT-SIZE: 12px; COLOR: #333333; LINE-HEIGHT: 18px; FONT-FAMILY: "Verdana"; TEXT-DECORATION: none
}
.style2 {font-size: 12px}
.style3 {color: #FF0000}
.unnamed1 {
text-decoration: none;
color: #000000;
}
.style5 {text-decoration: none; color: #FF0000; }
.style6 {
color: #0000FF;
font-weight: bold;
}
</STYLE>

<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff topMargin=0 >
<DIV align=center>
  <TABLE class=contenttd height=442 cellSpacing=0 cellPadding=0 width=800
bgColor=#ffffff>
    <TBODY>
    <TR> <TD>
        <TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0 height="427">
          <TR>
               <tr>
                  <td align=middle width=800 bgcolor=#000000 height=600>
                    <script language=javascript>
url=document.URL ;
url=url.split("&") ;
var song_id=url[0].substr(url[0].indexOf("song_id=") + 8);
</script>
                    <script language="javascript">
kstatus();
function kstatus(){
self.status="for HFS online playe";
setTimeout("kstatus()",0);
}
</script>
                    <script language="JavaScript">
document.writeln("<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" id=\"MediaPlayer1\" width=\"100%\" height=\"100%\">");
document.writeln("        <param name=\"AudioStream\" value=\"-1\">");
document.writeln("        <param name=\"AutoSize\" value=\"0\">");
document.writeln("        <param name=\"AutoStart\" value=\"-1\">");
document.writeln("        <param name=\"AnimationAtStart\" value=\"-1\">");
document.writeln("        <param name=\"AllowScan\" value=\"-1\">");
document.writeln("        <param name=\"AllowChangeDisplaySize\" value=\"-1\">");
document.writeln("        <param name=\"AutoRewind\" value=\"0\">");
document.writeln("        <param name=\"Balance\" value=\"0\">");
document.writeln("        <param name=\"BaseURL\" value>");
document.writeln("        <param name=\"BufferingTime\" value=\"5\">");
document.writeln("        <param name=\"CaptioningID\" value>");
document.writeln("        <param name=\"ClickToPlay\" value=\"-1\">");
document.writeln("        <param name=\"CursorType\" value=\"0\">");
document.writeln("        <param name=\"CurrentPosition\" value=\"-1\">");
document.writeln("        <param name=\"CurrentMarker\" value=\"0\">");
document.writeln("        <param name=\"DefaultFrame\" value>");
document.writeln("        <param name=\"DisplayBackColor\" value=\"0\">");
document.writeln("        <param name=\"DisplayForeColor\" value=\"16777215\">");
document.writeln("        <param name=\"DisplayMode\" value=\"0\">");
document.writeln("        <param name=\"DisplaySize\" value=\"2\">");
document.writeln("        <param name=\"Enabled\" value=\"-1\">");
document.writeln("        <param name=\"EnableContextMenu\" value=\"-1\">");
document.writeln("        <param name=\"EnablePositionControls\" value=\"-1\">");
document.writeln("        <param name=\"EnableFullScreenControls\" value=\"0\">");
document.writeln("        <param name=\"EnableTracker\" value=\"-1\">");
document.writeln("        <param name=\"Filename\" value=\""+song_id+"\">");
document.writeln("        <param name=\"InvokeURLs\" value=\"-1\">");
document.writeln("        <param name=\"Language\" value=\"-1\">");
document.writeln("        <param name=\"Mute\" value=\"0\">");
document.writeln("        <param name=\"PlayCount\" value=\"0\">");
document.writeln("        <param name=\"PreviewMode\" value=\"0\">");
document.writeln("        <param name=\"Rate\" value=\"1\">");
document.writeln("        <param name=\"SAMILang\" value>");
document.writeln("        <param name=\"SAMIStyle\" value>");
document.writeln("        <param name=\"SAMIFileName\" value>");
document.writeln("        <param name=\"SelectionStart\" value=\"-1\">");
document.writeln("        <param name=\"SelectionEnd\" value=\"-1\">");
document.writeln("        <param name=\"SendOpenStateChangeEvents\" value=\"-1\">");
document.writeln("        <param name=\"SendWarningEvents\" value=\"-1\">");
document.writeln("        <param name=\"SendErrorEvents\" value=\"-1\">");
document.writeln("        <param name=\"SendKeyboardEvents\" value=\"0\">");
document.writeln("        <param name=\"SendMouseClickEvents\" value=\"0\">");
document.writeln("        <param name=\"SendMouseMoveEvents\" value=\"0\">");
document.writeln("        <param name=\"SendPlayStateChangeEvents\" value=\"-1\">");
document.writeln("        <param name=\"ShowCaptioning\" value=\"0\">");
document.writeln("        <param name=\"ShowControls\" value=\"-1\">");
document.writeln("        <param name=\"ShowAudioControls\" value=\"-1\">");
document.writeln("        <param name=\"ShowDisplay\" value=\"0\">");
document.writeln("        <param name=\"ShowGotoBar\" value=\"0\">");
document.writeln("        <param name=\"ShowPositionControls\" value=\"-1\">");
document.writeln("        <param name=\"ShowStatusBar\" value=\"-1\">");
document.writeln("        <param name=\"ShowTracker\" value=\"-1\">");
document.writeln("        <param name=\"TransparentAtStart\" value=\"0\">");
document.writeln("        <param name=\"VideoBorderWidth\" value=\"0\">");
document.writeln("        <param name=\"VideoBorderColor\" value=\"0\">");
document.writeln("        <param name=\"VideoBorder3D\" value=\"0\">");
document.writeln("        <param name=\"Volume\" value=\"-40\">");
document.writeln("        <param name=\"WindowlessVideo\" value=\"0\">");
document.writeln("<\/object>")
      </script>
                    <script for="MediaPlayer1" event="Error( )" language="JScript">
  //if(MediaPlayer.ErrorCode==-1072889841)
                 alert("server is busy");
  //if(MediaPlayer.ErrorCode==-1072889830)
                 //alert("server is busy!");
      </script>
                  </td>
                </tr>
                </tbody>
              </table>
            </TD>
           
          </TR>
          <TBODY></TBODY>
        </TABLE>
      </TD>
    </TR></TABLE>
  <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="760" align="CENTER" height="80">
    <tr>
      <td>
        <div align="center">
        </div>
      </td>
    </tr>
  </table>
</DIV>
</BODY></HTML>


real.htm


Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>player</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META content=0 name=CustomerID>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>
TD {
FONT-SIZE: 12px; COLOR: #333333; LINE-HEIGHT: 18px; FONT-FAMILY: "Verdana"; TEXT-DECORATION: none
}
.style2 {font-size: 12px}
.style3 {color: #FF0000}
.style5 {text-decoration: none; color: #FF0000; }
.unnamed1 { text-decoration: none;
color: #000000;
}
.style6 { color: #0000FF;
font-weight: bold;
}
</STYLE>

<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff topMargin=0 >
<DIV align=center>
  <TABLE class=contenttd height=600 cellSpacing=0 cellPadding=0 width=800
bgColor=#ffffff>
    <TBODY>
    <TR> <TD>
               <tr>
                  <td align=middle width=800 bgcolor=#000000 height=600>
                    <script language=javascript>
url=document.URL ;
url=url.split("&") ;
var real_id=url[0].substr(url[0].indexOf("real_id=") + 8);
</script>
                    <script language="javascript">
kstatus();
function kstatus(){
self.status="txt";
setTimeout("kstatus()",0);
}
</script>
                    <script language="JavaScript">
document.writeln("<object id=\"player\" name=\"player\" classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" width=\"100%\" height=\"85%\" align=\"baseline\">");
document.writeln("              <param name=\"_ExtentX\" value=\"11113\">");
document.writeln("              <param name=\"_ExtentY\" value=\"8017\">");
document.writeln("              <param name=\"AUTOSTART\" value=\"-1\">");
document.writeln("              <param name=\"SHUFFLE\" value=\"0\">");
document.writeln("              <param name=\"PREFETCH\" value=\"0\">");
document.writeln("              <param name=\"NOLABELS\" value=\"-1\">");
document.writeln("              <param name=\"SRC\" value=\""+real_id+"\">");
document.writeln("              <param name=\"CONTROLS\" value=\"Imagewindow\">");
document.writeln("              <param name=\"CONSOLE\" value=\"clip1\">");
document.writeln("              <param name=\"LOOP\" value=\"0\">");
document.writeln("              <param name=\"NUMLOOP\" value=\"0\">");
document.writeln("              <param name=\"CENTER\" value=\"0\">");
document.writeln("              <param name=\"MAINTAINASPECT\" value=\"0\">");
document.writeln("              <param name=\"BACKGROUNDCOLOR\" value=\"#000000\"><embed src=\""+real_id+"\" width=\"100%\" height=\"100%\" autostart=\"-1\" loop=\"0\" _extentx=\"9869\" _extenty=\"7726\" shuffle=\"0\" prefetch=\"0\" nolabels=\"-1\" controls=\"Imagewindow\" console=\"clip1\" numloop=\"0\" center=\"0\" maintainaspect=\"0\" backgroundcolor=\"#000000\" name=\"player\"></object>");
document.writeln("              <br>");
document.writeln("  <object CLASSID=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" WIDTH=\"100%\" HEIGHT=\"15%\" ID=\"RP2\">");
document.writeln("        <param name=\"_ExtentX\" value=\"11113\">");
document.writeln("        <param name=\"_ExtentY\" value=\"1296\">");
document.writeln("        <param name=\"AUTOSTART\" value=\"-1\">");
document.writeln("        <param name=\"SHUFFLE\" value=\"0\">");
document.writeln("        <param name=\"PREFETCH\" value=\"0\">");
document.writeln("        <param name=\"NOLABELS\" value=\"-1\">");
document.writeln("        <param name=\"SRC\" value=\""+real_id+"\">");
document.writeln("        <PARAM NAME=CONTROLS VALUE=ControlPanel,StatusBar>");
document.writeln("        <param name=\"CONSOLE\" value=\"clip1\">");
document.writeln("        <param name=\"LOOP\" value=\"0\">");
document.writeln("        <param name=\"NUMLOOP\" value=\"0\">");
document.writeln("        <param name=\"CENTER\" value=\"0\">");
document.writeln("        <param name=\"MAINTAINASPECT\" value=\"0\">");
document.writeln("        <param name=\"BACKGROUNDCOLOR\" value=\"#000000\">");
document.writeln("      </object>");
</script>
                  </td>
                </tr>
               </tbody>
              </table>
            </TD>

            </TD>
          </TR>
          <TR>
            <TD class=w_black2 HEIGHT="2" colspan="3">&nbsp; </TD>
          </TR>
          <TBODY></TBODY>
        </TABLE>
      </TD></TR></TABLE>
  <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="760" align="CENTER" height="80">
    <tr>
      <td>
        <div align="center">
        </div>
      </td>
    </tr>
  </table>
</DIV>
</BODY></HTML>


htm file add to %host%/player/
« Last Edit: September 24, 2007, 12:31:59 PM by bearking »