diff --git a/slaeforms/app.py b/slaeforms/app.py index 4a77a04..14aba46 100644 --- a/slaeforms/app.py +++ b/slaeforms/app.py @@ -33,7 +33,7 @@ app = Flask(__name__) # configure the database, give it a path (it will be in the instances folder) app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///database.db" app.config["PERMANENT_SESSION_LIFETIME"] = 10800 #3 Stunden, 10800 sekunden -app.config['MAX_CONTENT_LENGTH'] = 20 * 1000 * 1000 # try and fix video upload not working +app.config['MAX_CONTENT_LENGTH'] = 22 * 1000 * 1000 # try and fix video upload not working db.init_app(app) #set the secret key (TODO change this for final deployment) diff --git a/slaeforms/static/videoscript.js b/slaeforms/static/videoscript.js index bc911f8..ebf178c 100644 --- a/slaeforms/static/videoscript.js +++ b/slaeforms/static/videoscript.js @@ -15,7 +15,7 @@ let recordedVideoBlob = null; // recorded videodata let isRecording = false; // false to display record button, true to display stop button let videoAccess = false; // true if user has given permission to use the webcam -let videotime = 75; // how many seconds video is allowed to be recorded +let videotime = 70; // how many seconds video is allowed to be recorded let timeleft = videotime; // counter for how much time is still left var countdownTimer; //the timer object that will end the recording if it takes too long @@ -131,7 +131,7 @@ async function cameraButton() { mediaRecorder = new MediaRecorder(stream, { mimeType: "video/webm", audioBitsPerSecond: 0, - videoBitsPerSecond: 2000000, // Standard bitrate for video is 2,5 mbps + videoBitsPerSecond: 1900000, // Standard bitrate for video is 2,5 mbps }); // when data is available at the mediaRecorder (this means the recording has ended, since I have not specified time intervalls) @@ -205,7 +205,9 @@ function recordButton() { videoDisplay.srcObject = stream; // set webcam stream as input for the video display videoDisplay.controls = false; // hide the video controls durin recording, because they are confusing mediaRecorder.start(); // start recording - timeoutstopper = setInterval(countdown, 1000) //stop the recording after "videotime" Seconds + timeleft = videotime; + countdownTimer = setInterval(countdown, 1000) //stop the recording after "videotime" Seconds + console.log("video bitrate = ",mediaRecorder.videoBitsPerSecond); @@ -230,7 +232,7 @@ function recordButton() { function stopRecording() { mediaRecorder.stop(); // stop recording videoDisplay.classList.remove("videomirror"); // don't mirror the videodisplay anymore - + clearInterval(countdownTimer); console.log("recording stops"); // enable the deletebutton again @@ -248,9 +250,8 @@ function timerStop() { function countdown() { if(timeleft <= 0){ - timerStop(); countdownText.textContent = ""; - timeleft = videotime + timerStop(); clearInterval(countdownTimer); return; } diff --git a/slaeforms/templates/p1infos.html b/slaeforms/templates/p1infos.html index 97577a3..9fb368e 100644 --- a/slaeforms/templates/p1infos.html +++ b/slaeforms/templates/p1infos.html @@ -3,5 +3,6 @@
Im Folgenden werden ihnen Videos gezeigt, die sie in den Kategorien „Natürlichkeit“, „Verständlichkeit“ und „grammatikalischer Korrektheit“ bewerten sollen.
Dafür können sie auf einer Skala mit 7 Punkten bewerten, wobei der Punkt ganz links für „sehr schlecht“, der Punkt in der Mitte für „neutral“, und der Punkt ganz rechts für „sehr schlecht“ steht.
Dann können sie weiteres Feedback als Text oder als Video geben. Das Video können sie direkt im Browser aufnehmen. Beachten sie, dass sie dazu eine Webcam benötigen und der Webseite erlauben müssen diese zu benutzen. Wenn sie auf den Kamera Knopf drücken, wird ihr Browser sie nach der Berechtigung fragen.
+Wenn sie Feedback per Video geben, kann es je nach dem wie schnell ihre Internetverbindung ist, einige Sekunden dauern die nächste Seite aufzurufen, weil das Video erst hochgeladen werden muss.
Genaue Informationen darüber wie wir die Videos verarbeiten finden sie in unserer Datenschutzerklärung.
\ No newline at end of file diff --git a/slaeforms/templates/standard_template.html b/slaeforms/templates/standard_template.html index 58527dd..6f19498 100644 --- a/slaeforms/templates/standard_template.html +++ b/slaeforms/templates/standard_template.html @@ -308,7 +308,7 @@ step={{question["step"]}} - + diff --git a/slaeforms/userstudy1.json b/slaeforms/userstudy1.json index bbfbe6b..bd3d5ac 100644 --- a/slaeforms/userstudy1.json +++ b/slaeforms/userstudy1.json @@ -435,7 +435,7 @@ }, "question5": { "type": "videoinput", - "text": "Hier können sie per Video Feedback geben", + "text": "Hier können sie per Video Feedback geben (max. 70 Sekunden)", "name": "video_feedback", "required": "false" } @@ -616,7 +616,7 @@ }, "question6": { "type": "videoinput", - "text": "Hier können sie per Video Feedback geben", + "text": "Hier können sie per Video Feedback geben (max. 70 Sekunden)", "name": "video_feedback", "required": "false" } @@ -808,7 +808,7 @@ }, "question6": { "type": "videoinput", - "text": "Hier können sie per Video Feedback geben", + "text": "Hier können sie per Video Feedback geben (max. 70 Sekunden)", "name": "video_feedback", "required": "false" }