4 Replies Latest reply on Nov 18, 2013 9:00 PM by Martins24

    edgehero - stopping audio instead of muting it.

    Martins24

      creating a sort of elearning presentation with next and back button.

       

      New screens will have its own audio. Edgehero works great playing the audio, its just i'm not sure how to stop the audio.

      I had a look at mute, but its not what i wanted.  with mute, if the user go back to the relevant screen, its not playing the audio from the beginning.

       

      so  Nextbutton -> audio play -> nextbutton-> current audio stop and next audio plays

       

      would removing the class of "audiolink_1"  solve this? how do I do that?

      Or is there a play function in edgehero to rewind the audio and play it from the begining?

      Or is there a simple stop audio for edge hero?

       

      thanks

        • 1. Re: edgehero - stopping audio instead of muting it.
          robboerman Level 4

          to able to do that, you now need to code some parts manually.

           

          i'm plnning to create an stop_audiolink class in the future.

           

          best way of doing something like that now, is this code

           

          var myaudio = document.getElementById("Stage_Rectangle");

                        myaudio.pause();  

                 /// stop audio with the div name Rectangle (rename if you have it another name in edge animate)

           

           

                    var myaudio2= document.getElementById("Stage_Rectangle2");

                        myaudio2.play();

          // Start audio with div name Rectangle2 (rename if you have it another name in edge animate)

          1 person found this helpful
          • 2. Re: edgehero - stopping audio instead of muting it.
            Martins24 Level 1

            Thanks, looks promising

             

            So playing audio will be triggered by the code? ( do not need "play_audiolink_2" class in the button?)

             

            So I tried the code but wouldn't play the audio. I did put the code in a button action.:

                      var myaudio2= document.getElementById("Stage_Rectangle2");

                          myaudio2.play();

             

            just to confirm Stage_Rectangle2 is one that contains "audiolink_2_mp3 audiolink_2_ogg" class isn't it?

            • 3. Re: edgehero - stopping audio instead of muting it.
              Martins24 Level 1

              oh ok, my mistake, script works for pausing.

              but what i need is stoping the audio so when the user goes back to that particular screen the audio starts from the begining?

               

              so anything for stopping (not pausing) or rewinding the audio ?

              i need this triggered by button to be played on mobile devices.

               

              any help would be greatly appreciated.

               

              thanks

              1 person found this helpful
              • 4. Re: edgehero - stopping audio instead of muting it.
                Martins24 Level 1

                allright i was only testing it on safari, it seems that safari won't stop this audio where firefox stops it ok

                 

                I've also tried buzz js, same thing, safari is pausing instead of stopping it... what a pain