diff --git a/src/components/pages/ABDesign/v1/pages/TrialPayment/components/PersonalVideo/index.tsx b/src/components/pages/ABDesign/v1/pages/TrialPayment/components/PersonalVideo/index.tsx index 43f66a8..4953bd1 100644 --- a/src/components/pages/ABDesign/v1/pages/TrialPayment/components/PersonalVideo/index.tsx +++ b/src/components/pages/ABDesign/v1/pages/TrialPayment/components/PersonalVideo/index.tsx @@ -31,6 +31,12 @@ const PersonalVideo = React.memo(({ url, gender }) => { metricService.reachGoal(EGoals.ROSE_VIDEO_PLAY_END); }; + const handlePlayPause = () => { + setIsPlaying((prev) => !prev); + if (isPlaying) metricService.reachGoal(EGoals.ROSE_VIDEO_PLAY_USER_PLAY); + if (!isPlaying) metricService.reachGoal(EGoals.ROSE_VIDEO_PLAY_USER_STOP); + }; + return (
{!isPlaying && !isError && !isStarted && ( @@ -67,7 +73,7 @@ const PersonalVideo = React.memo(({ url, gender }) => { {!isError && isStarted && ( setIsPlaying((prev) => !prev)} + onClick={handlePlayPause} className={styles["play-pause-button"]} /> )}