Type Function Object Recording Library media.* Return value none Revision 2017.3060 Keywords startRecording, audio recording See also media.newRecording() object:stopRecording()
Start recording audio.
Starting an audio recording will stop any audio playback. You cannot record and play audio at the same time.
To enable audio recording on Android devices, you must set the permission level in the build.settings
file.
settings = { android = { usesPermissions = { "android.permission.RECORD_AUDIO", }, }, }
object:startRecording()
local filePath = system.pathForFile( "newRecording.aif", system.DocumentsDirectory ) local r = media.newRecording( filePath ) r:startRecording()