APP Jquery mobile + phonegap --> No reproduce sonido

43 views
Skip to first unread message

laruinagrafica diseño ilustración fotografía

unread,
May 19, 2014, 2:28:39 PM5/19/14
to phone...@googlegroups.com
Hola, llevo unos días dándole vueltas a este problema, y es que no consigo que se reproduzca sonido alguno dentro de la app. En los simuladores funciona correctamente pero en cuanto filtro la app por phonegap el sonido de algunos botones que tengo habilitados no reproducen el audio. 

He probado varios plugins e incluso frames, pero tampoco.

Os dejo el código, a ver si me pueden ayudar, por favor:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="initial-scale=1, maximum-scale=1"/>
  <link rel="stylesheet" type="text/css" href="css/jquery.mobile.flatui.css" />


  <script src="js/jquery.js"></script>
  <script src="js/jquery.mobile-1.4.2.js"></script>
  <script src="js/ion.sound.js"></script>

  
<script>
        $(document).ready(function(){
    
            $.ionSound({
                sounds: [
                    "beer_can_opening",
                    "bell_ring",
                    "branch_break",
                    "water_droplet"
                ],
                path: "audio/",
                multiPlay: true,
                volume: "1.0"
            });
    
            $("#b01").on("click", function(){
                $.ionSound.play("beer_can_opening");
            });
            $("#b02").on("click", function(){
                $.ionSound.play("bell_ring");
            });
    
        });
    </script>

  
  </head>
<body>
  

    <div data-role="header" data-position="fixed" data-theme="f">
      <a href="index.html" data-role="button" data-icon="back" data-iconpos="notext" data-transition="slide" data-rel="back" data-ajax="true">Home</a>
      <h5>xxxxx xxx</h5>
      <a data-iconpos="notext" href="#panel" data-role="button" data-icon="flat-menu"></a>
    </div>
   

   
        <div data-role="content">
        <div data-role="collapsible" data-theme="f" data-collapsed="false">
        <h4>Sonido</h4>
            <button id="b01">Play "beer_can_opening"</button>
            <button id="b02">Play "bell_ring"</button>
    </div>
    </div>
    </div>
        
     
</body>
</html>


Gracias de antemano. Saludos.
Alfonso



jcesarmobile

unread,
May 20, 2014, 12:54:00 PM5/20/14
to phone...@googlegroups.com
En android? Creo recordar que no funcionaba la etiqueta audio, pero no se como funcionará ionSound

prueba con la media api de phonegap
Reply all
Reply to author
Forward
0 new messages