Skip to content

Releases: SRGSSR/pillarbox-android

3.0.0

19 Nov 08:50
3.0.0
3f6e6e1
Compare
Choose a tag to compare

New features

Playback monitoring

Pillarbox records various metrics related to playback performance (bitrate, stalls, playback duration, ...).
You can retrieve these values by using the following:

val player = PillarboxExoPlayer(context)
player.getCurrentMetrics() // Get the current PlaybackMetrics
player.currentMetricsAsFlow() // Get PlaybackMetrics as a Flow
player.getPeriodicallyCurrentMetricsAsState() // Get PlaybackMetrics as a Compose State

By default, these metrics are sent to a Pillarbox monitoring service when using PillarboxExoPlayer from pillarbox-core-business, or discarded when using PillarboxExoPlayer from pillarbox-player. You can customize this by doing:

val player = PillarboxExoPlayer(context) {
    // Disable monitoring handling
    disableMonitoring()
    // Output metrics to Logcat
    monitoring(Logcat)
    // Send metrics to a remote server
    monitoring(Remote) {
        config(endpointUrl = "...")
    }
}

Improved block reason support

The BlockReasonException is now a sealed class, possibly containing more information about a specific error.

val error = player.playerError
when (error) {
    is BlockReasonException.GeoBlock -> TODO("This chapter is geo-blocked")
    is BlockReasonException.StartDate -> TODO("This chapter will be available on ${error.instant}")
    is BlockReasonException.EndDate -> TODO("This chapter is no longer available since ${error.instant}")
    // Handle other types...
}

Customize the surface type used by the player

When using PlayerSurface from pillarbox-ui, you can now specify the type of surface you want to use:

PlayerSurface(
    player = player,
    surfaceType = SurfaceType.Surface, // Or `Texture` or `Spherical`
)

See SurfaceType for more information.

Other features

  • Pillarbox API documentation is now available online.
  • Chapters are available in the media item metadata. You can get them using MediaItem.mediaMetadata.chapters.
  • Credits are available in the media item metadata. You can get them using MediaItem.mediaMetadata.credits.
  • MediaItem.tag is no longer reserved for Pillarbox usage.
  • Introduce PillarboxPreloadManager helper for Media3 PreloadManager. Note that these APIs are incubating on Media3 side and will change in future versions.

Breaking changes

Introduce a DSL to create a player

The PillarboxExoPlayer constructor and the DefaultPillarbox have been removed.
Instead, you can use the PillarboxExoPlayer builder function, which comes in two variants:

  • PillarboxExoPlayer from pillarbox-player: closely matches a default ExoPlayer, with Pillarbox monitoring disabled.
  • PillarboxExoPlayer from pillarbox-core-business: suited for the SRG SSR needs, i.e. it can play URN and sends playback metrics to Pillarbox monitoring.
val player = PillarboxExoPlayer(context, Default) // from pillarbox-player
val srgPlayer = PillarboxExoPlayer(context) // from pillarbox-core-business

You can customize the player during creation:

val player = PillarboxExoPlayer(context) {
    addAssetLoader(CustomAssetLoader())
    seekBackwardIncrement(5.seconds)
    seekForwardIncrement(10.seconds)
}

Removal of deprecated symbols

Symbol Replacement Comment
MediaItemUrn SRGMediaItemBuilder
Player.disableTextTrack() Player.disableTextTrack() Use the extension from ch.srgssr.pillarbox.player.tracks instead
Player.setDefaultTextTrack() Player.setAutoTextTrack()
Player.disableAudioTrack() Player.disableAudioTrack() Use the extension from ch.srgssr.pillarbox.player.tracks instead
Player.setDefaultAudioTrack() Player.setAutoAudioTrack()
Tracks.text Tracks.textTracks
Tracks.audio Tracks.audioTracks
Tracks.video Tracks.videoTracks

Others breaking changes

  • Remove DefaultHttpClient. Use PillarboxHttpClient instead.

