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 ChrisYummi · Mar 01, 2013 at 04:49 PM · androidvideostreaming

Unable to stream a video on Android Pro with PlayFullScreenMovie

I can successfully get a test video playing if I put it locally on the devices StreamingAssets folder but when I try to play the original file that is on the web it never works and there is no useful output from logcat. I just get a black screen very briefly before returning to the default blue.

 using UnityEngine;
 using System.Collections;
 
 public class VideoTest : MonoBehaviour {
 
     // Use this for initialization
     //string moviePath = "famous.3gp";
     string moviePath = "http://www.pocketjourney.com/downloads/pj/video/famous.3gp";
     //string moviePath = "http://www.unity3d.com/webplayers/Movie/sample.ogg";
 
     // Use this for initialization
     void Start () {
 
         Invoke("doPlay",1.0f);
     }
 
     void doPlay() 
     {
         Debug.Log("Starting Movie: " + moviePath);   
         //iPhoneUtils.PlayMovieURL(moviePath, Color.black);
         Handheld.PlayFullScreenMovie (moviePath, Color.black, FullScreenMovieControlMode.Full);
         Debug.Log("All Done!");  
     }
     // Update is called once per frame
     void Update () {
         if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); }    
     }
 }

As you can see I've also tried an ogg file also but this doesn't work (is supposed to be for www.movie and MovieTextures - but these are not for mobile). I'm using Unity 4.0.1f2 with Android Pro building to an HTC Sensation XL and it has no problems playing any of these videos in its browser or directly so I'm guessing it's not a device or source problem.

I know there are many posters of video playback problems, and many unanswered because people make simple mistakes (and Unity gives no useful logs to prevent this - a shame) but since I'm only changing the target path to go from a working local one to a failing streamed one I can't think of what I might be doing wrong. I even tested the old depricated iPhoneUtils.PlayMovieURL in case it would help but it failed the same way.

Does Unity actually support this, as the documentation is very minimal and not fully updated to Unity 4?

Can anyone share the code for a successful online stream of a video?

Thanks

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 edafonseca · Sep 09, 2013 at 12:36 AM 0
Share

Hi there, I am trying to accomplish exactly the same as you in your original post, however, I am using Vuforia (Qualcomm) to achieve this. Could do elaborate on how you got Vuforia to stream a video to an Android device? I can't seem to get it to work and there are no useful errors in logcat. $$anonymous$$y Handheld.PlayFullScreen$$anonymous$$ovie always returns false. Do you have any tips or ideas as to why this does not work?

avatar image ChrisYummi · Sep 09, 2013 at 01:14 PM 0
Share

We have now found that the solution was to use a strea$$anonymous$$g server (afraid am not sure what that means exactly) to host the file. If its on youtube etc then these are already strea$$anonymous$$g servers and so the original Handheld.PlayFullScreen$$anonymous$$ovie should work. The error in my original post may have just been that the 3gp file was not on a strea$$anonymous$$g server. (Could also be that it was 3gp - we use mp4 now).

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Ing3nu · May 28, 2014 at 06:41 PM

In order to get the streaming to work, you have to check the "required WiFi connection" in the build settings. for some reason, Unity is not passing the required permission to access the web through to the AndroidManifest unless you have that box checked.

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 Chowdery · Jun 02, 2013 at 02:08 PM

Hey Chris, sorry to be the bearer of bad news but I don't think that movie streaming is supported through the WWW class on Android/IOS yet:

http://docs.unity3d.com/Documentation/Manual/iphone-unsupported.html

http://docs.unity3d.com/Documentation/Manual/android-unsupported.html

I'm currently looking for an alternative but not having much luck. Please let me know if you manage to find a work around :).

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 ChrisYummi · Jun 03, 2013 at 07:19 AM

Final solution looks like using the video player that you can get from Vuforia (Qualcomm). This handles streaming as well as writing to a texture.

https://developer.vuforia.com/resources/sample-apps/video-playback-sample-app

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

13 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 avatar image avatar image

Related Questions

StreamingAssets Folder Max Size 2 Answers

Unity 5.6 Video Clip stream on Android 0 Answers

Could a privacy error on a video streaming server cause videos not to play in an Android build? 1 Answer

Unity Video ads closing when player leaves app. 0 Answers

UnityEngine.Video.VideoPlayer takes a very long time to load. Can I stream it before it loads? 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