thieman / github-selfies

Everything is better with selfies. Yes, even pull requests. Trust me.
MIT License
1.14k stars 76 forks source link

Error when using it on Chrome 36.0.1924.0 #39

Closed hanxue closed 10 years ago

hanxue commented 10 years ago

Saw this error on Chrome Extensions page

Uncaught TypeError: Failed to execute 'webkitGetUserMedia' on 'Naviga

Error in selfie-base.js:202 (anonymous function)

  function startVideo () {
    $('.selfieVideoOverlay').text('Fetching camera stream...');
    $(config.buttonSelector).attr('disabled', 'disabled');
    if (typeof config.preVideoStart === 'function') { config.preVideoStart(); }
    navigator.webkitGetUserMedia({video: true}, function(_stream) {
      var video;
      $(config.buttonSelector).removeAttr('disabled');
      $('.selfieVideoOverlay').text('');
      $(config.videoSelector).removeClass('hideSelfieVideo');
      video  = document.querySelector(config.videoSelector);
      stream = _stream;
      $(config.videoSelector).attr('src', window.URL.createObjectURL(stream));
      if (typeof config.postVideoStart === 'function') { config.postVideoStart(); }
    });
  }
thieman commented 10 years ago

Ah crap, this is a regression from the massive GIF rework. It needs a second callback for the error case. selfie-0

hanxue commented 10 years ago

Oh no, and I thought it is caused by my butterfingers clicking "Deny" to the initial request for webcam permissions. Is there anyway I can re-initialize the permission request, and see if I can workaround this bug?

I have tried uninstalling and re-installing the extension to no avail.

thieman commented 10 years ago

Actually, that might also be a problem. Maybe the advanced dropdown in this article can help you grant access again. https://support.google.com/chrome/answer/2693767?hl=en

thieman commented 10 years ago

Should be fixed by https://github.com/thieman/github-selfies/commit/5b3baf88064cd484c4059d182c075ba6b3657f39