Handheld.PlayFullScreenMovie video doesn't show straight away

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.

Is there a reason that you do not use handheld.PlayFullScreenMovie just on Start()?

I explained above :slight_smile:

“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.”

If I delay playing the video for a few seconds after the scene starts, I can then see the video from the start (rather than just hearing the audio until the video nearly ends)

Hmm, I am using:

using UnityEngine;
using System.Collections;

public class StartVideo : MonoBehaviour {
   
    void Start () {
        Handheld.PlayFullScreenMovie("video_1.mp4", Color.black, FullScreenMovieControlMode.CancelOnInput, FullScreenMovieScalingMode.AspectFill);
    }

    void Update () {
   
    }
}

Then build to Google Nexus 4 and everything seems to be working fine. What device do you use?

Kindle Fire

I tried to build my project with video file on kindle fire but it worked as expected. Maybe you could create a reproduction project and send it to me or form a bug report and paste it’s number here?