Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(replay): bind onClick to overlay play/rewind buttons (#57558)

posthog[bot]d3a6b57b38ee
diff --git a/frontend/src/scenes/session-recordings/player/PlayerFrameOverlay.tsx b/frontend/src/scenes/session-recordings/player/PlayerFrameOverlay.tsx
index 32dd65f01517..52cf54a042c4 100644
--- a/frontend/src/scenes/session-recordings/player/PlayerFrameOverlay.tsx
+++ b/frontend/src/scenes/session-recordings/player/PlayerFrameOverlay.tsx
@@ -1,6 +1,7 @@
import './PlayerFrameOverlay.scss'
import { useActions, useValues } from 'kea'
+import { MouseEvent } from 'react'
import { IconEmoji, IconPlay, IconRewindPlay, IconWarning } from '@posthog/icons'
@@ -69,6 +70,12 @@ const PlayerFrameOverlayActions = (): JSX.Element | null => {
const PlayerFrameOverlayContent = (): JSX.Element | null => {
const { currentPlayerState, endReached, logicProps } = useValues(sessionRecordingPlayerLogic)
+ const { setPlay } = useActions(sessionRecordingPlayerLogic)
+
+ const handlePlay = (e: MouseEvent): void => {
+ e.stopPropagation()
+ setPlay()
+ }
let content = null
const pausedState =
@@ -119,6 +126,7 @@ const PlayerFrameOverlayContent = (): JSX.Element | null => {
icon={<IconRewindPlay className="text-6xl text-white" />}
aria-label="Rewind recording"
data-attr="replay-overlay-rewind"
+ onClick={handlePlay}
/>
) : (
<div className="flex flex-col items-center justify-center">
@@ -126,6 +134,7 @@ const PlayerFrameOverlayContent = (): JSX.Element | null => {
icon={<IconPlay className="text-6xl text-white" />}
aria-label="Resume recording"
data-attr="replay-overlay-resume"
+ onClick={handlePlay}
/>
{showActionsOnOverlay && <PlayerFrameOverlayActions />}
</div>