object:isRecording()

Type Function
Object Recording
Library media.*
Return value Boolean
Revision Release 2024.3703
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