LiveVideo.js is not working in asp.net mvc3 but html

287 views Asked by At

I have a html page that shows a canvas and live video streaming as a texture input by livevideo.js and three.js files. This html page works fine but not in mvc-3 view page in a form of cshtml. All I noticed is that this message below as a warning:

WebGL: INVALID_OPERATION: generateMipmap: level 0 not power of 2 or not all the same size

Why this is working in regular html page in iis server but not in mvc3 view page? I did not have any error yet. Thanks.

2

There are 2 answers

1
Ivo On

If you inspect the request made to the html and the mvc app (for instance, using fiddler), you will see the differences between both responses. I think probably there's a different header between them.

0
DarkoB On

I had a same problem with video texture. What you need to do is to avoid using mipmaps when texture is not power of 2 which are enabled by default:

_tmpTex.generateMipmaps = false;
_tmpTex.minFilter = THREE.LinearFilter;
_tmpTex.magFilter = THREE.LinearFilter;