From 021529b2ecea940b07fda18cad42f3516e5c8cad Mon Sep 17 00:00:00 2001 From: saravanan Date: Thu, 14 Nov 2024 15:39:39 +0800 Subject: [PATCH 01/29] exposed TweaksConfig.forceReuseVideoCodecReasons --- CHANGELOG.md | 4 +++ .../reactnative/converter/JsonConverter.kt | 21 ++++++++++++++ src/tweaksConfig.ts | 28 +++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4346b632..bdc9f713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Added + +- exposed `TweaksConfig.forceReuseVideoCodecReasons` + ### Fixed - Error where setting `PlaybackConfig.isAutoplayEnabled = true` causes the player view creation to fail on Android diff --git a/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt b/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt index 78438e5c..931e4d9a 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt @@ -6,6 +6,7 @@ import com.bitmovin.analytics.api.CustomData import com.bitmovin.analytics.api.DefaultMetadata import com.bitmovin.analytics.api.SourceMetadata import com.bitmovin.player.api.DeviceDescription.DeviceName +import com.bitmovin.player.api.ForceReuseVideoCodecReason import com.bitmovin.player.api.PlaybackConfig import com.bitmovin.player.api.PlayerConfig import com.bitmovin.player.api.TweaksConfig @@ -167,6 +168,16 @@ fun ReadableMap.toStyleConfig(): StyleConfig = StyleConfig().apply { withString("scalingMode") { scalingMode = ScalingMode.valueOf(it) } } +/** + * Converts any JS string into an `AdSourceType` enum value. + */ +private fun String.forceReuseVideoCodecReason(): ForceReuseVideoCodecReason? = when (this) { + "ColorInfoMismatch" -> ForceReuseVideoCodecReason.ColorInfoMismatch + "MaxInputSizeExceeded" -> ForceReuseVideoCodecReason.MaxInputSizeExceeded + "MaxResolutionExceeded" -> ForceReuseVideoCodecReason.MaxResolutionExceeded + else -> null +} + /** * Converts any JS object into a `TweaksConfig` object. */ @@ -189,6 +200,16 @@ fun ReadableMap.toTweaksConfig(): TweaksConfig = TweaksConfig().apply { withBoolean("useDrmSessionForClearSources") { useDrmSessionForClearSources = it } withBoolean("useFiletypeExtractorFallbackForHls") { useFiletypeExtractorFallbackForHls = it } withBoolean("preferSoftwareDecodingForAds") { preferSoftwareDecodingForAds = it } + withStringArray("forceReuseVideoCodecReasons") { + val mutableSet = mutableSetOf() + for (item in it) { + val reason = item?.forceReuseVideoCodecReason() + if (reason != null) { + mutableSet.add(reason) + } + } + forceReuseVideoCodecReasons = mutableSet + } } /** diff --git a/src/tweaksConfig.ts b/src/tweaksConfig.ts index 2269baf7..c0220854 100644 --- a/src/tweaksConfig.ts +++ b/src/tweaksConfig.ts @@ -1,3 +1,21 @@ +/** + * The different reasons when the video codec should be reused. + */ +export enum ForceReuseVideoCodecReason { + /** + * The new video quality color information is not compatible. + */ + ColorInfoMismatch = 'ColorInfoMismatch', + /** + * The new video quality exceed the decoder's configured maximum sample size. + */ + MaxInputSizeExceeded = 'MaxInputSizeExceeded', + /** + * The new video quality exceed the decoder's configured maximum resolution. + */ + MaxResolutionExceeded = 'MaxResolutionExceeded', +} + /** * This configuration is used as an incubator for experimental features. Tweaks are not officially * supported and are not guaranteed to be stable, i.e. their naming, functionality and API can @@ -170,4 +188,14 @@ export interface TweaksConfig { * @platform iOS */ updatesNowPlayingInfoCenter?: boolean; + + /** + * When switching between video formats (eg: adapting between video qualities) the codec might be recreated due to several reasons. + * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow. + * + * Default is `[]` i.e not set + * + * @platform Android + */ + forceReuseVideoCodecReasons?: Array; } From cdf799debdf74e1c9eddec71bf290e5435456358 Mon Sep 17 00:00:00 2001 From: saravanan Date: Thu, 14 Nov 2024 15:42:26 +0800 Subject: [PATCH 02/29] updated default value --- src/tweaksConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tweaksConfig.ts b/src/tweaksConfig.ts index c0220854..59316e56 100644 --- a/src/tweaksConfig.ts +++ b/src/tweaksConfig.ts @@ -193,7 +193,7 @@ export interface TweaksConfig { * When switching between video formats (eg: adapting between video qualities) the codec might be recreated due to several reasons. * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow. * - * Default is `[]` i.e not set + * Default is `null` i.e not set * * @platform Android */ From 6c0fe0be72537d83455ef8ef5378a17d315bcd97 Mon Sep 17 00:00:00 2001 From: Lukas Knoch-Girstmair Date: Fri, 15 Nov 2024 12:51:25 +0100 Subject: [PATCH 03/29] To idiomatic Kotlin --- .../reactnative/converter/JsonConverter.kt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt b/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt index 931e4d9a..45edf392 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt @@ -169,9 +169,9 @@ fun ReadableMap.toStyleConfig(): StyleConfig = StyleConfig().apply { } /** - * Converts any JS string into an `AdSourceType` enum value. + * Converts any JS string into an `ForceReuseVideoCodecReason` enum value. */ -private fun String.forceReuseVideoCodecReason(): ForceReuseVideoCodecReason? = when (this) { +private fun String.toForceReuseVideoCodecReason(): ForceReuseVideoCodecReason? = when (this) { "ColorInfoMismatch" -> ForceReuseVideoCodecReason.ColorInfoMismatch "MaxInputSizeExceeded" -> ForceReuseVideoCodecReason.MaxInputSizeExceeded "MaxResolutionExceeded" -> ForceReuseVideoCodecReason.MaxResolutionExceeded @@ -201,14 +201,10 @@ fun ReadableMap.toTweaksConfig(): TweaksConfig = TweaksConfig().apply { withBoolean("useFiletypeExtractorFallbackForHls") { useFiletypeExtractorFallbackForHls = it } withBoolean("preferSoftwareDecodingForAds") { preferSoftwareDecodingForAds = it } withStringArray("forceReuseVideoCodecReasons") { - val mutableSet = mutableSetOf() - for (item in it) { - val reason = item?.forceReuseVideoCodecReason() - if (reason != null) { - mutableSet.add(reason) - } - } - forceReuseVideoCodecReasons = mutableSet + forceReuseVideoCodecReasons = it + .filterNotNull() + .mapNotNull(String::toForceReuseVideoCodecReason) + .toSet() } } From 0ec9d9803d26f4617e9aa96bcc608edf4864c50c Mon Sep 17 00:00:00 2001 From: Lukas Knoch-Girstmair Date: Fri, 15 Nov 2024 12:57:51 +0100 Subject: [PATCH 04/29] Use Native android documentation --- src/tweaksConfig.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/tweaksConfig.ts b/src/tweaksConfig.ts index 59316e56..90d0654c 100644 --- a/src/tweaksConfig.ts +++ b/src/tweaksConfig.ts @@ -1,5 +1,11 @@ /** - * The different reasons when the video codec should be reused. + * When switching the video quality, the video decoder's configuration might change + * as the player can't always know if the codec supports such configuration change, it destroys and recreates it. + * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow. + * + * If a codec is know to support a given configuration change without issues, + * the configuration can be added to the `TweaksConfig.forceReuseVideoCodecReasons` + * to always reuse the video codec and avoid the black screen. */ export enum ForceReuseVideoCodecReason { /** @@ -190,8 +196,13 @@ export interface TweaksConfig { updatesNowPlayingInfoCenter?: boolean; /** - * When switching between video formats (eg: adapting between video qualities) the codec might be recreated due to several reasons. - * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow. + * When switching between video formats (eg: adapting between video qualities) + * the codec might be recreated due to several reasons. + * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be + * slow. + * + * If a device is know to support video format changes and keep the current decoder without issues, + * this set can be filled with multiple `ForceReuseVideoCodecReason` and avoid the black screen. * * Default is `null` i.e not set * From 5b860f6b2d089884f126a89577c9f7cf19a622eb Mon Sep 17 00:00:00 2001 From: Lukas Knoch-Girstmair Date: Fri, 15 Nov 2024 15:03:22 +0100 Subject: [PATCH 05/29] Update CHANGELOG.md Co-authored-by: Matthias Tamegger <5555332+matamegger@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05fdf875..8c074951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Added -- exposed `TweaksConfig.forceReuseVideoCodecReasons` +- Android: `TweaksConfig.forceReuseVideoCodecReasons` that allows to force the reuse of the video codec despite a configuration change. This flag should be set only, if it is known that the codec can handle the given configuration change ### Changed From 992340ca832a2ef592e0e4f053164014d4500b53 Mon Sep 17 00:00:00 2001 From: Update Bot Date: Fri, 15 Nov 2024 15:03:04 +0000 Subject: [PATCH 06/29] chore(android): update android player version to 3.93.0+jason --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index d091538a..16d24458 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -105,6 +105,6 @@ dependencies { // Bitmovin implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.33.0' implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' - implementation 'com.bitmovin.player:player:3.92.0+jason' + implementation 'com.bitmovin.player:player:3.93.0+jason' implementation 'com.bitmovin.player:player-media-session:3.92.0+jason' } From a29848e4ca0765302fc435983347ce6f5a8fe7da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 00:32:17 +0000 Subject: [PATCH 07/29] Bump cross-spawn from 7.0.3 to 7.0.6 Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9a3ca8db..a97afa1b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3268,9 +3268,9 @@ create-jest@^29.7.0: prompts "^2.0.1" cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" From faeecffb898fba37826c11ddc10dc5cb56abea65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 15:00:57 +0000 Subject: [PATCH 08/29] Bump cross-spawn from 7.0.3 to 7.0.6 in /example Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] --- example/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/yarn.lock b/example/yarn.lock index b2fbd2fd..a5eeb6f9 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -2266,9 +2266,9 @@ cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: parse-json "^4.0.0" cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" From 4f1f88c217d23e17a06012bb942783017c193c7f Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Thu, 21 Nov 2024 16:53:40 +0100 Subject: [PATCH 09/29] Add debug config --- src/debugConfig.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/debugConfig.ts diff --git a/src/debugConfig.ts b/src/debugConfig.ts new file mode 100644 index 00000000..bc8563ea --- /dev/null +++ b/src/debugConfig.ts @@ -0,0 +1,32 @@ +/** + * Global debug configuration for all Bitmovin components. + */ +export interface DebugConfig { + /** + * Enables global debug logging for all Bitmovin components. + * + * Provides detailed information primarily for debugging purposes, helping to + * diagnose problems and trace the flow of execution within the Player. + * + * ### Platform-Specific Logging Behavior: + * - **iOS:** logs are printed using `NSLog` at the verbose log level. + * - **Android:** logs are printed using `android.util.Log` with the following tags: + * - `BitmovinPlayer` + * - `BitmovinPlayerView` + * - `BitmovinOffline` + * - `BitmovinSource` + * - `BitmovinExoPlayer` + * + * ### Usage Notes: + * - On Android, this flag **must** be set **before** creating any Bitmovin component to take effect. + * - We recommend setting this flag during your app's initialization phase, such as in the + * `Application.onCreate` function on Android or equivalent initialization on iOS. + * + * ### Warning: + * This option **should not be enabled in production** as it may log sensitive or confidential + * information to the console. + * + * @defaultValue `false` + */ + isLoggingEnabled?: boolean; +} From d54fa8aca482843a60b7a7ff3a6cd263a98222de Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 11:12:37 +0100 Subject: [PATCH 10/29] first version --- DebugModule.m | 8 +++ DebugModule.swift | 56 +++++++++++++++++ ios/RCTConvert+BitmovinPlayer.swift | 16 +++++ src/{ => debug}/debugConfig.ts | 6 +- src/debug/index.ts | 95 +++++++++++++++++++++++++++++ 5 files changed, 179 insertions(+), 2 deletions(-) create mode 100644 DebugModule.m create mode 100644 DebugModule.swift rename src/{ => debug}/debugConfig.ts (88%) create mode 100644 src/debug/index.ts diff --git a/DebugModule.m b/DebugModule.m new file mode 100644 index 00000000..06a5ce30 --- /dev/null +++ b/DebugModule.m @@ -0,0 +1,8 @@ +// +// DebugModule.m +// Pods +// +// Created by Michele Pozzi on 21.11.24. +// + +#import diff --git a/DebugModule.swift b/DebugModule.swift new file mode 100644 index 00000000..e9dd8c78 --- /dev/null +++ b/DebugModule.swift @@ -0,0 +1,56 @@ +import BitmovinPlayer + +@objc(DebugModule) +public class DebugModule: NSObject, RCTBridgeModule { + // swiftlint:disable:next implicitly_unwrapped_optional + @objc public var bridge: RCTBridge! + + // swiftlint:disable:next implicitly_unwrapped_optional + public static func moduleName() -> String! { + "DebugModule" + } + + /// Module requires main thread initialization. + public static func requiresMainQueueSetup() -> Bool { + true + } + + // swiftlint:disable:next implicitly_unwrapped_optional + public var methodQueue: DispatchQueue! { + bridge.uiManager.methodQueue + } + + /** + - Gets the `LogLevel` from the debug Log. + - Parameter nativeId: Native Id of the the player instance. + - Parameter resolver: JS promise resolver. + - Parameter rejecter: JS promise rejecter. + */ + @objc(getLevel:resolver:rejecter:) + func getLevel( + _ playerId: NativeId, + resolver resolve: @escaping RCTPromiseResolveBlock, + rejecter reject: @escaping RCTPromiseRejectBlock + ) { + bridge.uiManager.addUIBlock { [weak self] _, _ in + guard let logger = DebugConfig.logging.logger else { + reject("[DebugModule]", "Invalid logger for player with ID: (\(playerId))", nil) + return + } + let level = logger.level + resolve(RCTConvert.toJson(logLevel: level)) + } + } + + /** + * Sets the level for the debug log. + - Parameter nativeId: Target player id. + - Parameter level: The level of the log to set. + */ + @objc(setLogLevel:level:) + func enableDebugging(_ playerId: NativeId, level: LogLevel) { + bridge.uiManager.addUIBlock { [weak self] _, _ in + DebugConfig.logging.logger?.level = level + } + } +} diff --git a/ios/RCTConvert+BitmovinPlayer.swift b/ios/RCTConvert+BitmovinPlayer.swift index 4cef95dd..b0cc184c 100644 --- a/ios/RCTConvert+BitmovinPlayer.swift +++ b/ios/RCTConvert+BitmovinPlayer.swift @@ -1347,6 +1347,18 @@ extension RCTConvert { } return nowPlayingConfig } + + static func debugConfig(_ json: Any?) -> DebugConfig? { + guard let json = json as? [String: Any?] else { return DebugConfig() } + var debugConfig = DebugConfig() + let isLoggingEnabled = json["isLoggingEnabled"] as? Bool ?? false + debugConfig.isLoggingEnabled = isLoggingEnabled + return debugConfig + } + + static func toJson(logLevel: LogLevel) -> Int { + logLevel.rawValue + } } /** * React native specific PlayerViewConfig. @@ -1401,3 +1413,7 @@ internal struct RNBufferLevels { let audio: BufferLevel let video: BufferLevel } + +//internal struct DebugConfig { +// var isLoggingEnabled: Bool = false +//} diff --git a/src/debugConfig.ts b/src/debug/debugConfig.ts similarity index 88% rename from src/debugConfig.ts rename to src/debug/debugConfig.ts index bc8563ea..50877d46 100644 --- a/src/debugConfig.ts +++ b/src/debug/debugConfig.ts @@ -1,7 +1,9 @@ +import { NativeInstanceConfig } from 'src/nativeInstance'; + /** * Global debug configuration for all Bitmovin components. */ -export interface DebugConfig { +export interface DebugConfig extends NativeInstanceConfig { /** * Enables global debug logging for all Bitmovin components. * @@ -28,5 +30,5 @@ export interface DebugConfig { * * @defaultValue `false` */ - isLoggingEnabled?: boolean; + isDebugLoggingEnabled?: boolean; } diff --git a/src/debug/index.ts b/src/debug/index.ts new file mode 100644 index 00000000..d459b2a1 --- /dev/null +++ b/src/debug/index.ts @@ -0,0 +1,95 @@ +import { NativeModules } from 'react-native'; +import BatchedBridge from 'react-native/Libraries/BatchedBridge/BatchedBridge'; +import NativeInstance from '../nativeInstance'; +import { DebugConfig } from './debugConfig'; + +const DebugModule = NativeModules.DebugModule; + +/** + * Represents a native Network configuration object. + * @internal + */ +export class Debug extends NativeInstance { + /** + * Whether this object's native instance has been created. + */ + isInitialized = false; + /** + * Whether this object's native instance has been disposed. + */ + isDestroyed = false; + + /** + * Allocates the Network config instance and its resources natively. + */ + initialize = () => { + if (!this.isInitialized) { + // Register this object as a callable module so it's possible to + // call functions on it from native code, e.g `onPreprocessHttpResponse`. + BatchedBridge.registerCallableModule(`Debug-${this.nativeId}`, this); + // Create native configuration object. + DebugModule.initWithConfig(this.nativeId, this.config); + this.isInitialized = true; + } + }; + + /** + * Destroys the native Network config and releases all of its allocated resources. + */ + destroy = () => { + if (!this.isDestroyed) { + DebugModule.destroy(this.nativeId); + this.isDestroyed = true; + } + }; + + /** + * Applies the user-defined `preprocessHttpRequest` function to native's `type` and `request` data and store + * the result back in `NetworkModule`. + * + * Called from native code when `NetworkConfig.preprocessHttpRequest` is dispatched. + * + * @param requestId Passed through to identify the completion handler of the request on native. + * @param type Type of the request to be made. + * @param request The HTTP request to process. + */ + onPreprocessHttpRequest = ( + requestId: string, + type: HttpRequestType, + request: HttpRequest + ) => { + this.config + ?.preprocessHttpRequest?.(type, request) + .then((resultRequest) => { + NetworkModule.setPreprocessedHttpRequest(requestId, resultRequest); + }) + .catch(() => { + NetworkModule.setPreprocessedHttpRequest(requestId, request); + }); + }; + + /** + * Applies the user-defined `preprocessHttpResponse` function to native's `type` and `response` data and store + * the result back in `NetworkModule`. + * + * Called from native code when `NetworkConfig.preprocessHttpResponse` is dispatched. + * + * @param responseId Passed through to identify the completion handler of the response on native. + * @param type Type of the request to be made. + * @param response The HTTP response to process. + */ + onPreprocessHttpResponse = ( + responseId: string, + type: HttpRequestType, + response: HttpResponse + ) => { + this.config + ?.preprocessHttpResponse?.(type, response) + .then((resultResponse) => { + NetworkModule.setPreprocessedHttpResponse(responseId, resultResponse); + }) + .catch(() => { + NetworkModule.setPreprocessedHttpResponse(responseId, response); + }); + }; +} From e35a0feb0484b542e7a0287bdf7c71152ba2e1d1 Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 11:13:57 +0100 Subject: [PATCH 11/29] moving to static class --- DebugModule.m | 13 +- DebugModule.swift | 39 ++---- .../player/reactnative/RNPlayerViewPackage.kt | 1 + ios/RCTConvert+BitmovinPlayer.swift | 16 --- src/debug/debugConfig.ts | 2 +- src/debug/index.ts | 123 ++++++------------ src/index.ts | 1 + 7 files changed, 59 insertions(+), 136 deletions(-) diff --git a/DebugModule.m b/DebugModule.m index 06a5ce30..321a9e8a 100644 --- a/DebugModule.m +++ b/DebugModule.m @@ -1,8 +1,7 @@ -// -// DebugModule.m -// Pods -// -// Created by Michele Pozzi on 21.11.24. -// +#import -#import +@interface RCT_EXTERN_REMAP_MODULE(DebugModule, DebugModule, NSObject) + +RCT_EXTERN_METHOD(setLoggingEnabled:(nonnull BOOL)enabled) + +@end diff --git a/DebugModule.swift b/DebugModule.swift index e9dd8c78..bc75f894 100644 --- a/DebugModule.swift +++ b/DebugModule.swift @@ -19,38 +19,19 @@ public class DebugModule: NSObject, RCTBridgeModule { public var methodQueue: DispatchQueue! { bridge.uiManager.methodQueue } +} - /** - - Gets the `LogLevel` from the debug Log. - - Parameter nativeId: Native Id of the the player instance. - - Parameter resolver: JS promise resolver. - - Parameter rejecter: JS promise rejecter. - */ - @objc(getLevel:resolver:rejecter:) - func getLevel( - _ playerId: NativeId, - resolver resolve: @escaping RCTPromiseResolveBlock, - rejecter reject: @escaping RCTPromiseRejectBlock - ) { +extension DebugModule { + // TODO: docs + @objc(setLoggingEnabled:) + func setLoggingEnabled(enabled: Bool) { bridge.uiManager.addUIBlock { [weak self] _, _ in - guard let logger = DebugConfig.logging.logger else { - reject("[DebugModule]", "Invalid logger for player with ID: (\(playerId))", nil) - return + if enabled { + DebugConfig.logging.logger?.level = .warning// TODO: .verbose } - let level = logger.level - resolve(RCTConvert.toJson(logLevel: level)) - } - } - - /** - * Sets the level for the debug log. - - Parameter nativeId: Target player id. - - Parameter level: The level of the log to set. - */ - @objc(setLogLevel:level:) - func enableDebugging(_ playerId: NativeId, level: LogLevel) { - bridge.uiManager.addUIBlock { [weak self] _, _ in - DebugConfig.logging.logger?.level = level + // else {// TODO: else necessary?? + // DebugConfig.logging.logger?.level + // } } } } diff --git a/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewPackage.kt b/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewPackage.kt index 807f6f54..7d3ab01f 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewPackage.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewPackage.kt @@ -30,6 +30,7 @@ class RNPlayerViewPackage : ReactPackage { BitmovinCastManagerModule(reactContext), BufferModule(reactContext), NetworkModule(reactContext), + DebugModule(reactContext), ) } diff --git a/ios/RCTConvert+BitmovinPlayer.swift b/ios/RCTConvert+BitmovinPlayer.swift index b0cc184c..4cef95dd 100644 --- a/ios/RCTConvert+BitmovinPlayer.swift +++ b/ios/RCTConvert+BitmovinPlayer.swift @@ -1347,18 +1347,6 @@ extension RCTConvert { } return nowPlayingConfig } - - static func debugConfig(_ json: Any?) -> DebugConfig? { - guard let json = json as? [String: Any?] else { return DebugConfig() } - var debugConfig = DebugConfig() - let isLoggingEnabled = json["isLoggingEnabled"] as? Bool ?? false - debugConfig.isLoggingEnabled = isLoggingEnabled - return debugConfig - } - - static func toJson(logLevel: LogLevel) -> Int { - logLevel.rawValue - } } /** * React native specific PlayerViewConfig. @@ -1413,7 +1401,3 @@ internal struct RNBufferLevels { let audio: BufferLevel let video: BufferLevel } - -//internal struct DebugConfig { -// var isLoggingEnabled: Bool = false -//} diff --git a/src/debug/debugConfig.ts b/src/debug/debugConfig.ts index 50877d46..bbee1f70 100644 --- a/src/debug/debugConfig.ts +++ b/src/debug/debugConfig.ts @@ -3,7 +3,7 @@ import { NativeInstanceConfig } from 'src/nativeInstance'; /** * Global debug configuration for all Bitmovin components. */ -export interface DebugConfig extends NativeInstanceConfig { +export interface DebugConfigOld extends NativeInstanceConfig { /** * Enables global debug logging for all Bitmovin components. * diff --git a/src/debug/index.ts b/src/debug/index.ts index d459b2a1..fd271daa 100644 --- a/src/debug/index.ts +++ b/src/debug/index.ts @@ -1,95 +1,52 @@ import { NativeModules } from 'react-native'; -import BatchedBridge from 'react-native/Libraries/BatchedBridge/BatchedBridge'; -import NativeInstance from '../nativeInstance'; -import { DebugConfig } from './debugConfig'; const DebugModule = NativeModules.DebugModule; -/** - * Represents a native Network configuration object. - * @internal - */ -export class Debug extends NativeInstance { - /** - * Whether this object's native instance has been created. - */ - isInitialized = false; - /** - * Whether this object's native instance has been disposed. - */ - isDestroyed = false; +export class DebugConfig { + private static _isDebugEnabled = false; /** - * Allocates the Network config instance and its resources natively. - */ - initialize = () => { - if (!this.isInitialized) { - // Register this object as a callable module so it's possible to - // call functions on it from native code, e.g `onPreprocessHttpResponse`. - BatchedBridge.registerCallableModule(`Debug-${this.nativeId}`, this); - // Create native configuration object. - DebugModule.initWithConfig(this.nativeId, this.config); - this.isInitialized = true; - } - }; - - /** - * Destroys the native Network config and releases all of its allocated resources. - */ - destroy = () => { - if (!this.isDestroyed) { - DebugModule.destroy(this.nativeId); - this.isDestroyed = true; - } - }; - - /** - * Applies the user-defined `preprocessHttpRequest` function to native's `type` and `request` data and store - * the result back in `NetworkModule`. + * Enables global debug logging for all Bitmovin components. * - * Called from native code when `NetworkConfig.preprocessHttpRequest` is dispatched. + * Provides detailed information primarily for debugging purposes, helping to + * diagnose problems and trace the flow of execution within the Player. * - * @param requestId Passed through to identify the completion handler of the request on native. - * @param type Type of the request to be made. - * @param request The HTTP request to process. - */ - onPreprocessHttpRequest = ( - requestId: string, - type: HttpRequestType, - request: HttpRequest - ) => { - this.config - ?.preprocessHttpRequest?.(type, request) - .then((resultRequest) => { - NetworkModule.setPreprocessedHttpRequest(requestId, resultRequest); - }) - .catch(() => { - NetworkModule.setPreprocessedHttpRequest(requestId, request); - }); - }; - - /** - * Applies the user-defined `preprocessHttpResponse` function to native's `type` and `response` data and store - * the result back in `NetworkModule`. + * ### Platform-Specific Logging Behavior: + * - **iOS:** logs are printed using `NSLog` at the verbose log level. + * - **Android:** logs are printed using `android.util.Log` with the following tags: + * - `BitmovinPlayer` + * - `BitmovinPlayerView` + * - `BitmovinOffline` + * - `BitmovinSource` + * - `BitmovinExoPlayer` * - * Called from native code when `NetworkConfig.preprocessHttpResponse` is dispatched. + * ### Usage Notes: + * - On Android, this flag **must** be set **before** creating any Bitmovin component to take effect. + * - We recommend setting this flag during your app's initialization phase, such as in the + * `Application.onCreate` function on Android or equivalent initialization on iOS. * - * @param responseId Passed through to identify the completion handler of the response on native. - * @param type Type of the request to be made. - * @param response The HTTP response to process. + * ### Warning: + * This option **should not be enabled in production** as it may log sensitive or confidential + * information to the console. + * + * @defaultValue `false` */ - onPreprocessHttpResponse = ( - responseId: string, - type: HttpRequestType, - response: HttpResponse - ) => { - this.config - ?.preprocessHttpResponse?.(type, response) - .then((resultResponse) => { - NetworkModule.setPreprocessedHttpResponse(responseId, resultResponse); - }) - .catch(() => { - NetworkModule.setPreprocessedHttpResponse(responseId, response); - }); - }; + static get isDebugLoggingEnabled(): boolean { + return DebugConfig._isDebugEnabled; + } + + static set isDebugLoggingEnabled(value: boolean) { + DebugConfig._isDebugEnabled = value; + DebugModule.setLoggingEnabled(value).then(() => {}); + } + // getter sync, setter sync (empty promise) } + +// const DebugConfig = { +// set isDebugLoggingEnabled(value: boolean) { +// DebugModule.setLoggingEnabled(value).then(() => {}); // TODO: do I need a promise here? +// }, +// // use get and set if cannot figure it out +// }; + +// export default DebugConfig; diff --git a/src/index.ts b/src/index.ts index 20d34fc7..4ec7abdd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,3 +25,4 @@ export * from './liveConfig'; export * from './bufferApi'; export * from './network'; export * from './mediaControlConfig'; +export * from './debug'; From 2d781967275e20f13194315cc74f15bf533e80bc Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 11:42:42 +0100 Subject: [PATCH 12/29] add module on android --- .../player/reactnative/DebugModule.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt diff --git a/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt b/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt new file mode 100644 index 00000000..d970ed2e --- /dev/null +++ b/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt @@ -0,0 +1,20 @@ +package com.bitmovin.player.reactnative + +import com.bitmovin.player.api.DebugConfig +import com.facebook.react.bridge.* +import com.facebook.react.module.annotations.ReactModule + +private const val MODULE_NAME = "DebugModule" + +@ReactModule(name = MODULE_NAME) +class DebugModule(context: ReactApplicationContext) : BitmovinBaseModule(context) { + override fun getName() = MODULE_NAME + + // TODO: docs + @ReactMethod + fun setLoggingEnabled(enabled: Boolean, promise: Promise) { + promise.unit.resolveOnUiThread { + DebugConfig.isLoggingEnabled = enabled + } + } +} \ No newline at end of file From b91464fd1be2938fe5af2a036bc3e1b3e2f50ea4 Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 12:36:05 +0100 Subject: [PATCH 13/29] Refactoring --- DebugModule.m => ios/DebugModule.m | 0 DebugModule.swift => ios/DebugModule.swift | 11 +++-- src/{debug/index.ts => debug.ts} | 56 ++++++++++++---------- src/debug/debugConfig.ts | 34 ------------- 4 files changed, 36 insertions(+), 65 deletions(-) rename DebugModule.m => ios/DebugModule.m (100%) rename DebugModule.swift => ios/DebugModule.swift (69%) rename src/{debug/index.ts => debug.ts} (55%) delete mode 100644 src/debug/debugConfig.ts diff --git a/DebugModule.m b/ios/DebugModule.m similarity index 100% rename from DebugModule.m rename to ios/DebugModule.m diff --git a/DebugModule.swift b/ios/DebugModule.swift similarity index 69% rename from DebugModule.swift rename to ios/DebugModule.swift index bc75f894..70950476 100644 --- a/DebugModule.swift +++ b/ios/DebugModule.swift @@ -22,16 +22,17 @@ public class DebugModule: NSObject, RCTBridgeModule { } extension DebugModule { - // TODO: docs + /// Enable/disable verbose logging for the console logger. + /// - Parameter enabled: Whether to set verbose logging as enabled or disabled. @objc(setLoggingEnabled:) func setLoggingEnabled(enabled: Bool) { bridge.uiManager.addUIBlock { [weak self] _, _ in + let defaultMinimumLevel: LogLevel = .warning if enabled { - DebugConfig.logging.logger?.level = .warning// TODO: .verbose + DebugConfig.logging.logger?.level = .verbose + } else { + DebugConfig.logging.logger?.level = defaultMinimumLevel } - // else {// TODO: else necessary?? - // DebugConfig.logging.logger?.level - // } } } } diff --git a/src/debug/index.ts b/src/debug.ts similarity index 55% rename from src/debug/index.ts rename to src/debug.ts index fd271daa..feb1325d 100644 --- a/src/debug/index.ts +++ b/src/debug.ts @@ -2,16 +2,33 @@ import { NativeModules } from 'react-native'; const DebugModule = NativeModules.DebugModule; +/** + * Global debug configuration for all Bitmovin components. + */ export class DebugConfig { private static _isDebugEnabled = false; /** - * Enables global debug logging for all Bitmovin components. + * Retrieves the current debug logging state. * - * Provides detailed information primarily for debugging purposes, helping to - * diagnose problems and trace the flow of execution within the Player. + * @returns `true` if debug logging is enabled, otherwise `false`. + */ + static get isDebugLoggingEnabled(): boolean { + return DebugConfig._isDebugEnabled; + } + + /** + * Enables or disables global debug logging for all Bitmovin components. + * + * Debug logging provides detailed information primarily for debugging purposes, + * helping to diagnose problems and trace the flow of execution within the Player. + * + * ### Warning: + * This option **should not be enabled in production** as it may log sensitive or confidential + * information to the console. * - * ### Platform-Specific Logging Behavior: + * ## Platform-Specific Logging Behavior + * --- * - **iOS:** logs are printed using `NSLog` at the verbose log level. * - **Android:** logs are printed using `android.util.Log` with the following tags: * - `BitmovinPlayer` @@ -20,33 +37,20 @@ export class DebugConfig { * - `BitmovinSource` * - `BitmovinExoPlayer` * - * ### Usage Notes: - * - On Android, this flag **must** be set **before** creating any Bitmovin component to take effect. + * ## Limitations + * --- + * **Android** + * - This flag **must** be set **before** creating any Bitmovin component to take effect. + * + * ## Usage Notes + * --- * - We recommend setting this flag during your app's initialization phase, such as in the * `Application.onCreate` function on Android or equivalent initialization on iOS. * - * ### Warning: - * This option **should not be enabled in production** as it may log sensitive or confidential - * information to the console. - * * @defaultValue `false` */ - static get isDebugLoggingEnabled(): boolean { - return DebugConfig._isDebugEnabled; - } - - static set isDebugLoggingEnabled(value: boolean) { + static async setDebugLogging(value: boolean): Promise { DebugConfig._isDebugEnabled = value; - DebugModule.setLoggingEnabled(value).then(() => {}); + await DebugModule.setLoggingEnabled(value); } - // getter sync, setter sync (empty promise) } - -// const DebugConfig = { -// set isDebugLoggingEnabled(value: boolean) { -// DebugModule.setLoggingEnabled(value).then(() => {}); // TODO: do I need a promise here? -// }, -// // use get and set if cannot figure it out -// }; - -// export default DebugConfig; diff --git a/src/debug/debugConfig.ts b/src/debug/debugConfig.ts deleted file mode 100644 index bbee1f70..00000000 --- a/src/debug/debugConfig.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NativeInstanceConfig } from 'src/nativeInstance'; - -/** - * Global debug configuration for all Bitmovin components. - */ -export interface DebugConfigOld extends NativeInstanceConfig { - /** - * Enables global debug logging for all Bitmovin components. - * - * Provides detailed information primarily for debugging purposes, helping to - * diagnose problems and trace the flow of execution within the Player. - * - * ### Platform-Specific Logging Behavior: - * - **iOS:** logs are printed using `NSLog` at the verbose log level. - * - **Android:** logs are printed using `android.util.Log` with the following tags: - * - `BitmovinPlayer` - * - `BitmovinPlayerView` - * - `BitmovinOffline` - * - `BitmovinSource` - * - `BitmovinExoPlayer` - * - * ### Usage Notes: - * - On Android, this flag **must** be set **before** creating any Bitmovin component to take effect. - * - We recommend setting this flag during your app's initialization phase, such as in the - * `Application.onCreate` function on Android or equivalent initialization on iOS. - * - * ### Warning: - * This option **should not be enabled in production** as it may log sensitive or confidential - * information to the console. - * - * @defaultValue `false` - */ - isDebugLoggingEnabled?: boolean; -} From e0ff572ce730a864077e87f53acdd4b430bbe2ef Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 12:53:21 +0100 Subject: [PATCH 14/29] Add docs --- .../main/java/com/bitmovin/player/reactnative/DebugModule.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt b/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt index d970ed2e..e3295893 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt @@ -10,7 +10,10 @@ private const val MODULE_NAME = "DebugModule" class DebugModule(context: ReactApplicationContext) : BitmovinBaseModule(context) { override fun getName() = MODULE_NAME - // TODO: docs + /** + * Enable/disable verbose logging for the console logger. + * @param enabled Whether to set verbose logging as enabled or disabled. + */ @ReactMethod fun setLoggingEnabled(enabled: Boolean, promise: Promise) { promise.unit.resolveOnUiThread { From 9454d91edbce0d353424786bf8f01cdea4ddb084 Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 13:00:20 +0100 Subject: [PATCH 15/29] Add newline --- .../main/java/com/bitmovin/player/reactnative/DebugModule.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt b/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt index e3295893..5499d025 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt @@ -20,4 +20,4 @@ class DebugModule(context: ReactApplicationContext) : BitmovinBaseModule(context DebugConfig.isLoggingEnabled = enabled } } -} \ No newline at end of file +} From f5b48c17f25366bb315942a8f05f239d6ffc86f5 Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 13:16:17 +0100 Subject: [PATCH 16/29] Add entry about debug logging getter and setter --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c074951..e88279c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Added + +- `isDebugLoggingEnabled` and `setDebugLogging(value: boolean)` to check and set whether debug logging is enabled. Debug logging helps diagnose problems and trace the flow of execution within the Player and **should not be enabled in production** as it may log sensitive or confidential information to the console. + ## [0.32.0] - 2024-11-14 ### Added From 320175822d93323a3dd78bd688a82a628735487e Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 13:18:44 +0100 Subject: [PATCH 17/29] Add missing version replacement command for mediasession module --- .github/workflows/create-sdk-update-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/create-sdk-update-pr.yml b/.github/workflows/create-sdk-update-pr.yml index bfd3e9d8..870a43d5 100644 --- a/.github/workflows/create-sdk-update-pr.yml +++ b/.github/workflows/create-sdk-update-pr.yml @@ -82,6 +82,7 @@ jobs: if: ${{ inputs.sdk_name == 'android' }} run: | sed -i '' "s/com.bitmovin.player:player:.*/com.bitmovin.player:player:${{ inputs.version_number }}'/g" android/build.gradle + sed -i '' "s/com.bitmovin.player:player-media-session:.*/com.bitmovin.player:player-media-session:${{ inputs.version_number }}'/g" android/build.gradle - name: Commit version bump run: | From e83380d5b405bc4f715fdd7716358c42dbaca139 Mon Sep 17 00:00:00 2001 From: Michele Pozzi <96702967+123mpozzi@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:34:25 +0100 Subject: [PATCH 18/29] Rephrase in React-Native terms instead of native MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Roland Kákonyi --- src/debug.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug.ts b/src/debug.ts index feb1325d..8ecff105 100644 --- a/src/debug.ts +++ b/src/debug.ts @@ -45,7 +45,7 @@ export class DebugConfig { * ## Usage Notes * --- * - We recommend setting this flag during your app's initialization phase, such as in the - * `Application.onCreate` function on Android or equivalent initialization on iOS. + * application's entry point (e.g. `App.tsx`). * * @defaultValue `false` */ From a2d6bb1b90de5c55b571ccf0845ddf788b76b7fb Mon Sep 17 00:00:00 2001 From: Michele Pozzi <96702967+123mpozzi@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:48:15 +0100 Subject: [PATCH 19/29] Add missing class name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Roland Kákonyi --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e88279c6..77ff4290 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Added -- `isDebugLoggingEnabled` and `setDebugLogging(value: boolean)` to check and set whether debug logging is enabled. Debug logging helps diagnose problems and trace the flow of execution within the Player and **should not be enabled in production** as it may log sensitive or confidential information to the console. +- `DebugConfig.isDebugLoggingEnabled` and `DebugConfig.setDebugLogging(value: boolean)` to check and set whether debug logging is enabled. Debug logging helps diagnose problems and trace the flow of execution within the Player and **should not be enabled in production** as it may log sensitive or confidential information to the console. ## [0.32.0] - 2024-11-14 From 10b027f45ed357e4eccc9d4c7105ca3ec10ee15f Mon Sep 17 00:00:00 2001 From: Michele Pozzi <96702967+123mpozzi@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:48:45 +0100 Subject: [PATCH 20/29] Shortify branch with ternary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Roland Kákonyi --- ios/DebugModule.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ios/DebugModule.swift b/ios/DebugModule.swift index 70950476..ec04fbb2 100644 --- a/ios/DebugModule.swift +++ b/ios/DebugModule.swift @@ -27,12 +27,7 @@ extension DebugModule { @objc(setLoggingEnabled:) func setLoggingEnabled(enabled: Bool) { bridge.uiManager.addUIBlock { [weak self] _, _ in - let defaultMinimumLevel: LogLevel = .warning - if enabled { - DebugConfig.logging.logger?.level = .verbose - } else { - DebugConfig.logging.logger?.level = defaultMinimumLevel - } + DebugConfig.logging.logger?.level = enabled ? .verbose : .warning } } } From 6ccf48a777249ede7d1d107d255ee9b2320f0b77 Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 14:37:07 +0100 Subject: [PATCH 21/29] Rename setter --- CHANGELOG.md | 2 +- src/debug.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ff4290..bc4d3c81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Added -- `DebugConfig.isDebugLoggingEnabled` and `DebugConfig.setDebugLogging(value: boolean)` to check and set whether debug logging is enabled. Debug logging helps diagnose problems and trace the flow of execution within the Player and **should not be enabled in production** as it may log sensitive or confidential information to the console. +- `DebugConfig.isDebugLoggingEnabled` and `DebugConfig.setDebugLoggingEnabled(value: boolean)` to check and set whether debug logging is enabled. Debug logging helps diagnose problems and trace the flow of execution within the Player and **should not be enabled in production** as it may log sensitive or confidential information to the console. ## [0.32.0] - 2024-11-14 diff --git a/src/debug.ts b/src/debug.ts index 8ecff105..cbe0ee4f 100644 --- a/src/debug.ts +++ b/src/debug.ts @@ -49,7 +49,7 @@ export class DebugConfig { * * @defaultValue `false` */ - static async setDebugLogging(value: boolean): Promise { + static async setDebugLoggingEnabled(value: boolean): Promise { DebugConfig._isDebugEnabled = value; await DebugModule.setLoggingEnabled(value); } From d1b0ed2232af581273c5e7a03380f27d484d4a5e Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 14:39:27 +0100 Subject: [PATCH 22/29] Rename setter --- .../main/java/com/bitmovin/player/reactnative/DebugModule.kt | 2 +- ios/DebugModule.m | 2 +- ios/DebugModule.swift | 4 ++-- src/debug.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt b/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt index 5499d025..98cff642 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt @@ -15,7 +15,7 @@ class DebugModule(context: ReactApplicationContext) : BitmovinBaseModule(context * @param enabled Whether to set verbose logging as enabled or disabled. */ @ReactMethod - fun setLoggingEnabled(enabled: Boolean, promise: Promise) { + fun setDebugLoggingEnabled(enabled: Boolean, promise: Promise) { promise.unit.resolveOnUiThread { DebugConfig.isLoggingEnabled = enabled } diff --git a/ios/DebugModule.m b/ios/DebugModule.m index 321a9e8a..777bb0c8 100644 --- a/ios/DebugModule.m +++ b/ios/DebugModule.m @@ -2,6 +2,6 @@ @interface RCT_EXTERN_REMAP_MODULE(DebugModule, DebugModule, NSObject) -RCT_EXTERN_METHOD(setLoggingEnabled:(nonnull BOOL)enabled) +RCT_EXTERN_METHOD(setDebugLoggingEnabled:(nonnull BOOL)enabled) @end diff --git a/ios/DebugModule.swift b/ios/DebugModule.swift index ec04fbb2..341a7749 100644 --- a/ios/DebugModule.swift +++ b/ios/DebugModule.swift @@ -24,8 +24,8 @@ public class DebugModule: NSObject, RCTBridgeModule { extension DebugModule { /// Enable/disable verbose logging for the console logger. /// - Parameter enabled: Whether to set verbose logging as enabled or disabled. - @objc(setLoggingEnabled:) - func setLoggingEnabled(enabled: Bool) { + @objc(setDebugLoggingEnabled:) + func setDebugLoggingEnabled(enabled: Bool) { bridge.uiManager.addUIBlock { [weak self] _, _ in DebugConfig.logging.logger?.level = enabled ? .verbose : .warning } diff --git a/src/debug.ts b/src/debug.ts index cbe0ee4f..960dec72 100644 --- a/src/debug.ts +++ b/src/debug.ts @@ -51,6 +51,6 @@ export class DebugConfig { */ static async setDebugLoggingEnabled(value: boolean): Promise { DebugConfig._isDebugEnabled = value; - await DebugModule.setLoggingEnabled(value); + await DebugModule.setDebugLoggingEnabled(value); } } From a31fb1cad46a8704ca8ce79fb4e1b0ee5f1de29a Mon Sep 17 00:00:00 2001 From: Update Bot Date: Fri, 22 Nov 2024 14:20:22 +0000 Subject: [PATCH 23/29] chore(ios): update ios player version to 3.78.0 --- RNBitmovinPlayer.podspec | 2 +- example/ios/Podfile.lock | 16 ++++++++-------- integration_test/ios/Podfile.lock | 16 ++++++++-------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/RNBitmovinPlayer.podspec b/RNBitmovinPlayer.podspec index e95c6c06..a694737f 100644 --- a/RNBitmovinPlayer.podspec +++ b/RNBitmovinPlayer.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.swift_version = "5.10" s.dependency "React-Core" - s.dependency "BitmovinPlayer", "3.77.0" + s.dependency "BitmovinPlayer", "3.78.0" s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.23.0" s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.13.0" end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 0e6b187f..9e56f62c 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -3,10 +3,10 @@ PODS: - BitmovinAnalyticsCollector/Core - BitmovinPlayerCore (~> 3.48) - BitmovinAnalyticsCollector/Core (3.9.0) - - BitmovinPlayer (3.77.0): + - BitmovinPlayer (3.78.0): - BitmovinAnalyticsCollector/BitmovinPlayer (~> 3.0) - - BitmovinPlayerCore (= 3.77.0) - - BitmovinPlayerCore (3.77.0) + - BitmovinPlayerCore (= 3.78.0) + - BitmovinPlayerCore (3.78.0) - boost (1.83.0) - DoubleConversion (1.1.6) - FBLazyVector (0.73.4-0) @@ -1049,7 +1049,7 @@ PODS: - React-logger (= 0.73.4-0) - React-perflogger (= 0.73.4-0) - RNBitmovinPlayer (0.32.0): - - BitmovinPlayer (= 3.77.0) + - BitmovinPlayer (= 3.78.0) - GoogleAds-IMA-iOS-SDK (= 3.23.0) - GoogleAds-IMA-tvOS-SDK (= 4.13.0) - React-Core @@ -1245,8 +1245,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: BitmovinAnalyticsCollector: d08e0b13bcc32973370e0d71f2faa739561bac0a - BitmovinPlayer: 65866e13f7a8246ccbc7378607d6ca789f0f459e - BitmovinPlayerCore: 158b4a5b81b12b819f0f51b7b89711ca47e11583 + BitmovinPlayer: 7fc1bf0b32c540537c05664c7b60a559f1e47206 + BitmovinPlayerCore: 37cc7a3299af139f19a0e2e88c1f476821242cb0 boost: 88202336c3ba1e7a264a83c0c888784b0f360c28 DoubleConversion: 74cb0ce4de271b23e772567504735c87134edf0a FBLazyVector: 33a271a7e8de0bd321e47356d8bc3b2d5fb9ddba @@ -1301,7 +1301,7 @@ SPEC CHECKSUMS: React-runtimescheduler: 20b2202e3396589a71069d12ae9f328949c7c7b8 React-utils: 0307d396f233e47a167b5aaf045b0e4e1dc19d74 ReactCommon: 17891ca337bfa5a7263649b09f27a8c664537bf2 - RNBitmovinPlayer: b05649d62740361dd1d1030ce5926e49b4a471eb + RNBitmovinPlayer: 4078b6c4f222f09ca147ed5c51a5fa4a2fa21863 RNCPicker: b18aaf30df596e9b1738e7c1f9ee55402a229dca RNScreens: b582cb834dc4133307562e930e8fa914b8c04ef2 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 @@ -1309,4 +1309,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 11ac6cb62c1978622f6d687b574d9de3441a2680 -COCOAPODS: 1.16.2 +COCOAPODS: 1.15.2 diff --git a/integration_test/ios/Podfile.lock b/integration_test/ios/Podfile.lock index c5ee5b6b..a17582f6 100644 --- a/integration_test/ios/Podfile.lock +++ b/integration_test/ios/Podfile.lock @@ -3,10 +3,10 @@ PODS: - BitmovinAnalyticsCollector/Core - BitmovinPlayerCore (~> 3.48) - BitmovinAnalyticsCollector/Core (3.9.0) - - BitmovinPlayer (3.77.0): + - BitmovinPlayer (3.78.0): - BitmovinAnalyticsCollector/BitmovinPlayer (~> 3.0) - - BitmovinPlayerCore (= 3.77.0) - - BitmovinPlayerCore (3.77.0) + - BitmovinPlayerCore (= 3.78.0) + - BitmovinPlayerCore (3.78.0) - boost (1.83.0) - DoubleConversion (1.1.6) - FBLazyVector (0.73.4-0) @@ -1041,7 +1041,7 @@ PODS: - React-logger (= 0.73.4-0) - React-perflogger (= 0.73.4-0) - RNBitmovinPlayer (0.32.0): - - BitmovinPlayer (= 3.77.0) + - BitmovinPlayer (= 3.78.0) - GoogleAds-IMA-iOS-SDK (= 3.23.0) - GoogleAds-IMA-tvOS-SDK (= 4.13.0) - React-Core @@ -1215,8 +1215,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: BitmovinAnalyticsCollector: d08e0b13bcc32973370e0d71f2faa739561bac0a - BitmovinPlayer: 65866e13f7a8246ccbc7378607d6ca789f0f459e - BitmovinPlayerCore: 158b4a5b81b12b819f0f51b7b89711ca47e11583 + BitmovinPlayer: 7fc1bf0b32c540537c05664c7b60a559f1e47206 + BitmovinPlayerCore: 37cc7a3299af139f19a0e2e88c1f476821242cb0 boost: 88202336c3ba1e7a264a83c0c888784b0f360c28 DoubleConversion: 74cb0ce4de271b23e772567504735c87134edf0a FBLazyVector: 33a271a7e8de0bd321e47356d8bc3b2d5fb9ddba @@ -1266,10 +1266,10 @@ SPEC CHECKSUMS: React-runtimescheduler: 20b2202e3396589a71069d12ae9f328949c7c7b8 React-utils: 0307d396f233e47a167b5aaf045b0e4e1dc19d74 ReactCommon: 17891ca337bfa5a7263649b09f27a8c664537bf2 - RNBitmovinPlayer: b05649d62740361dd1d1030ce5926e49b4a471eb + RNBitmovinPlayer: 4078b6c4f222f09ca147ed5c51a5fa4a2fa21863 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: ab50eb8f7fcf1b36aad1801b5687b66b2c0aa000 PODFILE CHECKSUM: d1cd0316ec7219d421f4dfb46ced3af29fd4e932 -COCOAPODS: 1.16.2 +COCOAPODS: 1.15.2 From bb5c268579c4621feb0edfdab3305c5c9aee2372 Mon Sep 17 00:00:00 2001 From: Michele Pozzi <123.mpozzi@gmail.com> Date: Fri, 22 Nov 2024 12:55:16 +0100 Subject: [PATCH 24/29] Add missing `@MainActor` decorators --- ios/FullscreenHandlerModule.swift | 3 +++ ios/RNPlayerViewManager.swift | 1 + 2 files changed, 4 insertions(+) diff --git a/ios/FullscreenHandlerModule.swift b/ios/FullscreenHandlerModule.swift index 963b0cbd..54ba2d16 100644 --- a/ios/FullscreenHandlerModule.swift +++ b/ios/FullscreenHandlerModule.swift @@ -44,6 +44,7 @@ public class FullscreenHandlerModule: NSObject, RCTBridgeModule { fullscreenHandlers.removeValue(forKey: nativeId) } + @MainActor @objc(onFullscreenChanged:isFullscreenEnabled:) func onFullscreenChanged(_ nativeId: NativeId, isFullscreenEnabled: Bool) -> Any? { fullscreenHandlers[nativeId]?.isFullscreen = isFullscreenEnabled @@ -51,12 +52,14 @@ public class FullscreenHandlerModule: NSObject, RCTBridgeModule { return nil } + @MainActor @objc(registerHandler:) func registerHandler(_ nativeId: NativeId) { guard fullscreenHandlers[nativeId] == nil else { return } fullscreenHandlers[nativeId] = FullscreenHandlerBridge(nativeId, bridge: bridge) } + @MainActor @objc(setIsFullscreenActive:isFullscreen:) func setIsFullscreenActive(_ nativeId: NativeId, isFullscreen: Bool) { fullscreenHandlers[nativeId]?.isFullscreen = isFullscreen diff --git a/ios/RNPlayerViewManager.swift b/ios/RNPlayerViewManager.swift index 96390e3f..99e96877 100644 --- a/ios/RNPlayerViewManager.swift +++ b/ios/RNPlayerViewManager.swift @@ -200,6 +200,7 @@ public class RNPlayerViewManager: RCTViewManager { bridge.module(for: FullscreenHandlerModule.self) as? FullscreenHandlerModule } + @MainActor private func maybeEmitPictureInPictureAvailabilityEvent(for view: RNPlayerView, previousState: Bool) { guard let playerView = view.playerView, playerView.isPictureInPictureAvailable != previousState else { From 80cdfa0fd64adb33a6271b4a5f9624efcfb87e87 Mon Sep 17 00:00:00 2001 From: Roland Kakonyi Date: Mon, 25 Nov 2024 08:49:07 +0100 Subject: [PATCH 25/29] add changelog entry --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c074951..94d956b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Changed + +- Update Bitmovin's native iOS SDK version to `3.78.0` + ## [0.32.0] - 2024-11-14 ### Added From 450448a8552a463a743e2d2fdae9784d20d744cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:08:50 +0000 Subject: [PATCH 26/29] Bump cross-spawn from 7.0.3 to 7.0.6 in /integration_test Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] --- integration_test/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration_test/yarn.lock b/integration_test/yarn.lock index b8d1f068..4d9cbd09 100644 --- a/integration_test/yarn.lock +++ b/integration_test/yarn.lock @@ -2252,9 +2252,9 @@ cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: parse-json "^4.0.0" cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" From 2c1b246f25b22a49ac3cda6358a2098e92b0bf6c Mon Sep 17 00:00:00 2001 From: Update Bot Date: Mon, 25 Nov 2024 10:53:13 +0000 Subject: [PATCH 27/29] chore(android): update android player version to 3.94.0+jason --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 16d24458..747db3d9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -105,6 +105,6 @@ dependencies { // Bitmovin implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.33.0' implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' - implementation 'com.bitmovin.player:player:3.93.0+jason' - implementation 'com.bitmovin.player:player-media-session:3.92.0+jason' + implementation 'com.bitmovin.player:player:3.94.0+jason' + implementation 'com.bitmovin.player:player-media-session:3.94.0+jason' } From 01ea42b5c4f4fe85f8efb94bbd0f7704c8ce6d90 Mon Sep 17 00:00:00 2001 From: Bitmovin Release Automation Date: Thu, 28 Nov 2024 09:55:36 +0000 Subject: [PATCH 28/29] prepare release 0.33.0 --- CHANGELOG.md | 2 +- example/ios/Podfile.lock | 6 +++--- integration_test/ios/Podfile.lock | 6 +++--- package.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f693e8a..caff47f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [Unreleased] +## [0.33.0] ### Added diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 9e56f62c..d474db36 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1048,7 +1048,7 @@ PODS: - React-jsi (= 0.73.4-0) - React-logger (= 0.73.4-0) - React-perflogger (= 0.73.4-0) - - RNBitmovinPlayer (0.32.0): + - RNBitmovinPlayer (0.33.0): - BitmovinPlayer (= 3.78.0) - GoogleAds-IMA-iOS-SDK (= 3.23.0) - GoogleAds-IMA-tvOS-SDK (= 4.13.0) @@ -1301,7 +1301,7 @@ SPEC CHECKSUMS: React-runtimescheduler: 20b2202e3396589a71069d12ae9f328949c7c7b8 React-utils: 0307d396f233e47a167b5aaf045b0e4e1dc19d74 ReactCommon: 17891ca337bfa5a7263649b09f27a8c664537bf2 - RNBitmovinPlayer: 4078b6c4f222f09ca147ed5c51a5fa4a2fa21863 + RNBitmovinPlayer: 2b6f5929e0469976e262679a092077483d4a0c37 RNCPicker: b18aaf30df596e9b1738e7c1f9ee55402a229dca RNScreens: b582cb834dc4133307562e930e8fa914b8c04ef2 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 @@ -1309,4 +1309,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 11ac6cb62c1978622f6d687b574d9de3441a2680 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/integration_test/ios/Podfile.lock b/integration_test/ios/Podfile.lock index a17582f6..7f238211 100644 --- a/integration_test/ios/Podfile.lock +++ b/integration_test/ios/Podfile.lock @@ -1040,7 +1040,7 @@ PODS: - React-jsi (= 0.73.4-0) - React-logger (= 0.73.4-0) - React-perflogger (= 0.73.4-0) - - RNBitmovinPlayer (0.32.0): + - RNBitmovinPlayer (0.33.0): - BitmovinPlayer (= 3.78.0) - GoogleAds-IMA-iOS-SDK (= 3.23.0) - GoogleAds-IMA-tvOS-SDK (= 4.13.0) @@ -1266,10 +1266,10 @@ SPEC CHECKSUMS: React-runtimescheduler: 20b2202e3396589a71069d12ae9f328949c7c7b8 React-utils: 0307d396f233e47a167b5aaf045b0e4e1dc19d74 ReactCommon: 17891ca337bfa5a7263649b09f27a8c664537bf2 - RNBitmovinPlayer: 4078b6c4f222f09ca147ed5c51a5fa4a2fa21863 + RNBitmovinPlayer: 2b6f5929e0469976e262679a092077483d4a0c37 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: ab50eb8f7fcf1b36aad1801b5687b66b2c0aa000 PODFILE CHECKSUM: d1cd0316ec7219d421f4dfb46ced3af29fd4e932 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/package.json b/package.json index aadaf457..0d730f53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bitmovin-player-react-native", - "version": "0.32.0", + "version": "0.33.0", "description": "Official React Native bindings for Bitmovin's mobile Player SDKs.", "main": "lib/index.js", "module": "lib/index.mjs", From e98297264644bd51ef081e1577f78c92a41a3862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20K=C3=A1konyi?= Date: Thu, 28 Nov 2024 11:07:22 +0100 Subject: [PATCH 29/29] Update CHANGELOG.md --- CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index caff47f3..d1f239b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,18 +4,16 @@ ### Added +- Android: `TweaksConfig.forceReuseVideoCodecReasons` that allows to force the reuse of the video codec despite a configuration change. This flag should be set only, if it is known that the codec can handle the given configuration change. - `DebugConfig.isDebugLoggingEnabled` and `DebugConfig.setDebugLoggingEnabled(value: boolean)` to check and set whether debug logging is enabled. Debug logging helps diagnose problems and trace the flow of execution within the Player and **should not be enabled in production** as it may log sensitive or confidential information to the console. ### Changed - Update Bitmovin's native iOS SDK version to `3.78.0` +- Update Bitmovin's native Android SDK version to `3.94.0` ## [0.32.0] - 2024-11-14 -### Added - -- Android: `TweaksConfig.forceReuseVideoCodecReasons` that allows to force the reuse of the video codec despite a configuration change. This flag should be set only, if it is known that the codec can handle the given configuration change - ### Changed - Update Bitmovin's native Android SDK version to `3.92.0`