object:isRecording()

Type Function
Object Recording
Library media.*
Return value Boolean
Revision 2017.3060
Keywords isRecording
See also Recording:startRecording()

Overview

Returns true if audio recording is currently in progress; false if otherwise.

Syntax

Recording:isRecording()

Example

local function recButtonPress ( event )
    if r:isRecording () then
        r:stopRecording()
        media.playSound( dataFileName, system.DocumentsDirectory, onCompleteSound )
    else
        r:startRecording()
    end
end