ActivityMediaSurfaceProvider

class ActivityMediaSurfaceProvider<Activity : Activity>(activityClass: KClass<Activity>, activitySurfaceHolder: Activity.() -> SurfaceHolder?, observer: LifecycleManagerObserver = LifecycleManagerObserver()) : MediaSurfaceProvider, ActivityLifecycleSubscribable

A MediaSurfaceProvider that provides a SurfaceHolder from a given Activity

Parameters

Activity

the type of android.app.Activity that provides the SurfaceHolder

activityClass
activitySurfaceHolder

method for getting a SurfaceHolder from an instance of Activity

observer

the LifecycleManagerObserver to observe the lifecycle

Constructors

Link copied to clipboard
constructor(activityClass: KClass<Activity>, activitySurfaceHolder: Activity.() -> SurfaceHolder?, observer: LifecycleManagerObserver = LifecycleManagerObserver())

Properties

Link copied to clipboard
Link copied to clipboard
open override val surface: Flow<MediaSurface?>

A Flow of the MediaSurface currently associated with the lifecycle

Functions

Link copied to clipboard
Link copied to clipboard
open override fun unsubscribe()