Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This plugin is a Cordova audio recorder plugin which works as API.

NotificationsYou must be signed in to change notification settings

tidycoder/cordova-plugin-audio-recorder-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Join the chat at https://gitter.im/emj365/cordova-plugin-audio-recorder-api

Introduction:

This plugin is a Cordova audio recorder plugin that works as API.

Different thanhttp://plugins.cordova.io/#/package/org.apache.cordova.media-capture this plugin does not request the native recorder app (system default recorder) and active recording manually.

Supports platforms:

  • iOS
  • Android

Install:

$ cordova plugin add cordova-plugin-audio-recorder-api

How to use:

varrecorder=newObject;recorder.stop=function(){window.plugins.audioRecorderAPI.stop(function(msg){// successalert('ok: '+msg);},function(msg){// failedalert('ko: '+msg);});}recorder.record=function(){window.plugins.audioRecorderAPI.record(function(msg){// completealert('ok: '+msg);},function(msg){// failedalert('ko: '+msg);},30);// record 30 seconds}recorder.playback=function(){window.plugins.audioRecorderAPI.playback(function(msg){// completealert('ok: '+msg);},function(msg){// failedalert('ko: '+msg);});}

Where are files save?

iOS:/var/mobile/Applications/<UUID>/Library/NoCloud/<file-id>.m4aAndroid:/data/data/<app-id>/files/<file-id>.m4a

Copy File to Another Place

Example with file plugin:http://ngcordova.com/docs/plugins/file/

iOS:/var/mobile/Applications/<UUID>/Documents/new_file.m4aAndroid:<sdcard>/new_file.m4a

window.plugins.audioRecorderAPI.record(function(savedFilePath){varfileName=savedFilePath.split('/')[savedFilePath.split('/').length-1];vardirectory;if(cordova.file.documentsDirectory){directory=cordova.file.documentsDirectory;// for iOS}else{directory=cordova.file.externalRootDirectory;// for Android}$cordovaFile.copyFile(cordova.file.dataDirectory,fileName,directory,"new_file.m4a").then(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));});},function(msg){alert('ko: '+msg);},3);

About

This plugin is a Cordova audio recorder plugin which works as API.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java54.1%
  • Objective-C40.0%
  • JavaScript5.9%

[8]ページ先頭

©2009-2025 Movatter.jp