10 Replies Latest reply on Nov 10, 2013 4:50 AM by gcgCui

    Audio Query (again -_-)

    PEPPERFACE Level 1

      Hi,

       

      Does any, bright soul have any experience (successful experience, I should say ) of adding audio which will play in an app on Android?

       

      I've managed to use the wonderful Edge Commons to great effect in adding sound to animations and everything plays fine using a whole host of different, desktop browers. However, when the same animations are launched on a tablet (a Nexus7 running Jellybean 4.2.2) the animation runs fine but it's all deathly silent. No audio at all.

       

      Any clues or ideas?

       

      Cheers in advance x

        • 1. Re: Audio Query (again -_-)
          PEPPERFACE Level 1

          Quick update... it looks (maybe) as though Jellybean has introduced the necessity for a 'user push' for audio to play - in much the same way as iOS disabled the autoplay facility for any audio running on Apple devices.

           

          I do know that with a bit of experimentation I've discovered that animations which include automatically playing audio content... i.e. audio playback which is triggered by code on the timeline... are silent when played on Android devices (the only playform I'm able to test on thus far). HOWEVER, when I create a 'click here to play 'this_sound'' button, the very same audio content plays seamlessly.

           

          So, I guess I'll need to work on a surrepticiously-placed 'play audio' button as a workaround

           

          x

          • 2. Re: Audio Query (again -_-)
            penn11

            Hi Pepperface. I have a question. I have sound working on every browser and iPad (found that one also on the Adobeforum where you asked an question). But when I check the sound on an android device, it doesn't work. Have you got any idea what this can be?

             

            Thanks for answering.

             

            Cheers,

             

            Penn11

            • 3. Re: Audio Query (again -_-)
              PEPPERFACE Level 1

              Hi Penn,

               

              I'm afraid I'm not sure as I haven't experienced this issue myself. Audio seems to work fine whenever I've run it on Android via a Samsung Galaxy S and a Nexus 7.

               

              The only thing that I might (?) be doing differently to you is that I always ensure I've got both mp3 and ogg versions of all audio files in the referenced folder. If you've only got one the other it's just possible that it's a file recognition issue... maybe

               

              Other than that, I'm at a loss. Really sorry that I can't shed more light on the problem for you.

               

              x

              1 person found this helpful
              • 4. Re: Audio Query (again -_-)
                penn11 Level 1

                Hi Pepperface.

                 

                Thank you for replying fast. I was thinking the same about the audio files. I only have MP3 now, that might be it. So I am gonna give that a try. Hopefully that will do the trick.

                 

                Thanks again.

                 

                Cheers,

                 

                Penn

                • 5. Re: Audio Query (again -_-)
                  penn11 Level 1

                  Sorry for the somewhat late respons. I didn't have time to try the ogg thing. Tonight I did and it seems to work! Thanks again! I am very happy!

                   

                  Penn

                  • 6. Re: Audio Query (again -_-)
                    PEPPERFACE Level 1

                    That's brilliant news... I'm really glad that the problem was resolved for you

                    • 7. Re: Audio Query (again -_-)
                      SEIF BH Level 2

                      insert this in stage>composition complete

                      // creation complete

                      try {

                                yepnope({

                                          load: "http://simonwidjaja.github.com/EdgeCommons/live/EdgeCommons-0.6.0.js",

                                          callback: function() {

                                // Load sound manifest (e.g. in creationComplete)

                                var assetsPath = "sounds/";

                                EC.Sound.setup(

                                           [

                                                              {src: assetsPath + "sound.mp3|" + assetsPath + "sound.ogg", id: 'sound'},

                       

                       

                       

                       

                                           ],

                                           function(){ EC.info("Sound setup finished", "Sound with Edge Commons"); }

                                );

                       

                       

                       

                       

                                                    }

                                });

                      }

                      catch(error) {

                                console.error("sw", error);

                      }

                       

                       

                       

                       

                      and insert this in your element 
                      EC.Sound.play("name_element")

                      • 8. Re: Audio Query (again -_-)
                        resdesign Adobe Community Professional & MVP

                        I always include several formats to be sure. There has been several discussions about sound on this forum.

                        1- FF or other open source browsers do not use mp3 because they would have to pay for a license which defeats the open source thing. So it uses ogg

                        2- other browsers use mp3

                        3- not sure about IOs but they may use ogg as well.

                         

                        Note: on IOS sound has to be triggered. Will not play by itself due to restrictions by Apple to prevent battery drain (I think!?).

                        1 person found this helpful
                        • 9. Re: Audio Query (again -_-)
                          penn11 Level 1

                          Hi SEIF-BH. I tried your option which also works. There is only one problem I face with android, and I also have that with the other option. I can play the sounds BUT I can't play several sounds at the same time. As soon as I trigger a secons sound, the first sound stops. And I want it to b possible to play different sounds at the same time. Any options?

                           

                          Thanks in advance.

                           

                          Penn11

                          • 10. Re: Audio Query (again -_-)
                            gcgCui

                            Hi, hope some one can help me. I have troubles with audio on Android. I´m using Buzz.js and works fine on browsers and iOS devices. But when I run my app from Eclipse I get this error:

                             

                            11-10 13:47:29.897: E/MediaPlayer(13864): error (1, -2147483648)

                             

                             

                            I changed the audio format because I had .mp3 and .wav now I´m using .ogg but nothing changes. Maybe I need to change the Buzz.js and use other implementation method.

                             

                            Does any one knows something about it?

                             

                            Thanks!

                             

                            Gabriel