ios - How to record landscape video in a portrait application? (Swift 2, iPhone) -


i need record landscape video inside portrait iphone application.

is possible or blocked hardware limitation?

using avcapturevideopreviewlayer able change preview orientation, video still recorded in portrait.

any idea welcomed!

you should able set orientation landscape video recording. , set preview layer portrait achieve landscape video previewed in portrait. if understand question correctly. can show code tried already?

        if capturesession.canaddoutput(videooutput) {             capturesession.addoutput(videooutput)             let connection = videooutput.connectionwithmediatype(avmediatypevideo)             if connection.supportsvideoorientation {                 connection.videoorientation = avcapturevideoorientation.landscaperight             }             print("adding output")          } else {             print("could not add front video output")             return         }      ...      func setuppreviewlayer() {          ...etc...          previewlayer.connection.videoorientation = avcapturevideoorientation.portrait          ...etc...      } 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -