Hi
I have an issue where I call Handheld.PlayFullScreenMovie and the video plays, you can hear the audio but no picture. Towards the end of the 4 second video the picture appears. Its as if its not loaded the video graphics into memory yet before playing or something.
Code looks like this:
void Start () {
PlayVideo("mine.mp4");
}
void PlayVideo(string videoPath){
StartCoroutine(PlayVideoCoroutine(videoPath));
}
protected IEnumerator PlayVideoCoroutine(string videoPath){
Handheld.PlayFullScreenMovie(videoPath, Color.white, FullScreenMovieControlMode.CancelOnInput);
yield return new WaitForEndOfFrame();
Application.LoadLevel("newLevel");
}
If I move PlayVideo(“mine.mp4”); out of Start() and put it in update, so that the scene runs for a little before calling play, it seems to work, BUT, I don’t want to make the user wait for 5 seconds before playing the video…
void Start () {
startedVideo = false;
}
void Update(){
if (Time.timeSinceLevelLoad > 5.0f) {
if (!startedVideo) {
PlayVideo (videoFile);
startedVideo=true;
}
}
}
void PlayVideo(string videoPath){
StartCoroutine(PlayVideoCoroutine(videoPath));
}
Video file is .mp4, AVC Coding, AAC 480000 hz Stereo sound, 25fps, 860kb/s data rate ish.
Testing on Kindle Fire 7" (3rd gen)
Any ideas most welcome. Thanks.