diff --git a/.tool-versions b/.tool-versions index 4365714..c5d2e2a 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ java zulu-11.52.13 groovy 3.0.8 yarn 1.22.19 -nodejs lts +nodejs 18.17.0 diff --git a/README.md b/README.md index 69d5728..e83763e 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Add this dependency to your project's POM: com.mux mux-sdk-java - 0.10.0 + 0.11.0 compile ``` @@ -58,7 +58,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.mux:mux-sdk-java:0.10.0" +compile "com.mux:mux-sdk-java:0.11.0" ``` ### Others @@ -71,7 +71,7 @@ mvn clean package Then manually install the following JARs: -* `target/mux-sdk-java-0.10.0.jar` +* `target/mux-sdk-java-0.11.0.jar` * `target/lib/*.jar` ## Getting Started diff --git a/build.gradle b/build.gradle index ea54d63..f45a336 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ plugins { } group = 'com.mux' -version = '0.10.0' +version = '0.11.0' repositories { mavenCentral() diff --git a/docs/Asset.md b/docs/Asset.md index c5520b1..8e17fc8 100644 --- a/docs/Asset.md +++ b/docs/Asset.md @@ -105,6 +105,9 @@ Name | Value ---- | ----- STANDARD | "standard" NONE | "none" +CAPPED_1080P | "capped-1080p" +AUDIO_ONLY | "audio-only" +AUDIO_ONLY_CAPPED_1080P | "audio-only,capped-1080p" diff --git a/docs/AssetStaticRenditionsFiles.md b/docs/AssetStaticRenditionsFiles.md index 835ab25..50d1b01 100644 --- a/docs/AssetStaticRenditionsFiles.md +++ b/docs/AssetStaticRenditionsFiles.md @@ -23,6 +23,7 @@ LOW_MP4 | "low.mp4" MEDIUM_MP4 | "medium.mp4" HIGH_MP4 | "high.mp4" AUDIO_M4A | "audio.m4a" +CAPPED_1080P_MP4 | "capped-1080p.mp4" diff --git a/docs/AssetsApi.md b/docs/AssetsApi.md index f9beb35..42b2134 100644 --- a/docs/AssetsApi.md +++ b/docs/AssetsApi.md @@ -948,7 +948,7 @@ Name | Type | Description | Notes Update MP4 support -Allows you to add or remove mp4 support for assets that were created without it. Currently there are two values supported in this request, `standard` and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. +Allows you to add or remove mp4 support for assets that were created without it. The values supported are `capped-1080p`, `audio-only`, `audio-only,capped-1080p`, `standard`(deprecated), and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. ### Example ```java @@ -972,7 +972,7 @@ public class Example { AssetsApi apiInstance = new AssetsApi(defaultClient); String ASSET_ID = "ASSET_ID_example"; // String | The asset ID. - UpdateAssetMP4SupportRequest updateAssetMP4SupportRequest = {"mp4_support":"standard"}; // UpdateAssetMP4SupportRequest | + UpdateAssetMP4SupportRequest updateAssetMP4SupportRequest = {"mp4_support":"capped-1080p"}; // UpdateAssetMP4SupportRequest | try { AssetResponse result = apiInstance.updateAssetMp4Support(ASSET_ID, updateAssetMP4SupportRequest) .execute(); diff --git a/docs/CreateAssetRequest.md b/docs/CreateAssetRequest.md index ebda59c..e64d318 100644 --- a/docs/CreateAssetRequest.md +++ b/docs/CreateAssetRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **playbackPolicy** | **java.util.List<PlaybackPolicy>** | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: `\"public\"` (anyone with the playback URL can stream the asset). And `\"signed\"` (an additional access token is required to play the asset). If no playback_policy is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional] **perTitleEncode** | **Boolean** | | [optional] **passthrough** | **String** | Arbitrary user-supplied metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. | [optional] -**mp4Support** | [**Mp4SupportEnum**](#Mp4SupportEnum) | Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional] +**mp4Support** | [**Mp4SupportEnum**](#Mp4SupportEnum) | Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional] **normalizeAudio** | **Boolean** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] **masterAccess** | [**MasterAccessEnum**](#MasterAccessEnum) | Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional] **test** | **Boolean** | Marks the asset as a test asset when the value is set to true. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test asset are watermarked with the Mux logo, limited to 10 seconds, deleted after 24 hrs. | [optional] @@ -25,6 +25,9 @@ Name | Value ---- | ----- NONE | "none" STANDARD | "standard" +CAPPED_1080P | "capped-1080p" +AUDIO_ONLY | "audio-only" +AUDIO_ONLY_CAPPED_1080P | "audio-only,capped-1080p" diff --git a/docs/DirectUploadsApi.md b/docs/DirectUploadsApi.md index f3863f9..88e46f0 100644 --- a/docs/DirectUploadsApi.md +++ b/docs/DirectUploadsApi.md @@ -109,7 +109,7 @@ public class Example { accessToken.setPassword("YOUR PASSWORD"); DirectUploadsApi apiInstance = new DirectUploadsApi(defaultClient); - CreateUploadRequest createUploadRequest = {"cors_origin":"https://example.com/","new_asset_settings":{"playback_policy":["public"]}}; // CreateUploadRequest | + CreateUploadRequest createUploadRequest = {"cors_origin":"https://example.com/","new_asset_settings":{"playback_policy":["public"],"mp4_support":"capped-1080p"}}; // CreateUploadRequest | try { UploadResponse result = apiInstance.createDirectUpload(createUploadRequest) .execute(); diff --git a/docs/UpdateAssetMP4SupportRequest.md b/docs/UpdateAssetMP4SupportRequest.md index b3fe47a..95b0942 100644 --- a/docs/UpdateAssetMP4SupportRequest.md +++ b/docs/UpdateAssetMP4SupportRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mp4Support** | [**Mp4SupportEnum**](#Mp4SupportEnum) | String value for the level of mp4 support | [optional] +**mp4Support** | [**Mp4SupportEnum**](#Mp4SupportEnum) | Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). `none` will delete the MP4s from the asset in question. | [optional] @@ -16,6 +16,9 @@ Name | Value ---- | ----- STANDARD | "standard" NONE | "none" +CAPPED_1080P | "capped-1080p" +AUDIO_ONLY | "audio-only" +AUDIO_ONLY_CAPPED_1080P | "audio-only,capped-1080p" diff --git a/gen/generator-config.json b/gen/generator-config.json index 4426e76..eadd54f 100644 --- a/gen/generator-config.json +++ b/gen/generator-config.json @@ -1,6 +1,6 @@ { "!!source": "https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/java.md", - "artifactVersion": "0.10.0", + "artifactVersion": "0.11.0", "apiPackage": "com.mux.sdk", "artifactDescription": "Mux SDK for Java", "artifactId": "mux-sdk-java", diff --git a/src/main/java/com/mux/ApiClient.java b/src/main/java/com/mux/ApiClient.java index f660a71..c24265a 100644 --- a/src/main/java/com/mux/ApiClient.java +++ b/src/main/java/com/mux/ApiClient.java @@ -123,7 +123,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("Mux Java | 0.10.0"); + setUserAgent("Mux Java | 0.11.0"); authentications = new HashMap(); } diff --git a/src/main/java/com/mux/sdk/AssetsApi.java b/src/main/java/com/mux/sdk/AssetsApi.java index 76ade44..a4423f7 100644 --- a/src/main/java/com/mux/sdk/AssetsApi.java +++ b/src/main/java/com/mux/sdk/AssetsApi.java @@ -2217,7 +2217,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr /** * Update MP4 support - * Allows you to add or remove mp4 support for assets that were created without it. Currently there are two values supported in this request, `standard` and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. + * Allows you to add or remove mp4 support for assets that were created without it. The values supported are `capped-1080p`, `audio-only`, `audio-only,capped-1080p`, `standard`(deprecated), and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. * @param ASSET_ID The asset ID. (required) * @param updateAssetMP4SupportRequest (required) * @return APIupdateAssetMp4SupportRequest diff --git a/src/main/java/com/mux/sdk/models/Asset.java b/src/main/java/com/mux/sdk/models/Asset.java index 513b745..8e58e72 100644 --- a/src/main/java/com/mux/sdk/models/Asset.java +++ b/src/main/java/com/mux/sdk/models/Asset.java @@ -421,7 +421,13 @@ public MasterAccessEnum read(final JsonReader jsonReader) throws IOException { public enum Mp4SupportEnum { STANDARD("standard"), - NONE("none"); + NONE("none"), + + CAPPED_1080P("capped-1080p"), + + AUDIO_ONLY("audio-only"), + + AUDIO_ONLY_CAPPED_1080P("audio-only,capped-1080p"); private String value; diff --git a/src/main/java/com/mux/sdk/models/AssetStaticRenditionsFiles.java b/src/main/java/com/mux/sdk/models/AssetStaticRenditionsFiles.java index 100b95d..c2120a0 100644 --- a/src/main/java/com/mux/sdk/models/AssetStaticRenditionsFiles.java +++ b/src/main/java/com/mux/sdk/models/AssetStaticRenditionsFiles.java @@ -40,7 +40,9 @@ public enum NameEnum { HIGH_MP4("high.mp4"), - AUDIO_M4A("audio.m4a"); + AUDIO_M4A("audio.m4a"), + + CAPPED_1080P_MP4("capped-1080p.mp4"); private String value; diff --git a/src/main/java/com/mux/sdk/models/CreateAssetRequest.java b/src/main/java/com/mux/sdk/models/CreateAssetRequest.java index 240fe02..4a49734 100644 --- a/src/main/java/com/mux/sdk/models/CreateAssetRequest.java +++ b/src/main/java/com/mux/sdk/models/CreateAssetRequest.java @@ -48,13 +48,19 @@ public class CreateAssetRequest { private String passthrough; /** - * Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. + * Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. */ @JsonAdapter(Mp4SupportEnum.Adapter.class) public enum Mp4SupportEnum { NONE("none"), - STANDARD("standard"); + STANDARD("standard"), + + CAPPED_1080P("capped-1080p"), + + AUDIO_ONLY("audio-only"), + + AUDIO_ONLY_CAPPED_1080P("audio-only,capped-1080p"); private String value; @@ -377,11 +383,11 @@ public CreateAssetRequest mp4Support(Mp4SupportEnum mp4Support) { } /** - * Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. + * Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. * @return mp4Support **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information.") + @ApiModelProperty(value = "Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. ") public Mp4SupportEnum getMp4Support() { return mp4Support; diff --git a/src/main/java/com/mux/sdk/models/UpdateAssetMP4SupportRequest.java b/src/main/java/com/mux/sdk/models/UpdateAssetMP4SupportRequest.java index 85e124b..fce7e84 100644 --- a/src/main/java/com/mux/sdk/models/UpdateAssetMP4SupportRequest.java +++ b/src/main/java/com/mux/sdk/models/UpdateAssetMP4SupportRequest.java @@ -30,13 +30,19 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class UpdateAssetMP4SupportRequest { /** - * String value for the level of mp4 support + * Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). `none` will delete the MP4s from the asset in question. */ @JsonAdapter(Mp4SupportEnum.Adapter.class) public enum Mp4SupportEnum { STANDARD("standard"), - NONE("none"); + NONE("none"), + + CAPPED_1080P("capped-1080p"), + + AUDIO_ONLY("audio-only"), + + AUDIO_ONLY_CAPPED_1080P("audio-only,capped-1080p"); private String value; @@ -88,11 +94,11 @@ public UpdateAssetMP4SupportRequest mp4Support(Mp4SupportEnum mp4Support) { } /** - * String value for the level of mp4 support + * Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). `none` will delete the MP4s from the asset in question. * @return mp4Support **/ @javax.annotation.Nullable - @ApiModelProperty(value = "String value for the level of mp4 support") + @ApiModelProperty(value = "Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). `none` will delete the MP4s from the asset in question. ") public Mp4SupportEnum getMp4Support() { return mp4Support;