Skip to content

Commit

Permalink
Merge pull request #444 from THEOplayer/release/v8.8.1
Browse files Browse the repository at this point in the history
Release/v8.8.1
  • Loading branch information
wvanhaevre authored Nov 20, 2024
2 parents ab99829 + 28137c5 commit 70f71f0
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [8.8.1] - 24-11-20

### Fixed

- Fixed build issue on tvOS caused by HomeIndicatorViewController

## [8.8.0] - 24-11-19

### Added
Expand Down
6 changes: 3 additions & 3 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions ios/presentationMode/THEOplayerRCTPresentationModeManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,14 @@ public class THEOplayerRCTPresentationModeManager {
self.moveView(containerView, to: fullscreenParentView)

// start hiding home indicator
if let customRootViewController = fullscreenParentView.findViewController() as? HomeIndicatorViewController {
customRootViewController.prefersAutoHidden = true
customRootViewController.setNeedsUpdateOfHomeIndicatorAutoHidden()
}
setHomeIndicatorHidden(true)
}
self.rnInlineMode = .fullscreen
}

private func exitFullscreen() {
// stop hiding home indicator
if let fullscreenParentView = self.view?.findParentViewOfType(RCTRootContentView.self),
let customRootViewController = fullscreenParentView.findViewController() as? HomeIndicatorViewController {
customRootViewController.prefersAutoHidden = false
customRootViewController.setNeedsUpdateOfHomeIndicatorAutoHidden()
}
setHomeIndicatorHidden(false)

// move the player
if let containerView = self.containerView,
Expand All @@ -89,6 +82,16 @@ public class THEOplayerRCTPresentationModeManager {
}
self.rnInlineMode = .inline
}

private func setHomeIndicatorHidden(_ hidden: Bool) {
#if os(iOS)
if let fullscreenParentView = self.view?.findParentViewOfType(RCTRootContentView.self),
let customRootViewController = fullscreenParentView.findViewController() as? HomeIndicatorViewController {
customRootViewController.prefersAutoHidden = hidden
customRootViewController.setNeedsUpdateOfHomeIndicatorAutoHidden()
}
#endif
}

func setPresentationModeFromRN(newPresentationMode: THEOplayerSDK.PresentationMode) {
guard newPresentationMode != self.presentationMode else { return }
Expand Down
2 changes: 2 additions & 0 deletions ios/viewController/HomeIndicatorViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import UIKit
public class HomeIndicatorViewController: UIViewController {
public var prefersAutoHidden = false

#if os(iOS)
public override var prefersHomeIndicatorAutoHidden: Bool {
get {
return self.prefersAutoHidden
}
}
#endif
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-theoplayer",
"version": "8.8.0",
"version": "8.8.1",
"description": "A THEOplayer video component for react-native.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit 70f71f0

Please sign in to comment.