rejetto forum

embedding WMP

0 Members and 1 Guest are viewing this topic.

Offline masaykh

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
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?


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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.
« Last Edit: April 04, 2010, 05:09:50 PM by TSG »


Offline masaykh

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