Skip to content

Commit 6f2dae4

Browse files
author
Stainless Bot
committed
[video] video_quality as a replacement for encoding_tier (#303) (#472)
* Draft changes * detabbify * Address Phil's review comments
1 parent a464948 commit 6f2dae4

File tree

6 files changed

+62
-11
lines changed

6 files changed

+62
-11
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 88
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-ecba5336919fc9783537b0901d6822cbcb49e160371c348a404bfcc748d09719.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-603174c84ed6d06302f3843b95c5281fa79df1e7428eb8d475525fb27fa48b38.yml

src/resources/video/assets.ts

+36-9
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,10 @@ export interface Asset {
226226
created_at: string;
227227

228228
/**
229-
* The encoding tier informs the cost, quality, and available platform features for
230-
* the asset. By default the `smart` encoding tier is used.
231-
* [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
229+
* @deprecated: This field is deprecated. Please use `video_quality` instead. The
230+
* encoding tier informs the cost, quality, and available platform features for the
231+
* asset. By default the `smart` encoding tier is used.
232+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
232233
*/
233234
encoding_tier: 'smart' | 'baseline';
234235

@@ -384,6 +385,14 @@ export interface Asset {
384385
* when the asset is created from a direct upload.
385386
*/
386387
upload_id?: string;
388+
389+
/**
390+
* The video quality controls the cost, quality, and available platform features
391+
* for the asset. By default the `plus` video quality is used. This field replaces
392+
* the deprecated `encoding_tier` value.
393+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
394+
*/
395+
video_quality?: 'basic' | 'plus';
387396
}
388397

389398
export namespace Asset {
@@ -573,9 +582,10 @@ export interface AssetOptions {
573582
advanced_playback_policies?: Array<AssetOptions.AdvancedPlaybackPolicy>;
574583

575584
/**
576-
* The encoding tier informs the cost, quality, and available platform features for
577-
* the asset. By default the `smart` encoding tier is used.
578-
* [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
585+
* @deprecated: This field is deprecated. Please use `video_quality` instead. The
586+
* encoding tier informs the cost, quality, and available platform features for the
587+
* asset. By default the `smart` encoding tier is used.
588+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
579589
*/
580590
encoding_tier?: 'smart' | 'baseline';
581591

@@ -667,6 +677,14 @@ export interface AssetOptions {
667677
* limited to 10 seconds, deleted after 24 hrs.
668678
*/
669679
test?: boolean;
680+
681+
/**
682+
* The video quality controls the cost, quality, and available platform features
683+
* for the asset. By default the `plus` video quality is used. This field replaces
684+
* the deprecated `encoding_tier` value.
685+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
686+
*/
687+
video_quality?: 'basic' | 'plus';
670688
}
671689

672690
export namespace AssetOptions {
@@ -1303,9 +1321,10 @@ export interface AssetCreateParams {
13031321
advanced_playback_policies?: Array<AssetCreateParams.AdvancedPlaybackPolicy>;
13041322

13051323
/**
1306-
* The encoding tier informs the cost, quality, and available platform features for
1307-
* the asset. By default the `smart` encoding tier is used.
1308-
* [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
1324+
* This field is deprecated. Please use `video_quality` instead. The encoding tier
1325+
* informs the cost, quality, and available platform features for the asset. By
1326+
* default the `smart` encoding tier is used.
1327+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
13091328
*/
13101329
encoding_tier?: 'smart' | 'baseline';
13111330

@@ -1387,6 +1406,14 @@ export interface AssetCreateParams {
13871406
* limited to 10 seconds, deleted after 24 hrs.
13881407
*/
13891408
test?: boolean;
1409+
1410+
/**
1411+
* The video quality controls the cost, quality, and available platform features
1412+
* for the asset. By default the `plus` video quality is used. This field replaces
1413+
* the deprecated `encoding_tier` value.
1414+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
1415+
*/
1416+
video_quality?: 'basic' | 'plus';
13901417
}
13911418

13921419
export namespace AssetCreateParams {

src/resources/video/delivery-usage.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ export interface DeliveryReport {
3939
asset_duration: number;
4040

4141
/**
42+
* @deprecated: This field is deprecated. Please use `asset_video_quality` instead.
4243
* The encoding tier that the asset was ingested at.
43-
* [See the encoding tiers guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
44+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
4445
*/
4546
asset_encoding_tier: 'smart' | 'baseline';
4647

@@ -76,6 +77,13 @@ export interface DeliveryReport {
7677
*/
7778
delivered_seconds_by_resolution: DeliveryReport.DeliveredSecondsByResolution;
7879

80+
/**
81+
* The video quality that the asset was ingested at. This field replaces
82+
* `asset_encoding_tier`.
83+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
84+
*/
85+
asset_video_quality?: 'basic' | 'plus';
86+
7987
/**
8088
* If exists, time at which the asset was deleted. Measured in seconds since the
8189
* Unix epoch.

src/resources/webhooks.ts

+14
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,13 @@ export namespace VideoDeliveryHighTrafficWebhookEvent {
536536
*/
537537
asset_duration?: number;
538538

539+
/**
540+
* @deprecated: This field is deprecated. Please use `asset_video_quality` instead.
541+
* The encoding tier that the asset was ingested at.
542+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
543+
*/
544+
asset_encoding_tier?: 'smart' | 'baseline';
545+
539546
/**
540547
* Unique identifier for the asset.
541548
*/
@@ -552,6 +559,13 @@ export namespace VideoDeliveryHighTrafficWebhookEvent {
552559
*/
553560
asset_state?: 'ready' | 'errored' | 'deleted';
554561

562+
/**
563+
* The video quality that the asset was ingested at. This field replaces
564+
* `asset_encoding_tier`.
565+
* [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
566+
*/
567+
asset_video_quality?: 'basic' | 'plus';
568+
555569
/**
556570
* Time at which the asset was created. Measured in seconds since the Unix epoch.
557571
*/

tests/api-resources/video/assets.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ describe('resource assets', () => {
6464
per_title_encode: true,
6565
playback_policy: ['public'],
6666
test: true,
67+
video_quality: 'basic',
6768
});
6869
});
6970

tests/api-resources/video/uploads.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ describe('resource uploads', () => {
116116
per_title_encode: true,
117117
playback_policy: ['public'],
118118
test: true,
119+
video_quality: 'basic',
119120
},
120121
test: true,
121122
timeout: 60,

0 commit comments

Comments
 (0)