Unity WebGL trying load stream 360 video with WebGLMovieTexture and 360StarterKit. How to load video from DropBox by http//*.mp4 link?
My project work in Firefox, but when i upload it in Heroku, heroku don't want load file more 300mb. Because i wanna try stream 360 video texture. When i put link in the my code and load it in browser, it give error of il2cpp. But without stream it works pefectly.
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class VideoTest : MonoBehaviour {
WebGLMovieTexture tex;
public GameObject sphere;
void Start () {
//tex = new WebGLMovieTexture("StreamingAssets/**.mp4");
tex = new WebGLMovieTexture("http://dl.dropboxusercontent.com/u/***/**.mp4");
sphere.GetComponent<MeshRenderer>().material = new Material (Shader.Find("Diffuse"));
sphere.GetComponent<MeshRenderer>().material.mainTexture = tex;
tex.Play();
}
void Update()
{
tex.Update();
}
}
Comment