begin process at 2012 05 28 11:55:53
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Navigation

 > WMANAGER.JS : GÉRER LES FICHIERS WMA AVEC WINDOWS MEDIA PLAYER CROSS-BROWSER

WMANAGER.JS : GÉRER LES FICHIERS WMA AVEC WINDOWS MEDIA PLAYER CROSS-BROWSER


 Information sur la source

Note :
Aucune note
Catégorie :Navigation Classé sous :Windows, Media Player, Musique, Internet, WMA Niveau :Initié Date de création :11/12/2010 Date de mise à jour :22/12/2010 00:45:37 Vu / téléchargé :1 967 / 92

Auteur : jdmcreator

Ecrire un message privé
Site perso
Commentaire sur cette source (0)
Ajouter un commentaire et/ou une note

 Description

Et voici ma dernière source, wmanager.js (vous pouvez prononcer womanager ^^) version Bêta 1.0

Une API complètement dédié à la gestion de fichier WMA, avec l'aide des plugins Windows Media Player (WMP) pour IE, Firefox, Safari... Tout y est : Arrêt/pause/muet/avance rapide/informations sur la chansons/gestionnaire d'événements. Le but de ce projet était de rendre WMP complètement compatible avec tous les principaux browsers. Je n'y suis pas arrivé (bugs dans Webkit) mais c'est réussit à 95%.

Pourquoi Windows Media Player ? Car c'est la seule façon (pour l'instant) de lire les fichiers WMA sur Internet, un format qui, malgré son incompatibilité, est toujours populaire. Tout m'est venu de ce petit script (http://www.editeurjavascript.com/scripts/scripts_ autres_3_364.php) qui disait entre autre que c'était réservé à IE. J'ai tenté d'y voir la vérité et inspiré par le concept (mais non le code) de SoundManager2, je me suis lancé dans cette aventure difficile tant les différences entre chaque navigateurs concernant l'interprétation du plugin était différente. Le 4/5 de mon temps a été consacrée à régler les bugs. De plus, personne auparavant n'avait créé de code pour régulariser WMP.

Je vous invite à télécharger la source =) Wmanager.js peut être utiliser seul (+ le plugin). Vous trouverez dans le ZIP une documentation complète ainsi que des exemples.

/*** EXEMPLE DISPONIBLE MAINTENANT SUR MON NOUVEAU SITE : http://www.jdmcreator.byethost5.com/sources/wmanag er/index.html ***/

Source

  • /*******************************************************
  • *************** Wmanager.js version 1.0 ****************
  • ****************** JDMCreator 2010 *********************
  • *******************************************************/
  • function OnDSPlayStateChangeEvt(tn)
  • {
  • wmanager.eventManager(tn);
  • }
  • wmanager= new function(){
  • this.version="1.0"
  • this.sounds=[];
  • this.soundStatus=[];
  • this.nb=0;
  • this.playAll=function(){
  • for(i in this.sounds){
  • this.sounds[i].play();
  • }
  • }
  • this.stopAll=function(){
  • for(i in this.sounds){
  • this.sounds[i].stop();
  • }
  • }
  • this.pauseAll=function(){
  • for(i in this.sounds){
  • this.sounds[i].pause();
  • }
  • }
  • this.resumeAll=function(){
  • for(i in this.sounds){
  • this.sounds[i].resume();
  • }
  • }
  • this.prepareToBeReady=function(i){
  • tl=this.sounds[i].getObject().URL.substring(this.sounds[i].getObject().URL.lastIndexOf('/')+1,this.sounds[i].getObject().URL.length);
  • tl=this.sounds[i].getObject().URL.substring(this.sounds[i].getObject().URL.lastIndexOf('\\')+1,this.sounds[i].getObject().URL.length);
  • td=this.sounds[i].systemURL.substring(this.sounds[i].systemURL.lastIndexOf('/')+1,this.sounds[i].systemURL.length);
  • td=this.sounds[i].systemURL.substring(this.sounds[i].systemURL.lastIndexOf('\\')+1,this.sounds[i].systemURL.length);
  • if(this.sounds[i].getObject().currentMedia!=null && tl==td && this.sounds[i].getObject().currentMedia.attributeCount>1){
  • try{this.sounds[i].onsystemready(this.sounds[i]);}catch(e){}
  • try{this.sounds[i].onready(this.sounds[i]);}catch(e){}
  • }
  • else{
  • this.nb=i;
  • window.setTimeout(function(){wmanager.prepareToBeReady(wmanager.nb)},50);
  • }
  • }
  • this.eventManager=function(tn){
  • for(i in this.sounds){
  • can=false;
  • yn=this.sounds[i].getObject();
  • ty=this.sounds[i];
  • tu=this.soundStatus[i];
  • if(yn!=null){
  • if(yn.playState!=tu){
  • if(yn.playState==tn){
  • if(tu==0){
  • this.prepareToBeReady(i);
  • try{ty.onsoundready(ty);}catch(e){}
  • if(tn==3 && !this.sounds[i].settings.autoPlay){
  • break;
  • }
  • }
  • can=true;
  • }
  • this.soundStatus[i]=tu;
  • }
  • if(can){
  • try{ty.onchangeplaystate(tn);}catch(e){}
  • switch(tn){
  • case 1:
  • ty.playing=false;
  • ty.paused=false;
  • ty.stopped=true;
  • try{ty.onstop(ty);}catch(e){}
  • break;
  • case 2:
  • ty.playing=false;
  • ty.paused=true;
  • ty.stopped=false;
  • try{ty.onpause(ty);}catch(e){}
  • break;
  • case 3:
  • ty.playing=true;
  • ty.paused=false;
  • ty.stopped=false;
  • try{this.sounds[i].onsystemplay(this.sounds[i]);}catch(e){}
  • try{this.sounds[i].onplay(this.sounds[i]);}catch(e){}
  • break;
  • case 8:
  • try{ty.onfinish(ty);}catch(e){}
  • break;
  • default:
  • break;
  • }
  • wmanager.soundStatus[i]=t1.playState;
  • }
  • }
  • }
  • }
  • this.createSound=function(){return false;}
  • this.isWMPInstalled=function(){
  • if(navigator.mimeTypes.length==0){
  • return undefined;
  • }
  • for(var i=0; i<navigator.mimeTypes.length; i++)
  • {
  • if(navigator.mimeTypes[i].type=='audio/x-ms-wma'){
  • return true;
  • }
  • }
  • return false;
  • }
  • this.createPlayer=function(tn){
  • tl=new this.playerCreater(tn);
  • this.sounds.push(tl);
  • this.soundStatus.push(0);
  • return tl.id;
  • }
  • this.getSoundById=function(tn){
  • for(i in this.sounds){
  • if(this.sounds[i].id==tn){
  • return this.sounds[i];
  • }
  • }
  • }
  • this.playerCreater=function(tn){
  • this.systemURL=tn.src;
  • this.onready=tn.onready;
  • this.playing=false;
  • this.isReady=false;
  • this.settings=tn;
  • this.settings.height=(tn.height==undefined) ? 320 : tn.height;
  • this.settings.width=(tn.width==undefined) ? 300 : tn.width;
  • this.settings.showControls=(tn.showControls==undefined) ? true : tn.showControls;
  • this.id=tn.id;
  • ty=document.createElement("div");
  • tnu=(tn.invisible) ? 'width=1 height=1 style="position:absolute;top:0px;left:0px;width:1px;height:1px;clip:rect(1px 1px 1px 1px);"' : 'width='+tn.width+' height='+tn.height;
  • ty.innerHTML='<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="test2" data="'+tn.src+'" '+tnu+' volume=" 0"><param name="URL" ref value="'+tn.src+'"><param name="autostart" value="true" /><param name="volume" value="0" /><object id="test" data="'+tn.src+'" type="application/x-ms-wmp" '+tnu+'><param name="URL" ref value="'+tn.src+'"><param name="autostart" value="true" /><param name="volume" value="0" /><param name="autostart" value="true" /><object id="test" data="'+tn.src+'" type="audio/x-ms-wma" '+tnu+'><param name="URL" ref value="'+tn.src+'"><param name="autostart" value="true" /></object></object></object>';
  • this.divObject=ty;
  • tn.element.appendChild(ty,tn.element);
  • this.paused=false;
  • this.stopped=true;
  • this.onsystemready=function(t,i){
  • wmanager.soundStatus[i]=t;
  • if(!this.settings.autoPlay){
  • this.stop();
  • }
  • if(!this.settings.showControls){
  • this.deleteControls();
  • }
  • if(this.settings.invisible){
  • this.changeSettings('invisible',true);
  • }
  • }
  • this.setURL=function(ty){
  • tn=this.getObject();
  • if(tn!=null){
  • for(var i=0;i<wmanager.sounds.length;i++){
  • if(wmanager.sounds[i]=this){
  • tu=i;
  • }
  • }
  • this.systemURL=ty;
  • wmanager.soundStatus[tu]=0;
  • try{this.onbeforechangeurl();}catch(e){}
  • tn.URL=ty;
  • }
  • }
  • this.getURL=function(tn){
  • tn=this.getObject();
  • if(tn!=null){
  • return tn.URL;
  • }
  • }
  • this.stop=function(){
  • tn=this.getObject();
  • if(tn!=null){if(tn.controls.isAvailable('Stop')){
  • tn.controls.stop()
  • }
  • }
  • }
  • this.fastForward=function(){
  • tn=this.getObject();
  • if(tn!=null){if(tn.controls.isAvailable('FastForward')){
  • tn.controls.fastForward()}
  • }
  • }
  • this.play=function(){
  • tn=this.getObject();
  • if(tn!=null){if(tn.controls.isAvailable('Play')){
  • tn.controls.play()}
  • }
  • }
  • this.pause=function(){
  • tn=this.getObject();
  • if(tn!=null){
  • if(tn.controls.isAvailable('Pause')){
  • tn.controls.pause()
  • }}
  • }
  • this.getVolume=function(){
  • tn=this.getObject();
  • if(tn!=null){
  • return tn.settings.volume;
  • }
  • }
  • this.setVolume=function(ty){
  • tn=this.getObject();
  • if(tn!=null){
  • tn.settings.volume=ty;
  • return tn.settings.volume==ty;
  • }
  • return false;
  • }
  • this.getDuration=function(){
  • tn=this.getObject();
  • if(tn!=null){
  • return tn.currentMedia.duration
  • }
  • }
  • this.getCurrentPosition=function(){
  • tn=this.getObject();
  • if(tn!=null){
  • return tn.controls.currentPosition;
  • }
  • }
  • this.getSongInformation=function(ty){
  • tn=this.getObject();
  • if(tn==null){
  • return false;
  • }
  • ty=ty.toLowerCase();
  • ty=(ty=="artist" || ty=="tpe1") ? "author" : ty;
  • ty=(ty=="songname" || ty=="tit2") ? "title" : ty;
  • ty=(ty=="artist" || ty=="tpe1") ? "WM/AlbumArtist" : ty;
  • ty=(ty=="album" || ty=="talb") ? "WM/AlbumTitle" : ty;
  • ty=(ty=="comm" || ty=="comment") ? "description" : ty;
  • ty=(ty=="tcon" || ty=="genre") ? "WM/GenreID" : ty;
  • ty=(ty=="genrename") ? "WM/Genre" : ty;
  • ty=(ty=="trck" || ty=="track") ? "WM/TrackNumber" : ty;
  • ty=(ty=="tyer" || ty=="year") ? "WM/Year" : ty;
  • try{
  • ty=tn.currentMedia.getItemInfo(ty);
  • if(ty!=""){
  • return ty;
  • }
  • }
  • catch(e){}
  • return false;
  • }
  • this.getVersion=function(){
  • return this.getObject().versionInfo;
  • }
  • this.getBalance=function(ty){
  • tn=this.getObject();
  • if(tn!=null){
  • return tn.settings.balance;
  • }
  • }
  • this.muted=false;
  • this.mute=function(ty){
  • tn=this.getObject();
  • if(tn!=null){
  • tn.settings.mute=true;
  • this.muted=true;
  • }
  • }
  • this.unmute=function(ty){
  • tn=this.getObject();
  • if(tn!=null){
  • tn.settings.mute=false;
  • this.muted=false;
  • }
  • }
  • this.setBalance=function(ty){
  • tn=this.getObject();
  • if(tn!=null){
  • tn.settings.balance=ty;
  • }
  • }
  • this.setPosition=function(ty){
  • tn=this.getObject();
  • if(tn!=null){
  • tn.controls.currentPosition=ty;
  • }
  • }
  • this.getCurrentPositionText=function(){
  • tn=this.getObject();
  • if(tn!=null){
  • return tn.controls.currentPositionString;
  • }
  • }
  • this.changeSettings=function(tn,tv){
  • switch(tn){
  • case "id" :
  • this.id=tv;
  • this.settings.id=tv;
  • break;
  • case "src" :
  • this.setURL(tv);
  • this.settings.src=tv;
  • break;
  • case "width" :
  • this.settings.width=tv;
  • ty=this.getObject();
  • if(ty!=null){
  • ty.width=tv;
  • ty.style.width=tv+"px";
  • }
  • break;
  • case "height" :
  • this.settings.height=tv;
  • ty=this.getObject();
  • if(ty!=null){
  • ty.height=tv;
  • ty.style.height=tv+"px";
  • }
  • break;
  • case "showControls" :
  • tv=(tv==true) ? "full" : "none";
  • this.settings.showControls=tv;
  • this.deleteControls(tv);
  • break;
  • case "invisible" :
  • ty=this.getObject();
  • td=this.getCurrentPosition()*1;
  • if(!tv){
  • ty.style.position="static";
  • ty.width=this.settings.width;
  • ty.height=this.settings.height;
  • ty.style.width=this.settings.width+"px";
  • ty.style.height=this.settings.height+"px";
  • ty.style.clip="";
  • }
  • else{
  • ty.style.position="absolute";
  • ty.style.top="0px";
  • ty.style.left="0px";
  • ty.width="1";
  • ty.height="1";
  • ty.style.width="1px";
  • ty.style.height="1px";
  • ty.style.clip="clip:rect(1px 1px 1px 1px)";
  • }
  • this.setPosition(td);
  • this.settings.invisible=tv;
  • break;
  • default:
  • break;
  • }
  • return null;
  • }
  • this.deleteControls=function(t){
  • t=(t==undefined) ? "none" : t;
  • tn=this.getObject();
  • if(tn!=null){
  • tn.uiMode=t;
  • return true;
  • }
  • return false;
  • }
  • this.resume=function(tn){
  • this.play(tn);
  • }
  • this.getObject=function(tn){
  • t1=this.divObject.firstChild;
  • if(t1.controls){return t1}
  • if(t1.lastChild.controls){
  • return t1.lastChild;}
  • return null;
  • }
  • if(!tn.showControls){
  • this.deleteControls();
  • }
  • try{
  • this.getObject().attachEvent("playStateChange",OnDSPlayStateChangeEvt);
  • }
  • catch(e){
  • try{
  • this.getObject().addEventListener("playStateChange",OnDSPlayStateChangeEvt)
  • }
  • catch(e){}
  • }
  • }
  • }
/*******************************************************
*************** Wmanager.js version 1.0 ****************
****************** JDMCreator 2010 *********************
*******************************************************/

  function OnDSPlayStateChangeEvt(tn)
  {
wmanager.eventManager(tn);

}


wmanager= new function(){
this.version="1.0"
this.sounds=[];
this.soundStatus=[];
this.nb=0;

this.playAll=function(){
for(i in this.sounds){
this.sounds[i].play();

}
}
this.stopAll=function(){
for(i in this.sounds){
this.sounds[i].stop();

}
}
this.pauseAll=function(){
for(i in this.sounds){
this.sounds[i].pause();

}
}
this.resumeAll=function(){
for(i in this.sounds){
this.sounds[i].resume();

}
}
this.prepareToBeReady=function(i){

tl=this.sounds[i].getObject().URL.substring(this.sounds[i].getObject().URL.lastIndexOf('/')+1,this.sounds[i].getObject().URL.length);
tl=this.sounds[i].getObject().URL.substring(this.sounds[i].getObject().URL.lastIndexOf('\\')+1,this.sounds[i].getObject().URL.length);
td=this.sounds[i].systemURL.substring(this.sounds[i].systemURL.lastIndexOf('/')+1,this.sounds[i].systemURL.length);
td=this.sounds[i].systemURL.substring(this.sounds[i].systemURL.lastIndexOf('\\')+1,this.sounds[i].systemURL.length);

if(this.sounds[i].getObject().currentMedia!=null && tl==td && this.sounds[i].getObject().currentMedia.attributeCount>1){
try{this.sounds[i].onsystemready(this.sounds[i]);}catch(e){}
try{this.sounds[i].onready(this.sounds[i]);}catch(e){}

}
else{
this.nb=i;
window.setTimeout(function(){wmanager.prepareToBeReady(wmanager.nb)},50);
}

}

this.eventManager=function(tn){



for(i in this.sounds){

can=false;

yn=this.sounds[i].getObject();
ty=this.sounds[i];
tu=this.soundStatus[i];
if(yn!=null){
if(yn.playState!=tu){

if(yn.playState==tn){

if(tu==0){

this.prepareToBeReady(i);

try{ty.onsoundready(ty);}catch(e){}
if(tn==3 && !this.sounds[i].settings.autoPlay){
break;
}

}
can=true;
}
this.soundStatus[i]=tu;

}


if(can){
try{ty.onchangeplaystate(tn);}catch(e){}
switch(tn){
case 1:
ty.playing=false;
ty.paused=false;
ty.stopped=true;
try{ty.onstop(ty);}catch(e){}
break;
case 2:
ty.playing=false;
ty.paused=true;
ty.stopped=false;
try{ty.onpause(ty);}catch(e){}
break;
case 3:
ty.playing=true;
ty.paused=false;
ty.stopped=false;

try{this.sounds[i].onsystemplay(this.sounds[i]);}catch(e){}
try{this.sounds[i].onplay(this.sounds[i]);}catch(e){}


break;
case 8:
try{ty.onfinish(ty);}catch(e){}
break;
default:
break;


}

wmanager.soundStatus[i]=t1.playState;

}
}
}
}
this.createSound=function(){return false;}
this.isWMPInstalled=function(){
if(navigator.mimeTypes.length==0){
return undefined;
}
for(var i=0; i<navigator.mimeTypes.length; i++)
{
if(navigator.mimeTypes[i].type=='audio/x-ms-wma'){
return true;
}
}
return false;
}
this.createPlayer=function(tn){
tl=new this.playerCreater(tn);
this.sounds.push(tl);
this.soundStatus.push(0);
return tl.id;
}

this.getSoundById=function(tn){

for(i in this.sounds){
if(this.sounds[i].id==tn){

return this.sounds[i];
}

}

}
this.playerCreater=function(tn){
this.systemURL=tn.src;
this.onready=tn.onready;
this.playing=false;
this.isReady=false;
this.settings=tn;
this.settings.height=(tn.height==undefined) ? 320 : tn.height;
this.settings.width=(tn.width==undefined) ? 300 : tn.width;
this.settings.showControls=(tn.showControls==undefined) ? true : tn.showControls;
this.id=tn.id;
ty=document.createElement("div");
tnu=(tn.invisible) ? 'width=1 height=1 style="position:absolute;top:0px;left:0px;width:1px;height:1px;clip:rect(1px 1px 1px 1px);"' : 'width='+tn.width+' height='+tn.height;

ty.innerHTML='<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="test2" data="'+tn.src+'" '+tnu+' volume=" 0"><param name="URL" ref value="'+tn.src+'"><param name="autostart" value="true" /><param name="volume" value="0" /><object id="test" data="'+tn.src+'" type="application/x-ms-wmp" '+tnu+'><param name="URL" ref value="'+tn.src+'"><param name="autostart" value="true" /><param name="volume" value="0" /><param name="autostart" value="true" /><object id="test" data="'+tn.src+'" type="audio/x-ms-wma" '+tnu+'><param name="URL" ref value="'+tn.src+'"><param name="autostart" value="true" /></object></object></object>';


this.divObject=ty;
tn.element.appendChild(ty,tn.element);

this.paused=false;
this.stopped=true;

this.onsystemready=function(t,i){

wmanager.soundStatus[i]=t;
if(!this.settings.autoPlay){
this.stop();
}
if(!this.settings.showControls){
this.deleteControls();
}
if(this.settings.invisible){
this.changeSettings('invisible',true);
}
}

this.setURL=function(ty){
tn=this.getObject();
if(tn!=null){

for(var i=0;i<wmanager.sounds.length;i++){
if(wmanager.sounds[i]=this){
tu=i;
}
}
this.systemURL=ty;
wmanager.soundStatus[tu]=0;
try{this.onbeforechangeurl();}catch(e){}
tn.URL=ty;
}
}

this.getURL=function(tn){
tn=this.getObject();
if(tn!=null){
return tn.URL;
}
}
this.stop=function(){

tn=this.getObject();
if(tn!=null){if(tn.controls.isAvailable('Stop')){
tn.controls.stop()
}
}
}
this.fastForward=function(){

tn=this.getObject();
if(tn!=null){if(tn.controls.isAvailable('FastForward')){
tn.controls.fastForward()}
}
}
this.play=function(){

tn=this.getObject();
if(tn!=null){if(tn.controls.isAvailable('Play')){
tn.controls.play()}
}
}
this.pause=function(){
tn=this.getObject();
if(tn!=null){
if(tn.controls.isAvailable('Pause')){
tn.controls.pause()
}}
}
this.getVolume=function(){

tn=this.getObject();
if(tn!=null){
return tn.settings.volume;
}
}
this.setVolume=function(ty){

tn=this.getObject();
if(tn!=null){
tn.settings.volume=ty;
return tn.settings.volume==ty;
}
return false;
}
this.getDuration=function(){

tn=this.getObject();
if(tn!=null){
return tn.currentMedia.duration
}
}
this.getCurrentPosition=function(){

tn=this.getObject();
if(tn!=null){
return tn.controls.currentPosition;
}
}
this.getSongInformation=function(ty){
tn=this.getObject();
if(tn==null){
return false;
}
ty=ty.toLowerCase();
ty=(ty=="artist" || ty=="tpe1") ? "author" : ty;
ty=(ty=="songname" || ty=="tit2") ? "title" : ty;
ty=(ty=="artist" || ty=="tpe1") ? "WM/AlbumArtist" : ty;
ty=(ty=="album" || ty=="talb") ? "WM/AlbumTitle" : ty;
ty=(ty=="comm" || ty=="comment") ? "description" : ty;
ty=(ty=="tcon" || ty=="genre") ? "WM/GenreID" : ty;
ty=(ty=="genrename") ? "WM/Genre" : ty;
ty=(ty=="trck" || ty=="track") ? "WM/TrackNumber" : ty;
ty=(ty=="tyer" || ty=="year") ? "WM/Year" : ty;


try{
ty=tn.currentMedia.getItemInfo(ty);
if(ty!=""){
return ty;
}
}
catch(e){}
return false;
}
this.getVersion=function(){
return this.getObject().versionInfo;
}

this.getBalance=function(ty){
tn=this.getObject();
if(tn!=null){
return tn.settings.balance;
}
}
this.muted=false;
this.mute=function(ty){
tn=this.getObject();
if(tn!=null){
tn.settings.mute=true;
this.muted=true;
}
}
this.unmute=function(ty){
tn=this.getObject();
if(tn!=null){
tn.settings.mute=false;
this.muted=false;
}
}
this.setBalance=function(ty){
tn=this.getObject();
if(tn!=null){
tn.settings.balance=ty;
}
}
this.setPosition=function(ty){
tn=this.getObject();
if(tn!=null){
tn.controls.currentPosition=ty;
}
}
this.getCurrentPositionText=function(){
tn=this.getObject();
if(tn!=null){
return tn.controls.currentPositionString;
}
}
this.changeSettings=function(tn,tv){

switch(tn){


case "id" :
this.id=tv;
this.settings.id=tv;
break;
case "src" :
this.setURL(tv);
this.settings.src=tv;
break;
case "width" :
this.settings.width=tv;
ty=this.getObject();
if(ty!=null){
ty.width=tv;
ty.style.width=tv+"px";
}
break;
case "height" :
this.settings.height=tv;
ty=this.getObject();
if(ty!=null){
ty.height=tv;
ty.style.height=tv+"px";
}
break;
case "showControls" :
tv=(tv==true) ? "full" : "none";
this.settings.showControls=tv;
this.deleteControls(tv);
break;
case "invisible" :

ty=this.getObject();
td=this.getCurrentPosition()*1;
if(!tv){
ty.style.position="static";
ty.width=this.settings.width;
ty.height=this.settings.height;
ty.style.width=this.settings.width+"px";
ty.style.height=this.settings.height+"px";
ty.style.clip="";
}
else{
ty.style.position="absolute";
ty.style.top="0px";
ty.style.left="0px";
ty.width="1";
ty.height="1";
ty.style.width="1px";
ty.style.height="1px";
ty.style.clip="clip:rect(1px 1px 1px 1px)";
}
this.setPosition(td);
this.settings.invisible=tv;
break;
default:
break;
}
return null;
}

this.deleteControls=function(t){

t=(t==undefined) ? "none" : t;

tn=this.getObject();
if(tn!=null){

tn.uiMode=t;
return true;

}
return false;




}
this.resume=function(tn){
this.play(tn);
}

this.getObject=function(tn){
t1=this.divObject.firstChild;
if(t1.controls){return t1}
if(t1.lastChild.controls){
return t1.lastChild;}
return null;

}
if(!tn.showControls){
this.deleteControls();
}
try{
this.getObject().attachEvent("playStateChange",OnDSPlayStateChangeEvt);
}
catch(e){
try{
this.getObject().addEventListener("playStateChange",OnDSPlayStateChangeEvt)

}
catch(e){}

}

}



}

 Conclusion

