All pastes #937147 Raw Edit

Object selon nav

public javascript v1 · immutable
·published 2008-03-10 21:44 UTC
rendered paste body
function medias_baliseObject(id, url, auto, largeur, hauteur, console) {  var obt;  obt="<OBJECT ";	var agt=navigator.userAgent.toLowerCase();	if ((agt.indexOf("msie")!=-1) && (agt.indexOf("opera")==-1)) {    obt+="ID=\"" + id + "\" ";    if (typeMIME(url).indexOf("quicktime")!=-1) {      obt+="CLASSID=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" ";      obt+="CODEBASE=\"http://www.apple.com/qtactivex/qtplugin.cab\" ";    } else if (typeMIME(url).indexOf("realaudio")!=-1) {      obt+="CLASSID=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" ";      obt+="CODEBASE=\"http://???\" ";    } else if (typeMIME(url).indexOf("shockwave")!=-1) {      obt+="CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";      obt+="CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" ";    } else {      obt+="CLASSID=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" ";      obt+="CODEBASE=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,0,0,0\" ";    }    obt+="WIDTH=\"" + largeur + "\" HEIGHT=\"" + hauteur + "\" ALIGN=\"middle\">";    if (typeMIME(url).indexOf("shockwave")!=-1) {        obt+="<PARAM NAME=\"MOVIE\" VALUE=\"" + url + "\">";        obt+="<PARAM NAME=\"QUALITY\" VALUE=\"high\">";    } else { obt+="<PARAM NAME=\"SRC\" VALUE=\"" + url + "\">"; }  } else {    obt+="NAME=\"" + id + "\" DATA=\"" + url + "\" ";    obt+="TYPE=\"" + typeMIME(url) + "\" ";    obt+="WIDTH=\"" + largeur + "\" HEIGHT=\"" + hauteur + "\" ALIGN=\"middle\">";  }  if (auto) {    obt+="<PARAM NAME=\"AUTOSTART\" VALUE=\"true\">";    obt+="<PARAM NAME=\"AUTOPLAY\" VALUE=\"true\">";  } else {    obt+="<PARAM NAME=\"AUTOSTART\" VALUE=\"false\">";    obt+="<PARAM NAME=\"AUTOPLAY\" VALUE=\"false\">";  }  obt+="<PARAM NAME=\"CONTROLLER\" VALUE=\"true\">";  obt+="<PARAM NAME=\"CONSOLE\" VALUE=\"" + id + "\">";  obt+="<PARAM NAME=\"CONTROLS\" VALUE=\"" + console + "\">";  return(obt);}