• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by yosh · Jun 28, 2010 at 01:57 PM · iphonevideoipadorientationplayback

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...

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

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

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image cregox · Feb 04, 2011 at 09:48 PM 0
Share

didn't work for me! :(

avatar image ayaz alavi · Sep 29, 2013 at 01:06 PM 0
Share

app crashed :(

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges