Ok, I sort of fixed it by just removing
<br>
<br>
<section class="main">
<figure>
<div id="stream-container" class="image-container">
<div class="close" id="close-stream">×</div>
<img id="stream" src="" class="rotate90">
</div>
</figure>
<br>
<br>
it does mean that the start button only works once to turn it on in the begining and it doesn't close stream, but small sacriface to make for the webpage to overall work.