From a9c5e252874be3891b3de4d1f3d441f28a27d0bf Mon Sep 17 00:00:00 2001 From: Ben Strong Date: Thu, 26 Aug 2021 15:22:20 -0500 Subject: [PATCH] Fix playback of audio from video files while backgrounded. --- ios/Video/RCTVideo.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index d2675b0d75..6a44ad7865 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -227,11 +227,13 @@ - (void)dealloc - (void) disableVideoTracks { _playerViewController.player = nil; + _playerLayer.player = nil; } - (void) enableVideoTracks { _playerViewController.player = _player; + _playerLayer.player = _player; } - (void)applicationDidEnterBackground:(NSNotification *)notification