Pillarbox is the modern SRG SSR multimedia player ecosystem, built on top of AndroidX Media3. Pillarbox has been designed with robustness, flexibility, and efficiency in mind, with full customization of:
View
s. Helpers are available in the pillarbox-ui
module.Its robust player provides all essential playback features you might expect:
MediaSession
and Android Auto.In addition, Pillarbox provides support for SRG SSR content by including the pillarbox-core-business
module (see "Getting started" below).
[!TIP] Pillarbox is also available on Apple platforms and the Web.
You can easily get your hands on Pillarbox by running one of the demo applications available in this project: pillarbox-demo for phone/tablet, or pillarbox-demo-tv for TV.
Each application allows you to:
pillarbox-demo
only).Pillarbox is deployed to GitHub Packages. So you need to add the following repository in your Gradle configuration:
// If you declare your repositories in the `settings.gradle(.kts)` file
repositories {
maven("https://maven.pkg.github.com/SRGSSR/pillarbox-android") {
credentials {
username = providers.gradleProperty("gpr.user").get()
password = providers.gradleProperty("gpr.key").get()
}
}
}
// If you declare your repositories in the root `build.gradle(.kts)` file
repositories {
maven("https://maven.pkg.github.com/SRGSSR/pillarbox-android") {
credentials {
username = project.findProperty("gpr.user")?.toString()
password = project.findProperty("gpr.key")?.toString()
}
}
}
Generate new token
.read:packages
scope is selected.Generate token
.~/.gradle/gradle.properties
file (create it if needed), add the following properties:
gpr.user=<your_GitHub_username>
gpr.key=<your_GitHub_personal_access_token>
[!TIP] You can check the GitHub documentation for more information.
In your module's build.gradle
/build.gradle.kts
file, add the following dependencies, based on your needs:
// Player specific features
implementation("ch.srgssr.pillarbox:pillarbox-player:<pillarbox_version>")
// Library to handle Cast integration
implementation("ch.srgssr.pillarbox:pillarbox-cast:<pillarbox_version>")
// Library to handle SRG SSR content through media URNs
implementation("ch.srgssr.pillarbox:pillarbox-core-business:<pillarbox_version>")
// Library to display the video surface
implementation("ch.srgssr.pillarbox:pillarbox-ui:<pillarbox_version>")
If not already enabled, you also need to turn on Java 17 support in every build.gradle
/build.gradle.kts
files using Pillarbox. To do so, add/update the following to/in the android
section:
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
To start using Pillarbox in your project, you can check each module's documentation:
If you want to contribute to the project have a look at our contributing guide.
See the LICENSE file for more information.