0 Replies Latest reply on Jun 20, 2016 9:32 AM by arieltalihina

    Audio doesn't play after building the app but it works good before the building

    arieltalihina

      please solve my problem i have tried several ways nothing works with me even have very simple code

       

       

      HTML

       

       

      <div class="ui-block-b"><p><a href="" data-role="button" data-icon="audio" onmousedown="rmadi.play()">Play</a></p></div>

           <div class="ui-block-c"><p><a href="index.html" target="_self" data-role="button" data-icon="home">Home</a></p></div>

             

                             <script>

      var rmadi = new Audio();

      rmadi.src = "sound/salam.mp3"

      </script>

       

            <div class="ui-block-b"><p><a href="index.html" target="_self" data-role="button" data-icon="home">Home</a></p></div>

           <div class="ui-block-b"><p><a href="start.html" data-role="button" target="_self" data-icon="back">Back</a></p></div>

          </div>

       

       

          <div data-role="content">

                  <img src="img/snoor.png"></div>

              <div class="ui-grid-b">

              <div class="ui-block-a"><p><a href="#Page7" data-role="button" data-icon="arrow-l">Prev</a></p></div>

           <div class="ui-block-b"><p><a href="" data-role="button" data-icon="audio" onmousedown="play.play()">Play</a></p></div>

           <div class="ui-block-c"><p><a href="index.html" target="_self" data-role="button" data-icon="home">Home</a></p></div>

             

                             <script>

      var play = new Audio();

      play.src = "sound/snoor.mp3"

      </script>

          </div>

      </div>

       

       

      config.XML

       

       

       

       

       

      <gap:platform name="android"/>

      <preference name="phonegap-version" value="cli-5.2.0" />

      <gap:plugin name="org.apache.cordova.inappbrowser"/>

      <gap:plugin name="org.apache.cordova.media" />

      <plugin name="de.neofonie.cordova.plugin.nativeaudio" spec="3.0.2" source="pgb" />

      <plugin name="org.apache.cordova.media" spec="0.2.16" source="pgb" />

      <plugin name="cordova-plugin-media" spec="1.0.1" source="pgb" />

      <!-- Default application icon -->

      <icon src="icons/72.png" />

       

       

      <icon src="icons/36.png"   gap:platform="android"    gap:qualifier="ldpi" />

      <icon src="icons/48.png"   gap:platform="android"    gap:qualifier="mdpi" />

      <icon src="icons/72.png"   gap:platform="android"    gap:qualifier="hdpi" />

      <icon src="icons/92.png"   gap:platform="android"    gap:qualifier="xhdpi" />

       

       

      </widget>