KitePlayerPlatform

The default KitePlayer stack for the current target.

Deprecated in favour of names a reader finds under KitePlayer: KitePlayer() builds the default player, and KitePlayer.availability, KitePlayer.isAvailable and KitePlayer.supportsPictureInPicture answer the same questions as the members here.

Android, iOS, macOS native and the desktop JVM provide real backends. Wasm becomes available after its codec module is loaded. JavaScript retains an explicit unavailable facade. Linux and Windows native have the FFmpeg backend but no audio output, so they answer unavailable, and a caller there passes its own output backend to KitePlayer.create. Except on Linux and Windows native, the standard runtime includes automatic HTTP transport without requiring a factory-specific resolver setting.

Custom backends remain independent of this facade: pass them directly to KitePlayer.create.

Properties

Link copied to clipboard

A non-throwing explanation of whether the default stack can be constructed.

Link copied to clipboard

Convenience form of availability for engine registries and feature pickers.

Link copied to clipboard

Whether this platform can put a player in a picture-in-picture window at all.

Functions

Link copied to clipboard
fun KitePlayerPlatform.attachBackgroundHandling(player: KitePlayer, context: Context, policy: BackgroundPolicy = BackgroundPolicy.ContinueAudio): AutoCloseable

Stops player decoding video for a screen nobody is looking at.

fun KitePlayerPlatform.attachBackgroundHandling(player: KitePlayer, policy: BackgroundPolicy = BackgroundPolicy.ContinueAudio): AutoCloseable

Stops player decoding video for a screen nobody is looking at.

fun KitePlayerPlatform.attachBackgroundHandling(player: KitePlayer, policy: BackgroundPolicy = BackgroundPolicy.ContinueAudio, pictureInPicture: KitePlayerPictureInPicture?): AutoCloseable

Stops player decoding video for a screen nobody is looking at, and keeps it on while the small window of pictureInPicture shows.

Link copied to clipboard

Makes player behave when something takes the sound away: a call, another app, or the headphones coming out.

Makes player behave when something takes the sound away: a call, another app, or the headphones coming out.

Link copied to clipboard

Shows session as a media notification and keeps playback going after the application leaves the screen.

Link copied to clipboard
fun createOrNull(config: PlayerConfig = PlayerConfig()): KitePlayer?

Creates the default player, or returns null when availability is unavailable.

Link copied to clipboard

Whether this device allows picture-in-picture at all. See KitePlayer.supportsPictureInPicture(context).