Rename loop property to disableLoop

This commit is contained in:
Ibrahem 2023-08-16 13:12:23 +03:00
parent f2376d11c3
commit 728effc935
No known key found for this signature in database
GPG Key ID: 5526EBA6000E583E
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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()