From 728effc9353ee5b2c3719652fdcd18781a3bb117 Mon Sep 17 00:00:00 2001 From: Ibrahem Date: Wed, 16 Aug 2023 13:12:23 +0300 Subject: [PATCH] Rename loop property to disableLoop --- ios/TransparentVideoViewManager.m | 2 +- ios/TransparentVideoViewManager.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/TransparentVideoViewManager.m b/ios/TransparentVideoViewManager.m index 3ca342c..32f7607 100644 --- a/ios/TransparentVideoViewManager.m +++ b/ios/TransparentVideoViewManager.m @@ -3,6 +3,6 @@ @interface RCT_EXTERN_MODULE(TransparentVideoViewManager, RCTViewManager) RCT_EXPORT_VIEW_PROPERTY(src, NSDictionary); -RCT_EXPORT_VIEW_PROPERTY(loop, BOOL); +RCT_EXPORT_VIEW_PROPERTY(disableLoop, BOOL); @end diff --git a/ios/TransparentVideoViewManager.swift b/ios/TransparentVideoViewManager.swift index bf6c84a..8d364fb 100644 --- a/ios/TransparentVideoViewManager.swift +++ b/ios/TransparentVideoViewManager.swift @@ -26,10 +26,10 @@ class TransparentVideoView : UIView { } } - @objc var loop: Bool = Bool() { + @objc var disableLoop: Bool = Bool() { didSet { // Setup looping on our video - self.playerView?.isLoopingEnabled = loop + self.playerView?.isLoopingEnabled = !disableLoop let player = self.playerView?.player if (loop && (player?.rate == 0 || player?.error != nil)) { player?.play()