Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-073
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-073
2022-073
Commits
ba96757f
Commit
ba96757f
authored
Nov 13, 2022
by
AdithyaKahawanugoda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc activitiy videos croped
parent
6c82a518
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
17 deletions
+12
-17
web-app/frontend/public/Videos/vid1.mp4
web-app/frontend/public/Videos/vid1.mp4
+0
-0
web-app/frontend/public/Videos/vid2.mp4
web-app/frontend/public/Videos/vid2.mp4
+0
-0
web-app/frontend/src/components/activities/reasoningIqEval/pictureConcept/PictureConcept.jsx
...ivities/reasoningIqEval/pictureConcept/PictureConcept.jsx
+0
-4
web-app/frontend/src/components/activities/reasoningIqEval/recorder/Recorder.js
...omponents/activities/reasoningIqEval/recorder/Recorder.js
+12
-13
No files found.
web-app/frontend/public/Videos/vid1.mp4
View file @
ba96757f
No preview for this file type
web-app/frontend/public/Videos/vid2.mp4
View file @
ba96757f
No preview for this file type
web-app/frontend/src/components/activities/reasoningIqEval/pictureConcept/PictureConcept.jsx
View file @
ba96757f
...
@@ -61,15 +61,11 @@ const PictureConcept = ({ nextActivity }) => {
...
@@ -61,15 +61,11 @@ const PictureConcept = ({ nextActivity }) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
effectRan
.
current
===
false
)
{
if
(
effectRan
.
current
===
false
)
{
RecordingHandler
(
`PC.wav`
,
activityIndex
,
"
pc
"
);
RecordingHandler
(
`PC.wav`
,
activityIndex
,
"
pc
"
);
return
()
=>
{
return
()
=>
{
console
.
log
(
"
unmounted
"
);
console
.
log
(
"
unmounted
"
);
effectRan
.
current
=
true
;
effectRan
.
current
=
true
;
};
};
}
}
// console.log(activityIndex);
// RecordingHandler(`PC.wav`, activityIndex, "pc");
},
[
activityIndex
]);
},
[
activityIndex
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
web-app/frontend/src/components/activities/reasoningIqEval/recorder/Recorder.js
View file @
ba96757f
...
@@ -22,17 +22,16 @@ export const RecordingHandler = async (
...
@@ -22,17 +22,16 @@ export const RecordingHandler = async (
recorder
.
record
();
recorder
.
record
();
const
sleep
=
(
m
)
=>
new
Promise
((
r
)
=>
setTimeout
(
r
,
m
));
const
sleep
=
(
m
)
=>
new
Promise
((
r
)
=>
setTimeout
(
r
,
m
));
sleep
(
15000
);
//await
await
sleep
(
15000
);
//await
await
recorder
.
stop
(
function
()
{
recorder
.
stop
(
function
()
{
console
.
log
(
"
Stopped Activity Index:
"
,
questionIndex
);
console
.
log
(
"
Stopped Activity Index:
"
,
questionIndex
);
let
blob
=
recorder
.
blob
;
let
blob
=
recorder
.
blob
;
stream
.
getTracks
().
forEach
(
function
(
track
)
{
track
.
stop
();
});
processRecording
(
blob
,
fileName
,
questionIndex
,
activityName
);
processRecording
(
blob
,
fileName
,
questionIndex
,
activityName
);
});
});
stream
.
getTracks
().
forEach
(
function
(
track
)
{
track
.
stop
();
});
};
};
const
processRecording
=
(
blob
,
fileName
,
questionIndex
,
activityName
)
=>
{
const
processRecording
=
(
blob
,
fileName
,
questionIndex
,
activityName
)
=>
{
...
@@ -59,13 +58,13 @@ const uploadRecording = async (file, fileName, questionIndex, activityName) => {
...
@@ -59,13 +58,13 @@ const uploadRecording = async (file, fileName, questionIndex, activityName) => {
};
};
if
(
activityName
===
"
pc
"
)
{
if
(
activityName
===
"
pc
"
)
{
//
await API.post(`predictPictureConcept`, data, config)
await
API
.
post
(
`predictPictureConcept`
,
data
,
config
)
//
.then((res) => {
.
then
((
res
)
=>
{
//
console.log(res.data);
console
.
log
(
res
.
data
);
//
})
})
//
.catch((err) => {
.
catch
((
err
)
=>
{
//
console.log(err, "ERROR");
console
.
log
(
err
,
"
ERROR
"
);
//
});
});
}
}
if
(
activityName
===
"
ar
"
)
{
if
(
activityName
===
"
ar
"
)
{
// await API.post(`predictArithmetic`, data, config)
// await API.post(`predictArithmetic`, data, config)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment