Rename loop property to disableLoop
This commit is contained in:
parent
f2376d11c3
commit
728effc935
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue