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 /
avatar image
1
Question by diegostickmen · Feb 16, 2017 at 01:59 PM · unity 5iosxcodehandheld

iOs Handheld.PlayFullScreenMovie - [prepareAsset]Error: The requested URL was not found on this server.

Hi Everyone,

I'm trying to play a full screen video using Handheld.PlayFullScreenMovie in iOs with no success:

-I'm placing the movie file into the StreamingAssets folder (MMIntro.mov) alt text

I'm adding in my Xcode project this movie file as copy bundle resources

xcode -> build phases -> copy bundle resources

However when it runs in iPhone it shows a white screen for some seconds and then comes back to the Unity Game.

The error log shows : [prepareAsset]Error: The requested URL was not found on this server.

Also, I'm checking if the file exists, and it desn't. It seems like is not being copied to an iOs accessible folder from the StreamingAsstes one.

alt text

Do you have any idea what am I doing wrong?? Do I need to set something else in my Xcode project?

Thanks in advance.

Here is My code

 public string movieName = "MMIntro.mov";
 IEnumerator loadAndPlayTexture(){
             if(System.IO.File.Exists(movieName)){
                 Debug.Log("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<File exists<" + movieName + ">");
             }
             else{
                 Debug.Log("<<<<<<<<<<<<<<<<<<<<<<<<<<<<File Not found<" + movieName + ">");
             }
     
     #if !UNITY_EDITOR && (UNITY_IOS || UNITY_ANDROID)
             Handheld.PlayFullScreenMovie (movieName, Color.black, FullScreenMovieControlMode.CancelOnInput);
             yield return new WaitForSeconds(1);
             GetComponentInParent<SequenceManager> ().advance ();
             gameObject.SetActive (false);
     #else
     
             yield return new WaitForSeconds(1);
             MovieTexture texture = null;
             try{
                  texture = (MovieTexture)image.texture;
             } catch {
                 GetComponentInParent<SequenceManager> ().advance ();
                 gameObject.SetActive (false);
                 yield break;
             }
             audio.clip = texture.audioClip;
             while (!texture.isReadyToPlay) {
                 yield return false;
             }
             image.color = Color.white;
             if(!isAudioMuted){
                 audio.Play ();
             }
             texture.Play ();
             while (texture.isPlaying) {
                 yield return false;
             }
             if (audio.isPlaying) {
                 audio.Stop();
             }
             texture.Stop ();
     
             GetComponentInParent<SequenceManager> ().advance ();
             gameObject.SetActive (false);
     #endif
             yield return false;
         }

intro.jpg (61.2 kB)
20170216-145834.jpg (380.7 kB)
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 thesanketkale · Nov 30, 2018 at 01:17 PM 0
Share

If the video is stored locally, did you try adding "file://" before the video file path?

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by booferei · Oct 11, 2019 at 07:51 AM

A little late response, but this just happened to me on iOS 13.

TL;DR: provide full path. Try prepending "file://"

My problem was that the file was in the app's data directory. The path was something like: /var/mobile/Containers/Data/Application//Documents/filename.mp4 Passing this path to Handheld.PlayFullScreenMovie worked on iOS 13 doesn't work. I had to add "file://" at the beginning: file:///var/mobile/Containers/Data/Application//Documents/filename.mp4

Also, in the OP's case, I would expect the file path would have to include the streaming assets path: string movePath = Path.Combine(Application.streamingAssetsPath, movieName);

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
0

Answer by umerPC · Sep 21, 2018 at 11:21 AM

I'm experiencing the same problem, did you manage to solve it?

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

8 People are following this question.

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

Related Questions

ios changes aren't showing when running app 0 Answers

Unity augmented reality based app keep crashing after building it on ios 1 Answer

xcodesettingspostprocesser 0 Answers

Accessing the volume buttons on iPhone for some functionality through Unity 1 Answer

unity 5 u3dxt xCode errors 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