@financial-times/cp-content-pipeline-schema 3.18.0 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/lib/generated/index.d.ts +11 -2
- package/lib/helpers/qualityWorkaround.d.ts +2 -0
- package/lib/helpers/qualityWorkaround.js +38 -0
- package/lib/helpers/qualityWorkaround.js.map +1 -0
- package/lib/model/Clip.d.ts +1 -17
- package/lib/model/Clip.js +27 -8
- package/lib/model/Clip.js.map +1 -1
- package/lib/model/Clip.test.js +77 -0
- package/lib/model/Clip.test.js.map +1 -1
- package/lib/model/schemas/capi/article.d.ts +18 -0
- package/lib/model/schemas/capi/audio.d.ts +14 -0
- package/lib/model/schemas/capi/base-schema.d.ts +42 -0
- package/lib/model/schemas/capi/base-schema.js +2 -0
- package/lib/model/schemas/capi/base-schema.js.map +1 -1
- package/lib/model/schemas/capi/content-package.d.ts +14 -0
- package/lib/model/schemas/capi/custom-code-component.d.ts +18 -0
- package/lib/model/schemas/capi/index.d.ts +96 -0
- package/lib/model/schemas/capi/live-blog-package.d.ts +18 -0
- package/lib/model/schemas/capi/placeholder.d.ts +18 -0
- package/lib/model/schemas/capi/video.d.ts +14 -0
- package/lib/resolvers/clip.d.ts +4 -9
- package/lib/resolvers/clip.js +3 -0
- package/lib/resolvers/clip.js.map +1 -1
- package/lib/resolvers/content-tree/Workarounds.d.ts +1 -0
- package/lib/resolvers/content-tree/references/RecommendedList.d.ts +4 -3
- package/lib/resolvers/content-tree/references/RecommendedList.js +5 -32
- package/lib/resolvers/content-tree/references/RecommendedList.js.map +1 -1
- package/lib/resolvers/content-tree/tagMappings.js +1 -0
- package/lib/resolvers/content-tree/tagMappings.js.map +1 -1
- package/lib/resolvers/index.d.ts +4 -9
- package/lib/types/clip.d.ts +21 -0
- package/lib/types/clip.js +3 -0
- package/lib/types/clip.js.map +1 -0
- package/package.json +1 -1
- package/queries/article.graphql +5 -3
- package/src/generated/index.ts +11 -2
- package/src/helpers/qualityWorkaround.ts +44 -0
- package/src/model/Clip.test.ts +95 -0
- package/src/model/Clip.ts +33 -27
- package/src/model/__snapshots__/RichText.test.ts.snap +3 -1
- package/src/model/schemas/capi/base-schema.ts +2 -0
- package/src/resolvers/clip.ts +3 -0
- package/src/resolvers/content-tree/Workarounds.ts +1 -0
- package/src/resolvers/content-tree/references/RecommendedList.ts +5 -45
- package/src/resolvers/content-tree/tagMappings.ts +1 -0
- package/src/types/clip.ts +23 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/typedefs/clip.graphql +9 -0
- package/typedefs/references/recommendedList.graphql +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.20.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.19.0...cp-content-pipeline-schema-v3.20.0) (2025-11-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* anchor links in clips ([f753082](https://github.com/Financial-Times/cp-content-pipeline/commit/f753082b61b1e5aa989cd1db901546eeee71fe83))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* avoid fetching teaser data from RecommendedList resolver ([54bc53f](https://github.com/Financial-Times/cp-content-pipeline/commit/54bc53f9a40446667a9f93b85d710cd6a943157d))
|
|
14
|
+
* hot-fix for image ddpx - force to 1 ([4499642](https://github.com/Financial-Times/cp-content-pipeline/commit/449964211495a2314b5fe079f0ff802c85f08cd9))
|
|
15
|
+
|
|
16
|
+
## [3.19.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.18.0...cp-content-pipeline-schema-v3.19.0) (2025-11-11)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* ci-3111 media queries on clips sources ([856bd45](https://github.com/Financial-Times/cp-content-pipeline/commit/856bd457ba6dc56f292c6a31e0edfe3f29b4a904))
|
|
22
|
+
|
|
3
23
|
## [3.18.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-schema-v3.17.0...cp-content-pipeline-schema-v3.18.0) (2025-11-06)
|
|
4
24
|
|
|
5
25
|
|
package/lib/generated/index.d.ts
CHANGED
|
@@ -423,6 +423,8 @@ export type ClipSource = {
|
|
|
423
423
|
readonly audioCodec?: Maybe<Scalars['String']['output']>;
|
|
424
424
|
/** The url of the clip source, eg. 'https://next-media-api.ft.com/renditions/16868569859480/0x0.mp3'. */
|
|
425
425
|
readonly binaryUrl: Scalars['String']['output'];
|
|
426
|
+
/** The encoding settings intention for the video media */
|
|
427
|
+
readonly dppx?: Maybe<Scalars['Int']['output']>;
|
|
426
428
|
/** The duration of the clip in milliseconds. */
|
|
427
429
|
readonly duration?: Maybe<Scalars['Int']['output']>;
|
|
428
430
|
/** The media type eg. video/mp4. */
|
|
@@ -431,6 +433,10 @@ export type ClipSource = {
|
|
|
431
433
|
readonly pixelHeight?: Maybe<Scalars['Int']['output']>;
|
|
432
434
|
/** The width of the clip in pixels. */
|
|
433
435
|
readonly pixelWidth?: Maybe<Scalars['Int']['output']>;
|
|
436
|
+
/** The width of the source immediately narrower than this one. */
|
|
437
|
+
readonly previousSourceWidth?: Maybe<Scalars['Int']['output']>;
|
|
438
|
+
/** The encoding quality of the video media */
|
|
439
|
+
readonly quality?: Maybe<Scalars['String']['output']>;
|
|
434
440
|
/** The video encoding format of the source, eg. h264. */
|
|
435
441
|
readonly videoCodec?: Maybe<Scalars['String']['output']>;
|
|
436
442
|
};
|
|
@@ -1555,7 +1561,7 @@ export type Recommended = Reference & {
|
|
|
1555
1561
|
};
|
|
1556
1562
|
export type RecommendedList = Reference & {
|
|
1557
1563
|
/** Recommended references contain teaser thumbnails of related articles. */
|
|
1558
|
-
readonly
|
|
1564
|
+
readonly children: ReadonlyArray<Recommended>;
|
|
1559
1565
|
/** The type of the reference, eg. 'recommended'. */
|
|
1560
1566
|
readonly type: Scalars['String']['output'];
|
|
1561
1567
|
};
|
|
@@ -2264,10 +2270,13 @@ export type ClipSetResolvers<ContextType = QueryContext, ParentType extends Reso
|
|
|
2264
2270
|
export type ClipSourceResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['ClipSource'] = ResolversParentTypes['ClipSource']> = ResolversObject<{
|
|
2265
2271
|
audioCodec: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2266
2272
|
binaryUrl: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2273
|
+
dppx: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2267
2274
|
duration: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2268
2275
|
mediaType: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2269
2276
|
pixelHeight: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2270
2277
|
pixelWidth: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2278
|
+
previousSourceWidth: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
|
2279
|
+
quality: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2271
2280
|
videoCodec: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
2272
2281
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2273
2282
|
}>;
|
|
@@ -2879,7 +2888,7 @@ export type RecommendedResolvers<ContextType = QueryContext, ParentType extends
|
|
|
2879
2888
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2880
2889
|
}>;
|
|
2881
2890
|
export type RecommendedListResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['RecommendedList'] = ResolversParentTypes['RecommendedList']> = ResolversObject<{
|
|
2882
|
-
|
|
2891
|
+
children: Resolver<ReadonlyArray<ResolversTypes['Recommended']>, ParentType, ContextType>;
|
|
2883
2892
|
type: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
2884
2893
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
2885
2894
|
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = qualityWorkaround;
|
|
4
|
+
// possible output sizes are set in https://github.com/Financial-Times/ip-ovide/tree/main/common/n-zencoder/src/profiles
|
|
5
|
+
const dimensions = new Map([
|
|
6
|
+
[1920, 1080],
|
|
7
|
+
[1280, 720],
|
|
8
|
+
[960, 540],
|
|
9
|
+
[640, 360],
|
|
10
|
+
[480, 270],
|
|
11
|
+
]);
|
|
12
|
+
// utility to extract width from filename pattern like /640x360.mp4
|
|
13
|
+
function getDimensionsFromFilename(url) {
|
|
14
|
+
// regex: get the first set of digits after a "/" and before "x", followed by 1+ digits, followed by ".mp" and 1 digit, then end of string.
|
|
15
|
+
const widthRegex = /\/(\d+)x(\d+)\.mp\d$/i;
|
|
16
|
+
const widthMatch = url.match(widthRegex);
|
|
17
|
+
return [
|
|
18
|
+
parseInt(widthMatch?.[1] ?? '0', 10),
|
|
19
|
+
parseInt(widthMatch?.[2] ?? '0', 10),
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
function qualityWorkaround(dataSource) {
|
|
23
|
+
return dataSource.map((source) => {
|
|
24
|
+
const originalDimensions = getDimensionsFromFilename(source.binaryUrl ?? '');
|
|
25
|
+
if (originalDimensions[0] === 0) {
|
|
26
|
+
// this will apply to audio files
|
|
27
|
+
return source;
|
|
28
|
+
}
|
|
29
|
+
const smallerDimension = Math.min(...originalDimensions);
|
|
30
|
+
source.quality = `${Array.from(dimensions.values()).includes(smallerDimension)
|
|
31
|
+
? smallerDimension
|
|
32
|
+
: dimensions.get(smallerDimension)}p`;
|
|
33
|
+
// hot fix to for all video sources to have a dppx of 1
|
|
34
|
+
source.dppx = 1;
|
|
35
|
+
return source;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=qualityWorkaround.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualityWorkaround.js","sourceRoot":"","sources":["../../src/helpers/qualityWorkaround.ts"],"names":[],"mappings":";;AAwBA,oCAmBC;AAvCD,wHAAwH;AACxH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACzB,CAAC,IAAI,EAAE,IAAI,CAAC;IACZ,CAAC,IAAI,EAAE,GAAG,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;CACX,CAAC,CAAA;AAEF,mEAAmE;AACnE,SAAS,yBAAyB,CAAC,GAAW;IAC5C,2IAA2I;IAC3I,MAAM,UAAU,GAAG,uBAAuB,CAAA;IAC1C,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IACxC,OAAO;QACL,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC;QACpC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC;KACrC,CAAA;AACH,CAAC;AAED,SAAwB,iBAAiB,CACvC,UAAwB;IAExB,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC/B,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,CAAA;QAC5E,IAAI,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,iCAAiC;YACjC,OAAO,MAAM,CAAA;QACf,CAAC;QACD,MAAM,gBAAgB,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,CAAA;QACxD,MAAM,CAAC,OAAO,GAAG,GACf,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YACxD,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,gBAAgB,CACrC,GAAG,CAAA;QACH,uDAAuD;QACvD,MAAM,CAAC,IAAI,GAAG,CAAC,CAAA;QACf,OAAO,MAAM,CAAA;IACf,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/lib/model/Clip.d.ts
CHANGED
|
@@ -2,22 +2,7 @@ import { Clip as ClipMetadata } from './schemas/capi/internal-content';
|
|
|
2
2
|
import { LiteralUnionScalarValues } from '../resolvers/literal-union';
|
|
3
3
|
import { ClipFormat } from '../resolvers/scalars';
|
|
4
4
|
import { QueryContext } from '..';
|
|
5
|
-
type ClipSource
|
|
6
|
-
binaryUrl: string;
|
|
7
|
-
mediaType: string;
|
|
8
|
-
audioCodec?: string;
|
|
9
|
-
duration?: number;
|
|
10
|
-
pixelHeight?: number;
|
|
11
|
-
pixelWidth?: number;
|
|
12
|
-
videoCodec?: string;
|
|
13
|
-
};
|
|
14
|
-
interface ClipVideo {
|
|
15
|
-
id(): string;
|
|
16
|
-
type(): string;
|
|
17
|
-
format(): LiteralUnionScalarValues<typeof ClipFormat>;
|
|
18
|
-
poster(): string;
|
|
19
|
-
dataSource(): ClipSource[];
|
|
20
|
-
}
|
|
5
|
+
import type { ClipSource, ClipVideo } from '../types/clip';
|
|
21
6
|
export declare class Clip implements ClipVideo {
|
|
22
7
|
private clip;
|
|
23
8
|
private context;
|
|
@@ -29,4 +14,3 @@ export declare class Clip implements ClipVideo {
|
|
|
29
14
|
dataSource(): ClipSource[];
|
|
30
15
|
poster(): string;
|
|
31
16
|
}
|
|
32
|
-
export {};
|
package/lib/model/Clip.js
CHANGED
|
@@ -8,6 +8,7 @@ const metadata_1 = require("../helpers/metadata");
|
|
|
8
8
|
const literal_union_1 = require("../resolvers/literal-union");
|
|
9
9
|
const scalars_1 = require("../resolvers/scalars");
|
|
10
10
|
const imageService_1 = __importDefault(require("../helpers/imageService"));
|
|
11
|
+
const qualityWorkaround_1 = __importDefault(require("../helpers/qualityWorkaround"));
|
|
11
12
|
class Clip {
|
|
12
13
|
clip;
|
|
13
14
|
context;
|
|
@@ -39,17 +40,35 @@ class Clip {
|
|
|
39
40
|
}
|
|
40
41
|
return 'standard-inline';
|
|
41
42
|
}
|
|
43
|
+
// apply 'quality' workaround
|
|
44
|
+
// order sources by width and then quality
|
|
45
|
+
// get the min width from the first previous more narrow item
|
|
42
46
|
dataSource() {
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
// create a copy of the array so we don't modify the original data
|
|
48
|
+
let dataSource = this.clip.dataSource.map((src) => ({
|
|
49
|
+
...src,
|
|
50
|
+
}));
|
|
51
|
+
dataSource = (0, qualityWorkaround_1.default)(dataSource);
|
|
52
|
+
dataSource = dataSource.sort((a, b) => {
|
|
53
|
+
const widthDiff = (b.pixelWidth ?? 0) - (a.pixelWidth ?? 0);
|
|
54
|
+
if (widthDiff !== 0) {
|
|
55
|
+
return widthDiff;
|
|
47
56
|
}
|
|
48
|
-
|
|
49
|
-
return 1;
|
|
50
|
-
}
|
|
51
|
-
return 0;
|
|
57
|
+
return (b?.dppx ?? 0) - (a?.dppx ?? 0);
|
|
52
58
|
});
|
|
59
|
+
// get the min width from the previous item if it has pixelWidth set, checking it is not the same as pixelWidth as the current item
|
|
60
|
+
for (let i = 0; i < dataSource.length; i++) {
|
|
61
|
+
let next = 1;
|
|
62
|
+
let minWidth = dataSource[i + next]?.pixelWidth;
|
|
63
|
+
while (typeof minWidth !== 'undefined' &&
|
|
64
|
+
minWidth === dataSource[i]?.pixelWidth) {
|
|
65
|
+
next++;
|
|
66
|
+
minWidth = dataSource[i + next]?.pixelWidth;
|
|
67
|
+
}
|
|
68
|
+
if (minWidth && dataSource[i]) {
|
|
69
|
+
dataSource[i].previousSourceWidth = minWidth;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
53
72
|
return dataSource;
|
|
54
73
|
}
|
|
55
74
|
poster() {
|
package/lib/model/Clip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Clip.js","sourceRoot":"","sources":["../../src/model/Clip.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiD;AAEjD,8DAGmC;AACnC,kDAAiD;AACjD,2EAAqD;
|
|
1
|
+
{"version":3,"file":"Clip.js","sourceRoot":"","sources":["../../src/model/Clip.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiD;AAEjD,8DAGmC;AACnC,kDAAiD;AACjD,2EAAqD;AACrD,qFAA4D;AAI5D,MAAa,IAAI;IAEL;IACA;IACA;IAHV,YACU,IAAkB,EAClB,OAAqB,EACrB,MAAe;QAFf,SAAI,GAAJ,IAAI,CAAc;QAClB,YAAO,GAAP,OAAO,CAAc;QACrB,WAAM,GAAN,MAAM,CAAS;IACtB,CAAC;IACJ,IAAI;QACF,OAAO,MAAM,CAAA;IACf,CAAC;IAED,EAAE;QACA,MAAM,IAAI,GAAG,IAAA,sBAAW,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACtC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,qCAAqC,CAAC,CAAA;QACvE,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACrB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAA;YAEnC,IAAI,UAAU,KAAK,gBAAgB,EAAE,CAAC;gBACpC,OAAO,iBAAiB,CAAA;YAC1B,CAAC;YAED,IAAI,IAAA,sCAAsB,EAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAA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AAC,EAAE,UAAU,CAAA;YAC7C,CAAC;YACD,IAAI,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC9B,UAAU,CAAC,CAAC,CAAE,CAAC,mBAAmB,GAAG,QAAQ,CAAA;YAC/C,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,MAAM;QACJ,MAAM,QAAQ,GAEV;YACF,SAAS,EAAE,GAAG;YACd,UAAU,EAAE,GAAG;YACf,WAAW,EAAE,IAAI;SAClB,CAAA;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,CAAA;QACnD,OAAO,GAAG;YACR,CAAC,CAAC,IAAA,sBAAe,EAAC;gBACd,GAAG;gBACH,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU;gBACnC,KAAK,EACH,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG;aACrE,CAAC;YACJ,CAAC,CAAC,EAAE,CAAA;IACR,CAAC;CACF;AAzFD,oBAyFC"}
|
package/lib/model/Clip.test.js
CHANGED
|
@@ -4,6 +4,41 @@ const Clip_1 = require("./Clip");
|
|
|
4
4
|
const mockContext = {
|
|
5
5
|
systemCode: 'cp-content-pipeline',
|
|
6
6
|
};
|
|
7
|
+
const mockDataSources = [
|
|
8
|
+
{
|
|
9
|
+
audioCodec: 'mp3',
|
|
10
|
+
binaryUrl: 'https://clips.ft.com/someguid/0x0.mp3',
|
|
11
|
+
duration: 21720,
|
|
12
|
+
mediaType: 'audio/mpeg',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
audioCodec: 'aac',
|
|
16
|
+
binaryUrl: 'https://clips.ft.com/someguid/640x360.mp4',
|
|
17
|
+
duration: 21684,
|
|
18
|
+
mediaType: 'video/mp4',
|
|
19
|
+
pixelHeight: 360,
|
|
20
|
+
pixelWidth: 640,
|
|
21
|
+
videoCodec: 'h264',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
audioCodec: 'aac',
|
|
25
|
+
binaryUrl: 'https://clips.ft.com/someguid/1280x720.mp4',
|
|
26
|
+
duration: 21684,
|
|
27
|
+
mediaType: 'video/mp4',
|
|
28
|
+
pixelHeight: 720,
|
|
29
|
+
pixelWidth: 1280,
|
|
30
|
+
videoCodec: 'h264',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
audioCodec: 'aac',
|
|
34
|
+
binaryUrl: 'https://clips.ft.com/someguid/1920x1080.mp4',
|
|
35
|
+
duration: 21684,
|
|
36
|
+
mediaType: 'video/mp4',
|
|
37
|
+
pixelHeight: 720,
|
|
38
|
+
pixelWidth: 1280,
|
|
39
|
+
videoCodec: 'h264',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
7
42
|
describe('Clip', () => {
|
|
8
43
|
describe('poster', () => {
|
|
9
44
|
it('uses the Origami Image Service when a url is provided', () => {
|
|
@@ -141,5 +176,47 @@ describe('Clip', () => {
|
|
|
141
176
|
expect(clip.poster()).toContain('width=1200');
|
|
142
177
|
});
|
|
143
178
|
});
|
|
179
|
+
describe('datasources', () => {
|
|
180
|
+
xit('creates a quality value and dppx value based on the width in the URL when quality is not provided', () => {
|
|
181
|
+
const clip = new Clip_1.Clip({
|
|
182
|
+
id: 'http://api.ft.com/things/1234',
|
|
183
|
+
type: 'http://www.ft.com/ontology/content/Clip',
|
|
184
|
+
dataSource: mockDataSources,
|
|
185
|
+
}, mockContext);
|
|
186
|
+
const dataSource = clip.dataSource();
|
|
187
|
+
expect(dataSource).toHaveLength(4);
|
|
188
|
+
expect(dataSource?.[0]?.quality).toBe('1080p');
|
|
189
|
+
expect(dataSource?.[0]?.dppx).toBe(2);
|
|
190
|
+
expect(dataSource?.[1]?.quality).toBe('720p');
|
|
191
|
+
expect(dataSource?.[2]?.quality).toBe('360p');
|
|
192
|
+
expect(dataSource?.[3]?.quality).toBeUndefined();
|
|
193
|
+
});
|
|
194
|
+
xit('orders the data sources by width and then dppx', () => {
|
|
195
|
+
const clip = new Clip_1.Clip({
|
|
196
|
+
id: 'http://api.ft.com/things/1234',
|
|
197
|
+
type: 'http://www.ft.com/ontology/content/Clip',
|
|
198
|
+
dataSource: mockDataSources,
|
|
199
|
+
}, mockContext);
|
|
200
|
+
const dataSource = clip.dataSource();
|
|
201
|
+
expect(dataSource).toHaveLength(4);
|
|
202
|
+
expect(dataSource?.[0]?.binaryUrl).toBe('https://clips.ft.com/someguid/1920x1080.mp4');
|
|
203
|
+
expect(dataSource?.[1]?.binaryUrl).toBe('https://clips.ft.com/someguid/1280x720.mp4');
|
|
204
|
+
expect(dataSource?.[2]?.binaryUrl).toBe('https://clips.ft.com/someguid/640x360.mp4');
|
|
205
|
+
expect(dataSource?.[3]?.binaryUrl).toBe('https://clips.ft.com/someguid/0x0.mp3');
|
|
206
|
+
});
|
|
207
|
+
it('sets the previousSourceWidth to the next most narrow source', () => {
|
|
208
|
+
const clip = new Clip_1.Clip({
|
|
209
|
+
id: 'http://api.ft.com/things/1234',
|
|
210
|
+
type: 'http://www.ft.com/ontology/content/Clip',
|
|
211
|
+
dataSource: mockDataSources,
|
|
212
|
+
}, mockContext);
|
|
213
|
+
const dataSource = clip.dataSource();
|
|
214
|
+
expect(dataSource).toHaveLength(4);
|
|
215
|
+
expect(dataSource?.[0]?.previousSourceWidth).toBe(640);
|
|
216
|
+
expect(dataSource?.[1]?.previousSourceWidth).toBe(640);
|
|
217
|
+
expect(dataSource?.[2]?.previousSourceWidth).toBeUndefined();
|
|
218
|
+
expect(dataSource?.[3]?.previousSourceWidth).toBeUndefined();
|
|
219
|
+
});
|
|
220
|
+
});
|
|
144
221
|
});
|
|
145
222
|
//# sourceMappingURL=Clip.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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J,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -853,6 +853,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
853
853
|
pixelHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
854
854
|
pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
855
855
|
videoCodec: import("zod").ZodOptional<import("zod").ZodString>;
|
|
856
|
+
quality: import("zod").ZodOptional<import("zod").ZodString>;
|
|
857
|
+
dppx: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
856
858
|
}, "strip", import("zod").ZodTypeAny, {
|
|
857
859
|
binaryUrl?: string | undefined;
|
|
858
860
|
pixelWidth?: number | undefined;
|
|
@@ -861,6 +863,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
861
863
|
duration?: number | undefined;
|
|
862
864
|
mediaType?: string | undefined;
|
|
863
865
|
videoCodec?: string | undefined;
|
|
866
|
+
quality?: string | undefined;
|
|
867
|
+
dppx?: number | undefined;
|
|
864
868
|
}, {
|
|
865
869
|
binaryUrl?: string | undefined;
|
|
866
870
|
pixelWidth?: number | undefined;
|
|
@@ -869,6 +873,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
869
873
|
duration?: number | undefined;
|
|
870
874
|
mediaType?: string | undefined;
|
|
871
875
|
videoCodec?: string | undefined;
|
|
876
|
+
quality?: string | undefined;
|
|
877
|
+
dppx?: number | undefined;
|
|
872
878
|
}>, "many">;
|
|
873
879
|
poster: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
874
880
|
id: import("zod").ZodString;
|
|
@@ -1046,6 +1052,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1046
1052
|
duration?: number | undefined;
|
|
1047
1053
|
mediaType?: string | undefined;
|
|
1048
1054
|
videoCodec?: string | undefined;
|
|
1055
|
+
quality?: string | undefined;
|
|
1056
|
+
dppx?: number | undefined;
|
|
1049
1057
|
}[];
|
|
1050
1058
|
format?: "standardInline" | "mobile" | undefined;
|
|
1051
1059
|
poster?: {
|
|
@@ -1093,6 +1101,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1093
1101
|
duration?: number | undefined;
|
|
1094
1102
|
mediaType?: string | undefined;
|
|
1095
1103
|
videoCodec?: string | undefined;
|
|
1104
|
+
quality?: string | undefined;
|
|
1105
|
+
dppx?: number | undefined;
|
|
1096
1106
|
}[];
|
|
1097
1107
|
format?: "standardInline" | "mobile" | undefined;
|
|
1098
1108
|
poster?: {
|
|
@@ -1179,6 +1189,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1179
1189
|
duration?: number | undefined;
|
|
1180
1190
|
mediaType?: string | undefined;
|
|
1181
1191
|
videoCodec?: string | undefined;
|
|
1192
|
+
quality?: string | undefined;
|
|
1193
|
+
dppx?: number | undefined;
|
|
1182
1194
|
}[];
|
|
1183
1195
|
format?: "standardInline" | "mobile" | undefined;
|
|
1184
1196
|
poster?: {
|
|
@@ -1247,6 +1259,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1247
1259
|
duration?: number | undefined;
|
|
1248
1260
|
mediaType?: string | undefined;
|
|
1249
1261
|
videoCodec?: string | undefined;
|
|
1262
|
+
quality?: string | undefined;
|
|
1263
|
+
dppx?: number | undefined;
|
|
1250
1264
|
}[];
|
|
1251
1265
|
format?: "standardInline" | "mobile" | undefined;
|
|
1252
1266
|
poster?: {
|
|
@@ -1736,6 +1750,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
1736
1750
|
duration?: number | undefined;
|
|
1737
1751
|
mediaType?: string | undefined;
|
|
1738
1752
|
videoCodec?: string | undefined;
|
|
1753
|
+
quality?: string | undefined;
|
|
1754
|
+
dppx?: number | undefined;
|
|
1739
1755
|
}[];
|
|
1740
1756
|
format?: "standardInline" | "mobile" | undefined;
|
|
1741
1757
|
poster?: {
|
|
@@ -2028,6 +2044,8 @@ export declare const articleSchema: import("zod").ZodObject<Pick<{
|
|
|
2028
2044
|
duration?: number | undefined;
|
|
2029
2045
|
mediaType?: string | undefined;
|
|
2030
2046
|
videoCodec?: string | undefined;
|
|
2047
|
+
quality?: string | undefined;
|
|
2048
|
+
dppx?: number | undefined;
|
|
2031
2049
|
}[];
|
|
2032
2050
|
format?: "standardInline" | "mobile" | undefined;
|
|
2033
2051
|
poster?: {
|
|
@@ -853,6 +853,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
853
853
|
pixelHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
854
854
|
pixelWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
855
855
|
videoCodec: import("zod").ZodOptional<import("zod").ZodString>;
|
|
856
|
+
quality: import("zod").ZodOptional<import("zod").ZodString>;
|
|
857
|
+
dppx: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
856
858
|
}, "strip", import("zod").ZodTypeAny, {
|
|
857
859
|
binaryUrl?: string | undefined;
|
|
858
860
|
pixelWidth?: number | undefined;
|
|
@@ -861,6 +863,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
861
863
|
duration?: number | undefined;
|
|
862
864
|
mediaType?: string | undefined;
|
|
863
865
|
videoCodec?: string | undefined;
|
|
866
|
+
quality?: string | undefined;
|
|
867
|
+
dppx?: number | undefined;
|
|
864
868
|
}, {
|
|
865
869
|
binaryUrl?: string | undefined;
|
|
866
870
|
pixelWidth?: number | undefined;
|
|
@@ -869,6 +873,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
869
873
|
duration?: number | undefined;
|
|
870
874
|
mediaType?: string | undefined;
|
|
871
875
|
videoCodec?: string | undefined;
|
|
876
|
+
quality?: string | undefined;
|
|
877
|
+
dppx?: number | undefined;
|
|
872
878
|
}>, "many">;
|
|
873
879
|
poster: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
874
880
|
id: import("zod").ZodString;
|
|
@@ -1046,6 +1052,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
1046
1052
|
duration?: number | undefined;
|
|
1047
1053
|
mediaType?: string | undefined;
|
|
1048
1054
|
videoCodec?: string | undefined;
|
|
1055
|
+
quality?: string | undefined;
|
|
1056
|
+
dppx?: number | undefined;
|
|
1049
1057
|
}[];
|
|
1050
1058
|
format?: "standardInline" | "mobile" | undefined;
|
|
1051
1059
|
poster?: {
|
|
@@ -1093,6 +1101,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
1093
1101
|
duration?: number | undefined;
|
|
1094
1102
|
mediaType?: string | undefined;
|
|
1095
1103
|
videoCodec?: string | undefined;
|
|
1104
|
+
quality?: string | undefined;
|
|
1105
|
+
dppx?: number | undefined;
|
|
1096
1106
|
}[];
|
|
1097
1107
|
format?: "standardInline" | "mobile" | undefined;
|
|
1098
1108
|
poster?: {
|
|
@@ -1179,6 +1189,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
1179
1189
|
duration?: number | undefined;
|
|
1180
1190
|
mediaType?: string | undefined;
|
|
1181
1191
|
videoCodec?: string | undefined;
|
|
1192
|
+
quality?: string | undefined;
|
|
1193
|
+
dppx?: number | undefined;
|
|
1182
1194
|
}[];
|
|
1183
1195
|
format?: "standardInline" | "mobile" | undefined;
|
|
1184
1196
|
poster?: {
|
|
@@ -1247,6 +1259,8 @@ export declare const audioSchema: import("zod").ZodObject<Pick<{
|
|
|
1247
1259
|
duration?: number | undefined;
|
|
1248
1260
|
mediaType?: string | undefined;
|
|
1249
1261
|
videoCodec?: string | undefined;
|
|
1262
|
+
quality?: string | undefined;
|
|
1263
|
+
dppx?: number | undefined;
|
|
1250
1264
|
}[];
|
|
1251
1265
|
format?: "standardInline" | "mobile" | undefined;
|
|
1252
1266
|
poster?: {
|