Skip to content

fix: add missing types for encoding tier & generated subtitles settings #319

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

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/video/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export interface InputOverlaySettings {
opacity?: string;
}

export interface GeneratedSubtitlesSettings {
name?: string;
passthrough?: string;
language_code?: string;
}
Copy link
Collaborator Author

@dylanjha dylanjha Nov 8, 2023

Choose a reason for hiding this comment

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

interestingly none of these are actually required. This request:

{
	"playback_policy": [
		"public"
	],
	"input": [
		{
			"url": "https://muxed.s3.amazonaws.com/leds.mp4",
			"generated_subtitles": [
				{}
			]
		}
	]
}

Will result in a text track being created with default language_code: "en" and default name: "English CC"

			{
				"type": "text",
				"text_type": "subtitles",
				"text_source": "generated_vod",
				"status": "preparing",
				"name": "English CC",
				"language_code": "en",
				"id": "zHkS8uZkPyY5v45ixKB3pgF8DEZyJrj5P2Nd7bZg2GidHOAyQX6rFQ"
			}


export interface InputSettings {
url: string;
start_time?: number;
Expand All @@ -90,6 +96,7 @@ export interface InputSettings {
name?: string;
closed_captions?: boolean;
passthrough?: string;
generated_subtitles?: Array<GeneratedSubtitlesSettings>;
}

export interface CreateAssetParams {
Expand All @@ -102,6 +109,7 @@ export interface CreateAssetParams {
master_access?: AssetMasterAccess;
per_title_encode?: boolean;
max_resolution_tier?: '1080p' | '1440p' | '2160p';
encoding_tier?: 'baseline' | 'smart';
}

export interface UpdateAssetParams {
Expand Down