From 8683aff031c9aff34e511a0ed1bfda2144cdb754 Mon Sep 17 00:00:00 2001 From: Ramon Garcia Date: Fri, 27 Feb 2015 09:51:03 +0100 Subject: [PATCH] SAM-2453 If the microphone permission is not allowed in audio questions the recording popup restarts endlessly. --- reference/library/src/webapp/js/sakai-recorder.js | 2 +- .../tool/assessment/bundle/DeliveryMessages.properties | 1 + .../tool/assessment/bundle/DeliveryMessages_es.properties | 1 + .../samigo-app/src/webapp/jsf/delivery/item/audioObject.jsp | 4 ++++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/reference/library/src/webapp/js/sakai-recorder.js b/reference/library/src/webapp/js/sakai-recorder.js index 7cd8a5b7d76b..726a0b0061ff 100644 --- a/reference/library/src/webapp/js/sakai-recorder.js +++ b/reference/library/src/webapp/js/sakai-recorder.js @@ -582,7 +582,7 @@ $(document).ready(function() { userMediaSupport = false; // Why is the user denying the mic? Reload and try again. - location.reload(); + $('#sakai-recorder-error').show(); }); } diff --git a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/DeliveryMessages.properties b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/DeliveryMessages.properties index abbbbc6d15f2..150393436fe7 100755 --- a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/DeliveryMessages.properties +++ b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/DeliveryMessages.properties @@ -545,6 +545,7 @@ audio_recorder_attempts_allowed=Total attempts allowed: audio_recorder_attempts_remaining=Attempts remaining: audio_recorder_browser_plea=Your browser does not support HTML5 audio APIs and does not have Flash support. Please consider using the latest version of Chrome or Firefox. audio_recorder_last_attempt=Your final attempt will be saved automatically when you click Stop +audio_not_allowed=Your browser does not have permission to use the microphone. Please adjust the permissions in your browser to use it and refresh the page. #message parameters: #0: user input diff --git a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/DeliveryMessages_es.properties b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/DeliveryMessages_es.properties index dce74a070b3e..64927cab905e 100644 --- a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/DeliveryMessages_es.properties +++ b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/DeliveryMessages_es.properties @@ -538,6 +538,7 @@ audio_recorder_attempts_allowed=Total de intentos permitidos\: audio_recorder_attempts_remaining=Intentos restantes\: audio_recorder_browser_plea=Su navegador no soporta las API's d audio HTML5 y no tiene soporte Flash. Por favor, considere el uso de la \u00faltima versi\u00f3n de Chrome o Firefox. audio_recorder_last_attempt=Tu intento definitivo se guardar\u00e1 autom\u00e1ticamente cuando pulses en Detener +audio_not_allowed=No tiene permisos en el navegador para usar el micr\u00f3fono, por favor cambie los permisos en su navegador para poder usarlo y recargue la p\u00e1gina. #message parameters: #0: user input diff --git a/samigo/samigo-app/src/webapp/jsf/delivery/item/audioObject.jsp b/samigo/samigo-app/src/webapp/jsf/delivery/item/audioObject.jsp index 3a5d0580d0b1..cee2d5238257 100644 --- a/samigo/samigo-app/src/webapp/jsf/delivery/item/audioObject.jsp +++ b/samigo/samigo-app/src/webapp/jsf/delivery/item/audioObject.jsp @@ -26,6 +26,10 @@
+ +
1