- Home /
Handheld.PlayFullScreenMovie doesn't work
Hello,
I've got a problem to play video on android devices. I check all the setup to make this and search to many forums with no succes. Here is my script :
var CniVidPathOne : String = "StreamingAssets/Anim 1 Cnidaire-Retake.mp4";
function Update () {
StartCoroutine(PlayStreamingVideo(CniVidPathOne));
}
function PlayStreamingVideo(url : String){
Handheld.PlayFullScreenMovie(url,Color.black,FullScreenMovieControlMode.Full,FullScreenMovieScalingMode.AspectFill);
yield WaitForEndOfFrame();
}
My problem is that the video doesn't play on the device (and not on the unity game when it isn't built). A black screen appears during one second and after that nothing... - I've got unity pro 4.6.1 with android pro. - The video's format is mp4 - I put the video in an StreamingAssets folder Can anyone explain me how it works or where is my mistake? Thanks.
Answer by Yury-Habets · May 21, 2015 at 12:26 PM
Works for me.
You should use the URL without "StreamingAssets/". If it still does not work - something may be wrong with the video codec.
It didn't work again. What are the exacts settings for the video codec? Thanks for the answer
Here they are: http://developer.android.com/guide/appendix/media-formats.html
Are you able to play the video file when you place it on SD card using some built-in video player?
One more thing (though not sure) - try to get rid of spaces, I never tried that.