Skip to content

Commit

Permalink
Merge branch 'develop' into feature/ios-hide-home-indicator-in-fullsc…
Browse files Browse the repository at this point in the history
…reen
  • Loading branch information
wvanhaevre authored Nov 19, 2024
2 parents 305af34 + 2c8aa0a commit 50e8e34
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed

- Simplified the viewController reparenting mechanism on iOS that is applied when changing the presentationMode to/from fullscreen.
- The `MediaPlaybackService` on Android is never restarted if a MediaButton event is received after the app was closed.
- Added a consumer R8 config file on Android, telling R8 not to throw errors or warnings because of classes that are expected to be missing.
- Simplified the viewController reparenting mechanism on iOS that is applied when changing the `presentationMode` to/from fullscreen.

## [8.7.0] - 24-11-05

Expand Down
2 changes: 2 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ android {
buildConfigField "boolean", "EXTENSION_ADS", "${enabledAds}"
buildConfigField "boolean", "EXTENSION_CAST", "${enabledCast}"
buildConfigField "boolean", "EXTENSION_MEDIASESSION", "${enabledMediaSession}"

consumerProguardFiles 'proguard-rules.pro'
}

buildTypes {
Expand Down
3 changes: 3 additions & 0 deletions android/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Do no warn if any of the API classes we resolve with compileOnly are missing because the feature
# is disabled: it is expected.
-dontwarn com.theoplayer.android.api.**
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ class ReactTHEOplayerContext private constructor(
// Create and initialize the media session
val mediaSession = MediaSessionCompat(reactContext, TAG)

// Do not let MediaButtons restart the player when the app is not visible
// Do not let MediaButtons restart the player when media session is not active.
// https://developer.android.com/media/legacy/media-buttons#restarting-inactive-mediasessions
mediaSession.setMediaButtonReceiver(null)

// Create a MediaSessionConnector and attach the THEOplayer instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ class MediaPlaybackService : Service() {

// Set mediaSession active
setActive(BuildConfig.EXTENSION_MEDIASESSION)

// Do not let MediaButtons restart the player when media session is not active.
// https://developer.android.com/media/legacy/media-buttons#restarting-inactive-mediasessions
mediaSession.setMediaButtonReceiver(null)
}
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ react {
/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
def enableProguardInReleaseBuilds = true

/**
* The preferred build flavor of JavaScriptCore (JSC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class THEOplayerRCTPresentationModeManager {
if let containerView = self.containerView,
let fullscreenParentView = self.view?.findParentViewOfType(RCTRootContentView.self) {
self.moveView(containerView, to: fullscreenParentView)

// start hiding home indicator
if let customRootViewController = fullscreenParentView.findViewController() as? HomeIndicatorViewController {
customRootViewController.prefersAutoHidden = true
Expand Down

0 comments on commit 50e8e34

Please sign in to comment.