Movie Texture Duration Returns -1

Hey guys,
This is the result I get of a video that plays fine in unity, doing a print right
after the Play() function. Format is OGV
I would like to get this resolved instead of doing isPlaying.

Any ideas will be greatly appreciated.

Before you call the Play() function, the duration is -1.


the duration will be -1 for some reason, but I successfully find a workaround:

IEnumerator playVideoList()
Renderer fr = GetComponent();
fr.material.mainTexture = videoList[0];
MovieTexture fmovie = (MovieTexture)fr.material.mainTexture;
AudioSource faud = GetComponent();
faud.clip = fmovie.audioClip;

    //yield return null;
    while (true)
        Renderer r = GetComponent<Renderer>();
        MovieTexture movie = (MovieTexture)r.material.mainTexture;
        if (!movie.isPlaying)
            if (idx == videoList.Length - 1) break;
            r.material.mainTexture = videoList[++idx];
            movie = (MovieTexture)r.material.mainTexture;
            AudioSource aud = GetComponent<AudioSource>();
            aud.clip = movie.audioClip;
        yield return new WaitForFixedUpdate();

Catch up on the newest movies, TV series, and more to get the most out of Fmovies. It’s simple to discover new releases and binge-watch your favourite TV episodes with Fmovies. instantly access a huge selection of films and TV shows.