Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by fuzzysam · Oct 23, 2012 at 01:12 PM · iosvideo

Occasional black screen and lock up when using Handheld.PlayFullScreenMovie

I'm using a script to load some videos from my Streaming Assets folder, for playback on iOS. These work fine most of the time, but sometimes will cause the entire app to lock up. This always happens as the video has ended and is presumably trying to close.

Any ideas what could cause this? Or things I should look into to see about fixing it? What code does Handheld.PlayFullScreenMovie load and how can I access it?

Here's the script I'm using:

 using UnityEngine;
 using System.Collections;
 
 public class PlayMovieScript : MonoBehaviour
 {
     private static bool finishedPlaying;
     private static string videoPath;
     
     public static void Activate(string path)
     {
         Handheld.PlayFullScreenMovie(path, new Color(0.7529411f, 0.7529411f, 0.7529411f), FullScreenMovieControlMode.Minimal, FullScreenMovieScalingMode.AspectFit);
         videoPath = path;
         finishedPlaying = true;
     }    
     
     void Update()
     {
         if (finishedPlaying)
         {
             finishedPlaying = false;
             if (videoPath == "session02.m4v")
             {            
                 Application.LoadLevel ("HierarchyBlocksScene");
             }
             if (videoPath == "sess4_1k.m4v")
             {            
                 Application.LoadLevel ("Options1Scene");
             }
         }
     }
 }
 
Comment
Add comment · Show 2
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 Xroft666 · Oct 23, 2012 at 05:03 PM 0
Share

Try using this

iPhoneUtils.Play$$anonymous$$ovie(moviePath, Color.black, iPhone$$anonymous$$ovieControl$$anonymous$$ode.CancelOnTouch);

avatar image fuzzysam · Oct 24, 2012 at 08:01 AM 0
Share

Same issue, plus I get "warning CS0618: `UnityEngine.iPhoneUtils.Play$$anonymous$$ovie(string, UnityEngine.Color, UnityEngine.iPhone$$anonymous$$ovieControl$$anonymous$$ode, UnityEngine.iPhone$$anonymous$$ovieScaling$$anonymous$$ode)' is obsolete: `Play$$anonymous$$ovie method is deprecated. Please use Handheld.PlayFullScreen$$anonymous$$ovie ins$$anonymous$$d.'"

I've managed to remedy this issue slightly by not using async load level right afterwards, but I'm still having a problem if I scrub through the video to the end. Is there a specific way I should be handling the running of code right after a video finishes? Or a way of telling when the video has actually finished? I'll edit my original post to include my script.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Grislymanor · Dec 23, 2015 at 10:41 PM

I had the same issue on an Android build and resolved it by removing 'Debug.Log ("Intro PLayed");' after my "Handheld.PlayFullScreenMovie" function and before 'Application.LoadLevel ("Menu");' . Weird.

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

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.

Follow this Question

Answers Answers and Comments

11 People are following this question.

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

Related Questions

Videoclip codec for mobile devices 0 Answers

Videos don't play in Apple Appstore build 0 Answers

VideoPlayer ios StreamingAssets black render 1 Answer

Knowing the position 1 Answer

3.4 iOS play movie ending 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