Skip to content

Add new media event types#246

Merged
SHession merged 2 commits intomainfrom
sh/add-new-media-event-types
May 5, 2026
Merged

Add new media event types#246
SHession merged 2 commits intomainfrom
sh/add-new-media-event-types

Conversation

@SHession
Copy link
Copy Markdown
Contributor

@SHession SHession commented Apr 30, 2026

What does this change?

Updates the MediaEvent thrift definition to match the new Ophan events. These correspond to tracking events we would like to send for self-hosted video.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

🦋 Changeset detected

Latest commit: 98fa575

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@guardian/bridget Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@SHession SHession added maintenance Departmental tracking: maintenance work, not a fix or a feature feature Departmental tracking: work on a new feature and removed maintenance Departmental tracking: maintenance work, not a fix or a feature labels Apr 30, 2026
@SHession SHession marked this pull request as ready for review April 30, 2026 12:49
@SHession SHession requested review from a team as code owners April 30, 2026 12:49
@SHession SHession changed the title Sh/add new media event types Add new media event types Apr 30, 2026
Comment thread thrift/native.thrift
enter_fullscreen = 10
exit_fullscreen = 11
view = 12
}
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.

Just out of curiousity, is there a reason to not include some of the available events (eg skip and cued

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've noticed those around, but I'm not sure what their intention is. Are these things we want to track?

They are not currently part of the Ophan model: https://dashboard.ophan.co.uk/docs/thrift/media.html#Enum_MediaEvent

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.

That's interesting. It looks like they were introduced to the thrift model over 2 years ago so not really in the scope of this PR anyway. As far as I'm aware, we're not including a skip button in the upcoming mvp player release so these are events we need to worry about for now.

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.

Good find! There is some missing context but I think that PR was attempting to codify the types already being used: https://github.com/guardian/ophan/pull/5822/changes#diff-4a7da8dbfd99c582271f26a2242b40557a69b3165b08bab3bf534c91e0c9064bR40-R44

The thrift model is a separate entity to those types and has no reference to those types. The conversion between what the web provides and the Ophan model expects takes place here: https://github.com/guardian/ophan/blob/258357082296624776c2bcc3ec8375779349b063/the-slab/app/extractors/MediaPlaybackExtractor.scala#L15-L20

Copy link
Copy Markdown
Contributor

@abeddow91 abeddow91 left a comment

Choose a reason for hiding this comment

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

Checked against https://github.com/guardian/ophan/pull/8060/changes and this looks to include all of the new events.

@SHession SHession merged commit 8bd56ff into main May 5, 2026
8 of 9 checks passed
@SHession SHession deleted the sh/add-new-media-event-types branch May 5, 2026 11:06
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.

2 participants