0

I'm trying to play a video file from the streaming assets folder. Works fine on PC but just doesn't load on Android.

if (!fileName.EndsWith(".mp4")) fileName = fileName + ".mp4";

var url = "file://" + Application.streamingAssetsPath + "/" + fileName;

if !UNITY_EDITOR && UNITY_ANDROID
    url = "jar:" + url;
#endif

videoPlayer.url = url;
videoPlayer.Prepare();  

I was wondering if I was missing a trick on getting the video URL and making it play?

James Lalor
  • 1,236
  • 9
  • 22

0 Answers0