From 620da55e7ef44cbea91b91771500559bf0cc9dc2 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Wed, 30 Oct 2024 13:10:16 +0100 Subject: [PATCH] docs: update README --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 28b3a22..b3f96d1 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,18 @@ implementation("eu.iamkonstantin.kotlin:gadulka:1.1.0") Instantiate the player and call play! +```kotlin +val player = GadulkaPlayer() +player.play(url = "...") +player.stop() +player.release() +``` + +Example using Jetpack Compose: + ```kotlin @Composable -fun AudioPlayer(player: GadulkaPlayer = GadulkaPlaye()) { +fun AudioPlayer(player: GadulkaPlayer = GadulkaPlayer()) { val url = remember { mutableStateOf("https://download.samplelib.com/wav/sample-12s.wav") } Row {