rejetto forum

Software => HTML & templates => HFS ~ HTTP File Server => RAWR-Designs => Topic started by: masaykh on March 29, 2010, 07:36:09 PM

Title: embedding WMP
Post by: masaykh on March 29, 2010, 07:36:09 PM
Hello everyone.
i have strange problem, i want to make preview box to use code like this:
Code: [Select]
<embed type='application/x-mplayer2' width=500 height=400 BufferingTime='5' src="+file+" autostart="true">
</embed>
so i opened terayon_previewbox.js , found this line
Code: [Select]
gEBI(target+"Content").innerHTML = '<object type="application/x-mplayer2" width='+width+' height='+height+'><param name=filename value="'+file+'" /><param name=autostart value=true /></object>';and changed it to
Code: [Select]
gEBI(target+"Content").innerHTML = '<embed type="application/x-mplayer2" width='+width+' height='+height+' src='+file+' autostart=true BufferingTime='5' /></embed>';
and...player in result code have undefined width and height..
i mean in resulted page when i view it i see :
Code: [Select]
width=undefined height=undefined
anyone can help me to solve this?
Title: Re: embedding WMP
Post by: TSG on April 04, 2010, 05:07:20 PM
If you are using the latest Terayon - 1.3.3 then I don't quite understand why you want to use embed... the object markup works fine for me... but I suppose embed will work too...

Those values would be undefined if they... aren't defined.

This is the code in latest Terayon:
Code: [Select]
// 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 type="application/x-mplayer2" width='+width+' height='+height+'><param name=filename value="'+file+'" /><param name=autostart value=true /><param name=autostart value=true /></object>';
}

This is the code with embed...
Code: [Select]
// 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 = '<embed type="application/x-mplayer2" width='+width+' height='+height+' src='+file+' autostart="true" BufferingTime="5" /></embed>';
}

untested.
Title: Re: embedding WMP
Post by: masaykh on April 04, 2010, 07:57:31 PM
thx. now everything working fine.