| Index: webrtc/sdk/objc/Framework/Classes/RTCCameraPreviewView.m
|
| diff --git a/webrtc/sdk/objc/Framework/Classes/RTCCameraPreviewView.m b/webrtc/sdk/objc/Framework/Classes/RTCCameraPreviewView.m
|
| index 5a60ba3e896ddd0585ab7746c261537faa46a9c6..6ea0e2a727b96c9208e7b7298d52e9adb8cca586 100644
|
| --- a/webrtc/sdk/objc/Framework/Classes/RTCCameraPreviewView.m
|
| +++ b/webrtc/sdk/objc/Framework/Classes/RTCCameraPreviewView.m
|
| @@ -18,11 +18,20 @@
|
| @implementation RTCCameraPreviewView
|
|
|
| @synthesize captureSession = _captureSession;
|
| +@synthesize shouldUpdateVideoOrientationOnDeviceRotation =
|
| + _shouldUpdateVideoOrientationOnDeviceRotation;
|
|
|
| + (Class)layerClass {
|
| return [AVCaptureVideoPreviewLayer class];
|
| }
|
|
|
| +- (instancetype)init {
|
| + if (self = [super init]) {
|
| + _shouldUpdateVideoOrientationOnDeviceRotation = YES;
|
| + }
|
| + return self;
|
| +}
|
| +
|
| - (void)setCaptureSession:(AVCaptureSession *)captureSession {
|
| if (_captureSession == captureSession) {
|
| return;
|
| @@ -39,7 +48,9 @@
|
| [super layoutSubviews];
|
|
|
| // Update the video orientation based on the device orientation.
|
| - [self setCorrectVideoOrientation];
|
| + if (_shouldUpdateVideoOrientationOnDeviceRotation) {
|
| + [self setCorrectVideoOrientation];
|
| + }
|
| }
|
|
|
| - (void)setCorrectVideoOrientation {
|
|
|