Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Added support on iOS to push the initial state of the player from the iOS bridge to the React native adapter.
- Added functionality to sync the player state from the native, mobile players to the react native adapter.
- Trigger an update for the iOS control centers (nowPlayingInfo and remoteCommands) to reflect a player state sync.

### Fixed

Expand Down
5 changes: 5 additions & 0 deletions ios/THEOplayerRCTView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ public class THEOplayerRCTView: UIView {
if let forwardedPlayerStateSync = self.onNativePlayerStateSync {
forwardedPlayerStateSync(["state": self.collectPlayerStatePayload()])
}

// trigger different feature managers to reflect the current state
self.nowPlayingManager.updateNowPlaying()
self.remoteCommandsManager.updateRemoteCommands()
self.pipControlsManager.updatePipControls()
}

// MARK: - Property bridging (config)
Expand Down
2 changes: 1 addition & 1 deletion ios/pip/THEOplayerRCTPipControlsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class THEOplayerRCTPipControlsManager: NSObject {
}
}

private func updatePipControls() {
func updatePipControls() {
if let player = self.player,
let pip = player.pip {
pip.configure(configuration: self.newPipConfiguration())
Expand Down
Loading