Skip to content

Commit

Permalink
Refactor CMCD controller and tests to use the common media library ut…
Browse files Browse the repository at this point in the history
…ilities (#5903)

* refactor CMCD controller and test to use common media library
* update build script to transpile the @svta package
* add ability to specify cmcd keys
  • Loading branch information
littlespex committed Nov 16, 2023
1 parent d296e89 commit f943d31
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 549 deletions.
8 changes: 1 addition & 7 deletions api-extractor/report/hls.js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,15 +752,8 @@ export class ChunkMetadata {
// @public
export class CMCDController implements ComponentAPI {
constructor(hls: Hls);
static appendQueryToUri(uri: any, query: any): any;
// (undocumented)
destroy(): void;
// Warning: (ae-forgotten-export) The symbol "CMCD" needs to be exported by the entry point hls.d.ts
static serialize(data: CMCD): string;
// Warning: (ae-forgotten-export) The symbol "CMCDHeaders" needs to be exported by the entry point hls.d.ts
static toHeaders(data: CMCD): Partial<CMCDHeaders>;
static toQuery(data: CMCD): string;
static uuid(): string;
}

// Warning: (ae-missing-release-tag) "CMCDControllerConfig" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Expand All @@ -770,6 +763,7 @@ export type CMCDControllerConfig = {
sessionId?: string;
contentId?: string;
useHeaders?: boolean;
includeKeys?: string[];
};

// Warning: (ae-missing-release-tag) "ComponentAPI" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Expand Down
4 changes: 2 additions & 2 deletions build-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const buildTypeToOutputName = {
light: `hls.light`,
};

/* Allow to customise builds through env-vars */
/* Allow to customize builds through env-vars */
// eslint-disable-next-line no-undef
const env = process.env;

Expand Down Expand Up @@ -96,7 +96,7 @@ const babelTsWithPresetEnvTargets = ({ targets, stripConsole }) =>
babel({
extensions,
babelHelpers: 'bundled',
exclude: 'node_modules/**',
exclude: /node_modules\/(?!(@svta)\/).*/,
assumptions: {
noDocumentAll: true,
noClassCalls: true,
Expand Down
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"@rollup/plugin-replace": "5.0.5",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.5",
"@svta/common-media-library": "0.4.5",
"@types/chai": "4.3.10",
"@types/chart.js": "2.9.40",
"@types/mocha": "10.0.4",
Expand Down
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export type CMCDControllerConfig = {
sessionId?: string;
contentId?: string;
useHeaders?: boolean;
includeKeys?: string[];
};

export type DRMSystemOptions = {
Expand Down

0 comments on commit f943d31

Please sign in to comment.