rejetto forum

Added DivX/Avi player to Terayon v1.3.2 theme

Guest · 46 · 41361

0 Members and 1 Guest are viewing this topic.

mprprozac

  • Guest
Hi,

I'm new to this program and community, but by the looks of it this is a fine piece of software. I've downloaded some templates and modded (hate to say improved) the Terayon 1.3.2 Theme.

I've added the DivX Web Player to play AVI,DivX & MKV (mkv not confirmed) files.
I'm working on WMV,WMA using Silverlight.

Once it's done i'll post the changes i made and the files needed.  ;D
But first to bed, 5:20AM at the moment  :P
« Last Edit: June 01, 2009, 09:56:52 AM by That_Stevens_Guy »



Offline Novox

  • Occasional poster
  • *
    • Posts: 84
    • View Profile

mprprozac

  • Guest
That sounds great!! waiting for your shared :D

I'm working on Silverlight WMV/WMA player, but it won't work.
I'm wondering if the applet will work in linux/mac if i use the standard (wmp) embedded code???
If so, i can put the changes online by tomorrow...


Offline Novox

  • Occasional poster
  • *
    • Posts: 84
    • View Profile
Only for playing DivX/AVI is also great!

Can you try to playing WMA/WMV by embedded Windows Media Player itself?


mprprozac

  • Guest
I've managed to get the following filetypes to work:
-Avi
-DivX
-VMW
-WMA

Avi & DivX uses the DivX web player to preview the content, and WMV & WMA uses the Windows Media Embedded code.
Changes in the sources are posted below, and JS file is attached for the people who don't want to edit the source :)

Changes in terayon_preview.js
Added codes in Line 30
Code: [Select]
else if(ext.match(".avi|.divx")) spawnDIVXBox(target,file);
else if(ext.match(".wmv|.wma")) spawnWMVBox(target,file);

Added codes in Line 119
Code: [Select]
/* Spawn DivX Box */
var volume = 50;
var height, width, aspect;
var playmethod = "single";
var context = "on";
function spawnDIVXBox(target,file) {
height = ext==".divx"?270:270;
width = ext==".divx"&&aspect=="wide"?427:320;
spawnBox(target,width,height);
setTimeout("setDIVXBox(\""+target+"\",\""+file+"\");",300);
}
function setDIVXBox(target,file) {
setName(file);
file = file.replace('+','%2B').replace('&','%26');
volume = getCookie('Volume') ? getCookie('Volume') : volume;
playmethod = getCookie('Method') ? getCookie('Method')+"&mode=full" : "single&mode=full";
if(autoplay == true) playmethod = "single";
gEBI(target+"Content").innerHTML = "<object classid='clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616' width="+width+" height="+height+" codebase='http://go.divx.com/plugin/DivXBrowserPlugin.cab' id='IE_divx'><param name='custommode' value='none'/><param name='previewImage' value=''/><param name='src' value="+file+"/><!--DivX Web Player code generator (divx.com)--><embed type='video/divx' id='MZ_divx' src="+file+" custommode='none' width="+width+" height="+height+" autoplay='true' previewImage='' pluginspage='http://go.divx.com/plugin/download/ /></object>";
autoplay = false;
}

/* Spawn WMV Box */
var volume = 50;
var height, width, aspect;
var playmethod = "single";
var context = "on";
function spawnWMVBox(target,file) {
height = ext==".wmv"?270:270;
width = ext==".wmv"&&aspect=="wide"?427:320;
spawnBox(target,width,height);
setTimeout("setWMVBox(\""+target+"\",\""+file+"\");",300);
}
function setWMVBox(target,file) {
setName(file);
file = file.replace('+','%2B').replace('&','%26');
volume = getCookie('Volume') ? getCookie('Volume') : volume;
playmethod = getCookie('Method') ? getCookie('Method')+"&mode=full" : "single&mode=full";
if(autoplay == true) playmethod = "single";
getdiv = "wmvp";
scripttype = "text/javascript";

gEBI(target+"Content").innerHTML = "<OBJECT id='mediaPlayer' width="+width+" height="+height+" classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'><param name='fileName' value="+file+"> <param name='animationatStart' value='true'><param name='transparentatStart' value='true'><param name='autoStart' value='true'><param name='showControls' value='true' volume="+volume+"><param name='loop' value='false'><EMBED type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="+width+" height="+height+" src="+file+" autostart='true' designtimesp='5311' loop='false' volume="+volume+"></EMBED></OBJECT>";
autoplay = false;
}

Changes in Terayon vX.X.tpl

