You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since iOS 16 the orientation of VideoView doesn't work.
Steps to Reproduce
Create CameraSource from the camera
Attach the camera with addRenderer to a VideoView
Set the phone in landscape mode
See the result, VideoView is in landscape in iOS 15, but not with iOS 16
Code
func startPreview(){
guard let backCamera =CameraSource.captureDevice(position:.back)else{Logs.error("Can't get back camera.")Alert.show(message:"No front or back capture device found!", sourceController:self)return}// Preview our local camera track in the local video preview view.self.camera =CameraSource(delegate:self)
if let camera =self.camera {
localVideoTrack =LocalVideoTrack(source: camera, enabled: true, name:"Camera")}else{Logs.error("Can't get camera.")}// Add renderer to video track for local preview
localVideoTrack?.addRenderer(self.previewView)Logs.debug("Video track created")letsupportedFormats=CameraSource.supportedFormats(captureDevice: backCamera)varformatFound:VideoFormat?
for format in supportedFormats {
if let formatCasted = format as?VideoFormat{
if formatCasted.dimensions.height ==1080 && formatCasted.dimensions.width ==1920{
formatFound = formatCasted
}}}
guard let format = formatFound else{Alert.show(message:"Can't find the right format.", sourceController:self)Logs.error("Can't find the right format.")return}
camera?.startCapture(device: backCamera, format: format){(captureDevice, videoFormat, error)in
if let error {letmessage="Capture failed with error.\ncode = \((error asNSError).code) error = \(error.localizedDescription)"Logs.error(message)Alert.show(message: message, sourceController:self)}else{self.previewView.shouldMirror =(captureDevice.position ==.front)}}}
Screenshot
iOS 15.6.1 :
iOS 16.0.1 :
Reproduces How Often
Always since iOS 16
Versions
All relevant version information for the issue.
Video iOS SDK
v5.4.0
Xcode
14.1
iOS Version
15.6.1 & 16.0.1
iOS Device
iPhone 13 mini & iPhone SE
The text was updated successfully, but these errors were encountered:
Description
Since iOS 16 the orientation of VideoView doesn't work.
Steps to Reproduce
Code
Screenshot
iOS 15.6.1 :
iOS 16.0.1 :
Reproduces How Often
Always since iOS 16
Versions
All relevant version information for the issue.
Video iOS SDK
v5.4.0
Xcode
14.1
iOS Version
15.6.1 & 16.0.1
iOS Device
iPhone 13 mini & iPhone SE
The text was updated successfully, but these errors were encountered: