Skip to content

Commit 5a3d96f

Browse files
author
Jaesung
authored
Merge pull request #12 from sendbird/feature/jaesung/mirror-front-camera
Add feature: mirroring front camera
2 parents c9ff02e + 63fb985 commit 5a3d96f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

QuickStart.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@
533533
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
534534
CODE_SIGN_ENTITLEMENTS = QuickStart/QuickStart.entitlements;
535535
CODE_SIGN_STYLE = Automatic;
536-
CURRENT_PROJECT_VERSION = 9;
536+
CURRENT_PROJECT_VERSION = 1;
537537
DEVELOPMENT_TEAM = RM4A5PXTUX;
538538
FRAMEWORK_SEARCH_PATHS = (
539539
"$(inherited)",
@@ -561,7 +561,7 @@
561561
CODE_SIGN_ENTITLEMENTS = QuickStart/QuickStart.entitlements;
562562
CODE_SIGN_IDENTITY = "Apple Development";
563563
CODE_SIGN_STYLE = Automatic;
564-
CURRENT_PROJECT_VERSION = 9;
564+
CURRENT_PROJECT_VERSION = 1;
565565
DEVELOPMENT_TEAM = RM4A5PXTUX;
566566
FRAMEWORK_SEARCH_PATHS = (
567567
"$(inherited)",

QuickStart/Dial/VideoCallViewController.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ extension VideoCallViewController {
179179

180180
self.localVideoView?.embed(localSBVideoView)
181181
self.view?.embed(remoteSBVideoView)
182+
183+
self.mirrorLocalVideoView()
182184
}
183185

184186
func resizeLocalVideoView() {
@@ -199,6 +201,11 @@ extension VideoCallViewController {
199201
})
200202
}
201203

204+
func mirrorLocalVideoView() {
205+
guard let localSBView = self.localVideoView?.subviews.first else { return }
206+
localSBView.transform = CGAffineTransform(scaleX: -1.0, y: 1.0)
207+
}
208+
202209
// SendBirdCalls: Start / Stop Video
203210
func updateLocalVideo(isEnabled: Bool) {
204211
self.videoOffButton.setBackgroundImage(UIImage(named: isEnabled ? "btnVideoOffSelected" : "btnVideoOff"), for: .normal)

0 commit comments

Comments
 (0)