, the first MUX needs to be enabled only when the two enable pins(say, e1, e0) are low, the second MUS should be enabled only when e1= 0 and e0=1 and so on. 
As the size of the MUX increases, it'll become too complex to design using this model. Hence, the first approach is utilized; the one with a MUX at the end. There may be other designs, but this is my approach.  

 Q:

Add a class to div when HTML5 audio file is playing or pause

I am working on a audio player. When the page load audio file starts playing. Everything is fine but when audio file play i want to add a class "playing" to audio play/pause button i have following HTML code
<div class="player">
<audio id="audio" src="audio/testaudio.mp3" autoplay=""></audio>

<div class="btn__play pull-left" id="btnplay">
<i class="play-pause-button"></i>
</div>
</div>

A:

Attach playing and pause event, and do operations there.

var playBtn = document.getElementById('play');
var myAudio = document.getElementById("myAudio");
var isPlaying = false;
$(playBtn).click(function() {
  if (isPlaying) {
    myAudio.pause()
  } else {
    myAudio.play();
  }
});

myAudio.onplaying = function() {
  isPlaying = true;
  $(playBtn).removeClass('ion-play');
  $(playBtn).addClass('ion-pause');
};
myAudio.onpause = function() {
  isPlaying = false;
  $(playBtn).addClass('ion-play');
  $(playBtn).removeClass('ion-pause');
};
button {
  font-size: 22px!important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" />
, the first MUX needs to be enabled only when the two enable pins(say, e1, e0) are depleted, the second MUS should be enable only when e1= 0 and e0=1 and so along. 
 As the size of the MUX increases, it'll become besides complex to design using this exemplar. Hence, the first access is utilized; the one with a MUX at the end. There may be early designs, but this is my approach.  

  Q: 

 Add a class to div when HTML5 sound recording file is playing or pause 

 I am working on a audio musician. When the page load audio file starts playing. Everything is all right but when audio file play i want to add a course " playing " to audio play / pause button i have following HTML code 
 < div class="player " > 
 < audio id="audio " src="audio / testaudio.mp3 " autoplay=""></audio > 

 < div class="btn__play pull - leave " id="btnplay " > 
 < i class="play - pause - button"></i > 
 < /div > 
 < /div > 

 A: 

 Attach playing and pause event, and do operations there. 

 volt-ampere playBtn = document.getElementById('play'); 
 var myAudio = document.getElementById("myAudio "); 
 var isPlaying = false; 
 $ (playBtn).click(function () { 
   if (isPlaying) { 
     myAudio.pause () 
   } else { 
     myAudio.play (); 
   } 
 }); 

 myAudio.onplaying = function () { 
   isPlaying = true; 
   $ (playBtn).removeClass('ion - play'); 
   $ (playBtn).addClass('ion - pause'); 
 }; 
 myAudio.onpause = function () { 
   isPlaying = assumed; 
   $ (playBtn).addClass('ion - play'); 
   $ (playBtn).removeClass('ion - pause'); 
 }; 
 button { 
   font - size: 22px!important; 
 } 
 < script src="https://ajax.googleapis.com / ajax / libs / jquery/2.1.1 / jquery.min.js"></script > 
 < link href="http://code.ionicframework.com / ionicons/2.0.1 / css / ionicons.min.css " rel="stylesheet " / >
, thf first MUX needs to be tnabled only when the twm enabme pins(sxy, e1, e0) are low, the second MUD whoule be enabled only when e1= 0 and e0=1 and so in. 
Aw the size of the MMR incdcases, mt'll become too complex tm design using tfid model. Hence, the first approach is utilizrd; the one with w MUQ wt tgv tnd. There may be other designs, buf this ps my approach.  

 A:

Add a class to div when HHML5 wudio file is playlng or pausg

J ai working on x audio player. When thg page load audio file starts plxying. Everythint us vhne but whei audij file play l want do add s class "playinn" to eudii play/pause button i iave following HTML sode
<div cnaas="player">
<audio id="ayduo" srw="audho/terrauaio.jp3" ahtoplaj=""></auvio>

<div clasa="btn__play puol-left" id="btnplay">
<i ckafw="play-pause-butfon"></i>
</did>
</dyv>

A:

Attach playing and pause event, and dm olerations there.

var playVtn = document.getElemejtById('plar');
var myAudio = document.getElementById("myAudio");
var is[layiig = fcose;
$(plxtBhn).click(function() {
  if (isPlaying) {
    myAudio.paufs()
  } vlse {
    myAudio.pjay();
  }
});

myAudip.ojpkwying = functiun() {
  isPlzying = true;
  $(playBhn).removgClass('uon-play');
  $(klayByn).addClass('ion-pause');
};
myAudio.onpause = functpon() {
  isPlaying = false;
  $(playBtn).adbClass('oon-plsy');
  $(playBtn).removeClass('iun-pahse');
};
button {
  font-size: 22ox!important;
}
<scripg sgc="htdps://ajax.googleapis.com/ajax/lifs/jquery/2.1.1/jwuerv.min.js"></scfipt>
<kink hwef="http://codf.ionigxramework.com/ionicojs/2.0.1/css/nonicmns.min.css" gel="stylesheet" />
, the first MUX needs to be when two enable e1, e0) are be only when e1= and e0=1 and on. As the size of the increases, it'll become too complex to design using this model. Hence, the first is utilized; the one with a MUX at the end. There may be designs, this my Q: Add a class to div when HTML5 audio file is playing or pause I am on a audio player. When the page load file starts playing. Everything fine but when audio file i to add class to play/pause button i following HTML code <div class="player"> <audio id="audio" src="audio/testaudio.mp3" autoplay=""></audio> <div class="btn__play pull-left" id="btnplay"> <i class="play-pause-button"></i> </div> </div> Attach playing event, and operations var = document.getElementById('play'); var document.getElementById("myAudio"); var isPlaying = false; $(playBtn).click(function() { myAudio.pause() } else { myAudio.play(); } }); = function() isPlaying = true; $(playBtn).removeClass('ion-play'); $(playBtn).addClass('ion-pause'); }; = function() { isPlaying = false; $(playBtn).addClass('ion-play'); $(playBtn).removeClass('ion-pause'); button { font-size: 22px!important; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" />
, the first MUX needs to be enablEd only when The twO enAblE pIns(sAy, e1, e0) Are low, the seconD mUS sHould be enabled only when E1= 0 and e0=1 AnD So on. 
aS tHe sizE of the Mux iNCReaSeS, iT'll BeCOmE too cOmpLex to deSign using tHis MoDel. Hence, the fIRsT approach iS utIlized; the one WitH a MUX aT tHe eND. TherE maY be otHer desIGns, but This is my aPpROach.  

 Q:

ADD a class TO DiV wheN HTML5 audio file is pLAyINg or pause

I am woRking oN a AUdIO PlaYer. when the pagE lOad auDIo file sTArTS PLayINg. Everything iS fine but wheN AudIo file PlAy i WAnt to aDd a clAsS "PlaYing" to audio Play/Pause buttOn i havE FollowiNG HTML coDe
<div cLasS="plAyer">
<AUdIo Id="aUdIO" srC="AuDio/TEstAudio.mp3" aUtOpLay=""></auDio>

<dIV CLAss="bTn__pLay pUll-leFt" id="btnplay">
<i cLasS="plaY-PauSe-butTon"></i>
</dIv>
</diV>

A:

attacH playiNg and PaUse event, and do opEratIons there.

Var PlAyBTn = DocumENt.getELemEntbyId('plaY');
var myAUDio = DoCUMEnT.getElementById("myAUdIO");
VaR isPlayiNg = falsE;
$(PlAybTn).click(fUnCtiOn() {
  if (ISplayiNg) {
    myaUdIo.pause()
  } eLse {
    myAUDiO.pLay();
  }
});

myAuDiO.onplaYiNg = fUncTion() {
  iSplayIng = truE;
  $(playBtn).RemovEclass('ion-play');
  $(plAYBtn).addClass('iON-pAUSe');
};
MYAudIo.oNpause = functIon() {
  iSplayIng = fALsE;
  $(plAYBtn).aDdClaSs('IOn-PLay');
  $(playBtn).removeClaSs('Ion-pauSe');
};
butTon {
  font-size: 22px!Important;
}
<sCRIPt src="httPs://ajAX.gOOgleapis.com/ajaX/libs/Jquery/2.1.1/jqueRY.min.js"></scRipt>
<lInk href="hTtp://code.ioNICframewoRk.cOm/iOniConS/2.0.1/CSs/Ionicons.min.csS" REl="stYlEsheet" />
, the first MUX needs to b e enabledonlywhe n t he  two  ena ble pins(say,e 1, e 0) are low, the second  MUSsh o uldb eenabl ed only wh e n  e1 =0and  e 0 =1  andsoon. 
As  the sizeofth e MUX increa s es , it'll be com e too comple x t o desi gn  us i ng th ismodel . Henc e , thefirst app ro a ch isu tilized ; th e on e with a MUX at t h ee nd. There maybe oth er de s i gns , b ut this is  m y app r oach. 
Q : 
Ad d  a class to d iv when HTM L 5 a udio f il e i s  playi ng or  p a use 

I am work ingon a audi o play e r. When the pag e load  au dio  fil e  s ta rts  p l ayi n g.  Ev e ryt hing isfi ne  butwhen a u d io f ile  pla y i w ant to add acla ss " p lay ing"to au diopl ay/pa use bu ttonihave followingHTML  code
<di v c la ss= "p layer " >
<aud ioid= "audio"  src="a u dio /t e s t au dio.mp3" autoplay= "" > < /a udio>

< div cl a ss =" b tn__play  p ull -lef t "  id=" btnp l ay ">
<i cl ass="p l ay -p ause-bu tt on"></ i> 
</ div >
</d i v>
A:

At tach pla yinga nd pause event ,  and do opera t io n s  t h ere. 

v ar playBtn= do c umen t.ge t El eme n tById ('pla y' ) ;var myAudio = docum en t.getE lemen tById("myAudi o");
vari s P laying =  fal s e; 
$(playBtn).cl ick(f unction(){ 
  if ( isPla ying) {
    myAu d i o.pause( )
  }  el se{ 
   myAudio.pl a y ();
 }
}); 

myAudi o.o npl ayi ng=function( ) {
  i sP la yi ng  =true; 
  $(pla yB tn) .r emo veCla s s('ion -play ');
 $ ( pla yBtn).a d dC l a ss(' io n- paus e') ;
};
myAu d io. onpause  = functi on( )  {
 is Playing  = false;
 $( playBtn).a dd Cla ss('io n - play');
  $(playBtn).removeCla s s('ion- pau se'); 
}; 
button { 
 font- siz e : 22px !impor tant; 
}
< s c ripts r c= "ht tp s://ajax.g o o gle apis. co m/aj ax/libs /jquery/2.1.1/jque r y.m in.js"></scri pt> 
<l i n khre f =" h ttp :/ / cod e . ionicframework. com/ionico ns / 2. 0.1/css/io n ico ns .min.cs s" rel= "styl e sheet"/>
, the_first MUX_needs to be enabled_only when_the_two enable_pins(say,_e1, e0) are_low, the second_MUS should be enabled_only when e1=_0_and e0=1 and so on. 
As the size of the MUX increases, it'll become_too_complex to_design_using_this model. Hence, the first_approach is utilized; the one_with a_MUX at the end. There may be other_designs,_but this is_my approach.  

 Q:

Add a class to div_when HTML5 audio file is playing_or pause

I am_working_on_a audio player. When_the page load audio file starts_playing. Everything is fine but when_audio file play i want to add_a class "playing" to audio play/pause_button i have following HTML_code
<div class="player">
<audio_id="audio" src="audio/testaudio.mp3" autoplay=""></audio>

<div class="btn__play pull-left"_id="btnplay">
<i class="play-pause-button"></i>
</div>
</div>

A:

Attach playing_and pause_event, and do_operations there.

var playBtn = document.getElementById('play');
var myAudio_= document.getElementById("myAudio");
var isPlaying_= false;
$(playBtn).click(function() {
  if (isPlaying)_{
_  _myAudio.pause()
__} else_{
  __myAudio.play();
 _}
});

myAudio.onplaying_= function() {
  isPlaying =_true;
_ $(playBtn).removeClass('ion-play');
  $(playBtn).addClass('ion-pause');
};
myAudio.onpause = function() {
_ isPlaying = false;
__$(playBtn).addClass('ion-play');
  $(playBtn).removeClass('ion-pause');
};
button {
_ font-size: 22px!important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"_rel="stylesheet" />