delay 2 secs
This commit is contained in:
parent
dee46f821e
commit
d4cd19cca4
2 changed files with 7 additions and 2 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
<div id="button-containers" class="row">
|
||||
<button id="take-photo-btn" class="btn waves-effect waves-light disabled" name="take-photo-btn" onClick="takePhoto()">
|
||||
<i class="material-icons left">camera</i>Take photo
|
||||
<i class="material-icons left">camera</i>Take photo <small>(2 secs delay)</small>
|
||||
</button>
|
||||
<button id="send-photo-btn" class="btn waves-effect waves-light disabled" name="send-photo-btn" onClick="sendPhoto()">
|
||||
<i class="material-icons left">share</i>Share photo
|
||||
|
|
|
@ -143,7 +143,7 @@ function sendPhoto() {
|
|||
}
|
||||
|
||||
|
||||
function takePhoto() {
|
||||
function _takePhoto() {
|
||||
console.log("take photo");
|
||||
document.querySelector("#sb-message").style.visibility = "visible";
|
||||
var video = document.querySelector("#sb-video");
|
||||
|
@ -175,6 +175,11 @@ function takePhoto() {
|
|||
}
|
||||
|
||||
|
||||
function takePhoto() {
|
||||
window.setTimeout(_takePhoto, 2000);
|
||||
}
|
||||
|
||||
|
||||
function initCamera() {
|
||||
console.log("request camera permission");
|
||||
document.querySelector("#canvas-container").style.display = "block";
|
||||
|
|
Loading…
Reference in a new issue