Problem playing movietexture only with local file

Hi!

It’s my first time on this forum so please excuse any mistake I could do regarding forum rules.

I have Unity Pro and am trying to play a movie from the Streaming Assets folder (standalone build). I can successfully play the movie with the WWW class, as long as it uses an (http://unity3d.com/files/docs/sample.ogg) from the web. The movie is in ogg format. That same movie, when inside the Streaming Assets folder, fails to play. Trying a few things I found out it’s actually never ready to play.

Here’s the code:

IEnumerator StartVideo ()
    {   
        WWW www = new WWW(System.IO.Path.Combine(Application.streamingAssetsPath, "sample.ogg"));
        while (!www.isDone)
            yield return null;
            
        MovieTexture movieTexture = www.movie;
            
        GetComponent<RawImage>().texture = movieTexture;
        MovieTexture movieToPlay = GetComponent<RawImage>().texture as MovieTexture;
        
        movieToPlay.Play();
    }

Any idea why it works on the web and not in the Streaming Assets folder? I can see that it was imported successfully in Unity, so that’s not the issue.

Thank you very much!

WWW www = new WWW(“file:///” + System.IO.Path.Combine(Application.streamingAssetsPath, “sample.ogg”));