Changes made in code in Line 352
replaced
Code: [Select]
[file.avi = file.divx = file.aiff = file.bat = file.css = file.doc = file.exe = file.file = file.gif = file.gzip = file.ini = file.m3u = file.mov = file.mpeg = file.mpg = file.ogg = file.pdf = file.ppt = file.rar = file.sit = file.sitx = file.tar = file.tgz = file.wav = file.wmv = file.wma = file.xls = file.zip]with
Code: [Select]
[file.aiff = file.bat = file.css = file.doc = file.exe = file.file = file.gif = file.gzip = file.ini = file.m3u = file.mov = file.mpeg = file.mpg = file.ogg = file.pdf = file.ppt = file.rar = file.sit = file.sitx = file.tar = file.tgz = file.wav = file.xls = file.zip]
Added code in Line 425

Code: [Select]
[file.wmv = file.wma]
<tr>
<td class="row1" align="center" valign="middle" width="64">
<a href="%encoded-folder%%item-url%" class="messageimagelink"><img src="/template/icons/%item-ext%.gif" class="noIcon" alt=""/></a>
</td>
<td width="100%" class="{.if not|{.get|can access.}|P.} {.inc|rows|1.}{.if|{.mod|{.^rows.}|2.}|altRow1|altRow2.}">
<div class="forumlink fileLink">
<a href="%folder%%item-url%">%item-name%</a>{.if|{.get|is new.}|<span style="font-size:7pt;font-weight:normal"> - <span class="Response"><b>NEW</b></span></span>.}
</div>
<span class="genmed" style="width:85%">%comment%</span>
<div class="minHeight"></div>
<div class="gensmall fileStats">
<span style="width:125px;float:left"><b>File Size:</b> %item-size%</span>
<span style="width:65px;float:left"><b>Hits:</b> %item-dl-count%</span>
<span style="width:200px;float:left"><b>Date:</b> %item-modified%</span>
</div>
</td>
<td nowrap="nowrap" class="qrow">
<div class="quicklinks">
<div class=q1><a href="%item-url%" title="Download this file."><div class="dow-a">&nbsp;</div></a></div>
<div class=q2 {.switch|%item-ext%|,|wmv,wma|name="mediaFile"|.}><a href="javascript:void(0)" onClick="initPreviewBox('Box-'+(%sequential%+1),this.name)" name="%item-full-url%" title="Open this file in a preview box"><div class="fla">&nbsp;</div></a><span id="Box-%sequential%"></span></div>
</div>
</td>
</tr>

[file.divx = file.avi]
<tr>
<td class="row1" align="center" valign="middle" width="64">
<a href="%encoded-folder%%item-url%" class="messageimagelink"><img src="/template/icons/%item-ext%.gif" class="noIcon" alt=""/></a>
</td>
<td width="100%" class="{.if not|{.get|can access.}|P.} {.inc|rows|1.}{.if|{.mod|{.^rows.}|2.}|altRow1|altRow2.}">
<div class="forumlink fileLink">
<a href="%folder%%item-url%">%item-name%</a>{.if|{.get|is new.}|<span style="font-size:7pt;font-weight:normal"> - <span class="Response"><b>NEW</b></span></span>.}
</div>
<span class="genmed" style="width:85%">%comment%</span>
<div class="minHeight"></div>
<div class="gensmall fileStats">
<span style="width:125px;float:left"><b>File Size:</b> %item-size%</span>
<span style="width:65px;float:left"><b>Hits:</b> %item-dl-count%</span>
<span style="width:200px;float:left"><b>Date:</b> %item-modified%</span>
</div>
</td>
<td nowrap="nowrap" class="qrow">
<div class="quicklinks">
<div class=q1><a href="%item-url%" title="Download this file."><div class="dow-a">&nbsp;</div></a></div>
<<div class=q2 {.switch|%item-ext%|,|avi,divx|name="mediaFile"|.}><a href="#" onClick="initPreviewBox('Box-'+(%sequential%+1),this.name)" name="%item-full-url%" title="Open this file in a preview box"><div class="fla">&nbsp;</div></a><span id="Box-%sequential%"></span></div>>
</div>
</td>
</tr>

I've only attached the JS file to this reply, because i've heavily modded the template file.

Any questions? Please reply or PM me :)





Currently working on (Quicktime) MPEG codem, results will be posted when completed
« Last Edit: May 15, 2009, 09:51:49 AM by mprprozac »


Offline Novox

  • Occasional poster
  • *
    • Posts: 84
    • View Profile
Wow!! Great work man!! You are so great!!!

Thanks for sharing!!


mrprozac

  • Guest
Just contributing to the community :)

Hope everyone enjoys this mod/addon.
I'll try to make more stuff for HFS when i have any spare time :)


austin

  • Guest
Can you make one that will work with RAWR too?  Or can this be added to a RAWR theme as well?  I don't use Terayon.  Tried it but it just didn't have what I needed. ;D


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
RAWR-Player will support .mov h264, and I'll make a silverlight player also when I get around to it.

