5 Replies Latest reply on Jan 22, 2013 5:04 AM by Dan McCabe

    Status of HTML5 Audio

    Dan McCabe

      Where can I get the status of HTML5 audio in the various versions of RhoElements on various Motorola devices?

       

      With these tags:

       

      <audio id="errorbeep" class="hidden">

        <source src="static/beep-4.mp3" type="audio/mpeg" />

        <source src="static/beep-4.ogg" type="audio/ogg" />

      </audio>

       

      And this javascript,

       

      errorbeep.play();

       

      The sound does play on my 9190 using RhoElements 1.0.3.11  (no longer available to me, but deployed and working, although it does always autoplay on load, which it should not)

       

      The sound does not play on my 9500 using RhoElements 2.2.1.13 right next to me.

       

      Thx in advance,

       

      Dan

        • Re: Status of HTML5 Audio
          Darryn Campbell

          Hi Dan,

           

          I'm surprised HTML5 audio worked on the 9190 with RhoElements 1.0, it certainly wasn't designed to Moving forward the most immediate way to play audio would be the media player API http://docs.rhomobile.com/rhoelements/apicompatibility currently this only seems to support Android but we will be extending support to all other operating systems in our next major release.  As it stands in 2.2 we only offer the playwave api (http://docs.rhomobile.com/rhoelements/generic/) at current.

           

          HTML5 audio is supported in the native browsers on all platforms other than Windows Mobile / CE, it is on our roadmap but the media player API has priority.

            • Re: Status of HTML5 Audio
              Dan McCabe

              Darryn,

               

              The playwave function takes a filename.

               

              That implies that the file has to be local on the device, rather than

              server hosted.

               

              That means that I'd have to deploy all the possible sounds that I need to

              play to the device after I installed RhoElements, or that I would use the

              file transfer api in RhoElements to download them on first run.

               

              Is that correct, or can I pass a uri to the playwave function and it will

              keep it for me?

               

              As an aside, the whole reason I am doing this is because no on ever looks

              at the screen in scanning based apps on devices with real scanners, and if

              you can't make a sound to get their attention, you end up with a giant mess

              as they just keep scanning even though the system is not in the right state

              to accept those scans.

               

              Thx,

               

              Dan

               

               

              On Sun, Jan 20, 2013 at 4:39 PM, Darryn Campbell <

                • Re: Status of HTML5 Audio
                  Benedict Kennedy

                  Hi Dan,

                   

                  As an alternative, there is the "notification" module available which gives access to the device's beeper. Through this module you can create beeps of differing frequency and cycles.

                   

                  http://docs.rhomobile.com/rhoelements/notification

                   

                  This way you can create differing sounds without having to rely on other media.

                  • Re: Status of HTML5 Audio
                    Darryn Campbell

                    Hi Dan,

                     

                    As an aside, the whole reason I am doing this is because no on ever looks

                    at the screen in scanning based apps on devices with real scanners, and if

                    you can't make a sound to get their attention, you end up with a giant mess

                    as they just keep scanning even though the system is not in the right state

                    to accept those scans.

                     

                    You can configure the Scanner to play a wave file on successful or invalid scan, see the following configuration settings:

                    <ScanDecodeWav          VALUE=""/>
                    <ScanInvalidWav         VALUE=""/>
                    

                     

                    Unfortunately these are Windows Mobile / CE / Embedded Handheld only but look to be what you're after.  I did notice a potential bug with the scanner the other day too, if you specify the frequency as a hex value it might not work so you could also specify

                    <DecodeFrequency        VALUE="0xBB8"/>
                    

                    as decimal, ie 3000

                     

                    Darryn.

                      • Re: Status of HTML5 Audio
                        Dan McCabe

                        Darryn,

                         

                        That isn't really what I'm after.

                        Bad barcodes isn't the problem.

                         

                        The problem is scanning the location barcode into the product field, or the

                        lot barcode into the product field, etc.  Typically, they are all code 128

                        and all "valid" from the perspective of the scan engine.

                         

                        The app has to validate the entry by checking against formatting rules

                        and\or a database and provide audio feedback to the user to get them to pay

                        attention when they've gotten off track.

                         

                        I was not able to get the http transfer to work to download a wav file for

                        playwave.

                        I kept getting "error 3" and not seeing anything in my server logs.

                         

                        I decided to just go with the beeper tones and pager using the notification

                        api, which seems to work ok.

                         

                        Thx,

                         

                        Dan

                         

                        On Tue, Jan 22, 2013 at 3:18 AM, Darryn Campbell <