
Composable media player component enabling video playback from URLs or local files, with optional landscape orientation, loading state, and error handling through customizable callbacks.
commonMain.dependencies
implementation("io.github.shadmanadman:kmpShaPlayer:1.0.2")
@Composable
fun KmpShaPlayer(
modifier: Modifier? = null,
urlOrPathToFile: String,
isLandscape: Boolean = false,
stop: Boolean = false,
onLoading: ((isLoading: Boolean) -> Unit) = {},
onError: ((error: Throwable) -> Unit) = {}
)
urlOrPathToFile : Takes a url or a path to a local fileisLandscape : Forces the player to go landscapeonLoading : Loading stateonError : In case of a throwablecommonMain.dependencies
implementation("io.github.shadmanadman:kmpShaPlayer:1.0.2")
@Composable
fun KmpShaPlayer(
modifier: Modifier? = null,
urlOrPathToFile: String,
isLandscape: Boolean = false,
stop: Boolean = false,
onLoading: ((isLoading: Boolean) -> Unit) = {},
onError: ((error: Throwable) -> Unit) = {}
)
urlOrPathToFile : Takes a url or a path to a local fileisLandscape : Forces the player to go landscapeonLoading : Loading stateonError : In case of a throwable