Skip to content

Commit

Permalink
Merge pull request #40 from Aar-if/newaltv1
Browse files Browse the repository at this point in the history
timeSpent added and NaN issue fix for video content
  • Loading branch information
Aar-if authored Feb 28, 2024
2 parents f1e872b + 130299a commit b4eb502
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/common-lib/src/components/SunbirdPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const SunbirdPlayer = ({
// const edata = telemetry?.edata
// trackData = [...trackData, edata]
} else if (telemetry?.eid === 'END') {
localStorage.setItem('totalDuration', telemetry?.edata?.duration)
const summaryData = telemetry?.edata
if (summaryData?.summary && Array.isArray(summaryData?.summary)) {
const score = summaryData.summary.find((e) => e['score'])
Expand Down
2 changes: 1 addition & 1 deletion packages/studentprogram/src/pages/lessonList.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default function LessonList({ footerLinks }) {
lessonId: lessonId?.identifier,
status: "completed",
contentType: localStorage.getItem("contentType"),
duration: localStorage.getItem("totalDuration"),
timeSpent: localStorage.getItem("totalDuration"),
score: score ? score : 0,
scoreDetails: scoreDetails,
program: programData?.programId,
Expand Down

0 comments on commit b4eb502

Please sign in to comment.