-
Notifications
You must be signed in to change notification settings - Fork 2
ci-3349 clipset in content tree #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,23 @@ | |
| These abstract helper types define special types a [Parent](#parent) can use as | ||
| [children][term-child]. | ||
|
|
||
|
|
||
| ### `AssetFormat` | ||
|
|
||
| ```ts | ||
| type AssetFormat = | ||
| | "desktop" | ||
| | "mobile" | ||
| | "square" | ||
| | "square-ftedit" | ||
| | "standard" | ||
| | "wide" | ||
| | "standard-inline" | ||
|
|
||
| ``` | ||
|
|
||
| `AssetFormat` defines the chosen responsive setting for an asset like an image or clip | ||
|
|
||
| ### `LayoutWidth` | ||
|
|
||
| ```ts | ||
|
|
@@ -21,6 +38,30 @@ type LayoutWidth = | |
|
|
||
| `LayoutWidth` defines how the component should be presented in the article page according to the column layout system. | ||
|
|
||
| ### `AVSource` | ||
|
|
||
| ```ts | ||
| type AVSource = { | ||
| binaryUrl: string | ||
| mediaType: string | ||
| audioCodec?: string | ||
| duration?: number | ||
| } | ||
| ``` | ||
|
|
||
| `AVSource` defines the properties for the source of an audio or video asset | ||
|
|
||
| ### `VideoSource` | ||
|
|
||
| ```ts | ||
| type VideoSource = AVSource & { | ||
| pixelHeight?: number | ||
| pixelWidth?: number | ||
| videoCodec?: string | ||
| } | ||
| ``` | ||
|
|
||
| `VideoSource` extends AVSource to add in the properties relevant just to videos | ||
|
|
||
| ## Core Nodes | ||
|
|
||
|
|
@@ -288,6 +329,7 @@ type StoryBlock = | |
| | Layout | ||
| | Pullquote | ||
| | ScrollyBlock | ||
| | ClipSet | ||
| | Table | ||
| | Recommended | ||
| | RecommendedList | ||
|
|
@@ -358,14 +400,7 @@ type Image = { | |
| id: string | ||
| width: number | ||
| height: number | ||
| format: | ||
| | "desktop" | ||
| | "mobile" | ||
| | "square" | ||
| | "square-ftedit" | ||
| | "standard" | ||
| | "wide" | ||
| | "standard-inline" | ||
| format: AssetFormat | ||
| url: string | ||
| sourceSet?: ImageSource[] | ||
| } | ||
|
|
@@ -539,8 +574,6 @@ interface Video extends Node { | |
|
|
||
| The `title` can be obtained by fetching the Video from the content API. | ||
|
|
||
| TODO: Figure out how Clips work, how they are different? | ||
|
|
||
| ### `YoutubeVideo` | ||
|
|
||
| ```ts | ||
|
|
@@ -552,6 +585,58 @@ interface YoutubeVideo extends Node { | |
|
|
||
| **YoutubeVideo** represents a video referenced by a Youtube URL. | ||
|
|
||
| ### `ClipSet` | ||
| ```ts | ||
| interface ClipSet extends Node { | ||
| type: "clip-set" | ||
| id: string | ||
| layoutWidth: ClipSetLayoutWidth | ||
| autoplay?: boolean | ||
| fragmentIdentifier?: string | ||
| loop?: boolean | ||
| muted?: boolean | ||
| external clips: Clip[] | ||
| external publishedDate: string | ||
| external accessibility?: ClipAccessibility | ||
| external caption?: string | ||
| external contentWarning?: string[] | ||
| external credits?: string | ||
| external description?: string | ||
| external displayTitle?: string | ||
| external noAudio?: boolean | ||
| external systemTitle?: string | ||
| external source?: string | ||
| external subtitle?: string | ||
| } | ||
|
|
||
| type Clip = { | ||
| id: string | ||
| dataSource: VideoSource[] | ||
| format?: Extract<AssetFormat, "standard-inline" | "mobile"> | ||
| poster?: string | ||
| } | ||
|
|
||
| /** Clip captions are files that provide the text captions on the video and their synchronisation timings */ | ||
| type ClipCaption = { | ||
| /** Caption file content type */ | ||
| mediaType?: string | ||
| /** Caption file location */ | ||
| url?: string | ||
| } | ||
|
|
||
| type ClipAccessibility = { | ||
| captions?: ClipCaption[] | ||
| transcript?: Body | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
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...
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| } | ||
|
|
||
| type ClipSetLayoutWidth = Extract<LayoutWidth, "in-line" | "mid-grid" | "full-grid"> | ||
|
debugwand marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| **ClipSet** represents a short piece of possibly-looping video content for an article. | ||
|
|
||
| The external fields are derived from the separately published [ClipSet](https://api.ft.com/schemas/clip-set.json) and [Clip](https://api.ft.com/schemas/clip.json) objects in the Content API. | ||
|
|
||
|
|
||
| ### `ScrollyBlock` | ||
|
|
||
| ```ts | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.