diff --git a/ios/ViewController.h b/ios/ViewController.h index be207a839f..fb4fe1c9dc 100644 --- a/ios/ViewController.h +++ b/ios/ViewController.h @@ -15,6 +15,3 @@ @end extern id sharedViewController; - -void startVideo(int width, int height); -void stopVideo(); diff --git a/ios/ViewController.mm b/ios/ViewController.mm index d67ae849ee..e97d67406f 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -382,11 +382,11 @@ extern float g_safeInsetBottom; } } -void startVideo(int width, int height) { - [cameraHelper startVideo: width h:height]; +- (void)startVideo:(int)width height:(int)height { + [cameraHelper startVideo:width h:height]; } -void stopVideo() { +- (void)stopVideo { [cameraHelper stopVideo]; } diff --git a/ios/ViewControllerCommon.h b/ios/ViewControllerCommon.h index bdcd0ee255..52766bff4d 100644 --- a/ios/ViewControllerCommon.h +++ b/ios/ViewControllerCommon.h @@ -13,5 +13,7 @@ - (UIView *)getView; - (void)startLocation; - (void)stopLocation; +- (void)startVideo:(int)width height:(int)height; +- (void)stopVideo; @end diff --git a/ios/main.mm b/ios/main.mm index 5f12970d9d..bc0909e8f6 100644 --- a/ios/main.mm +++ b/ios/main.mm @@ -429,9 +429,9 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string if (!strncmp(param1.c_str(), "startVideo", 10)) { int width = 0, height = 0; sscanf(param1.c_str(), "startVideo_%dx%d", &width, &height); - startVideo(width, height); + [sharedViewController startVideo:width height:height]; } else if (!strcmp(param1.c_str(), "stopVideo")) { - stopVideo(); + [sharedViewController stopVideo]; } return true; case SystemRequestType::GPS_COMMAND: