FlowplayerLifecycleObserver

Fragments and activities in Support Library 26.1.0 and later implement the androidx.lifecycle.LifecycleOwner. Fragments and activities that fall into this category and use FlowplayerView instead of FlowplayerSupportFragment can easily bind the player to their lifecycle by calling FlowplayerLifecycleObserver.registerLifecycle. This way, the player automatically listens to the activity or fragment's lifecycle methods without having to manually call the player's lifecycle methods (onPause, onResume, etc).

To automatically handle lifecycle events and orientation changes, it's recommend to use FlowplayerSupportFragment instead of FlowplayerView when possible.

Functions

Link copied to clipboard
open override fun onDestroy(owner: LifecycleOwner)
Link copied to clipboard
open override fun onPause(owner: LifecycleOwner)
Link copied to clipboard
open override fun onResume(owner: LifecycleOwner)
Link copied to clipboard
open override fun onStart(owner: LifecycleOwner)
Link copied to clipboard
open override fun onStop(owner: LifecycleOwner)
Link copied to clipboard

Method that adds the player as an observer to the activity or fragment's lifecycle.