What's Changed

Read more

2.3.0

30 Jul 13:35
8e65327
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.2.1...2.3.0

2.2.1

02 Jul 08:57
5365411
Compare
Choose a tag to compare

This release updates AndroidX Lifecycle to 2.8.3, to fix an issue with code shrinking.

What's Changed

Full Changelog: 2.2.0...2.2.1

2.2.0

26 Jun 06:57
641dae4
Compare
Choose a tag to compare

Fixes

  • Fix wrong media_position send to CommandersAct when removing the current MediaItem from the player. ( PLAYRTS-5583)
  • Fix ANR when displaying notification with low to no internet.
  • Fix current chapter and credit not clear when seek back.

What's Changed

Full Changelog: 2.1.2...2.2.0

2.1.2 - Fix CommandersAct crash

12 Jun 09:51
1a2c2b8
Compare
Choose a tag to compare

Important

This release reverts back CommandersAct version dependency

  • CommandersAct core to 5.4.3
  • CommandersAct service side to 5.5.2

That introduce application crashes.

What's Changed

Full Changelog: 2.1.1...2.1.2

2.1.1

06 Jun 14:33
78e4001
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.1.0...2.1.1

2.1.0

06 Jun 14:32
cdd115e
Compare
Choose a tag to compare

SRGAnalytics

  • Fix "ghost start" issue. Comscore will start only when the first Activity is created.

Player

  • Fix DRM issue with new LSVS DRM streams.
  • Pillarbox 2.1.0 introduce new kinds of Asset meta data that are linked to a MediaItem.
  1. Chapters : a time range that contains metadata of a Chapter, player will call PillarboxPlayer.Listener.onChapterChanged when player enter or exit a chapter.
  2. Blocked time range : a time range where the player can't reach anytime, player will call PillarboxPlayer.Listener.onBlockedTimeRangeReached when the player jump to the end of the blocked range.
  3. Credits (Opening and Closing) : a time range that contains credis metadata, player will call PillarboxPlayer.Listener.onCreditChanged when player enter or exit a chapter.

New apis

val player : PillarboxPlayer
player.getCurrentChapters()
player.getChapterAtPosition()
player.getChapterAtPosition(positionMs)
player.getCurrentChapterAsFlow()
player.getCurrentChapterAsState()

player.getCurrentCredits()
player.getCreditAtPosition()
player.getCreditAtPosition(positionMs)
player.getCurrentCreditAsFlow()
player.getCurrentCreditAsState()

Core business

  • SRGAssetLoader read and fill the chapter, credits and blocked time range from the MediaComposition.

Known bugs

  • Live DRM can't be played
  • Audio stream with multiple chapters can't be played

What's Changed

Full Changelog: 2.0.0...2.1.0

2.0.0

07 May 15:19
dd8531e
Compare
Choose a tag to compare

Player

  • Improved system integration and background playback through custom MediaController and MediaSession classes. Check the documentation for more information.
  • Added a new Player.isAtLiveEdge(Long, Window) method to know if the media is at live edge.
  • New way to load a media from a custom source by providing a custom AssetLoader implementation:
val player = PillarboxExoPlayer(
    context = context,
    mediaSourceFactory = PillarboxMediaSourceFactory(context).apply {
        addAssetLoader(SRGAssetLoader(context)) // Provided by pillarbox-core-business to handled URNs
        addAssetLoader(MyCustomAssetLoader())
    },
)
  • Added new methods to easily manage tracks:
val player: Player = ...
val currentTracks: Tracks = player.currentTracks

val tracks: List<Track> = currentTracks.tracks // Get all the supported tracks
val audioTracks: List<AudioTrack> = currentTracks.audioTracks // Get all the supported audio tracks
val textTracks: List<TextTrack> = currentTracks.textTracks // Get all the supported text tracks
val videoTracks: List<VideoTrack> = currentTracks.videoTracks // Get all the supported video tracks

