Skip to content

kohii-core / kohii.v1.core / Playback / Controller

Controller

interface Controller

Provides necessary information and callbacks to setup a manual controller for a Playback.

Functions

Name Summary
kohiiCanPause open fun kohiiCanPause():Boolean
Returns true if the library can automatically pause the Playback, false otherwise.
kohiiCanStart open fun kohiiCanStart():Boolean
Returns true to tell if the library can start a Playback automatically for the first time , or false otherwise.
setupRenderer open fun setupRenderer(playback:Playback, renderer:Any?):Unit
This method is called once the renderer of the Playback becomes available. Client should use this callback to setup the manual controller mechanism for the renderer. For example: provide a user interface for controlling the playback.
teardownRenderer open fun teardownRenderer(playback:Playback, renderer:Any?):Unit
This method is called once the renderer of the Playback becomes unavailable to it. Client should use this callback to clean up any manual controller mechanism set before. Note that the library also does some cleanup by itself to ensure the sanity of the renderer.