feat: add getCurrentPosition to component's ref (#3824)
* feat: add getCurrentPosition to component's ref --------- Co-authored-by: mostafahasani <hasanie.mostafa@alopeyk.com>
This commit is contained in:
committed by
GitHub
parent
e23e02b359
commit
c7f4d7b83b
@@ -86,6 +86,13 @@ class RCTVideoManager: RCTViewManager {
|
||||
})
|
||||
}
|
||||
|
||||
@objc(getCurrentPosition:resolver:rejecter:)
|
||||
func getCurrentPosition(reactTag: NSNumber, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
||||
performOnVideoView(withReactTag: reactTag, callback: { videoView in
|
||||
videoView?.getCurrentPlaybackTime(resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
override class func requiresMainQueueSetup() -> Bool {
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user