(stream)
| 98 | } |
| 99 | |
| 100 | function gotStream(stream) { |
| 101 | window.stream = stream; // make stream available to console |
| 102 | videoElement.srcObject = stream; |
| 103 | if (stream.getVideoTracks()[0]) { |
| 104 | openCamera = stream.getVideoTracks()[0].getSettings().deviceId; |
| 105 | } |
| 106 | if (stream.getAudioTracks()[0]) { |
| 107 | openMic = stream.getAudioTracks()[0].getSettings().deviceId; |
| 108 | } |
| 109 | // Refresh list in case labels have become available |
| 110 | return getDevices(); |
| 111 | } |
| 112 | |
| 113 | function handleError(error) { |
| 114 | console.log('navigator.MediaDevices.getUserMedia error: ', error.message, error.name); |
nothing calls this directly
no test coverage detected