Playable
A Playable contains necessary information about a Media item, and the config provided by client for it to start the media with expected result. Instance of Playable is provided by PlayableCreator.
An implementation of Playable must take into account about the following points:
A Playable is managed at application scope. So it must not retain any reference to narrower scope like androidx.fragment.app.Fragment or android.app.Activity.
A Playable must acknowledge about configuration changes. It must return a correct value from onConfigChange so that the system can provide proper resource management. For example if any of its resource needs to be reset at configuration change, its onConfigChange method must return
false
.
AbstractPlayable is a base implementation that leverage actual playback logic to a Bridge.
See also
Constructors
Types
Functions
Return true
to indicate that this Playable would survive configuration changes and no playback reloading would be required. In special cases like YouTube playback, it is recommended to return false
so Kohii will handle the resource recycling correctly.
Once the Playback finds it is good time for the Playable to request/release the Renderer, it will trigger these calls to send that signal. The 'good time' can varies due to the actual use case. In Kohii, there are 2 following cases:
Once the Playback finds it is good time for the Playable to request/release the Renderer, it will trigger these calls to send that signal. The 'good time' can varies due to the actual use case. In Kohii, there are 2 following cases: