- Home /
How to set the video-playback orientation (iPhoneUtils.PlayMovie)
Hi,
ive just imported a video to play it as a game-intro. Ive used the documentation to get further information about playing videos for iphone/ipad. (with this link: Applications/Unity%20iPhone/Unity%20iPhone.app/Contents/Documentation/Documentation/Manual/Video%20Files.html)
At the bottom of this help-document theres "Video player does not respect device orientation"-fact. Although ive set the "Default screen orientation" in the Player/Project-settings to LandscapeLeft, my intro video is played in portrait-mode. After watching the video my unity scene is set correctly - only the video-orientation is wrong.
(Using Xcode 4 beta and iPad)
Does anybody know what to do? Would be great. Thanks for your time...
Answer by Jaap Kreijkamp · Jul 29, 2010 at 03:11 AM
In iOS4 Apple changed the API for movie playback, adding support for movie orientation. Unfortunately Unity iPhone doesn't handle this new functionality yet (come one guys please solve this!) and there's actually no good solution around it, unless you don't mind coding in Objective-C. If you don't use keyboard support in your game/app you could try the hack suggested in this forum post.
Answer by raminsh · Aug 16, 2010 at 02:55 AM
hello I had the same problem with both Ipod and ipad. and the issue frankly is not in unity therefore the solution is not in unity script either. you should do the following:
1- add this part to your playmovie code iPhoneMovieScalingMode.AspectFit right after iPhoneMovieControlMode.CancelOnTouch and save your script
2- go to xcode and look for this file AppController.mm
3- in the code of this file look for this line iphone::KeyboardOnScreen::Init();
4- comment this line.
that is it. now build & run and you are good. unfortunately this is the problem with os4 of itouch and ipad I hope that helped
Your answer
Follow this Question
Related Questions
Prepare Different Resolutions App Preview Videos for Apple Store 0 Answers
iPhone video playback in 3.0 beta5 working? 2 Answers
Playing videos inside the game scene on a iPAD 2 Answers
How to play a video on iPhone without using the native iOS video player? 0 Answers
Screen orientation based on device for unified app 0 Answers