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]