Skip to content

Track mute and unmute media events for the self hosted video player#15815

Open
SHession wants to merge 7 commits intosh/bump-ophan-tracking-dependenciesfrom
sh/send-self-hosted-player-mute-interaction-events
Open

Track mute and unmute media events for the self hosted video player#15815
SHession wants to merge 7 commits intosh/bump-ophan-tracking-dependenciesfrom
sh/send-self-hosted-player-mute-interaction-events

Conversation

@SHession
Copy link
Copy Markdown
Contributor

@SHession SHession commented May 7, 2026

What does this change?

This change submits tracking events when self-hosted video mutes or unmuted via user interaction.

Note

This does not include when a video is muted by a non explicit user action e.g. scrolling the video out of view.

Why?

This will allow us to gather data about user interactions with the self hosted media player, following on from #15804.

Testing

I have tested this change across Chrome, Firefox and Safari.

@SHession SHession changed the title Sends mute and unmute media events when users mute the self hosted vi… Tracj mute and unmute media events for the self hosted video player May 7, 2026
@SHession SHession changed the title Tracj mute and unmute media events for the self hosted video player Track mute and unmute media events for the self hosted video player May 7, 2026
@SHession SHession added the feature Departmental tracking: work on a new feature label May 7, 2026
@SHession SHession force-pushed the sh/bump-ophan-tracking-dependencies branch from c4caaba to 1435a56 Compare May 7, 2026 09:43
@SHession SHession force-pushed the sh/send-self-hosted-player-mute-interaction-events branch from 6f9c7eb to 6caa8d0 Compare May 7, 2026 09:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

@SHession SHession marked this pull request as ready for review May 7, 2026 10:04
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

},
[playerState, isMuted, sendOphanTrackingEvent],
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very neat!

@SHession SHession force-pushed the sh/bump-ophan-tracking-dependencies branch from 1435a56 to f81be55 Compare May 7, 2026 14:58
@SHession SHession requested a review from a team as a code owner May 7, 2026 14:58
@SHession SHession force-pushed the sh/bump-ophan-tracking-dependencies branch from f81be55 to c06f80f Compare May 7, 2026 14:58
Copy link
Copy Markdown
Contributor

@domlander domlander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A great step to improving our video tracking 🎉

[isWeb, isApps, atomId, ophanVideoStyle],
);

const mutePlayer = useCallback(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a name like setMutedState or similar might make calls to this function easier to read.

I also might be tempted to use named arguments here to make calls to this function even clearer to read without having to check the implementation, but will leave up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants