Skip to Main Content
Player Logo
PlayerPlugins

Kotlin Coroutines

Kotlin coroutines is a popular Kotlin library to handle asynchronous programming and concurrency in the JVM. More information on Coroutines can be found here This module contains several JVM exclusive plugins to aid various tooling needs.

UpdatesPlugin

Plugin using a ReceiveChannel to provide an updated asset whenever the Player View is updated.

Usage

In build.gradle
implementation "com.intuit.player.plugins:coroutines:$PLAYER_VERSION"
In Player constructor
import com.intuit.player.plugins.coroutines.UpdatesPlugin

val plugins = listOf(UpdatesPlugin())
AndroidPlayer(plugins)

API

The API for this plugin revolves around the `ReceiveChannel` for asset updates. Public API available from sources here:

FlowScopePlugin

Plugin that provides a CoroutineScope that can be used to perform various async operations with the context of the current flow. All operations launched using the scope will be cancelled when player changes state.

Usage

In build.gradle
implementation "com.intuit.player.plugins:coroutines:$PLAYER_VERSION"
In Player constructor
import com.intuit.player.plugins.coroutines.FlowScopePlugin

val plugins = listOf(FlowScopePlugin())
AndroidPlayer(plugins)

API

Public API available from sources here: