Skip to content
Snippets Groups Projects
Commit 2071cbf7 authored by v4nkor's avatar v4nkor
Browse files

Working scrollup + WIP ask for microphone

parent 75db13d6
Branches
No related tags found
No related merge requests found
......@@ -110,7 +110,7 @@ function listenForCristo(){
recognition.onerror = function(event) {
voiceBtn.disabled = false;
voiceBtn.textContent = 'Ecouter a nouveau';
diagnosticPara.textContent = 'Error occurred in recognition: ' + event.error;
console.log('Error occurred in recognition: ' + event.error);
voiceSpan.style.display = "none";
heardSpan.innerText = " Erreur ";
heardSpan.style.display = "";
......@@ -319,7 +319,7 @@ function pageScrollDown() {
function pageScrollUp() {
window.scrollBy(0,-1);
if ((window.innerHeight + Math.round(window.scrollY)) <= document.body.offsetHeight) {
if (window.scrollY <= 1) {
speak("Haut de page atteind, j'arrete de monter");
}
else{
......@@ -347,3 +347,11 @@ docReady(function() {
populateVoiceList();
voiceSelect.value= "Microsoft Paul - French (France) (fr-FR)";
});
navigator.mediaDevices.getUserMedia({ audio: true })
.then(function(stream) {
console.log('You let me use your mic!')
})
.catch(function(err) {
console.log('No mic for you!')
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment