Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tvos): fix build (and update sample) #4134

Merged
merged 2 commits into from
Sep 2, 2024
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
10 changes: 5 additions & 5 deletions examples/exampletvOS/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ PODS:
- React-jsinspector (0.71.12-0)
- React-logger (0.71.12-0):
- glog
- react-native-video (6.0.0):
- react-native-video (6.4.5):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-video/Video (= 6.0.0)
- react-native-video/Video (6.0.0):
- react-native-video/Video (= 6.4.5)
- react-native-video/Video (6.4.5):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-perflogger (0.71.12-0)
Expand Down Expand Up @@ -592,7 +592,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 0c8c5e8b2171be52295f59097923babf84d1cf66
React-jsinspector: f8e6919523047a9bd1270ade75b4eca0108963b4
React-logger: 16c56636d4209cc204d06c5ba347cee21b960012
react-native-video: fc60911540a69935cc7950829163f6f41259cb0d
react-native-video: fdcfbf66416475f8e122be9f7d72dd1d156ef3ed
React-perflogger: 355109dc9d6f34e35bc35dabb32310f8ed2d29a2
React-RCTActionSheet: 9d1be4d43972f2aae4b31d9e53ffb030115fa445
React-RCTAnimation: aab7e1ecd325db67e1f2a947d85a52adf86594b7
Expand All @@ -609,6 +609,6 @@ SPEC CHECKSUMS:
Yoga: 8b8c06e142662150974d1c70b4c5ffb08eb468db
YogaKit: 1e22bf2228b3a5ac8cc88965153061ae92c494b5

PODFILE CHECKSUM: 26d254806a611a4bc6b6c39cff790dd08f770ccf
PODFILE CHECKSUM: e20830ba1d59fa52a9075c08861e37e5f2ac113c

COCOAPODS: 1.15.2
23 changes: 12 additions & 11 deletions ios/Video/RCTVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -498,18 +498,19 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
NowPlayingInfoCenterManager.shared.registerPlayer(player: _player!)
}
} else {
if #available(iOS 16.0, *) {
// This feature caused crashes, if the app was put in bg, before the source change
// https://github.com/TheWidlarzGroup/react-native-video/issues/3900
self._playerViewController?.allowsVideoFrameAnalysis = false
}

#if !os(tvOS)
if #available(iOS 16.0, *) {
// This feature caused crashes, if the app was put in bg, before the source change
// https://github.com/TheWidlarzGroup/react-native-video/issues/3900
self._playerViewController?.allowsVideoFrameAnalysis = false
}
#endif
_player?.replaceCurrentItem(with: playerItem)

if #available(iOS 16.0, *) {
self._playerViewController?.allowsVideoFrameAnalysis = true
}

#if !os(tvOS)
if #available(iOS 16.0, *) {
self._playerViewController?.allowsVideoFrameAnalysis = true
}
#endif
// later we can just call "updateNowPlayingInfo:
NowPlayingInfoCenterManager.shared.updateNowPlayingInfo()
}
Expand Down
Loading