bitmovin-player-react-native 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.0] - 2025-11-06
4
+
5
+ ### Changed
6
+
7
+ - Update Bitmovin's native Android SDK version to `3.132.1+jason`
8
+ - Update Bitmovin's native iOS SDK version to `3.98.0`
9
+
10
+ ### Fixed
11
+
12
+ - iOS: race condition causing invalid initial state for full screen button on `PlayerView`
13
+
3
14
  ## [1.3.0] - 2025-10-29
4
15
 
5
16
  ### Added
@@ -108,6 +108,6 @@ dependencies {
108
108
 
109
109
  // Bitmovin
110
110
  implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
111
- implementation 'com.bitmovin.player:player:3.131.0+jason'
112
- implementation 'com.bitmovin.player:player-media-session:3.131.0+jason'
111
+ implementation 'com.bitmovin.player:player:3.132.1+jason'
112
+ implementation 'com.bitmovin.player:player-media-session:3.132.1+jason'
113
113
  }
@@ -12,30 +12,46 @@ public class FullscreenHandlerModule: Module {
12
12
  /// ResultWaiter used for blocking thread while waiting for fullscreen state change
13
13
  private let waiter = ResultWaiter<Bool>()
14
14
 
15
+ private var fullscreenActiveUpdateBuffer = LockedBox(value: [NativeId: Bool]())
16
+
15
17
  public func definition() -> ModuleDefinition {
16
18
  Name("FullscreenHandlerModule")
17
19
 
18
20
  OnDestroy {
19
21
  fullscreenHandlers.removeAll()
20
22
  waiter.removeAll()
23
+ fullscreenActiveUpdateBuffer.update { value in
24
+ value.removeAll()
25
+ }
21
26
  }
22
27
 
23
28
  Events("onEnterFullscreen", "onExitFullscreen")
24
29
 
25
30
  AsyncFunction("registerHandler") { (nativeId: NativeId) in
26
31
  DispatchQueue.main.async { [weak self] in
27
- guard let self, self.fullscreenHandlers[nativeId] == nil else {
32
+ guard let self, fullscreenHandlers[nativeId] == nil else {
28
33
  return
29
34
  }
30
- self.fullscreenHandlers[nativeId] = FullscreenHandlerBridge(
35
+ let handler = FullscreenHandlerBridge(
31
36
  nativeId,
32
37
  moduleRegistry: appContext?.moduleRegistry
33
38
  )
39
+ if let isFullscreen = fullscreenActiveUpdateBuffer.value[nativeId] {
40
+ // Apply buffered value
41
+ handler.isFullscreenValueBox.update(isFullscreen)
42
+ fullscreenActiveUpdateBuffer.update { value in
43
+ value.removeValue(forKey: nativeId)
44
+ }
45
+ }
46
+ fullscreenHandlers[nativeId] = handler
34
47
  }
35
48
  }.runOnQueue(.main)
36
49
 
37
50
  AsyncFunction("destroy") { [weak self] (nativeId: NativeId) in
38
51
  self?.fullscreenHandlers.removeValue(forKey: nativeId)
52
+ self?.fullscreenActiveUpdateBuffer.update { value in
53
+ value.removeValue(forKey: nativeId)
54
+ }
39
55
  }.runOnQueue(.main)
40
56
 
41
57
  AsyncFunction("notifyFullscreenChanged") { [weak self] (id: Int, isFullscreenEnabled: Bool) in
@@ -43,7 +59,14 @@ public class FullscreenHandlerModule: Module {
43
59
  }
44
60
 
45
61
  AsyncFunction("setIsFullscreenActive") { [weak self] (nativeId: NativeId, isFullscreen: Bool) in
46
- self?.fullscreenHandlers[nativeId]?.isFullscreenValueBox.update(isFullscreen)
62
+ guard let handler = self?.fullscreenHandlers[nativeId] else {
63
+ // Buffer the value until the handler is registered
64
+ self?.fullscreenActiveUpdateBuffer.update { value in
65
+ value[nativeId] = isFullscreen
66
+ }
67
+ return
68
+ }
69
+ handler.isFullscreenValueBox.update(isFullscreen)
47
70
  }.runOnQueue(.main)
48
71
  }
49
72
 
@@ -18,4 +18,10 @@ internal class LockedBox<T> {
18
18
  self._value = value
19
19
  }
20
20
  }
21
+
22
+ func update(_ updateBlock: (inout T) -> Void) {
23
+ lock.withLock {
24
+ updateBlock(&self._value)
25
+ }
26
+ }
21
27
  }
@@ -28,7 +28,7 @@ Pod::Spec.new do |s|
28
28
  s.static_framework = true
29
29
 
30
30
  s.dependency 'ExpoModulesCore'
31
- s.dependency "BitmovinPlayer", "3.97.2"
31
+ s.dependency "BitmovinPlayer", "3.98.0"
32
32
  s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.26.1"
33
33
  s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.15.1"
34
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitmovin-player-react-native",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Official React Native bindings for Bitmovin's mobile Player SDKs.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",