Releases: SRGSSR/pillarbox-android
5.0.0
New features
Google Cast support
Warning
Google Cast support is still under development, and so APIs may change in the future.
pillarbox-cast
introducesPillarboxCastPlayer
that implements the same interface asPillarboxExoPlayer
.pillarbox-core-business-cast
allows to cast SRG content to a SRG SSR receivers (the same used by SRGLetterbox applications).
Breaking changes
SpriteSheetLoader
loadsBitmap
image URL through a suspending function.AnalyticsConfig.sourceKey
uses aSourceKey
instead of aString
.
val config = AnalyticsConfig(
vendor = AnalyticsConfig.Vendor.SRG,
appSiteName = "pillarbox-demo-android",
sourceKey = SourceKey.SRG_DEBUG,
)
What's Changed
- Add a
PillarboxCastPlayer
and update the demo by @MGaetan89 in #875 - Add shuffle support to
CastPlayer
by @MGaetan89 in #878 - Bump kotlin from 2.1.0 to 2.1.10 by @dependabot in #877
- Bump com.autonomousapps.dependency-analysis from 2.7.0 to 2.8.0 by @dependabot in #882
- Bump the androidx group with 4 updates by @dependabot in #880
- 868 handle text and audio tracks with castplayer by @StaehliJ in #879
- Bump com.autonomousapps.dependency-analysis from 2.8.0 to 2.8.1 by @dependabot in #888
- Bump coil from 3.0.4 to 3.1.0 by @dependabot in #886
- 871 provide a mediaitemconverter for pillarbox by @StaehliJ in #883
- Bump org.jetbrains.kotlinx:kotlinx-datetime from 0.6.1 to 0.6.2 by @dependabot in #887
- Bump com.autonomousapps.dependency-analysis from 2.8.1 to 2.8.2 by @dependabot in #898
- Bump android-gradle-plugin from 8.8.0 to 8.8.1 by @dependabot in #897
- Remove secrets from public workflow by @MGaetan89 in #899
- Bump the androidx group with 7 updates by @dependabot in #896
- Don't crash when spritesheet can't be downloaded. by @StaehliJ in #893
- Don't force PillarboxExoPlayer instance in Services by @StaehliJ in #890
- 895 avoid arbitrary source keys by @StaehliJ in #900
- 884 add doc for googlecast with pillarbox by @StaehliJ in #901
Full Changelog: 4.0.0...5.0.0
4.0.0
New features
- ComScore page view tracking has been removed, as asked by the GD.
- Support time API. See Player#getUnixTimeMs(Long, Window) and Player#seekToUnixTimeMs(Long, Window).
- Support for sprite sheets. See SRGAssetLoaderConfig#spriteSheetLoader(SpriteSheetLoader).
- Support for playlist's preload configuration.
Breaking changes
- Remove Ktor dependency.
SRGAnalytics.sendPageView
no longer sendsComScorePageView
.SRGAssetLoader
no longer supports custom URL to load a media composition.MetricsCollector
no longer implementsPillarboxAnalyticsListener
andPlaybackSessionManager.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.
- The
- 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
- Update
pillarbox-player
module documentation by @MGaetan89 in #792 - Move config files to the
config
folder by @MGaetan89 in #795 - Bump the androidx group with 6 updates by @dependabot in #796
- Update to Gradle 8.11 by @MGaetan89 in #788
- Make some symbols
internal
/private
by @MGaetan89 in #800 - Sprite sheet by @StaehliJ in #777
- Upgrade to Coil 3.0.3 by @MGaetan89 in #801
- Bump robolectric from 4.14 to 4.14.1 by @dependabot in #806
- Bump com.autonomousapps.dependency-analysis from 2.4.2 to 2.5.0 by @dependabot in #807
- Move lint.xml to the root of the project by @StaehliJ in #809
- Update to AndroidX Media3 1.5.0 by @MGaetan89 in #794
- Bump coil from 3.0.3 to 3.0.4 by @dependabot in #813
- Downgrade Ktor to 2.3.13 by @MGaetan89 in #811
- Update GitHub Actions workflows by @MGaetan89 in #818
- Update documentation for the
pillarbox-player
module by @MGaetan89 in #817 - Bump kotlin from 2.0.21 to 2.1.0 by @dependabot in #816
- 802 player time api by @StaehliJ in #814
- Bump com.autonomousapps.dependency-analysis from 2.5.0 to 2.6.0 by @dependabot in #827
- Bump android-gradle-plugin from 8.7.2 to 8.7.3 by @dependabot in #826
- Improve accessibility in the demo app by @MGaetan89 in #820
- Improve accessibility in "Showcases" and on the player by @MGaetan89 in #821
- Remove Ktor dependency by @MGaetan89 in #829
- Bump com.autonomousapps.dependency-analysis from 2.6.0 to 2.6.1 by @dependabot in #838
- Bump kotlinx-kover from 0.8.3 to 0.9.0 by @dependabot in #836
- 822 remove toggleablebox by @StaehliJ in #828
- 824 enforce official supported integration hostname by @StaehliJ in #833
- Bump dokka from 2.0.0-Beta to 2.0.0 by @dependabot in #837
- Add emoji for debug and nigthly build by @StaehliJ in #839
- Bump the srgssr group with 3 updates by @dependabot in #835
- Bump the androidx group with 6 updates by @dependabot in #834
- Improve Gradle scripts by @MGaetan89 in #840
- Bump mockk from 1.13.13 to 1.13.14 by @dependabot in #843
- Update Tataki media URL by @MGaetan89 in #844
- 830 reduce flakiness of some tests by @MGaetan89 in #846
- Bump the androidx group with 12 updates by @dependabot in #841
- Bump Gradle from 8.11.1 to 8.12 by @MGaetan89 in #845
- Bump kotlinx-coroutines from 1.9.0 to 1.10.1 by @dependabot in #842
- Bump org.json:json from 20240303 to 20241224 by @dependabot in #851
- Fix bad substitution when printing by @StaehliJ in #852
- Bump kotlinx-kover from 0.9.0 to 0.9.1 by @dependabot in #854
- Bump org.json:json from 20241224 to 20250107 by @dependabot in #855
- Bump mockk from 1.13.14 to 1.13.16 by @dependabot in #857
- Bump com.autonomousapps.dependency-analysis from 2.6.1 to 2.7.0 by @dependabot in #858
- Fix failing test by @StaehliJ in #862
- Bump kotlinx-serialization from 1.7.3 to 1.8.0 by @dependabot in #850
- Bump android-gradle-plugin from 8.7.3 to 8.8.0 by @dependabot in #853
- Correctly forward MediaPeriod.Callback with PillarboxMediaPeriod. by @StaehliJ in #861
- Bump com.squareup.okio:okio from 3.9.1 to 3.10.2 by @dependabot in #856
- Bump the srgssr group with 3 updates by @dependabot in #865
- Bump the androidx group with 6 updates by @dependabot in #864
- Remove comscore pageview tracking by @StaehliJ in #863
Full Changelog: 3.0.0...4.0.0
3.0.1
3.0.0
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 Media3PreloadManager
. 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
frompillarbox-player
: closely matches a defaultExoPlayer
, with Pillarbox monitoring disabled.PillarboxExoPlayer
frompillarbox-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
. UsePillarboxHttpClient
instead.
What's Changed
- Check device capabilities to display picture in picture button by @StaehliJ in #663
- Bump gradle/actions from 3 to 4 in the actions group by @dependabot in #668
- Fix
PillarboxSlider
min/max values by @MGaetan89 in #671 - Bump android-gradle-plugin from 8.5.1 to 8.5.2 by @dependabot in #675
- Bump kotlin from 2.0.0 to 2.0.10 by @dependabot in #674
- Bump the androidx group with 4 updates by @dependabot in #673
- Update Gradle to 8.10 by @MGaetan89 in #679
- Bump the androidx group with 2 updates by @dependabot in #681
- Move Chapters and Credits into MediaMetadata by @StaehliJ in #687
- Bump madrapps/jacoco-report from 1.6.1 to 1.7.0 in the actions group by @dependabot in #689
- Bump kotlin from 2.0.10 to 2.0.20 by @dependabot in #686
- Bump kotlinx-serialization from 1.7.1 to 1.7.2 by @dependabot in #692
- Bump android-gradle-plugin from 8.5.2 to 8.6.0 by @dependabot in #691
- Bump the androidx group across 1 directory with 12 updates by @dependabot in #693
- Bump com.autonomousapps.dependency-analysis from 1.33.0 to 2.0.1 by @dependabot in #690
- Bump the androidx group across 1 directory with 8 updates by @dependabot in #700
- Update AndroidX Compose by @MGaetan89 in #698
- Bump detekt from 1.23.6 to 1.23.7 by @dependabot in #696
- Qos by @StaehliJ in #694
- Extract Detekt config in a dedicated plugin and simplify config by @MGaetan89 in #703
- Update to AndroidX Navigation 2.8.0 by @MGaetan89 in #701
- Bump com.autonomousapps.dependency-analysis from 2.0.1 to 2.0.2 by @dependabot in #707
- Bump kotlinx-coroutines from 1.8.1 to 1.9.0 by @dependabot in #706
- Fix
ComScoreTrackerIntegrationTest
flakiness by @MGaetan89 in #711 - Store pillarbox data into current tracks by @StaehliJ in #704
- Fix
MonitoringTest
by usingPillarboxExoPlayer
directly by @MGaetan89 in #714 - Remove
ModalNavigationDrawer
positioning hack inPlaybackSettingsDrawer
by @MGaetan89 in #712 - 708 revisit timerange trackers by @StaehliJ in #713
- Bump madrapps/jacoco-report from 1.7.0 to 1.7.1 in the actions group by @dependabot in #721
- 716 update monitoring data format by @StaehliJ in #724
- Add missing Detekt rules by @MGaetan89 in #725
- Bump the androidx group with 5 updates by @dependabot in #7...
2.3.0
What's Changed
- PLAY-6636 CommandersAct media event send media_audiodescription_on by @StaehliJ in #629
- Use local MediaComposition for Live urns by @StaehliJ in #633
- Bump robolectric from 4.12.2 to 4.13 by @dependabot in #630
- Bump Gradle from 8.8 to 8.9 by @MGaetan89 in #636
- Bump mockk from 1.13.11 to 1.13.12 by @dependabot in #641
- Bump android-gradle-plugin from 8.5.0 to 8.5.1 by @dependabot in #642
- Bump the androidx group with 3 updates by @dependabot in #640
- Bump kotlinx-kover from 0.8.2 to 0.8.3 by @dependabot in #647
- Bump coil from 2.6.0 to 2.7.0 by @dependabot in #648
- Update to AndroidX Media3 1.4.0 by @MGaetan89 in #618
- Move
TVSlider
topillarbox-demo-shared
by @MGaetan89 in #650 - Remove leanback by @MGaetan89 in #651
- Bump com.autonomousapps.dependency-analysis from 1.32.0 to 1.33.0 by @dependabot in #661
- Bump the androidx group with 10 updates by @dependabot in #660
- Enable edge-to-edge in the demo application by @MGaetan89 in #658
- Add argument to set
Player.getMaxSeekToPreviousPosition
when creating aPillarboxExoPlayer
by @MGaetan89 in #659
Full Changelog: 2.2.1...2.3.0
2.2.1
This release updates AndroidX Lifecycle to 2.8.3, to fix an issue with code shrinking.
What's Changed
- Bump kotlinx-kover from 0.8.1 to 0.8.2 by @dependabot in #622
- Cherry-pick test changes from #615 by @MGaetan89 in #620
- Update AndroidX Lifecycle to 2.8.3 by @MGaetan89 in #617
- Bump kotlinx-serialization from 1.7.0 to 1.7.1 by @dependabot in #623
- Improve version regex and add tests by @MGaetan89 in #616
Full Changelog: 2.2.0...2.2.1
2.2.0
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
- Don't let Dependabot update ComScore and CommandersAct by @MGaetan89 in #585
- Fix current time range reset by @StaehliJ in #581
- Bump kotlinx-serialization from 1.6.3 to 1.7.0 by @dependabot in #586
- Bump android-gradle-plugin from 8.4.1 to 8.4.2 by @dependabot in #576
- Avoid send null current chapter when not needed by @StaehliJ in #587
- 580 implements custom listeners like media3 by @StaehliJ in #589
- Replace the fondue video in demo by @MGaetan89 in #591
- Bump the androidx group with 7 updates by @dependabot in #594
- Bump android-gradle-plugin from 8.4.2 to 8.5.0 by @dependabot in #595
- Fix: use
runUntilPendingCommandsAreFullyHandled
inCommandersActTrackerIntegrationTest
by @MGaetan89 in #603 - Run Bitmap decoding not on main thread by @StaehliJ in #601
- Bump ktor from 2.3.11 to 2.3.12 by @dependabot in #602
- 605 bad commandersact stop position after removing item by @StaehliJ in #606
Full Changelog: 2.1.2...2.2.0
2.1.2 - Fix CommandersAct crash
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
- Use DefaultPillarbox setup from the DI by @StaehliJ in #573
- Bump kotlinx-kover from 0.8.0 to 0.8.1 by @dependabot in #577
- Update
.gitignore
by @MGaetan89 in #579 - Bump kotlinx-serialization from 1.6.3 to 1.7.0 by @dependabot in #578
- Revert "Bump kotlinx-serialization from 1.6.3 to 1.7.0 (#578)" by @StaehliJ in #584
- Rollback commandersAct version to a stable version by @StaehliJ in #583
Full Changelog: 2.1.1...2.1.2
2.1.1
What's Changed
- Fix typos in documentation. by @Loic-Dumas in #569
- Audio main chapter always returns empty list of Player chapter by @StaehliJ in #570
- Remove lifecyle 2.8.1 by @StaehliJ in #572
Full Changelog: 2.1.0...2.1.1
2.1.0
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
.
- Chapters : a time range that contains metadata of a Chapter, player will call
PillarboxPlayer.Listener.onChapterChanged
when player enter or exit a chapter. - 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. - 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 theMediaComposition
.
Known bugs
- Live DRM can't be played
- Audio stream with multiple chapters can't be played
What's Changed
- Update guide to setup the GitHub repository by @MGaetan89 in #534
- Bump the androidx group with 4 updates by @dependabot in #522
- Bump android-gradle-plugin from 8.3.2 to 8.4.0 by @dependabot in #523
- Custom blocked segments by @StaehliJ in #539
- Replace usages of
MediaItemUrn
withSRGMediaItemBuilder
by @MGaetan89 in #537 - Add journalistic blocking reason by @MGaetan89 in #538
- Bump ktor from 2.3.10 to 2.3.11 by @dependabot in #542
- Bump kotlinx-coroutines from 1.8.0 to 1.8.1 by @dependabot in #541
- Bump mockk from 1.13.10 to 1.13.11 by @dependabot in #548
- Bump robolectric from 4.12.1 to 4.12.2 by @dependabot in #545
- Bump android-gradle-plugin from 8.4.0 to 8.4.1 by @dependabot in #547
- Bump kotlinx-kover from 0.7.6 to 0.8.0 by @dependabot in #546
- Bump the androidx group with 10 updates by @dependabot in #544
- Add a seek bar to the TV demo player by @MGaetan89 in #543
- Bump kotlin from 1.9.23 to 2.0.0 by @dependabot in #549
- 517 helper for media route button display by @StaehliJ in #525
- Bump com.autonomousapps.dependency-analysis from 1.31.0 to 1.32.0 by @dependabot in #554
- Simplify JVM toolchain setup by @MGaetan89 in #556
- Bump the androidx group with 5 updates by @dependabot in #560
- Bump com.tagcommander.lib:ServerSide from 5.5.3 to 5.5.4 by @dependabot in #562
- Revert toolchain changes from #556 by @MGaetan89 in #563
- Enable multi session for drm by @StaehliJ in #566
- 559 ghost start issue by @StaehliJ in #564
Full Changelog: 2.0.0...2.1.0