I'm trying to upload/save a taken video(if shot in portrait mode) in landscape mode. Using the UIImagePickerController, According to these questions:
video orientation UIImagePickerController
How can I set the UIImagePickerController orientation for video?
These questions(and many others) explain how to determine if the video is shot in portrait orientation but I cannot find a answer to how a video can actually be uploaded and saved(to a server) in an orientation that when played on a media device the video isn't horizontal and weird looking. Can we come to conclusion here for everyone who has looked into this and see if/how this can be done?
Related
I have some videoplayer plugin thats play video on iOS IPhone.
I am in portrait mode and I run video
video goes into landscape mode
I rotate into landscape to watch the video
I press exit video - plugin is closed
Screen is in landscape but I get wrong document size and wrong window.innerHeight. Html tag has these wrong dimensions, so I am not able to do it in javascript/dom
Please can I solve this somehow? Am I able to refresh display? Because when I switch into portrait mode and back, then everything is ok.
window.screen.orientation is correct and window.screen.width/height are correct too.
edit:
I have tried to use this plugin https://github.com/apache/cordova-plugin-screen-orientation and when I lock portrait it is cropped also. There is some problem with viewport, width=device-width, but I do not know how to solve it
I am working on MPMoviePlayerViewController but struggling with playing video in full screen when changing orientation.
I have recorded video in landscape so it is possible to play that video in portrait in full screen.
Check this image for reference where video is in landscape and it should play red rectangle part when device is in portrait in full screen.
(the rectangle part contains the center of video and not the entire video).
so if anybody know's solution please help.
Thanks in advance.
I am making an application in landscape, but I need to open the photo gallery in the image. The photo gallery only opens in the portrait mode. Is there any way that the application can be limited to stay in the landscape mode except only for the photo gallery? Or can the photo gallery be opened in landscape?
Possibly, rotation of a view could help you. Have a look at CGAffineTransformMakeRotation.
But remember, it would affect your UIAlertView.
It is not possible because it is restricted by the framework, it will always open in portrait mode
I'm going to use UIImagePickerController with source as a camera. by default when i'm capturing the image m able to take the picture in portrait mode. here the problem is that i'm not able to display the same view in landscape mode.
Is there any other way to open the camera in Landscape mode?
Thanks in advance.
First of all there is no way to open camera in Landscape mode So we have to customize views as per our need.
You have to add rotation transformation to picture which will match to landscape view. You can hard code it as ,
Blockquote
CGAffineTransformRotate(CGAffineTransformIdentity, 117.81)"
Blockquote
how to play video landscape with standard api?
video play only portrait !!!
change the app orientation landscape is not useful, because video start portrait forever.
i have a portrait app with a button, when pressed video must play landscape.
yourmoviecontrollername setOrientation:UIDeviceOrientationPortrait animated:NO];
is not allowed by Apple
Maybe the regular videoplayercontroller doesnt do landscape by itself...i would suggest using MPMoviePlayerViewController available in 3.2, you set it up and use view controllers presentMoviePlayerController method in order to display, should work fine for you. here is a ref MPViewcontroller