l-min-components 1.7.1488 → 1.7.1490
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/reportsComponents/fullAnalysis/components/Grammar.v2.jsx +1 -1
- package/src/components/reportsComponents/reportQuestions/components/responseAudio.jsx +5 -9
- package/src/components/reportsComponents/reportQuestions/questions/dialogueScripted.jsx +1 -0
- package/src/components/reportsComponents/reportQuestions/questions/dialogueUnscripted.jsx +1 -0
- package/src/components/reportsComponents/reportQuestions/questions/essayScripted.jsx +2 -0
- package/src/components/reportsComponents/reportQuestions/questions/essayUnscripted.jsx +5 -1
- package/src/components/reportsComponents/reportQuestions/questions/quizScripted.jsx +1 -0
- package/src/components/reportsComponents/reportQuestions/questions/quizUnsripted.jsx +1 -0
- package/src/components/reportsComponents/reportQuestions/questions/reading.jsx +2 -0
- package/src/components/reportsComponents/reportQuestions/questions/soundPlay.jsx +2 -0
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@ import useLanguages from "../api/useLanguage";
|
|
|
30
30
|
const GrammarV2 = ({ Aidata, isPersonal }) => {
|
|
31
31
|
const [selectedSection, setSelectedSection] = useState(1);
|
|
32
32
|
|
|
33
|
-
const [selectedOperationIndex, setSelectedOperationIndex] = useState(
|
|
33
|
+
const [selectedOperationIndex, setSelectedOperationIndex] = useState(null);
|
|
34
34
|
const [transalate, setTranslate] = useState(null);
|
|
35
35
|
|
|
36
36
|
const { translateLangData, handleTranslate } = useLanguages();
|
|
@@ -13,18 +13,14 @@ import useAudioPlayer from "../../../useAudioPlayer";
|
|
|
13
13
|
import PlayIcon from "../../../../assets/svg/playIcon";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
* @param {Object} props
|
|
18
|
-
* @param {string} props.url
|
|
19
|
-
* @param {String} props.streamUrl
|
|
20
|
-
* @returns {React.ReactNode}
|
|
21
|
-
*/
|
|
22
|
-
const ResponseAudio = ({ url, streamUrl }) => {
|
|
16
|
+
const ResponseAudio = ({ url, streamUrl, audioData }) => {
|
|
23
17
|
const { play, isPlaying, isReady, pause } = useAudioPlayer({
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
streamSrc: audioData?.url || streamUrl,
|
|
19
|
+
src: audioData?.uploaded_media_url || url,
|
|
26
20
|
});
|
|
27
21
|
|
|
22
|
+
console.log(url, "/////");
|
|
23
|
+
|
|
28
24
|
useEffect(() => {
|
|
29
25
|
return () => {
|
|
30
26
|
if (isPlaying) {
|
|
@@ -81,6 +81,7 @@ const DialogueScripted = ({ data, aiData, setToggle }) => {
|
|
|
81
81
|
<ResponseAudio
|
|
82
82
|
streamUrl={selectedResponse?.recording?.url}
|
|
83
83
|
url={selectedResponse?.recording?.uploaded_media_url}
|
|
84
|
+
audioData={selectedResponse?.recording}
|
|
84
85
|
key={selected}
|
|
85
86
|
/>
|
|
86
87
|
<div className="right">
|
|
@@ -79,6 +79,7 @@ const DialogueUnscripted = ({ data, aiData, setToggle }) => {
|
|
|
79
79
|
<ResponseAudio
|
|
80
80
|
streamUrl={selectedResponse?.recording?.url}
|
|
81
81
|
url={selectedResponse?.recording?.uploaded_media_url}
|
|
82
|
+
audioData={selectedResponse?.recording}
|
|
82
83
|
key={selected}
|
|
83
84
|
/>
|
|
84
85
|
<div className="right">
|
|
@@ -56,6 +56,8 @@ const EssayScripted = ({ data, aiData, setToggle }) => {
|
|
|
56
56
|
<ResponseAudio
|
|
57
57
|
streamUrl={data?.answer?.data?.data?.recording?.url}
|
|
58
58
|
url={data?.answer?.data?.data?.recording?.uploaded_media_url}
|
|
59
|
+
audioData={data?.answer?.data?.data?.recording}
|
|
60
|
+
key={data?.answer?.data?.data?.recording?.id}
|
|
59
61
|
/>
|
|
60
62
|
)}
|
|
61
63
|
<div className="right">
|
|
@@ -25,6 +25,8 @@ const EssayUnscripted = ({ data, aiData, setToggle }) => {
|
|
|
25
25
|
}
|
|
26
26
|
}, [data]);
|
|
27
27
|
const transcript = getTrabScriptData(analysis?.models);
|
|
28
|
+
|
|
29
|
+
console.log(data?.answer?.data?.data?.recording?.uploaded_media_url);
|
|
28
30
|
return (
|
|
29
31
|
<QuestionSection>
|
|
30
32
|
{data?.question_data?.question_title && (
|
|
@@ -47,8 +49,10 @@ const EssayUnscripted = ({ data, aiData, setToggle }) => {
|
|
|
47
49
|
<QuestionSectionAction>
|
|
48
50
|
{data?.answer && (
|
|
49
51
|
<ResponseAudio
|
|
52
|
+
key={data?.answer?.data?.data?.recording?.id}
|
|
50
53
|
streamUrl={data?.answer?.data?.data?.recording?.url}
|
|
51
|
-
url={data?.
|
|
54
|
+
url={data?.answer?.data?.data?.recording?.uploaded_media_url}
|
|
55
|
+
audioData={data?.answer?.data?.data?.recording}
|
|
52
56
|
/>
|
|
53
57
|
)}
|
|
54
58
|
<div className="right">
|
|
@@ -73,6 +73,7 @@ const QuizScripted = ({ data, aiData, setToggle }) => {
|
|
|
73
73
|
<ResponseAudio
|
|
74
74
|
streamUrl={selectedResponse?.recording?.url}
|
|
75
75
|
url={selectedResponse?.recording?.uploaded_media_url}
|
|
76
|
+
audioData={selectedResponse?.recording}
|
|
76
77
|
key={selected}
|
|
77
78
|
/>
|
|
78
79
|
<div className="right">
|
|
@@ -68,6 +68,7 @@ const QuizUnscripted = ({ data, aiData, setToggle }) => {
|
|
|
68
68
|
<ResponseAudio
|
|
69
69
|
streamUrl={selectedResponse?.recording?.url}
|
|
70
70
|
url={selectedResponse?.recording?.uploaded_media_url}
|
|
71
|
+
audioData={selectedResponse?.recording}
|
|
71
72
|
key={selected}
|
|
72
73
|
/>
|
|
73
74
|
<div className="right">
|
|
@@ -49,6 +49,8 @@ const Reading = ({ data, aiData, setToggle }) => {
|
|
|
49
49
|
<ResponseAudio
|
|
50
50
|
streamUrl={data?.answer?.data?.recording?.url}
|
|
51
51
|
url={data?.answer?.data?.recording?.uploaded_media_url}
|
|
52
|
+
audioData={data?.answer?.data?.recording}
|
|
53
|
+
key={data?.answer?.data?.recording?.id}
|
|
52
54
|
/>
|
|
53
55
|
<div className="right">
|
|
54
56
|
<AnalysisButton
|
|
@@ -51,6 +51,8 @@ const SoundPlay = ({ data, aiData, setToggle }) => {
|
|
|
51
51
|
<ResponseAudio
|
|
52
52
|
streamUrl={data?.answer?.data?.audio?.url}
|
|
53
53
|
url={data?.answer?.data?.audio?.uploaded_media_url}
|
|
54
|
+
audioData={data?.answer?.data?.audio}
|
|
55
|
+
key={data?.answer?.data?.audio?.id}
|
|
54
56
|
/>
|
|
55
57
|
<div className="right">
|
|
56
58
|
<AnalysisButton
|