Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kkostov committed Oct 30, 2024
1 parent c7b4322 commit 620da55
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 620da55

Please sign in to comment.