audio - toggle on/off multiple sounds even when they are not currently playing


i wondering if there way stop toggle sounds if not playing.

 

what mean have several sound files play 1 @ time when slide comes in. can toggle on/of current sound if want toggle sounds on/off in compostion if not playing when go next slide on or off depending chosen on previous slide?

 

one of problem not want sounds turned on @ same time current 1 still want able turn off sounds if user decides not want hear sound while @ same time want sounds load automatically on each slide if has decided have sound.

 

hope makes sense.

didn't have time test code yet.

but should work.

html5 audio can not accessed class, can accessed id.

 

so made code

 

$( "audio" ).each(function() {

var = $(this).attr("id");

var audioplayer = document.getelementbyid(a)

    audioplayer.pause();

    audioplayer.currenttime = 0;

});

 

this find id of audios , pause them , reset time 0

( not way officially stop audio )

 

or van mute code

 

$( "audio" ).each(function() {

var = $(this).attr("id");

var audioplayer = document.getelementbyid(a)

    audioplayer.muted = true;

});

 

 

 

- rob



More discussions in Edge Animate CC


adobe

Comments

Popular posts from this blog

Some mp4 files not displaying correctly (CS6)

Thread: Samba is not authenticating with LDAP