Skip to content
Snippets Groups Projects
Commit 3f02a78d authored by Jean-Marie PRIGENT's avatar Jean-Marie PRIGENT
Browse files

Update sketch.js for sound notification

parent 9b8669b3
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,9 @@ let classifier;
// Model URL
let imageModelURL = 'https://demo-poc-ml-nail-biter-alerter.s3.eu-west-3.amazonaws.com/model.json';
//let notifyAudio = document.getElementById("notifyAudio");
// Notify audio
let notifyAudio = new Audio('short-success.mp3');
// Video
let video;
......@@ -74,7 +77,8 @@ function gotResult(error, results) {
document.body.style.backgroundColor = "#ff416c";
document.body.style.backgroundImage = "linear-gradient(to right, #ff416c, #ff4b2b)";
// Play sound trigger not working sound without user interaction: cf https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
// notifyAudio.play();
notifyAudio.play();
}
// Classifiy again!
classifyVideo();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment