PrismSession

open class PrismSession(val context: Context, val lifecycleOwner: LifecycleOwner, val captureSession: CaptureSessionInterface, val configuration: PrismSessionConfiguration = PrismSessionConfiguration(), val audioPlayer: AudioPlayerInterface = AudioPlayer(context), val speechSynthesizer: SpeechSynthesizerInterface = SpeechSynthesizer(context), dispatcher: CoroutineDispatcher = Dispatchers.Main)

A PrismSession is a container for all the state and configuration for a single session. It is responsible for managing the state of the session and the audio player, and all of the future state managers.

Parameters

context

The context that the CaptureSession is running in

configuration

The configuration for the PrismSession

Constructors

Link copied to clipboard
constructor(context: Context, lifecycleOwner: LifecycleOwner, captureSession: CaptureSessionInterface, configuration: PrismSessionConfiguration = PrismSessionConfiguration(), audioPlayer: AudioPlayerInterface = AudioPlayer(context), speechSynthesizer: SpeechSynthesizerInterface = SpeechSynthesizer(context), dispatcher: CoroutineDispatcher = Dispatchers.Main)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The current state of the CaptureSession

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun cancel()

Cancel the CaptureSession This triggers the cancel process programmatically, as if the user had pressed the close button. The state returns to 'idle'

Link copied to clipboard
fun continue()

Continue CaptureSession This tells the session its ready to continue to the next step.

Link copied to clipboard

Will start the manager for the next step

Link copied to clipboard
fun start()

Start the CaptureSession This resets and begins the entire capture flow.

Link copied to clipboard

Will start the manager for the next step

Link copied to clipboard
fun stop()

Stop the CaptureSession This will stop the process and trigger any recording in progress to finish and process.