diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index 357ca247..e195cbf4 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -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) } diff --git a/ios/Video/RCTVideoManager.m b/ios/Video/RCTVideoManager.m index a272fa60..96c9d0f4 100644 --- a/ios/Video/RCTVideoManager.m +++ b/ios/Video/RCTVideoManager.m @@ -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) diff --git a/ios/Video/RCTVideoManager.swift b/ios/Video/RCTVideoManager.swift index ef70eb54..82851a1c 100644 --- a/ios/Video/RCTVideoManager.swift +++ b/ios/Video/RCTVideoManager.swift @@ -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() } }) }