From 1199a3050b6f7580cdc3f82919b440e3132c4a3d Mon Sep 17 00:00:00 2001 From: Gustavo Date: Thu, 7 Apr 2022 12:03:16 -0300 Subject: [PATCH] Alerta sonoro view do painel --- sapl/templates/sessao/painel.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sapl/templates/sessao/painel.html b/sapl/templates/sessao/painel.html index 44f345a75..1852901f8 100644 --- a/sapl/templates/sessao/painel.html +++ b/sapl/templates/sessao/painel.html @@ -116,11 +116,12 @@ $(function() { } startTime(); - var audioAlertFinish = document.getElementById("audio"); + var audioAlertFinish = document.getElementById("audio"); $('#discurso').prop('disabled', false); $('#aparte').prop('disabled', false); $('#ordem').prop('disabled', false); - $('#consideracoes').prop('disabled', false); + $('#consideracoes').prop('disabled', false); + var intervaloDiscurso; $('#discurso').runner({ autostart: false, @@ -143,6 +144,9 @@ $(function() { $('#discursoReset').show(); $('#discurso').runner('stop'); $('#discursoStart').text('Iniciar'); + clearInterval(intervaloDiscurso); + + }); @@ -155,6 +159,13 @@ $(function() { $('#discursoReset').hide(); $('#discurso').runner('start'); $('#discursoStart').text('Parar'); + intervaloDiscurso = setInterval(function () { + if($('#cronometro_discurso').runner('info').formattedTime == "00:00:02") { + audioAlertFinish.play(); + } + }, 1000); + + } else {