function updateButtonState() {
  var btn = document.querySelector('button');
  btn.disabled = false;

  if((!curStream) || (!curStream.active)) {
    btn.innerHTML = "Enable Camera";
  }
  else {
    btn.innerHTML = "Disable Camera"; 
  }
}
Updates button state according to Camera stream status