From 3d3eba97e814519cd79836208af25b948059795b Mon Sep 17 00:00:00 2001 From: Olivier Bouillet <62574056+freeboub@users.noreply.github.com> Date: Wed, 22 Jan 2025 22:56:50 +0100 Subject: [PATCH] fix(ios): fix paused video by default (#4379) * fix: update style to allow show control click * fix: push missing revert --- examples/bare/src/styles.tsx | 1 + examples/expo/src/styles.tsx | 1 + ios/Video/RCTVideo.swift | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/bare/src/styles.tsx b/examples/bare/src/styles.tsx index ddee2d7d..6147016f 100644 --- a/examples/bare/src/styles.tsx +++ b/examples/bare/src/styles.tsx @@ -86,6 +86,7 @@ const styles = StyleSheet.create({ fontSize: 11, color: 'white', padding: 10, + paddingTop: 50, lineHeight: 12, }, controlOption: { diff --git a/examples/expo/src/styles.tsx b/examples/expo/src/styles.tsx index ddee2d7d..6147016f 100644 --- a/examples/expo/src/styles.tsx +++ b/examples/expo/src/styles.tsx @@ -86,6 +86,7 @@ const styles = StyleSheet.create({ fontSize: 11, color: 'white', padding: 10, + paddingTop: 50, lineHeight: 12, }, controlOption: { diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index a624cc27..75c5d237 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -1538,7 +1538,9 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH guard _isPlaying != isPlaying else { return } _isPlaying = isPlaying - _paused = !isPlaying + if _controls { + _paused = !isPlaying + } onVideoPlaybackStateChanged?(["isPlaying": isPlaying, "isSeeking": self._pendingSeek == true, "target": reactTag as Any]) }