Controller

interface Controller

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

Functions

Link copied to clipboard
open fun kohiiCanPause(): Boolean

Returns true if the library can automatically pause the Playback, false otherwise.

Link copied to clipboard
open fun kohiiCanStart(): Boolean

Returns true to tell if the library can start a Playback automatically for the first time , or false otherwise.

Link copied to clipboard
open fun setupRenderer(playback: Playback, renderer: Any?)

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.

Link copied to clipboard
open fun teardownRenderer(playback: Playback, renderer: Any?)

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.