Some finetuning before feedback

This commit is contained in:
Jan 2024-09-23 15:15:32 +02:00
parent c4e312662c
commit 5eed494c16
5 changed files with 13 additions and 11 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -3,5 +3,6 @@
<p>Im Folgenden werden ihnen Videos gezeigt, die sie in den Kategorien „Natürlichkeit“, „Verständlichkeit“ und „grammatikalischer Korrektheit“ bewerten sollen.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>Genaue Informationen darüber wie wir die Videos verarbeiten finden sie in unserer <a target="_blank" href="{{ url_for('datenschutz') }}">Datenschutzerklärung</a>.</p>
</div>

View File

@ -308,7 +308,7 @@ step={{question["step"]}}
<video autoplay muted playsinline id="videoDisplay"></video>
</div>
<p id="countdown" style="font-size: 50px; text-align: center;"></p>
<p id="countdown" style="font-size: 40px; text-align: center;"></p>
<script src="{{ url_for('static', filename='videoscript.js')}}">
</script>

View File

@ -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"
}