Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 /
This question was closed Mar 30, 2015 at 09:44 AM by clunk47 for the following reason:

Problem is not reproducible or outdated

avatar image
1
Question by adrianrdzv · Aug 10, 2011 at 09:18 AM · androidvideomovieplayback

Android video playback

I'm having problems with video playback in Android.

There is not much documentation on this, Unity docs only say to use iPhoneUtils.PlayMovie()

Is this line of code supposed to work in Android?

iPhoneUtils.PlayMovie("video.mp4",Color.black, iPhoneMovieControlMode.Hidden);

I installed Quicktime and I have Android Pro. When I deploy the application to my tablet and reach the point to play the video the screens turns black and that's it. I tried with different versions of the video (mp4 and 3gp).

The log shows:

VERBOSE/MediaPlayer-JNI(8664): native_setup VERBOSE/MediaPlayer(8664): constructor VERBOSE/MediaPlayer(8664): setListener VERBOSE/MediaPlayer-JNI(8664): seekTo: 0(msec) VERBOSE/MediaPlayer(8664): seekTo 0 ERROR/MediaPlayer(8664): Attempt to perform seekTo in wrong state: mPlayer=0x0, mCurrentState=1 ERROR/MediaPlayer(8664): message received msg=100, ext1=-38, ext2=0 VERBOSE/MediaPlayer(8664): notify(100, -38, 0) callback on disconnected mediaplayer INFO/ActivityManager(2488): Displayed activity com.qualcomm.QCARUnityPlayer/com.unity3d.player.VideoPlayer: 70 ms (total 70 ms)

Is there any working sample code using unity video playback in Android?

Comment
Add comment · Show 1
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 tonyarabish · Oct 25, 2018 at 06:27 AM 0
Share

Avdshare Video Converter is the most professional video to Android converter with which any unsupported video can be easily converted to Android products supported video formats. See the guide:https://www.avdshare.com/convert-avi-to-android-supported-video-formats

2 Replies

  • Sort: 
avatar image
3
Best Answer

Answer by adrianrdzv · Aug 10, 2011 at 01:11 PM

I found the problem.

I knew that the video should be placed in the Streaming Assets folder, what I didn't know is that if you place it in another folder within Streaming Assets, you should include the folder name in the iPhoneUtils.PlayMovie() call.

 iPhoneUtils.PlayMovie("Movies/video.mp4",Color.black, iPhoneMovieControlMode.Hidden);

Hope this helps to anyone making this silly mistake.

Comment
Add comment · Show 1 · 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 · Oct 18, 2011 at 05:38 PM 0
Share

somewhat related links: http://answers.unity3d.com/questions/18503/how-integrate-video-before-menu-in-unity-iphone-ga.html and http://forum.unity3d.com/threads/80109-Does-iPhoneUtils.Play$$anonymous$$ovie-work-on-Android-devices in my case the issue was the codec somehow. Videos would play on Android but not inside Unity.

avatar image
3

Answer by aubreuil56 · Mar 30, 2015 at 09:26 AM

This issue is fixed with Unity 5, Handheld class now works if you had normal license, no need for Android Pro with Unity 5, thanks all

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

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

how to play video on android 4 Answers

Video player lagging on Adroid when transcoded 0 Answers

Playing from a specific point using Handheld.PlayFullScreenMovie 0 Answers

I can't get my .mov or .mp4 to play in unity pro 3 Answers

how to play video on android device?? 1 Answer


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