EnCiv / undebate

Not debates, but recorded online video Q&A with candidates so voters can quickly can get to know them, for every candidate, for every election, across the US.
Other
20 stars 14 forks source link

Recorder Silently Stalled if another app has the camera #104

Open ddfridley opened 4 years ago

ddfridley commented 4 years ago

If you are running Zoom (or maybe if any other app has the camera) when you open a link to a recorder (specifially cc.enciv.org/moderator-maker-recorder) , after you agree to the preamble, it goes to the screen with the windows, but it just sits there showing the speaker, and a blank window for the camera.

It should show a message or something saying that the camera is not available, and click here to try again.

look in app/components/reactCameraRecorder.jsx and app/components/web-components/undebate.jsx

You can duplicate this problem by opening the camera on Windows, and going to your localhost:/schoolboard-undebate-candidate-recorder

ddfridley commented 4 years ago

If you are trying to record, and the app can't get the camera - perhaps because it's being used by zoom or the camera app or something, there is no indication to the user. But this is what show up in the logs:

1:07:46 PM browser info  [ '2020-04-01T20:07:46.646Z',
  'Undebate.beginButton',
  { socketId: 'XM9yJBDo2XtGZ5-LAAAR', userId: 'anonymous' } ]
1:07:50 PM browser error  [ '2020-04-01T20:07:50.482Z',
  'navigator.getUserMedia error:',
  'NotReadableError',
  'Could not start video source',
  { socketId: 'XM9yJBDo2XtGZ5-LAAAR', userId: 'anonymous' } ]
1:07:50 PM browser error  [ '2020-04-01T20:07:50.483Z',
  'getCameraMedia',
  'NotReadableError',
  'Could not start video source',
  { socketId: 'XM9yJBDo2XtGZ5-LAAAR', userId: 'anonymous' } ]

see async getCameraMedia in app/components/web-components/undebate.jsx and app/components/react-camera-recorder.jsx