Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.32.0 #562

Merged
merged 12 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [0.32.0]

### Changed

- Update Bitmovin's native Android SDK version to `3.92.0`

### Fixed

- Error where setting `PlaybackConfig.isAutoplayEnabled = true` causes the player view creation to fail on Android
- Potential infinite stall when using `NetworkConfig.preprocessHttpRequest` and `NetworkConfig.preprocessHttpResponse` on Android

## [0.31.0] - 2024-11-07

### Added
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.91.0+jason'
implementation 'com.bitmovin.player:player-media-session:3.91.0+jason'
implementation 'com.bitmovin.player:player:3.92.0+jason'
implementation 'com.bitmovin.player:player-media-session:3.92.0+jason'
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.bitmovin.player.reactnative

import android.util.Log
import androidx.concurrent.futures.CallbackToFutureAdapter
import androidx.concurrent.futures.CallbackToFutureAdapter.Completer
import com.bitmovin.player.api.network.HttpRequest
Expand All @@ -14,6 +15,7 @@ import com.bitmovin.player.reactnative.converter.toJson
import com.bitmovin.player.reactnative.converter.toNetworkConfig
import com.facebook.react.bridge.*
import com.facebook.react.module.annotations.ReactModule
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.Future

private const val MODULE_NAME = "NetworkModule"
Expand All @@ -25,8 +27,9 @@ class NetworkModule(context: ReactApplicationContext) : BitmovinBaseModule(conte
* In-memory mapping from `nativeId`s to `NetworkConfig` instances.
*/
private val networkConfigs: Registry<NetworkConfig> = mutableMapOf()
private val preprocessHttpRequestCompleters: MutableMap<String, Completer<HttpRequest>> = mutableMapOf()
private val preprocessHttpResponseCompleters: MutableMap<String, Completer<HttpResponse>> = mutableMapOf()
private val preprocessHttpRequestCompleters = ConcurrentHashMap<String, Completer<HttpRequest>>()
private val preprocessHttpResponseCompleters = ConcurrentHashMap<String, Completer<HttpResponse>>()

override fun getName() = MODULE_NAME

fun getConfig(nativeId: NativeId?): NetworkConfig? = nativeId?.let { networkConfigs[it] }
Expand Down Expand Up @@ -94,9 +97,14 @@ class NetworkModule(context: ReactApplicationContext) : BitmovinBaseModule(conte

@ReactMethod
fun setPreprocessedHttpRequest(requestId: String, request: ReadableMap) {
preprocessHttpRequestCompleters[requestId]?.set(request.toHttpRequest())
preprocessHttpRequestCompleters.remove(requestId)
val completer = preprocessHttpRequestCompleters.remove(requestId)
if (completer == null) {
Log.e(MODULE_NAME, "Completer is null for requestId: $requestId, this can cause stuck network requests")
return
}
completer.set(request.toHttpRequest())
}

private fun preprocessHttpResponseFromJS(
nativeId: NativeId,
type: HttpRequestType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class RNPlayerViewManager(private val context: ReactApplicationContext) : Simple
val playbackConfig = playerConfig?.getMap("playbackConfig")
val isPictureInPictureEnabled = view.config?.pictureInPictureConfig?.isEnabled == true ||
playbackConfig?.getBooleanOrNull("isPictureInPictureEnabled") == true
view.enableBackgroundPlayback = playbackConfig?.getBoolean("isBackgroundPlaybackEnabled") ?: false
view.enableBackgroundPlayback = playbackConfig?.getBooleanOrNull("isBackgroundPlaybackEnabled") == true

val rnStyleConfigWrapper = playerConfig?.toRNStyleConfigWrapperFromPlayerConfig()
val configuredPlayerViewConfig = view.config?.playerViewConfig ?: PlayerViewConfig()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Intent
import android.os.Binder
import android.os.IBinder
import com.bitmovin.player.api.Player
import com.bitmovin.player.api.media.session.ControllerInfo
import com.bitmovin.player.api.media.session.MediaSession
import com.bitmovin.player.api.media.session.MediaSessionService

Expand All @@ -29,7 +30,7 @@ class MediaSessionPlaybackService : MediaSessionService() {
private val binder = ServiceBinder()
private var mediaSession: MediaSession? = null

override fun onGetSession(): MediaSession? = null
override fun onGetSession(controllerInfo: ControllerInfo) = null

override fun onDestroy() {
disconnectSession()
Expand Down
6 changes: 3 additions & 3 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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.31.0):
- RNBitmovinPlayer (0.32.0):
- BitmovinPlayer (= 3.77.0)
- GoogleAds-IMA-iOS-SDK (= 3.23.0)
- GoogleAds-IMA-tvOS-SDK (= 4.13.0)
Expand Down Expand Up @@ -1301,12 +1301,12 @@ SPEC CHECKSUMS:
React-runtimescheduler: 20b2202e3396589a71069d12ae9f328949c7c7b8
React-utils: 0307d396f233e47a167b5aaf045b0e4e1dc19d74
ReactCommon: 17891ca337bfa5a7263649b09f27a8c664537bf2
RNBitmovinPlayer: a706e0f5a1a595271feda6d1fc9a9a7ff6d94104
RNBitmovinPlayer: b05649d62740361dd1d1030ce5926e49b4a471eb
RNCPicker: b18aaf30df596e9b1738e7c1f9ee55402a229dca
RNScreens: b582cb834dc4133307562e930e8fa914b8c04ef2
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: ab50eb8f7fcf1b36aad1801b5687b66b2c0aa000

PODFILE CHECKSUM: 11ac6cb62c1978622f6d687b574d9de3441a2680

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
6 changes: 3 additions & 3 deletions integration_test/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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.31.0):
- RNBitmovinPlayer (0.32.0):
- BitmovinPlayer (= 3.77.0)
- GoogleAds-IMA-iOS-SDK (= 3.23.0)
- GoogleAds-IMA-tvOS-SDK (= 4.13.0)
Expand Down Expand Up @@ -1266,10 +1266,10 @@ SPEC CHECKSUMS:
React-runtimescheduler: 20b2202e3396589a71069d12ae9f328949c7c7b8
React-utils: 0307d396f233e47a167b5aaf045b0e4e1dc19d74
ReactCommon: 17891ca337bfa5a7263649b09f27a8c664537bf2
RNBitmovinPlayer: a706e0f5a1a595271feda6d1fc9a9a7ff6d94104
RNBitmovinPlayer: b05649d62740361dd1d1030ce5926e49b4a471eb
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: ab50eb8f7fcf1b36aad1801b5687b66b2c0aa000

PODFILE CHECKSUM: d1cd0316ec7219d421f4dfb46ced3af29fd4e932

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
4 changes: 2 additions & 2 deletions integration_test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"test:android": "yarn stop-test:android && yarn start-test:android",
"test:ios": "yarn stop-test:ios && yarn start-test:ios",
"pods": "yarn pods-install || yarn pods-update",
"pods-install": "NO_FLIPPER=1 yarn pod-install",
"pods-update": "cd ios && NO_FLIPPER=1 pod update --silent"
"pods-install": "[ \"$(uname)\" != Darwin ] || NO_FLIPPER=1 yarn pod-install",
"pods-update": "[ \"$(uname)\" != Darwin ] || cd ios && NO_FLIPPER=1 pod update --silent"
},
"dependencies": {
"@types/react": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bitmovin-player-react-native",
"version": "0.31.0",
"version": "0.32.0",
"description": "Official React Native bindings for Bitmovin's mobile Player SDKs.",
"main": "lib/index.js",
"module": "lib/index.mjs",
Expand Down
Loading