I had the same problem and I found a hack. I think the problem arises
when the xhr communication is initiated before all resources are
loaded. Basically the stream.html file must wait before initialising
the xhr connection. So replacing startstream(); by setTimeout
(startstream, 1); fixes the issue. I am not sure it is the cleanest
solution, but it works. If anyone has a better understanding of the
problem, I'll be happy to hear it.