AndroidX MediaRouter Compose

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 dependency

This library is available as a GitHub Package. Follow GitHub's documentation to add the repository to your project.

Set up the repository

repositories {
maven {
url = uri("https://maven.pkg.github.com/SRGSSR/androidx-mediarouter-compose")
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.androidx.mediarouter")
}
}
}

Declaring the dependency

In your module build.gradle(.kts) file, add the following dependency:

implementation("ch.srgssr.androidx.mediarouter:mediarouter-compose:<version>")

All modules:

Link copied to clipboard

This module provides Compose components to integrate Media Routing in your application.