You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/08/30 21:41:27 UTC

[GitHub] [cordova-plugin-media-capture] utan opened a new issue #145: error 20 in real device or emulator

utan opened a new issue #145: error 20 in real device or emulator
URL: https://github.com/apache/cordova-plugin-media-capture/issues/145
 
 
   # Bug Report
   Trow error 20
   ## Problem
   Api not available?
   ### What is expected to happen?
   expect to record audio
   
   
   ### What does actually happen?
   It trows an error , error 20
   
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   cordova-plugin-media-capture 3.0.3 "Capture" 
   cordova 9
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   installed app-debug.apk
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   Linux 8.04
   Cordova 9
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   using VSCODE
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x ] I searched for existing GitHub issues
   - [x ] I updated all Cordova tooling to most recent version
   - [x ] I included all the necessary information above
   ``js
   document.addEventListener("deviceready", onDeviceReady, false);
   
               function onDeviceReady (){
   
                   const startButton = $('.startAudioRecorder');
   
                   const stopButton = $('.stopAudioRecorder');
   
                   startButton.on('click', recordAudio);
   
                   function recordAudio() {
   
                       console.log('starting recording!');
   
                       var options = { limit: 1, duration: 10 };
   
                       navigator.device.capture.captureAudio(captureSuccess, captureError, options);
   
                       function captureSuccess(){
                           navigator.notification.alert('it did work..');
   
                       }
   
                       function captureError( error ){
   
                           navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
   
                       }
                       stopButton.on('click', () => {
   
                           console.log('stoping reconrding');
   
                           /*
                           mediaRec.stopRecord();
                           mediaRec.release();
                           */
                           
                           stopButton.off('click');
   
                       });
                   }
   
               }
   `

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org