Je mettrai les exemples sur Internet en temps et lieu.

Pour l'instant, profitez ^^ Vous pouvez l'utiliser sur Internet, un petit commentaire pour me le mentionner serait gentil, mais ce n'est pas obligé ^^ Si vous trouvez des bugs (j'en connais quelques-uns que je n'ai toujours pas réussit à régler), si vous avez des suggestions, des commentaires, des questions.... n'hésitez pas à laisser un commentaire et je vous répondrai ;)

 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip


 Historique

11 décembre 2010 15:31:42 :
Le ZIP n'avait pas fonctionné O_O
22 décembre 2010 00:45:40 :
Exemples maintenant disponibles sur mon nouveau site : http://www.jdmcreator.byethost5.com/sources/wmanager/index.html

 Sources du même auteur

Source avec Zip JDMATH-MINI.JS : GÉNÉRATION D'EXPRESSION MATHÉMATIQUE
PARSER LES CARACTÈRES HTML D'UNE STRING
Source avec Zip TIMER : SETTIMEOUT & SETINTERVAL AMÉLIORÉS
RÉPÉTER UN VIDÉO YOUTUBE EN JAVASCRIPT À L'AIDE D'UN MARQUE-...
Source avec Zip 20 ASTUCES POUR PROGRAMMEURS JAVASCRIPT AVANCÉS

 Sources de la même categorie

