AudioCaptureSession

A session that captures the audio of a browser.

The captured audio is delivered through AudioDataCaptured events. When the capture fails, the session becomes inactive and the AudioCaptureFailed event is fired. The session is stopped automatically when the browser is closed.

Events of a session are delivered only to the observers of that session. Once the session is stopped or has failed, it drops the buffers it has not started delivering, and registering an observer throws ObjectClosedException.

Since

9.6.0

See also

Functions

Link copied to clipboard
abstract fun audio(): Audio
Returns the Audio instance whose audio is captured.
Link copied to clipboard
abstract fun isActive(): Boolean
Returns true if the session is capturing audio.
Link copied to clipboard
abstract fun <E : T?> on(eventClass: Class<E>, observer: Observer<E>): Subscription
Subscribes the given event observer to receive the events of the given eventClass.
Link copied to clipboard
Returns the options this session was started with.
Link copied to clipboard
abstract fun stop()
Stops the audio capture.
Link copied to clipboard
inline fun <E : Event> Observable<in E>.subscribe(observer: Observer<E>): Subscription

Subscribes the given observer to receive events of type E from this Observable.