class Recording : AutoCloseable


A recording started with RecorderCommands.start. This interface allows awaits for completion, if a time limit was specified or force stop the recording.

Summary

Public constructors

Recording(
    process: ProcessCommands,
    commandOutput: Shell.CommandOutput,
    timeLimitSeconds: Long,
    pid: Int
)

Public functions

Unit
await(timeoutSeconds: Long)

Blocks until the recording is complete.

open Unit

Stops the current recording.

Boolean

Returns whether the recording is still running.

Public properties

Int

The process id of the recording.

Public constructors

Recording

Added in 1.0.0-alpha01
Recording(
    process: ProcessCommands,
    commandOutput: Shell.CommandOutput,
    timeLimitSeconds: Long,
    pid: Int
)

Public functions

await

Added in 1.0.0-alpha01
fun await(timeoutSeconds: Long = max(timeLimitSeconds * 2, 10)): Unit

Blocks until the recording is complete. Note that if a time limit was not given this method throws an IllegalStateException. Also if the screen recorder process doesn't end by the given timeoutSeconds, a TimeoutException is thrown.

Parameters
timeoutSeconds: Long = max(timeLimitSeconds * 2, 10)

the timeout in number of seconds.

close

Added in 1.0.0-alpha01
open fun close(): Unit

Stops the current recording.

isRunning

Added in 1.0.0-alpha01
fun isRunning(): Boolean

Returns whether the recording is still running.

Public properties

pid

Added in 1.0.0-alpha01
val pidInt

The process id of the recording.