1 Reply Latest reply on May 3, 2016 3:33 PM by kerrishotts

    Write to file with the Media plugin

    threeodev

      I am trying to record a short 10 sec audioclip.

       

      I think i am VERY confused about the paths and cvdfile info.

       

      Here is my jscode:

      [CODE ]

                     $("#recordingstart").on("tap",function(){
                      console.log('starting recording');
                      var src = "cdvfile://localhost/persistent/hello.mp3";
                      var mediaRec = new Media(src,
                      
                      function() {
                        console.log('mediaSuccess');
                      },
                      function(err) {
                        console.log('mediaError: '+err.code+'   '+err.message);
                      },
                      function(status) {
                        console.log('mediaStatus :' +status);
                      });
                      console.log(mediaRec);
                      
                      mediaRec.startRecord();
                      
                      setTimeout(function() {
                        mediaRec.stopRecord();
                        mediaRec.release();
                        
                      }, 10000);
                      
                    });
      

      [/CODE]

       

      It seems everything checks out. No errors....but i can´t find it in the obscure filepathes of Android!