Skip to content

Releases: SRGSSR/pillarbox-android

5.0.0

20 Feb 14:29
39dbd92
Compare
Choose a tag to compare

New features

Google Cast support

Warning

Google Cast support is still under development, and so APIs may change in the future.

  • pillarbox-cast introduces PillarboxCastPlayer that implements the same interface as PillarboxExoPlayer.
  • pillarbox-core-business-cast allows to cast SRG content to a SRG SSR receivers (the same used by SRGLetterbox applications).

Breaking changes

val config = AnalyticsConfig(
   vendor = AnalyticsConfig.Vendor.SRG,
   appSiteName = "pillarbox-demo-android",
   sourceKey = SourceKey.SRG_DEBUG,
)

What's Changed

Full Changelog: 4.0.0...5.0.0

4.0.0

22 Jan 14:00
eee45c9
Compare
Choose a tag to compare

New features

Breaking changes

  • Remove Ktor dependency.
  • SRGAnalytics.sendPageView no longer sends ComScorePageView.
  • SRGAssetLoader no longer supports custom URL to load a media composition.
  • MetricsCollector no longer implements PillarboxAnalyticsListener and PlaybackSessionManager.Listener.
  • MonitoringConfigFactory's constructor is no longer public.
  • PillarboxBuilder.create() is no longer public.
  • PillarboxPreloadManager constructor has changed:
    • The rendererCapabilitiesListFactory: RendererCapabilitiesList.Factory argument was removed.
    • The allocator: DefaultAllocator argument was removed.
    • The renderersFactory: RenderersFactory argument was added.
    • The loadControl: LoadControl argument was added.
  • Remove the following from pillarbox-ui:
    • ToggleableBox().
    • DelayedVisibilityState.
    • rememberDelayedVisibilityState(Boolean, Boolean, Duration).
    • rememberDelayedVisibilityState(Player, Boolean, Boolean, Duration).
    • Modifier.toggleable(Boolean, Role?, DelayedVisibilityState).
    • Modifier.toggleable(Boolean, Role?, Indication?, MutableInteractionSource?, DelayedVisibilityState).
    • Modifier.maintainVisibleOnFocus(DelayedVisibilityState).

What's Changed

Full Changelog: 3.0.0...4.0.0

3.0.1

26 Nov 13:04
3.0.1
8be3fa6
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.0.0...3.0.1

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