From 29c7311d27d4e5d1c77a8dfd0494e071288e173e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaquim=20St=C3=A4hli?= Date: Thu, 22 Feb 2024 13:17:03 +0100 Subject: [PATCH] Update pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PlayerCallbackFlow.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Gaƫtan Muller --- .../main/java/ch/srgssr/pillarbox/player/PlayerCallbackFlow.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PlayerCallbackFlow.kt b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PlayerCallbackFlow.kt index 09cf406f6..987bf2bba 100644 --- a/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PlayerCallbackFlow.kt +++ b/pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PlayerCallbackFlow.kt @@ -299,6 +299,7 @@ fun Player.getAspectRatioAsFlow(defaultAspectRatio: Float): Flow = .map { it.computeAspectRatio(defaultAspectRatio) } + .onEmpty { emit(defaultAspectRatio) } /** * Get track selection parameters as flow [Player.getTrackSelectionParameters]