I need to display a very large 360 video on a VR application. I’ve already done the skybox and Render texture setup and its working fine but as the video file is too large the application does’nt buid. The solution I am trying is to load the video from the persistent data path using a script. Although the app is able to locate the video clip on the local storage, for some reason it’s not playing. Can somebody help me? The script I wrote is the following:
[SerializeField]
TextMeshPro text;
[SerializeField]
VideoPlayer player;
private string path;
// Start is called before the first frame update
void Start()
{
path = Application.persistentDataPath;
path = Application.persistentDataPath + "/JbRedimensioned.mp4";
text.text = path;
player.source = VideoSource.Url;
player.url = path;
if(player.clip != null)
{
string clip = player.clip.name;
clip = clip + player.clip.length.ToString();
text.text = clip;
player.Prepare();
player.waitForFirstFrame = true;
if(player.isPrepared)
{
player.Play();
}
}else
{
path = path + "__ no clip";
text.text = path;
}
}