mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
fix this
reference
This commit is contained in:
parent
a3b7d3453e
commit
1e2df37f8f
@ -22,7 +22,9 @@ class RecordVideoExtension implements JsPsychExtension {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.recorder.ondataavailable = this.handleOnDataAvailable;
|
this.recorder.ondataavailable = (event) => {
|
||||||
|
this.handleOnDataAvailable(event);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
on_load = () => {
|
on_load = () => {
|
||||||
@ -32,7 +34,7 @@ class RecordVideoExtension implements JsPsychExtension {
|
|||||||
on_finish = () => {
|
on_finish = () => {
|
||||||
this.recorder.stop();
|
this.recorder.stop();
|
||||||
|
|
||||||
this.recorder.ondataavailable = null;
|
//this.recorder.ondataavailable = null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
record_video_data: new Blob(this.recordedChunks),
|
record_video_data: new Blob(this.recordedChunks),
|
||||||
@ -41,6 +43,7 @@ class RecordVideoExtension implements JsPsychExtension {
|
|||||||
|
|
||||||
private handleOnDataAvailable(event) {
|
private handleOnDataAvailable(event) {
|
||||||
if (event.data.size > 0) {
|
if (event.data.size > 0) {
|
||||||
|
console.log("chunks added");
|
||||||
this.recordedChunks.push(event.data);
|
this.recordedChunks.push(event.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user