//show function EmpireCMSPlayVideo(vtype,furl,width,height,autostart,baseurl){ var filetype; var cfiletype; var playstr=''; var filetypeflash='|.swf|'; var filetypeflv='|.flv|'; var filetypemediaplayer='|.wmv|.asf|.wma|.mp3|.asx|.mid|.midi|'; var filetyperealplayer='|.rm|.ra|.rmvb|.mp4|.mov|.avi|.wav|.ram|.mpg|.mpeg|'; var filetypejwplayer='|.flv|.mp4|'; var filetypehtml5video='|.ogg|.mp4|.webm|'; var filetypehtml5audio='|.ogg|.mp3|.wav|'; if(vtype=='auto'||vtype=='') { filetype=EmpireCMSPlayerGetFiletype(furl); cfiletype='|'+filetype+'|'; if(filetypejwplayer.indexOf(cfiletype)!=-1)//jwplayer { playstr=EmpireCMSShowJwplayer(furl,width,height,autostart,baseurl); } else if(filetypehtml5video.indexOf(cfiletype)!=-1)//html5video { playstr=EmpireCMSShowHtml5video(furl,width,height,autostart,baseurl); } else if(filetypehtml5audio.indexOf(cfiletype)!=-1)//html5audio { playstr=EmpireCMSShowHtml5audio(furl,width,height,autostart,baseurl); } else if(filetypeflv.indexOf(cfiletype)!=-1)//flv { playstr=EmpireCMSShowFlv(furl,width,height,autostart,baseurl); } else if(filetypeflash.indexOf(cfiletype)!=-1)//flash { playstr=EmpireCMSShowFlash(furl,width,height,autostart,baseurl); } else if(filetyperealplayer.indexOf(cfiletype)!=-1)//realplayer { playstr=EmpireCMSShowRealPlayer(furl,width,height,autostart,baseurl); } else//mediaplayer { playstr=EmpireCMSShowMediaPlayer(furl,width,height,autostart,baseurl); } } else { if(vtype=='jwplayer')//jwplayer { playstr=EmpireCMSShowJwplayer(furl,width,height,autostart,baseurl); } else if(vtype=='html5video')//html5video { playstr=EmpireCMSShowHtml5video(furl,width,height,autostart,baseurl); } else if(vtype=='html5audio')//html5audio { playstr=EmpireCMSShowHtml5audio(furl,width,height,autostart,baseurl); } else if(vtype=='flv')//flv { playstr=EmpireCMSShowFlv(furl,width,height,autostart,baseurl); } else if(vtype=='flash')//flash { playstr=EmpireCMSShowFlash(furl,width,height,autostart,baseurl); } else if(vtype=='realplayer')//realplayer { playstr=EmpireCMSShowRealPlayer(furl,width,height,autostart,baseurl); } else//mediaplayer { playstr=EmpireCMSShowMediaPlayer(furl,width,height,autostart,baseurl); } } document.write(playstr); } //filetype function EmpireCMSPlayerGetFiletype(sfile){ var filetype,s; s=sfile.lastIndexOf("."); filetype=sfile.substring(s+1).toLowerCase(); return '.'+filetype; } //flash function EmpireCMSShowFlash(furl,width,height,autostart,baseurl){ var str=''; str=''; return str; } //flv function EmpireCMSShowFlv(furl,width,height,autostart,baseurl){ var str=''; var fname=''; str=''; return str; } //mediaplayer function EmpireCMSShowMediaPlayer(furl,width,height,autostart,baseurl){ var str=''; str=''; return str; } //realplayer function EmpireCMSShowRealPlayer(furl,width,height,autostart,baseurl){ var str=''; str='
'; return str; } //jwplayer function EmpireCMSShowJwplayer(furl,width,height,autostart,baseurl){ var str=''; str='
Loading the player...
jwplayer("EmpireCMSmyElement").setup({ autostart:'+autostart+',file: "'+furl+'",height:'+height+',width:'+width+' });'; return str; } //html5video function EmpireCMSShowHtml5video(furl,width,height,autostart,baseurl){ var str=''; var addauto=''; if(autostart==1) { addauto=' autoplay="autoplay"'; } str=''; return str; } //audio function EmpireCMSShowHtml5audio(furl,width,height,autostart,baseurl){ var str=''; var addauto=''; if(autostart==1) { addauto=' autoplay="autoplay"'; } str=''; return str; }