Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Does iPhoneUtils.PlayMovie work on Android devices?

Discussion in 'Android' started by BogdanDude, Mar 1, 2011.

  1. BogdanDude

    BogdanDude

    Joined:
    Jun 18, 2009
    Posts:
    89
    I saw in the product features, in the Unity 'Store' that you can play full screen movies on Android.

    I tried using iPhoneUtils.PlayMovie, but it didn't work for me. Maybe I've got some movie format wrong or something...

    Were you guys able to play a movie on an Android device?

    Thanks,
    Bogdan
     
  2. denis@unity3d.com

    denis@unity3d.com

    Joined:
    Dec 16, 2010
    Posts:
    2
    Yes, iPhoneUtils.PlayMovie() works on Android. Take a look at the attached example. What exactly did not work for you though?
     

    Attached Files:

  3. BogdanDude

    BogdanDude

    Joined:
    Jun 18, 2009
    Posts:
    89
    Hi Denis!

    Thanks for the sample project. I tried running it, but all I get is a black screen, with no video playing (when pressing any of the buttons).
    Did it work for you?

    I tested it in Unity 3.3 f2, on a Nexus One and the Xperia Play.

    Thanks,
    Bogdan
     
  4. Wozik

    Wozik

    Joined:
    Apr 10, 2009
    Posts:
    662
    Supplied codecs depend on the particular device. Please recheck the compatible video formats and try with your devices.
    The safe bet should be H.264 for video (resolution like 640x480 should be OK) and MP3 for sound.
     
  5. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    Ok, I found a codec that works for the videos. However, now the problem is that when a video completes there is a serious hang/delay before getting back into the game, and the fact that Unity doesn't stop execution like it does on iOS.
     
    Last edited: Oct 26, 2011
  6. Ingenu

    Ingenu

    Joined:
    Sep 11, 2009
    Posts:
    49
    Hi iWoz!

    Have you had any issues with playback quitting early? I am using iPhoneUtils.PlayMovie() for our Android build of our product and about halfway through the movie it stops (no indication of a crash, no hiccups or glitches in the playback) and returns us to the original menu.
     
  7. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,080
    Any update on fixing the quirks of iPhoneUtils.PlayMovie for Android?
     
  8. sadiq@xstpl.com

    sadiq@xstpl.com

    Joined:
    Feb 27, 2013
    Posts:
    6
    Your code not working
     
  9. sadiq@xstpl.com

    sadiq@xstpl.com

    Joined:
    Feb 27, 2013
    Posts:
    6
    code not working
     
  10. Alfa--

    Alfa--

    Joined:
    Dec 9, 2014
    Posts:
    2
    not working