Stream always in landscape - no reaction to publisher when changing options

Hi there!
I’m using your streaming utility, and it all works, except from 1 thing - I wnt the user to only be able to stream in landscapemode.
I have tried to set the options.orientation to .LandscapeRight, and also tried setting it to AVCaptureVideoOrientation.LandscapeRight … Actually I have tried to set it to all of the options, but always remains at the Portrait … Is there anything I have overseen?
Here’s my publish method
private func publish() {
print("----------------------- publishControl ------------------------------------------------------")
var options: MediaPublishOptions

options = MediaPublishOptions.liveStream(self.streamView) as! MediaPublishOptions
options.orientation = .LandscapeRight
options.resolution = RESOLUTION_HIGH // 720x1280px (landscape)
publisher = Backendless.sharedInstance().mediaService.publishStream(“stream”, tube: VIDEO_TUBE, options: options, responder: self)
But it still shows in Portrait mode… :confused:

Hi Nicolai,

If you need to publish in .LandscapeRight, please, rotate your device in this orientation.
Player has its own options.orientation , so you can set it too.

You could try our sample project from iOS-Samples github.


Hi Slava,

Sorry, but I think its a little rude to mark this question as solved, as its not!
Obviously I have tried to flip my phone into landscapemode, but the problem is, that when i do, the images gets turned sideways. No matter if I set the publisher’s option.orientation to .LandscapeRight, .LandscapeLeft, .Portrait or whatever, it’s always the same. It looks fine in portrait, but as soon as I flip my phone, the preview is sideways - like, the top of my head to the side-sideways…

I just figured out though, that it’s caused by the auto-rotate function, so the imageview gets turned around when i flip the phone. In your example the image is freezed to portraitmode, and thats why it doesn’t flip the image. So now I just have to figure out how to lock the stream-screen in landscape mode - thats just not an easy task, as I have a tapbar controller and lots of navigationcontrollers, but I guess I’ll figure it out somehow :slight_smile: But thanks for your answer anyway!

Internal task BKNDLSS-13175 was created.