我正在尝试将来自 IP 摄像机的视频流渲染为 three.js 纹理,但我找不到如何去做。我正在尝试这样的事情:
....
var video = document.createElement('video');
video.crossOrigin="anonymous";
video.width = 320;
video.height = 240;
video.autoplay = true;
video.loop = true;
//This works, but it is not from an IP Camera
//video.src="http://video.webmfiles.org/big-buck-bunny_trailer.webm";
//This does not work
video.src="http://webcam01.bigskyresort.com/mjpg/video.mjpg";
this._video = video
var texture;
texture = new THREE.Texture( video );
....
任何的想法?
提前谢谢了!