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
Post a Comment