gum_picture.html [180:226]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - audio.play(); } else if (picture_status) { content.appendChild(picture); picture.src = window.URL.createObjectURL(stream); picture.onload = function(e) { window.URL.revokeObjectURL(this.src); } } }, function(err) { message.innerHTML = "

" + err + "

"; stopMedia(); }); } catch(e) { message.innerHTML = "

" + e + "

"; stopMedia(); } } function startSnapshot() { capturing = !capturing; if (capturing) { captureImage(); snapshot.value = "Stop Snapshot"; } else { snapshot.value = "Snapshot"; } } function captureImage() { if (video_status && capturing) { //dump("Capturing len " + snapshots.length + "\n"); var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); canvas.width = video.videoWidth/4; canvas.height = video.videoHeight/4; ctx.drawImage(video, 0, 0, canvas.width, canvas.height); if (snapshots.unshift(canvas) > 4) snapshots.length = 4; frames.innerHTML = ''; for(var i=0; i"; stopMedia(); }); } catch(e) { message.innerHTML = "

" + e + "

"; stopMedia(); } } function startSnapshot() { capturing = !capturing; if (capturing) { captureImage(); snapshot.value = "Stop Snapshot"; } else { snapshot.value = "Snapshot"; } } function captureImage() { if (video_status && capturing) { //dump("Capturing len " + snapshots.length + "\n"); var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); canvas.width = video.videoWidth/4; canvas.height = video.videoHeight/4; ctx.drawImage(video, 0, 0, canvas.width, canvas.height); if (snapshots.unshift(canvas) > 4) snapshots.length = 4; frames.innerHTML = ''; for(var i=0; i