File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ navigator.mediaDevices.getUserMedia(
184
184
function successCallback ( stream ) {
185
185
console . log ( 'getUserMedia() got stream: ' , stream ) ;
186
186
window . stream = stream ;
187
-
187
+ gumVideo . srcObject = stream ;
188
188
}
189
189
190
190
function errorCallback ( error ) {
@@ -216,7 +216,20 @@ function handleDataAvailable(event) {
216
216
}
217
217
}
218
218
219
+ function handleStop ( event ) {
220
+ console . log ( 'Recorder stopped: ' , event ) ;
221
+ }
219
222
223
+ function toggleRecording ( ) {
224
+ if ( recordButton . textContent === 'Start Recording' ) {
225
+ startRecording ( ) ;
226
+ } else {
227
+ stopRecording ( ) ;
228
+ recordButton . textContent = 'Start Recording' ;
229
+ playButton . disabled = false ;
230
+ downloadButton . disabled = false ;
231
+ }
232
+ }
220
233
221
234
222
235
// The nested try blocks will be simplified when Chrome 47 moves to Stable
You can’t perform that action at this time.
0 commit comments