react-native-theoplayer 8.8.0 → 8.8.1

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
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [8.8.1] - 24-11-20
9
+
10
+ ### Fixed
11
+
12
+ - Fixed build issue on tvOS caused by HomeIndicatorViewController
13
+
8
14
  ## [8.8.0] - 24-11-19
9
15
 
10
16
  ### Added
@@ -66,21 +66,14 @@ public class THEOplayerRCTPresentationModeManager {
66
66
  self.moveView(containerView, to: fullscreenParentView)
67
67
 
68
68
  // start hiding home indicator
69
- if let customRootViewController = fullscreenParentView.findViewController() as? HomeIndicatorViewController {
70
- customRootViewController.prefersAutoHidden = true
71
- customRootViewController.setNeedsUpdateOfHomeIndicatorAutoHidden()
72
- }
69
+ setHomeIndicatorHidden(true)
73
70
  }
74
71
  self.rnInlineMode = .fullscreen
75
72
  }
76
73
 
77
74
  private func exitFullscreen() {
78
75
  // stop hiding home indicator
79
- if let fullscreenParentView = self.view?.findParentViewOfType(RCTRootContentView.self),
80
- let customRootViewController = fullscreenParentView.findViewController() as? HomeIndicatorViewController {
81
- customRootViewController.prefersAutoHidden = false
82
- customRootViewController.setNeedsUpdateOfHomeIndicatorAutoHidden()
83
- }
76
+ setHomeIndicatorHidden(false)
84
77
 
85
78
  // move the player
86
79
  if let containerView = self.containerView,
@@ -89,6 +82,16 @@ public class THEOplayerRCTPresentationModeManager {
89
82
  }
90
83
  self.rnInlineMode = .inline
91
84
  }
85
+
86
+ private func setHomeIndicatorHidden(_ hidden: Bool) {
87
+ #if os(iOS)
88
+ if let fullscreenParentView = self.view?.findParentViewOfType(RCTRootContentView.self),
89
+ let customRootViewController = fullscreenParentView.findViewController() as? HomeIndicatorViewController {
90
+ customRootViewController.prefersAutoHidden = hidden
91
+ customRootViewController.setNeedsUpdateOfHomeIndicatorAutoHidden()
92
+ }
93
+ #endif
94
+ }
92
95
 
93
96
  func setPresentationModeFromRN(newPresentationMode: THEOplayerSDK.PresentationMode) {
94
97
  guard newPresentationMode != self.presentationMode else { return }
@@ -6,9 +6,11 @@ import UIKit
6
6
  public class HomeIndicatorViewController: UIViewController {
7
7
  public var prefersAutoHidden = false
8
8
 
9
+ #if os(iOS)
9
10
  public override var prefersHomeIndicatorAutoHidden: Bool {
10
11
  get {
11
12
  return self.prefersAutoHidden
12
13
  }
13
14
  }
15
+ #endif
14
16
  }
@@ -1 +1 @@
1
- {"version":"8.8.0","buildDate":"2024-11-19T15:05:29.967Z"}
1
+ {"version":"8.8.1","buildDate":"2024-11-20T11:12:07.095Z"}
@@ -1 +1 @@
1
- {"version":"8.8.0","buildDate":"2024-11-19T15:05:29.967Z"}
1
+ {"version":"8.8.1","buildDate":"2024-11-20T11:12:07.095Z"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-theoplayer",
3
- "version": "8.8.0",
3
+ "version": "8.8.1",
4
4
  "description": "A THEOplayer video component for react-native.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/manifest.json CHANGED
@@ -1 +1 @@
1
- {"version":"8.8.0","buildDate":"2024-11-19T15:05:29.967Z"}
1
+ {"version":"8.8.1","buildDate":"2024-11-20T11:12:07.095Z"}