Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).

iOS Portrait

zhao_w_
Beginner
370 Views

Hello, I use the webrtc 3.4 version of the SDK, how can I force the camera output data are vertical screen, thank you.I found that I'll direction of equipment modification videoOrientation don't take effect

 

//            AVCaptureVideoOrientation orientation = av.videoOrientation;

//            switch (orientation) {

//                case UIInterfaceOrientationPortraitUpsideDown:

//                    if(av.videoOrientation != AVCaptureVideoOrientationPortraitUpsideDown) {

//                        dispatch_async(dispatch_get_global_queue(0, 0), ^{

//                            [session beginConfiguration];

//                            av.videoOrientation = AVCaptureVideoOrientationPortraitUpsideDown;

//                            [session commitConfiguration];

//                        });

//                    }

//                    break;

//                case UIInterfaceOrientationLandscapeRight:

//                    if(av.videoOrientation != AVCaptureVideoOrientationLandscapeRight) {

//                        dispatch_async(dispatch_get_global_queue(0, 0), ^{

//                            [session beginConfiguration];

//                            av.videoOrientation = AVCaptureVideoOrientationLandscapeRight;

//                            [session commitConfiguration];

//                        });

//                    }

//                    break;

//                case UIInterfaceOrientationLandscapeLeft:

//                    if(av.videoOrientation != AVCaptureVideoOrientationLandscapeLeft) {

//                        dispatch_async(dispatch_get_global_queue(0, 0), ^{

//                            [session beginConfiguration];

//                            av.videoOrientation = AVCaptureVideoOrientationLandscapeLeft;

//                            [session commitConfiguration];

//                        });

//                    }

//                    break;

//                case UIInterfaceOrientationPortrait:

//                    if(av.videoOrientation != AVCaptureVideoOrientationPortrait) {

//                        dispatch_async(dispatch_get_global_queue(0, 0), ^{

//                            [session beginConfiguration];

//                            av.videoOrientation = AVCaptureVideoOrientationPortrait;

//                            [session commitConfiguration];

//                        });

//                    }

//                    break;

//                default:

//                    break;

//            }

0 Kudos
2 Replies
Jianjun_Z_Intel
Employee
370 Views

Hi zhao,

Did you try locking orientation?

0 Kudos
zhao_w_
Beginner
370 Views

HI Jianjun Z

  How to locking , user may close device orientation lock

0 Kudos
Reply