player.selectTrack(Track) // Select a single track
player.enable<Audio|Text|Video>Track() // Enable a specific type of track
player.disable<Audio|Text|Video>Track() // Disable a specific type of track
player.setAuto<Audio|Text|Video>Track() // Restore the default track of a specific type
  • Added support for blocked segments.
  • Added support for chapters. You can use the following methods to access the corresponding information:
Player.getCurrentChapters(): List<Chapter> // Get all the chapters for the current media
Player.getChapterAtPosition(Long): Chapter? // Get the chapter at the provided position
Player.getCurrentChapterAsFlow(): Flow<Chapter?> // Observe the chapter currently playing as Flow
Player.getCurrentChapterAsState(): State<Chapter?> // Observe the chapter currently playing as State
  • Added support for time intervals (intro/credits). You can use the following methods to access the corresponding information:
Player.getCurrentCredits(): List<Credit> // Get all the credits for the current media (opening credits, closing credits)
Player.getCreditAtPosition(Long): Credit? // Get the credit at the provided position
Player.getCurrentCreditAsFlow(): Flow<Credit?> // Observe the credit currently active as Flow
Player.getCurrentCreditAsState(): State<Credit?> // Observe the credit currently active as State

Core business

  • Extract information about blocked segments, chapters and credits.

Demo

  • The multi-player showcase has been improved to only have one player playing audio at a given time.
  • Added a showcase to toggle repeat mode and to pause the media item when it ends.
  • Added a showcase to display chapters.
  • Added a showcase with a blocked segment.

Breaking changes

  • The mediaItemSource and dataSourceFactory arguments of the DefaultPillarbox constructor have been removed. Please provide a MediaCompositionService directly. The MediaCompositionMediaItemSource class and its related classes have been removed.
  • PillarboxExoPlayer is now a concrete class, while PillarboxPlayer has become an interface. Simply replace your usages of PillarboxPlayer by PillarboxExoPlayer, and PillarboxExoPlayer by PillarboxPlayer:
// Pillarbox 1.0.0
val player: PillarboxExoPlayer = PillarboxPlayer(...)

// Pillarbox 2.0.0
val player: PillarboxPlayer = PillarboxExoPlayer(...)

Note

Following a change in AndroidX Media3 1.3.0, you should setup Java 8 APIs desugaring, by following this guide.
This is new requirement should be reverted in an upcoming version of AndroidX Media3 (see androidx/media#1312 (comment) for more information).
This should be done even if your min SDK version is 24+.

What's Changed

New Contributors

Full Changelog: 1.0.0...2.0.0

1.0.0

14 Mar 10:17
c4c141c
Compare
Choose a tag to compare

Important

Letterbox will be sunset in August 2025:

  • New SRG SSR products must use Pillarbox only.
  • Existing SRG SSR products using Letterbox must transition to Pillarbox before this date.

This is the first official release of Pillarbox for Android platforms. Pillarbox is the modern SRG SSR media playback ecosystem, a generational leap over its predecessor Letterbox.

Tip

Should you have questions, ideas, or should you need assistance, please use our issue tracker or a dedicate discussion.

This version of Pillarbox is based on AndroidX Media3 1.3.0

New features

  • Smooth seeking is a better way to seek. To take advantage of this new amazing feature have a look at SmoothProgressTrackerState.
  • Core business error messages are translated in all Swiss 🇨🇭 languages (fr, de, it, rm and en).
  • Support for 360° video, have a look at the Compose function SphericalSurface.
  • Improve Pillarbox Demo on both mobile and Android TV.

Bug fixes

What's Changed

Read more

0.8.1

21 Dec 11:56
b84fbf7
Compare
Choose a tag to compare
0.8.1 Pre-release
Pre-release

What's Changed

  • Don't remove query parameters when applying akamai token by @StaehliJ in #270
  • Do not notifyPause when buffering is starting by @StaehliJ in #271

Full Changelog: 0.8.0...0.8.1