@@ -322,19 +322,21 @@ class RCTPlayerObserver: NSObject, AVPlayerItemMetadataOutputPushDelegate, AVPla
322
322
_restoreUserInterfaceForPIPStopCompletionHandler = completionHandler
323
323
}
324
324
325
- func playerViewController(
326
- _: AVPlayerViewController ,
327
- willEndFullScreenPresentationWithAnimationCoordinator coordinator: UIViewControllerTransitionCoordinator
328
- ) {
329
- // iOS automatically pauses videos after exiting fullscreen,
330
- // but it's better if we resume playback
331
- let wasPlaying = player? . timeControlStatus == . playing
332
-
333
- coordinator. animate ( alongsideTransition: nil ) { [ weak self] context in
334
- guard let self, !context. isCancelled, wasPlaying else { return }
335
- self . player? . play ( )
325
+ #if !os(tvOS)
326
+ func playerViewController(
327
+ _: AVPlayerViewController ,
328
+ willEndFullScreenPresentationWithAnimationCoordinator coordinator: UIViewControllerTransitionCoordinator
329
+ ) {
330
+ // iOS automatically pauses videos after exiting fullscreen,
331
+ // but it's better if we resume playback
332
+ let wasPlaying = player? . timeControlStatus == . playing
333
+
334
+ coordinator. animate ( alongsideTransition: nil ) { [ weak self] context in
335
+ guard let self, !context. isCancelled, wasPlaying else { return }
336
+ self . player? . play ( )
337
+ }
336
338
}
337
- }
339
+ #endif
338
340
339
341
func setRestoreUserInterfaceForPIPStopCompletionHandler( _ restore: Bool ) {
340
342
guard let _restoreUserInterfaceForPIPStopCompletionHandler else { return }
0 commit comments