From 2f09d63315996c23b058993e7a2d9840444774c0 Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Wed, 6 Nov 2024 14:12:44 +0100 Subject: [PATCH] Fix default value As this config is not existing on Native, we have to set a default value directly here Because it may not be there in the Json --- .../main/java/com/bitmovin/player/reactnative/PlayerModule.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/bitmovin/player/reactnative/PlayerModule.kt b/android/src/main/java/com/bitmovin/player/reactnative/PlayerModule.kt index 6358ef55..c8044ffb 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/PlayerModule.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/PlayerModule.kt @@ -78,7 +78,7 @@ class PlayerModule(context: ReactApplicationContext) : BitmovinBaseModule(contex val analyticsConfig = analyticsConfigJson?.toAnalyticsConfig() val defaultMetadata = analyticsConfigJson?.getMap("defaultMetadata")?.toAnalyticsDefaultMetadata() val enableMediaSession = playerConfigJson?.getMap("mediaControlConfig") - ?.toMediaControlConfig()?.isEnabled + ?.toMediaControlConfig()?.isEnabled ?: true val networkConfig = networkNativeId?.let { networkModule.getConfig(it) } if (networkConfig != null) {