Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/assets/sounds/coinsEarnSound.mp3
Binary file not shown.
8 changes: 7 additions & 1 deletion src/pages/videos/videoReel/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import LikeButton from "./LikeButton";
import { TopIcon } from "./TopIcon";
import VideoList from "./VideoList";
const TELEMETRYBATCH = import.meta.env.VITE_TELEMETRYBATCH || 20;

import soundFile from "../../../assets/sounds/coinsEarnSound.mp3";
/*
Comment telemetry in all Sunbird players; to undo, find this function and uncomment.
TelemetrySyncManager.syncFailedBatch();
Expand Down Expand Up @@ -110,6 +110,11 @@ const VideoReel: React.FC<{
}
}, 300);

const playSound = () => {
const audio = new Audio(soundFile);
audio.play().catch((error) => console.error("Audio play error:", error));
};

const newHandleEvent = async (data: any) => {
const result = handleEvent(data);
if (data?.data?.iframeId) {
Expand Down Expand Up @@ -193,6 +198,7 @@ const VideoReel: React.FC<{
setCoins(
(e) => e + retult1?.assignRewardPoints?.lesson_completion?.points
);
playSound();
}
await callReaminigTelemetry(
telemetryListRef?.current || [],
Expand Down
Loading