fix(tvos): fix build (and update sample) (#4134)
* fix(tvos): fix build (and update sample)
This commit is contained in:
		@@ -316,11 +316,11 @@ PODS:
 | 
				
			|||||||
  - React-jsinspector (0.71.12-0)
 | 
					  - React-jsinspector (0.71.12-0)
 | 
				
			||||||
  - React-logger (0.71.12-0):
 | 
					  - React-logger (0.71.12-0):
 | 
				
			||||||
    - glog
 | 
					    - glog
 | 
				
			||||||
  - react-native-video (6.0.0):
 | 
					  - react-native-video (6.4.5):
 | 
				
			||||||
    - RCT-Folly (= 2021.07.22.00)
 | 
					    - RCT-Folly (= 2021.07.22.00)
 | 
				
			||||||
    - React-Core
 | 
					    - React-Core
 | 
				
			||||||
    - react-native-video/Video (= 6.0.0)
 | 
					    - react-native-video/Video (= 6.4.5)
 | 
				
			||||||
  - react-native-video/Video (6.0.0):
 | 
					  - react-native-video/Video (6.4.5):
 | 
				
			||||||
    - RCT-Folly (= 2021.07.22.00)
 | 
					    - RCT-Folly (= 2021.07.22.00)
 | 
				
			||||||
    - React-Core
 | 
					    - React-Core
 | 
				
			||||||
  - React-perflogger (0.71.12-0)
 | 
					  - React-perflogger (0.71.12-0)
 | 
				
			||||||
@@ -592,7 +592,7 @@ SPEC CHECKSUMS:
 | 
				
			|||||||
  React-jsiexecutor: 0c8c5e8b2171be52295f59097923babf84d1cf66
 | 
					  React-jsiexecutor: 0c8c5e8b2171be52295f59097923babf84d1cf66
 | 
				
			||||||
  React-jsinspector: f8e6919523047a9bd1270ade75b4eca0108963b4
 | 
					  React-jsinspector: f8e6919523047a9bd1270ade75b4eca0108963b4
 | 
				
			||||||
  React-logger: 16c56636d4209cc204d06c5ba347cee21b960012
 | 
					  React-logger: 16c56636d4209cc204d06c5ba347cee21b960012
 | 
				
			||||||
  react-native-video: fc60911540a69935cc7950829163f6f41259cb0d
 | 
					  react-native-video: fdcfbf66416475f8e122be9f7d72dd1d156ef3ed
 | 
				
			||||||
  React-perflogger: 355109dc9d6f34e35bc35dabb32310f8ed2d29a2
 | 
					  React-perflogger: 355109dc9d6f34e35bc35dabb32310f8ed2d29a2
 | 
				
			||||||
  React-RCTActionSheet: 9d1be4d43972f2aae4b31d9e53ffb030115fa445
 | 
					  React-RCTActionSheet: 9d1be4d43972f2aae4b31d9e53ffb030115fa445
 | 
				
			||||||
  React-RCTAnimation: aab7e1ecd325db67e1f2a947d85a52adf86594b7
 | 
					  React-RCTAnimation: aab7e1ecd325db67e1f2a947d85a52adf86594b7
 | 
				
			||||||
@@ -609,6 +609,6 @@ SPEC CHECKSUMS:
 | 
				
			|||||||
  Yoga: 8b8c06e142662150974d1c70b4c5ffb08eb468db
 | 
					  Yoga: 8b8c06e142662150974d1c70b4c5ffb08eb468db
 | 
				
			||||||
  YogaKit: 1e22bf2228b3a5ac8cc88965153061ae92c494b5
 | 
					  YogaKit: 1e22bf2228b3a5ac8cc88965153061ae92c494b5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PODFILE CHECKSUM: 26d254806a611a4bc6b6c39cff790dd08f770ccf
 | 
					PODFILE CHECKSUM: e20830ba1d59fa52a9075c08861e37e5f2ac113c
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COCOAPODS: 1.15.2
 | 
					COCOAPODS: 1.15.2
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -498,18 +498,19 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
 | 
				
			|||||||
                NowPlayingInfoCenterManager.shared.registerPlayer(player: _player!)
 | 
					                NowPlayingInfoCenterManager.shared.registerPlayer(player: _player!)
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            if #available(iOS 16.0, *) {
 | 
					            #if !os(tvOS)
 | 
				
			||||||
                // This feature caused crashes, if the app was put in bg, before the source change
 | 
					                if #available(iOS 16.0, *) {
 | 
				
			||||||
                // https://github.com/TheWidlarzGroup/react-native-video/issues/3900
 | 
					                    // This feature caused crashes, if the app was put in bg, before the source change
 | 
				
			||||||
                self._playerViewController?.allowsVideoFrameAnalysis = false
 | 
					                    // https://github.com/TheWidlarzGroup/react-native-video/issues/3900
 | 
				
			||||||
            }
 | 
					                    self._playerViewController?.allowsVideoFrameAnalysis = false
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            #endif
 | 
				
			||||||
            _player?.replaceCurrentItem(with: playerItem)
 | 
					            _player?.replaceCurrentItem(with: playerItem)
 | 
				
			||||||
 | 
					            #if !os(tvOS)
 | 
				
			||||||
            if #available(iOS 16.0, *) {
 | 
					                if #available(iOS 16.0, *) {
 | 
				
			||||||
                self._playerViewController?.allowsVideoFrameAnalysis = true
 | 
					                    self._playerViewController?.allowsVideoFrameAnalysis = true
 | 
				
			||||||
            }
 | 
					                }
 | 
				
			||||||
 | 
					            #endif
 | 
				
			||||||
            // later we can just call "updateNowPlayingInfo:
 | 
					            // later we can just call "updateNowPlayingInfo:
 | 
				
			||||||
            NowPlayingInfoCenterManager.shared.updateNowPlayingInfo()
 | 
					            NowPlayingInfoCenterManager.shared.updateNowPlayingInfo()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user