- Home /
Unable to stream online video on android
I'm kinda new to Unity especially on this type of function. I been trying to stream an online video on android. I tried to use the Unity sample and change it in order to work on android platform. But I kinda stuck out here, not knowing how to solve this. Somehow I just don't know how to modify this. Could anyone enlighten me a little?
#pragma strict
var url = "http://www.unity3d.com/webplayers/Movie/sample.ogg";
function Start () {
var www = new WWW(url);
yield;
Handheld.PlayFullScreenMovie(url,Color.clear,
FullScreenMovieControlMode.Full,
FullScreenMovieScalingMode.AspectFit);
}
function Update () {
}
It managed to run on android devices but the video is not playing.
So you are trying to open a site if the user touched it?
Something like that. I'm trying to stream a video once the user open the application.
Answer by Paulius-Liekis · Dec 09, 2014 at 12:25 AM
First: you don't need that WWW stuff, just call Handheld.PlayFullScreenMovie with your url.
Second: are you sure you're using correct format. If it plays on iOS it doesn't mean that Android supports it. I can not see .ogg on Video formats in this page: http://developer.android.com/guide/appendix/media-formats.html
Checkout documentation about supported formats: http://docs.unity3d.com/ScriptReference/Handheld.PlayFullScreenMovie.html
Answer by Chowdery · Jun 02, 2013 at 02:13 PM
Hey Issac, I've tried looking around on the Unity forums and have seen a few questions regarding this functionality, although I don't think the functionality is available just yet in Unity:
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 :).
So, it's been a year and a half, has this been added or worked around in Unity?
These links do not mention anything regarding Handheld.PlayFullScreen$$anonymous$$ovie on Android, so why are you saying it does not work?
Your answer
Follow this Question
Related Questions
How can i do youtube video player from video url for Android devices ? 0 Answers
Streamreader read .txt file with Android 0 Answers
How do i stream audio? 0 Answers
Unity download audio 1 Answer