Skip to content

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

Merged
SHession merged 5 commits into
mainfrom
sh/send-self-hosted-player-mute-interaction-events
May 11, 2026
Merged

Track mute and unmute media events for the self hosted video player#15815
SHession merged 5 commits into
mainfrom
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

@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have no strong preference so I've gone for your suggestion of named arguments. I have also updated the function name.

@SHession SHession force-pushed the sh/bump-ophan-tracking-dependencies branch from c06f80f to fe9d166 Compare May 11, 2026 11:23
Base automatically changed from sh/bump-ophan-tracking-dependencies to main May 11, 2026 12:15
@SHession SHession force-pushed the sh/send-self-hosted-player-mute-interaction-events branch from 83b4150 to 56acf82 Compare May 11, 2026 12:18
@SHession SHession force-pushed the sh/send-self-hosted-player-mute-interaction-events branch from f39c9e8 to 47e1df9 Compare May 11, 2026 12:29
@SHession SHession merged commit 9f00267 into main May 11, 2026
24 checks passed
@SHession SHession deleted the sh/send-self-hosted-player-mute-interaction-events branch May 11, 2026 13:18
@gu-prout
Copy link
Copy Markdown

gu-prout Bot commented May 11, 2026

Seen on PROD (merged by @SHession 12 minutes and 52 seconds ago) Please check your changes!

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 Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants