Hello everyone,
I’ve been having problems trying to play a previously downloaded video on Quest2. I’m using the follwowing to download the file:
unityWebRequest = new UnityWebRequest(videoList.FullPath, UnityWebRequest.kHttpVerbGET);
String path = Path.Combine(Application.persistentDataPath, "file_1.mp4");
unityWebRequest.downloadHandler = new DownloadHandlerFile(path);
yield return unityWebRequest.SendWebRequest();
if (unityWebRequest.isNetworkError || unityWebRequest.isHttpError)
{
Debug.Log("Error: " + unityWebRequest.error);
}
else
{
Debug.Log("File successfully downloaded and saved to " + path);
partialDownloads[videoList.Id] = percentage100;
}
Then, in another screen (basically the same scene included for video 180 in the Oculus package) I’m trying the following to play the video:
String checkVideoPath = Path.Combine(Application.persistentDataPath, "file_1.mp4");
if (File.Exists(checkVideoPath))
{
videoPath = checkVideoPath;
videoPlayer.url = videoPath;
}
The file is downloaded properly, I can copy the downloaded video using Side Quest, the last block is executed and it looks like the File actually exists in the path, however, the video is not played…
Any idea?