Manager

Manager is a component designed to manage a Fragment or an Activity which contains big Views like RecyclerView or ViewPager. Manager creates and manages Buckets for Views on demand. You only need to create Bucket for the View whose manages Videos. For example, your app has 2 RecyclerViews A and B, but only B contains Videos. You can ask the Manager to create and manage a Bucket for the RecyclerView B only. That way, the library doesn't need to observe and handle the changes of the RecyclerView A.

Creating a Manager can be done as below:

// Currently we are in the scope of a Fragment's onViewCreated.
val engine = // Get an Engine instance.
val manager = engine.register(this)

Parameters

memoryMode

The MemoryMode used in this Manager.

activeLifecycleState

the minimum Lifecycle.State where the Playback can be playing.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface OnSelectionListener

Functions

Link copied to clipboard
fun addBucket(    view: View,     strategy: Strategy = SINGLE_PLAYER,     selector: Selector = SINGLE_PLAYER): Manager
Link copied to clipboard
fun applyVolumeInfo(    volumeInfo: VolumeInfo,     target: Any,     scope: Scope)

Apply a specific VolumeInfo to all Playbacks in a Scope.

Link copied to clipboard
open operator override fun compareTo(other: Manager): Int
Link copied to clipboard
fun observe(mediaTag: Any, observer: PlayableObserver): Boolean

Observe to the changes of Playable's Playback by its tag.

Link copied to clipboard
open override fun onCreate(@NonNull p0: LifecycleOwner)
Link copied to clipboard
open override fun onDestroy(owner: LifecycleOwner)
Link copied to clipboard
open override fun onPause(@NonNull p0: LifecycleOwner)
Link copied to clipboard
open override fun onResume(@NonNull p0: LifecycleOwner)
Link copied to clipboard
open override fun onStart(owner: LifecycleOwner)
Link copied to clipboard
open override fun onStateChanged(source: LifecycleOwner, event: Lifecycle.Event)
Link copied to clipboard
open override fun onStop(owner: LifecycleOwner)
Link copied to clipboard
fun pause(playable: Playable)
Link copied to clipboard
fun play(playable: Playable)
Link copied to clipboard
fun registerRendererProvider(type: Class<*>, provider: RendererProvider)
Link copied to clipboard
fun removeBucket(vararg views: View): Manager

Properties

Link copied to clipboard
val host: Any