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.
// 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>";
}