The browsers can get buggy when you use quicktime or wmp plugins, we tested all of this once before.

We also pulled the DivX Web Player cause it was too buggy depending on the situation. And they pulled down Stage 6 so I just gave up on the idea. But if it works for you, go for it.

Lately I have been resting after getting the website online. I think Richard is just playing with the back end at the moment. I know I said I would release new builds when we got the site up, but my life has changed a little bit, I'm looking for work so I haven't got the time to play with HFS just now. Hopefully I can get them out soon enough, but at least the currently releases aren't buggy. Stability is the key now. Our next project is going to be the Admin Panel. But I can't see that coming out till late this year.


mprprozac

  • Guest
Can you make one that will work with RAWR too?  Or can this be added to a RAWR theme as well?  I don't use Terayon.  Tried it but it just didn't have what I needed. ;D

i'll try to make it possible, but i need to finish some other things.I'll keep you updated :)


mprprozac

  • Guest
RAWR-Player will support .mov h264, and I'll make a silverlight player also when I get around to it.

The browsers can get buggy when you use quicktime or wmp plugins, we tested all of this once before.

We also pulled the DivX Web Player cause it was too buggy depending on the situation. And they pulled down Stage 6 so I just gave up on the idea. But if it works for you, go for it.
DivX web player seems to run stable on the four major browsers (firefox, Chrome, Opera & IE) on my system and on my relatives computers, same for wmv plug-in. But i hate to use different plug-ins and trying to make one complete package.
But i'll try to add some features as a 3rd party dev to some templates. :)


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
With the DivX Web Player, it was something to do with the URL that was being fed to the player. And randomly, depending on HFS permissions, would throw up errors within the player.

http://www.divx.com/en/products/software/windows/divx

It does seem like they are continuing support for the player... So I might add it to the release templates again... Which I haven't decided when I am going to release yet, been too busy. My apologies. It is nice to know that the current templates are stable enough to avoid complaints. I might sit down and tidy them up over the coming week.

I have no idea how to even start programming a silverlight player... for wmv, wma. So maybe I will have to borrow one that people can install if they need the feature.

Of course these players would only be available in RAWR-Template and Terayon. ToG is supposed to be very lightweight. I will not be adding anymore than is needed for basic usage. But like always the code is always pretty much the same so anyone can have a go at installing one of these other players to ToG if they want it. When the tutorial feature of our website fires up, this is the sort of thing that can be found there.
« Last Edit: May 22, 2009, 06:21:52 PM by That_Stevens_Guy »


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
I think this will work with Terayon... not sure. But this is the code I have worked out for RAWR-Template. Much more optimised. Any smaller than this and you run into compatability issues.

Also, I didnt know but AVI also works with windows media player, so long as the codec is installed. I even managed to get MKV working with WMP. however both formats were buggy and really taxed HFS. So I have stuck with what you came up with. I wont be adding anymore than these formats to the templates. You could go on forever making plugins for streaming media. mp3,flv,mp4,m4a,mov,3gp,aac,avi,divx,wmv,wma are the containers supported by our templates now. I think we have covered most of the popular ones and a few extra.

Code: [Select]
// Insert DivX
function spawnDIVXBox(target,file) {
    spawnBox(target,640,370);
    setTimeout("setDIVXBox(\""+target+"\",\""+file+"\");",300);
}
function setDIVXBox(target,file) {
    setName(file);
    gEBI(target+"Content").innerHTML = "<object classid='clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616' width=640 height=370><param name=src value=\""+file+"\"/><embed type='video/divx' src="+file+" width=640 height=370 autoplay=true/></object>";
}
// Insert WM
function spawnWMBox(target,file) {
    height = ext!=".wma"?405:45;
    width = ext!=".wma"?640:400;
    spawnBox(target,width,height);
    setTimeout("setWMBox(\""+target+"\",\""+file+"\");",300);
}
function setWMBox(target,file) {
    setName(file);
    gEBI(target+"Content").innerHTML = "<object classid='clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95' width="+width+" height="+height+" type='application/x-oleobject'><param name=filename value=\""+file+"\"><param name=autostart value=true /><embed type='application/x-mplayer2' width="+width+" height="+height+" src=\""+file+"\" autostart=1 /></object>";
}
« Last Edit: June 01, 2009, 12:38:45 PM by That_Stevens_Guy »


Offline slasherx

  • Occasional poster
  • *
    • Posts: 98
    • View Profile
this is awsome man. i've been waiting for this for ever. i have been using 1.3.0 finally can upgrade.

edit: i keep getting error with divx player.

Can you upload your complete template or pm it to me.

Thanks
« Last Edit: June 07, 2009, 12:06:23 PM by slasherx »