Skip to content

ci-3349 clipset in content tree#143

Open
debugwand wants to merge 5 commits intomainfrom
ci-3349-clip-set
Open

ci-3349 clipset in content tree#143
debugwand wants to merge 5 commits intomainfrom
ci-3349-clip-set

Conversation

@debugwand
Copy link
Contributor

@debugwand debugwand commented Jan 28, 2026

taken from https://github.com/Financial-Times/content-tree/pull/90/changes - rebase would have been harder


some questions:
* what happened with posterAlt and posterCredits? do they not actually exist? are they for legacy?
these were for old clips

some things marked as optional in cp content pipeline (really everything except id and type) that are not optional here: is there a reason?

the following things are marked as optional, matches existing data and content pipeline optional settings

  • accessibility
  • autoplay
  • caption
  • clips (though yes it is weird that it is optional, possibly from legacy data support)
  • contentWarning
  • credits
  • description
  • layout
  • displayTitle
  • loop
  • muted
  • noAudio
  • source
  • subtitle
  • systemtitle

clipsource

  • audioCodec (no guarantee it actually has one)
  • videoCodec (likewise)
  • pixelWidth (no video - no dimensions)
  • pixelHeight (as width)
  • duration

clip

  • format
  • poster

@debugwand debugwand requested review from a team as code owners January 28, 2026 14:44
@debugwand debugwand marked this pull request as draft January 28, 2026 15:06
@adgad
Copy link
Collaborator

adgad commented Jan 28, 2026

what happened with posterAlt and posterCredits? do they not actually exist? are they for legacy?

Yup, I think these were from the original/legacy Clip definition. We no longer publish those attributes from Spark, and we shouldn't have any more content like that AFAIK

some things marked as optional in cp content pipeline (really everything except id and type) that are not optional here: is there a reason?

This may have been an incorrect assumption on my behalf! I think I assumed the reason they were optional in cp-content-pipeline was because they came from the Clip embed (in which case it would be covered by the external modifier. But looking at the C&M schemas for ClipSet and Clip there are very few things that are actually required when publishing, so I think most of those should probably be external AND optional

@debugwand debugwand marked this pull request as ready for review January 29, 2026 12:30
```ts
type ClipAccessibility = {
captions?: ClipCaption[]
transcript?: Body
Copy link
Contributor

Choose a reason for hiding this comment

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

Thought: I can't recall why this is a body. I suspect it was because only the body support multiple paragraphs and Spark publish them because they were coming as that from 3PlayMedia. Do you know more @adgad ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

from the original PR:

There is a challenge around transcripts, which is currently modelled as a nested body. In the current component in cp-content-pipeline-ui, it is expecting another RichText graphql type (which has a graphql-ish data structure with fields like raw, structured, references). I'm not really sure how we model that in content-tree, or if. If we need content-tree to be different to cp-content-pipeline (i.e. maintain a workaround), that would also mean the UI component itself isn't really transferable.
a. DECISION IRL - we should not replicate the graphql structure in content-tree, but instead make cp-content-pipeline work with this somehow. Some ideas below, but still a bit hazy.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So I'm looking through spark clips now, and I can't see any evidence that it's sending XML/HTML for transcripts:

  • The CAPI schema has it as a "string" type
  • In the Spark Clips code it looks like it's grabbing the text blocks and concatting
  • Checked a few recent clips and all the transcripts were plain text.

I wonder if maybe the automatic AI transcripts are coming through as text, but the 3play media ones may be HTML? 🤔 let me see if i can find one of those...

Copy link
Collaborator

@adgad adgad Feb 5, 2026

Choose a reason for hiding this comment

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

OKay yes I think that's it - the professionally transcribed ones are still coming as HTML. Example: https://api.ft.com/content/8a3f67bc-3c86-4779-a4e4-fe93a8642e49

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we strip them at Spark level and avoid dodgy HTML? We will need to amend old data. It seems that in HTML it just add complexity to content pipeline for no valuable reason

SPEC.md Outdated
Comment on lines 591 to 598
type ClipSource = {
binaryUrl: string
mediaType: string
audioCodec?: string
duration?: number
pixelHeight?: number
pixelWidth?: number
videoCodec?: string
Copy link
Contributor

Choose a reason for hiding this comment

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

Could/Should this be potentially a generic mediaSource shared amongst multiple audio/video players? I guess we can keep it like this for now and change it when needed. If the fields don't change it should not be a breaking change, or would it be? @adgad @debugwand

Copy link
Contributor Author

Choose a reason for hiding this comment

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

6de42c5#diff-7426c9e3a694ca6015df5f98637912975f2edea23270203ee89a8bdeed246ee0R41 - this is what would make sense to me for future possible audio sources, while keeping the dataSource property name intact

Copy link
Contributor

Choose a reason for hiding this comment

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

Your solution seems quite neat to me, what do you reckon @adgad?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants