Wowza Community

Landscape video with black bars if device is hold as portrait on streaming start

I have an app (iOS) that forces the view controller to stay on landscape since the app is thought to stream with the device on landscape (if the user rotates to portrait we display an overlay that ask to please rotate back to landscape). The issue I’m facing is that if the user starts streaming with the device on landscape, everything is fine, but if the user was holding the device on portrait while starting the streaming, the video is showing black bars on top and bottom and the video is portrait instead of landscape oriented. To be clear, the preview on the device camera is ok, it’s the video on Wowza Streaming Cloud that has the black bars (see screenshots).

The view controller has these methods to force landscape:

override var shouldAutorotate: Bool { return false } 

override var supportedInterfaceOrientations: UIInterfaceOrientationMask { return UIInterfaceOrientationMask.landscapeRight } 

and on WowzaConfig object I have the following values to force landscape:

videoWidth = 640 
videoHeight = 360 
broadcastVideoOrientation = .alwaysLandscape 
capturedVideoRotates = false 
videoPreviewRotates = false 
broadcastScaleMode = .aspectFill 

I already tried with all the combinations from the above config values but still no luck. I also tried with the SwiftSDKSampleApp from the examples and got the same results.

Hi Luis Floreani,

did you eventually solve the issue.

Please, feel free to reply to this comment if you still have this issue and I will assist you.