g && !self.paused) {
        log("Video can play, forcing play")
        onUserActivity()
        self.play()
      }
    }, 100);
  };

  var menu = document.getElementById('context-menu');
  menu.addEventListener("mousedown", function(e) {
    e.stopPropagation();
  });

  var closeContextMenu = function(e) {
    if (e) {
      e.stopPropagation();
      e.preventDefault();
    }
    menu.style.display = "none";
    self.player.removeEventListener("mousedown", closeContextMenu);
    document.removeEventLi