From 2c19a4770df73179436a9e23a5e55ad0699fcfcc Mon Sep 17 00:00:00 2001 From: Wojciech Ogrodowczyk Date: Mon, 7 Oct 2024 14:32:35 +0200 Subject: [PATCH] fix(iOS): pause video on end reached & don't remove listeners (#4218) This fixes an issue when seeking back to the beginning results in no `onProgress` events being fired. --- ios/Video/RCTVideo.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index 751c7b4a..92cea601 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -1631,7 +1631,8 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH } ) } else { - _playerObserver.removePlayerTimeObserver() + _player?.pause() + _player?.rate = 0.0 } }