Simplify media routing in your Compose app with this native Material
3 MediaRouter library. Enjoy easy integration, a pure Compose-friendly
approach, and no need for AppCompatActivity
or Theme.AppCompat.*
. Focus on what matters:
creating seamless media experiences for your users.
- Add the GitHub Packages repository:
// settings.gradle.kts
repositories {
maven {
url = uri("https://maven.pkg.github.com/SRGSSR/MediaMaestro")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
content {
includeGroup("ch.srgssr.media.maestro")
}
}
}
- Add the dependency:
// <module>/build.gradle.kts
implementation("ch.srgssr.media.maestro:media-maestro:<version>")
- Add the Media Router button:
// In your @Composable layout
MediaRouteButton()
And you're good to go! If you need more customization, you can check the documentation.
New versions are automatically published to GitHub Packages whenever a new tag following the x.y.z
pattern is pushed.
This library is provided under the MIT License. Please refer to the license file for detailed information.