Source avec Zip Source avec une capture ANTI-ROBOTS V 1.0 par MacGaliver
Source avec une capture PRÉSENTOIR PAGE/SUJET par tiranus
Source avec Zip Source avec une capture NAVIGATEUR INTERNET HAVRET par HAVRETos
Source avec Zip Source avec une capture NAVIGATION PAR AJAX, CHARGEMENT DES PAGES SANS RECHARGEMENT par zulrigh
Source avec Zip Source avec une capture MENU DE GAUCHE WIN XP par micking

 Sources en rapport avec celle ci

Source avec Zip Source avec une capture NAVIGATEUR INTERNET HAVRET par HAVRETos
Source avec Zip Source avec une capture BOITE A MUSIC AVEC LA BALISE AUDIO par kazma
Source avec Zip Source avec une capture SÉQUENCEUR par jdmcreator
DÉTECTION D'IE par kangourouxxx
Source avec Zip Source avec une capture SLIDER (CURSEUR VARIABLE) ÉLÉMENT JAVASCRIPT par kgilbert

Commentaires et avis

Aucun commentaire pour le moment.

 Ajouter un commentaire


Discussions en rapport avec ce code source dans le forum

Plug-in Windows Media Player => Lecture aléatoire [ par link78180 ] Salut.Il y aurait-il un moyen de lire aléatoirement une musique en tant que musique de départ ? (au lieu de définir la musique de départ dans les para ie est de mozilla [ par sikove ] Salut, en parcourant les champs du navigator en javascript, j'ai remarqué que le codename de ie est mozilla ? donc internet explorer est un navigateur Lire une musique ds Windows Media ActiveX grace a un lien [ par link78180 ] Salut !Voilà, j'ai un site avec un lecteur windows media (activex).et je voudré, en cliquant sur un lien vers une musique, que ca lise la musique ds l Obligation d'ouvrir une URL dans Internet Explorer [ par freebond ] Voici mon prob :J'ai un site qui ne fonctionne que sous internet explorer or notre navigateur par défaut à la société est Netscape.Je souhaiterais don GROS PROB DE SON!!!!?? [ par ppfm ] bonjour à tous, j'ai un gros souci, car cela concerne un site pro : j'aimerai comprendre pourquoi, ayant intégré de la musique continue sur tout un si Javascript Windows.open [ par s.defaye ] J'utilise la fonction windows.open et je ne peux plus reutiliser cette fonction avec que la premiere fenetre ouverte soit fermée.Quelqu'un a t il une Login Windows en Java Script [ par Frantz_xxx ] bonjour à tous! je fais un site intranet sur un serveur et des utilisateurs se connectent sur leur machine pour venir consulter le site du serveur. A redimensionnement sous internet explorer [ par aurelivs ] bonjourje fais un site ou je gere le redimensionnement automatique des images (lorsque lon réduit la fenetre)exemple: &lt;img src="image.jpg" width="9 Un menu parcourir comme Windows [ par Atorina ] Bonjour,J'aimerai faire un menu fenetre qui permettrai de parcourir les repertoire et fichier d'un utilisateur (en intranet). Cela me permettai de réc Fenetre vibrante au rythme de la musique [ par VENOM911 ] Je me fait une page web et j'aimerai que la fenetre vibre au rythme de la musique. Je sait comment mettre la musique en arriere plan et comment faire


Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 3,635 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales