fix(ios): fix wrong fullscreen method definition (#3338)
This commit is contained in:
parent
6df0f7d1c0
commit
7f49b56027
@ -1085,11 +1085,11 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
_resouceLoaderDelegate?.setLicenseResultError(error, licenseUrl)
|
||||
}
|
||||
|
||||
func dismissFullscreenPlayer(_ error:String!) {
|
||||
func dismissFullscreenPlayer() {
|
||||
setFullscreen(false)
|
||||
}
|
||||
|
||||
func presentFullscreenPlayer(_ error:String!) {
|
||||
func presentFullscreenPlayer() {
|
||||
setFullscreen(true)
|
||||
}
|
||||
|
||||
|
@ -81,8 +81,9 @@ RCT_EXTERN_METHOD(setLicenseResultError:(NSString *)error
|
||||
RCT_EXTERN_METHOD(setPlayerPauseState:(nonnull NSNumber *)paused
|
||||
reactTag:(nonnull NSNumber *)reactTag)
|
||||
|
||||
RCT_EXTERN_METHOD(presentFullscreenPlayer
|
||||
reactTag:(nonnull NSNumber *)reactTag)
|
||||
RCT_EXTERN_METHOD(presentFullscreenPlayer:(nonnull NSNumber *)reactTag)
|
||||
|
||||
RCT_EXTERN_METHOD(dismissFullscreenPlayer:(nonnull NSNumber *)reactTag)
|
||||
|
||||
RCT_EXTERN_METHOD(dismissFullscreenPlayer
|
||||
reactTag:(nonnull NSNumber *)reactTag)
|
||||
|
@ -48,25 +48,25 @@ class RCTVideoManager: RCTViewManager {
|
||||
})
|
||||
}
|
||||
|
||||
@objc(dismissFullscreenPlayer:reactTag:)
|
||||
func dismissFullscreenPlayer(error: NSString, reactTag: NSNumber) -> Void {
|
||||
@objc(dismissFullscreenPlayer:)
|
||||
func dismissFullscreenPlayer(_ reactTag: NSNumber) -> Void {
|
||||
bridge.uiManager.prependUIBlock({_ , viewRegistry in
|
||||
let view = viewRegistry?[reactTag]
|
||||
if !(view is RCTVideo) {
|
||||
RCTLogError("Invalid view returned from registry, expecting RCTVideo, got: %@", String(describing: view))
|
||||
} else if let view = view as? RCTVideo {
|
||||
view.dismissFullscreenPlayer(error as String)
|
||||
view.dismissFullscreenPlayer()
|
||||
}
|
||||
})
|
||||
}
|
||||
@objc(presentFullscreenPlayer:reactTag:)
|
||||
func presentFullscreenPlayer(error: NSString, reactTag: NSNumber) -> Void {
|
||||
@objc(presentFullscreenPlayer:)
|
||||
func presentFullscreenPlayer(_ reactTag: NSNumber) -> Void {
|
||||
bridge.uiManager.prependUIBlock({_ , viewRegistry in
|
||||
let view = viewRegistry?[reactTag]
|
||||
if !(view is RCTVideo) {
|
||||
RCTLogError("Invalid view returned from registry, expecting RCTVideo, got: %@", String(describing: view))
|
||||
} else if let view = view as? RCTVideo {
|
||||
view.presentFullscreenPlayer(error as String)
|
||||
view.presentFullscreenPlayer()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user