title: resume audio phonegap
body: <p>hey guys i am using the media phonegap api to play,pause and stop the audio. so far i managed to play,stop and pause, but i do not know how to resume please help me</p>
  
  <p>below is the code i have written till now</p>
  
  <pre><code>   var my_media = null;
      var mediaTimer = null;
       var pausePos = 0;
      var counter=0;
      var playing=false;
  
  
     function playAudio(src) {
  // Create Media object from src
  my_media = new Media(src, onSuccess, onError);
  
  // Play audio
  
   my_media.play();
  
  
    // get audio duration
  var duration =  my_media.getDuration();
  
  // set slider data
  if( duration &gt; 0 ){
      $('#slider').attr( 'max', Math.round(duration) );
      $('#slider').slider('refresh');
  }
  
  
  
  // Update my_media position every second
  if (mediaTimer == null) {
      mediaTimer = setInterval(function() {
          // get my_media position
          my_media.getCurrentPosition(
              // success callback
              function(position) {
                  if (position &gt; -1) {
                      setAudioPosition(position);
                  }
              },
              // error callback
              function(e) {
                  console.log("Error getting pos=" + e);
                  setAudioPosition("Error: " + e);
              }
          );
      }, 1000);
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>  /* pause audio */
     function pauseAudio() {
       if (my_media) {
      my_media.pause();
       }
      }
  
  function resumeAudio()
     {
  
   }
  
   /* stop audio */
      function stopAudio() {
  if (my_media) {
      my_media.stop();
      playing = false;
      my_media.release();
       }
  clearInterval(mediaTimer);
  mediaTimer = null;
  pausePos = 0;
   }
  
  
  
  
      // onSuccess Callback
  
     function onSuccess() {
  console.log("playAudio():Audio Success");
    }
  
    // onError Callback
  
     function onError(error) {
         alert('code: '    + error.code    + '\n' +
      'message: ' + error.message + '\n');
   }
  
      // Set audio position
  
     function setAudioPosition(position) {
            pausePos = position;
            position = Math.round(position);
            $('#slider').val(position);
           $('#slider').slider('refresh');
       }
  
  
     function player(id)
       {
           //alert(id);
           playAudio("/sdcard/MuseumCache/"+id+"/"+id+".mp3");
            //alert("end");
      }
  </code></pre>
  
  <p>Please help me to write the resume function. they said the media.play() plays and resumes playing audio file </p>