mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
feat: speek funcionando no android atraves do firefox
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="pt-BR">
|
||||
<html lang="pt-BR" id="all">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -24,7 +24,6 @@
|
||||
<div class="logo">
|
||||
<h1>
|
||||
<img src="{% static 'midia/logo.png' %}" width="60">
|
||||
|
||||
</h1>
|
||||
</div>
|
||||
<div class="nav-list">
|
||||
|
||||
@@ -11,4 +11,14 @@ function menuShow() {
|
||||
|
||||
function entrar(){
|
||||
alert('Onde tu pensa que vai entrar?🤨');
|
||||
}
|
||||
}
|
||||
var elem = document.getElementById("all");
|
||||
function openFullscreen() {
|
||||
if (elem.requestFullscreen) {
|
||||
elem.requestFullscreen();
|
||||
} else if (elem.webkitRequestFullscreen) { /* Safari */
|
||||
elem.webkitRequestFullscreen();
|
||||
} else if (elem.msRequestFullscreen) { /* IE11 */
|
||||
elem.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,10 +58,8 @@ function notificacao(){
|
||||
if (data['notificacao'] == 'true'){
|
||||
console.log('verdadeiro')
|
||||
document.cookie = `pronto=${data['pronto']}`;
|
||||
// navigator.vibrate(200);
|
||||
// navigator.vibrate([200, 100, 200]);
|
||||
mostrarNotificacao(data['titulo'], data['corpo'],'Garçom')
|
||||
texto = new SpeechSynthesisUtterance(data['corpo']+', para '+data['titulo']);
|
||||
texto = new SpeechSynthesisUtterance(data['corpo']+', para '+data['titulo']+' tá pronto.');
|
||||
window.speechSynthesis.speak(texto);
|
||||
console.log(data['notificacao'])
|
||||
|
||||
@@ -78,7 +76,6 @@ function notificacao(){
|
||||
}
|
||||
|
||||
|
||||
|
||||
setInterval(()=> {
|
||||
notificacao()
|
||||
}, 10000)
|
||||
|
||||
@@ -77,16 +77,14 @@ function notificacao(){
|
||||
.then(data => {
|
||||
if (data['notificacao'] == 'true'){
|
||||
document.cookie = `fila=${data['fila']}`;
|
||||
// navigator.vibrate(200);
|
||||
// navigator.vibrate([200, 100, 200]);
|
||||
mostrarNotificacao(data['titulo'], data['corpo'],'Cozinha')
|
||||
texto = new SpeechSynthesisUtterance(data['corpo']+', '+data['titulo']+'.');
|
||||
window.speechSynthesis.speak(texto);
|
||||
|
||||
}else{
|
||||
console.log(data['notificacao'])
|
||||
console.log('notificação foi false')
|
||||
}
|
||||
// var produtos_mais_vendidos = data.produtos_mais_vendidos
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Erro verificar notificação:', error)
|
||||
|
||||
Reference in New Issue
Block a user