diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9d7d7a1..63a8ffe 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -49,6 +49,8 @@ docs/ExportFile.md docs/ExportsApi.md docs/FilterValue.md docs/FiltersApi.md +docs/GenerateTrackSubtitlesRequest.md +docs/GenerateTrackSubtitlesResponse.md docs/GetAssetInputInfoResponse.md docs/GetAssetOrLiveStreamIdResponse.md docs/GetAssetOrLiveStreamIdResponseData.md @@ -242,6 +244,8 @@ lib/mux_ruby/models/error.rb lib/mux_ruby/models/export_date.rb lib/mux_ruby/models/export_file.rb lib/mux_ruby/models/filter_value.rb +lib/mux_ruby/models/generate_track_subtitles_request.rb +lib/mux_ruby/models/generate_track_subtitles_response.rb lib/mux_ruby/models/get_asset_input_info_response.rb lib/mux_ruby/models/get_asset_or_live_stream_id_response.rb lib/mux_ruby/models/get_asset_or_live_stream_id_response_data.rb @@ -363,4 +367,6 @@ lib/mux_ruby/version.rb mux_ruby.gemspec spec/api_client_spec.rb spec/configuration_spec.rb +spec/models/generate_track_subtitles_request_spec.rb +spec/models/generate_track_subtitles_response_spec.rb spec/spec_helper.rb diff --git a/Gemfile.lock b/Gemfile.lock index 806026d..aae9853 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - mux_ruby (3.13.0) + mux_ruby (3.14.0) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index f059c45..83175a3 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Not familiar with Mux? Check out https://mux.com/ for more information. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v1 -- Package version: 3.13.0 +- Package version: 3.14.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit [https://docs.mux.com](https://docs.mux.com) @@ -40,16 +40,16 @@ gem build mux_ruby.gemspec Then either install the gem locally: ```shell -gem install ./mux_ruby-3.13.0.gem +gem install ./mux_ruby-3.14.0.gem ``` -(for development, run `gem install --dev ./mux_ruby-3.13.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./mux_ruby-3.14.0.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'mux_ruby', '~> 3.13.0' + gem 'mux_ruby', '~> 3.14.0' ### Install from Git diff --git a/docs/Asset.md b/docs/Asset.md index ab616df..9de42f0 100644 --- a/docs/Asset.md +++ b/docs/Asset.md @@ -31,6 +31,7 @@ | **recording_times** | [**Array<AssetRecordingTimes>**](AssetRecordingTimes.md) | An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream. Additionally any time slate media is inserted during brief interruptions in the live stream media or times when the live streaming software disconnects, a recording session representing the slate media will be added with a \"slate\" type. | [optional] | | **non_standard_input_reasons** | [**AssetNonStandardInputReasons**](AssetNonStandardInputReasons.md) | | [optional] | | **test** | **Boolean** | True means this live stream is a test asset. 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 assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional] | +| **ingest_type** | **String** | The type of ingest used to create the asset. | [optional] | ## Example @@ -64,7 +65,8 @@ instance = MuxRuby::Asset.new( static_renditions: null, recording_times: null, non_standard_input_reasons: null, - test: null + test: null, + ingest_type: null ) ``` diff --git a/docs/AssetsApi.md b/docs/AssetsApi.md index 3156586..83c27ef 100644 --- a/docs/AssetsApi.md +++ b/docs/AssetsApi.md @@ -10,11 +10,12 @@ All URIs are relative to *https://api.mux.com* | [**delete_asset**](AssetsApi.md#delete_asset) | **DELETE** /video/v1/assets/{ASSET_ID} | Delete an asset | | [**delete_asset_playback_id**](AssetsApi.md#delete_asset_playback_id) | **DELETE** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Delete a playback ID | | [**delete_asset_track**](AssetsApi.md#delete_asset_track) | **DELETE** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID} | Delete an asset track | +| [**generate_asset_track_subtitles**](AssetsApi.md#generate_asset_track_subtitles) | **POST** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles | Generate track subtitles | | [**get_asset**](AssetsApi.md#get_asset) | **GET** /video/v1/assets/{ASSET_ID} | Retrieve an asset | | [**get_asset_input_info**](AssetsApi.md#get_asset_input_info) | **GET** /video/v1/assets/{ASSET_ID}/input-info | Retrieve asset input info | | [**get_asset_playback_id**](AssetsApi.md#get_asset_playback_id) | **GET** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a playback ID | | [**list_assets**](AssetsApi.md#list_assets) | **GET** /video/v1/assets | List assets | -| [**update_asset**](AssetsApi.md#update_asset) | **PATCH** /video/v1/assets/{ASSET_ID} | Update an Asset | +| [**update_asset**](AssetsApi.md#update_asset) | **PATCH** /video/v1/assets/{ASSET_ID} | Update an asset | | [**update_asset_master_access**](AssetsApi.md#update_asset_master_access) | **PUT** /video/v1/assets/{ASSET_ID}/master-access | Update master access | | [**update_asset_mp4_support**](AssetsApi.md#update_asset_mp4_support) | **PUT** /video/v1/assets/{ASSET_ID}/mp4-support | Update MP4 support | @@ -444,6 +445,80 @@ nil (empty response body) - **Accept**: Not defined +## generate_asset_track_subtitles + +> generate_asset_track_subtitles(asset_id, track_id, generate_track_subtitles_request) + +Generate track subtitles + +Generates subtitles (captions) for a given audio track. This API can be used for up to 7 days after an asset is created. + +### Examples + +```ruby +require 'time' +require 'mux_ruby' +# setup authorization +MuxRuby.configure do |config| + # Configure HTTP basic authorization: accessToken + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MuxRuby::AssetsApi.new +asset_id = 'asset_id_example' # String | The asset ID. +track_id = 'track_id_example' # String | The track ID. +generate_track_subtitles_request = MuxRuby::GenerateTrackSubtitlesRequest.new # GenerateTrackSubtitlesRequest | + +begin + # Generate track subtitles + result = api_instance.generate_asset_track_subtitles(asset_id, track_id, generate_track_subtitles_request) + p result +rescue MuxRuby::ApiError => e + puts "Error when calling AssetsApi->generate_asset_track_subtitles: #{e}" +end +``` + +#### Using the generate_asset_track_subtitles_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> generate_asset_track_subtitles_with_http_info(asset_id, track_id, generate_track_subtitles_request) + +```ruby +begin + # Generate track subtitles + data, status_code, headers = api_instance.generate_asset_track_subtitles_with_http_info(asset_id, track_id, generate_track_subtitles_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MuxRuby::ApiError => e + puts "Error when calling AssetsApi->generate_asset_track_subtitles_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **asset_id** | **String** | The asset ID. | | +| **track_id** | **String** | The track ID. | | +| **generate_track_subtitles_request** | [**GenerateTrackSubtitlesRequest**](GenerateTrackSubtitlesRequest.md) | | | + +### Return type + +[**GenerateTrackSubtitlesResponse**](GenerateTrackSubtitlesResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## get_asset > get_asset(asset_id) @@ -738,7 +813,7 @@ end > update_asset(asset_id, update_asset_request) -Update an Asset +Update an asset Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the `passthrough` field. @@ -759,7 +834,7 @@ asset_id = 'asset_id_example' # String | The asset ID. update_asset_request = MuxRuby::UpdateAssetRequest.new # UpdateAssetRequest | begin - # Update an Asset + # Update an asset result = api_instance.update_asset(asset_id, update_asset_request) p result rescue MuxRuby::ApiError => e @@ -775,7 +850,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Update an Asset + # Update an asset data, status_code, headers = api_instance.update_asset_with_http_info(asset_id, update_asset_request) p status_code # => 2xx p headers # => { ... } diff --git a/docs/CreateSimulcastTargetRequest.md b/docs/CreateSimulcastTargetRequest.md index c04185e..0b72407 100644 --- a/docs/CreateSimulcastTargetRequest.md +++ b/docs/CreateSimulcastTargetRequest.md @@ -5,8 +5,8 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **passthrough** | **String** | Arbitrary user-supplied metadata set by you when creating a simulcast target. | [optional] | -| **stream_key** | **String** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. | [optional] | -| **url** | **String** | RTMP hostname including application name for the third party live streaming service. Example: `rtmp://live.example.com/app`. | [optional] | +| **stream_key** | **String** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations. | [optional] | +| **url** | **String** | The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT. | [optional] | ## Example diff --git a/docs/Error.md b/docs/Error.md index 5779f05..10c1886 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -12,6 +12,7 @@ | **description** | **String** | Description of the error. | [optional] | | **count** | **Integer** | The total number of views that experienced this error. | [optional] | | **code** | **Integer** | The error code | [optional] | +| **player_error_code** | **String** | The string version of the error code | [optional] | ## Example @@ -26,7 +27,8 @@ instance = MuxRuby::Error.new( last_seen: null, description: null, count: null, - code: null + code: null, + player_error_code: null ) ``` diff --git a/docs/GenerateTrackSubtitlesRequest.md b/docs/GenerateTrackSubtitlesRequest.md new file mode 100644 index 0000000..9f73a39 --- /dev/null +++ b/docs/GenerateTrackSubtitlesRequest.md @@ -0,0 +1,18 @@ +# MuxRuby::GenerateTrackSubtitlesRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **generated_subtitles** | [**Array<AssetGeneratedSubtitleSettings>**](AssetGeneratedSubtitleSettings.md) | Generate subtitle tracks using automatic speech recognition with this configuration. | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::GenerateTrackSubtitlesRequest.new( + generated_subtitles: null +) +``` + diff --git a/docs/GenerateTrackSubtitlesResponse.md b/docs/GenerateTrackSubtitlesResponse.md new file mode 100644 index 0000000..672a00f --- /dev/null +++ b/docs/GenerateTrackSubtitlesResponse.md @@ -0,0 +1,18 @@ +# MuxRuby::GenerateTrackSubtitlesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**Track**](Track.md) | | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::GenerateTrackSubtitlesResponse.new( + data: null +) +``` + diff --git a/docs/InputSettings.md b/docs/InputSettings.md index 975c0bb..a7b1ff9 100644 --- a/docs/InputSettings.md +++ b/docs/InputSettings.md @@ -6,7 +6,7 @@ | ---- | ---- | ----------- | ----- | | **url** | **String** | The URL of the file that Mux should download and use. * For the main input file, this should be the URL to the muxed file for Mux to download, for example an MP4, MOV, MKV, or TS file. Mux supports most audio/video file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `audio` tracks, the URL is the location of the audio file for Mux to download, for example an M4A, WAV, or MP3 file. Mux supports most audio file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `text` tracks, the URL is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) formats for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the URL is the location of the watermark image. The maximum size is 4096x4096. * When creating clips from existing Mux assets, the URL is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. The url property may be omitted on the first input object when providing asset settings for LiveStream and Upload objects, in order to configure settings related to the primary (live stream or direct upload) input. | [optional] | | **overlay_settings** | [**InputSettingsOverlaySettings**](InputSettingsOverlaySettings.md) | | [optional] | -| **generated_subtitles** | [**Array<AssetGeneratedSubtitleSettings>**](AssetGeneratedSubtitleSettings.md) | Generate subtitle tracks using automatic speech recognition using this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. | [optional] | +| **generated_subtitles** | [**Array<AssetGeneratedSubtitleSettings>**](AssetGeneratedSubtitleSettings.md) | Generate subtitle tracks using automatic speech recognition with this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. | [optional] | | **start_time** | **Float** | The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. | [optional] | | **end_time** | **Float** | The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. | [optional] | | **type** | **String** | This parameter is required for `text` type tracks. | [optional] | diff --git a/docs/LiveStream.md b/docs/LiveStream.md index 70e38d6..b408657 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -26,6 +26,7 @@ | **test** | **Boolean** | True means this live stream is a test live stream. Test live streams can be used to help evaluate the Mux Video APIs for free. There is no limit on the number of test live streams, but they are watermarked with the Mux logo, and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours. | [optional] | | **max_continuous_duration** | **Integer** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional][default to 43200] | | **srt_passphrase** | **String** | Unique key used for encrypting a stream to a Mux SRT endpoint. | [optional] | +| **active_ingest_protocol** | **String** | The protocol used for the active ingest stream. This is only set when the live stream is active. | [optional] | ## Example @@ -54,7 +55,8 @@ instance = MuxRuby::LiveStream.new( latency_mode: null, test: null, max_continuous_duration: null, - srt_passphrase: null + srt_passphrase: null, + active_ingest_protocol: null ) ``` diff --git a/docs/LiveStreamsApi.md b/docs/LiveStreamsApi.md index 2a301d3..b42158e 100644 --- a/docs/LiveStreamsApi.md +++ b/docs/LiveStreamsApi.md @@ -9,12 +9,12 @@ All URIs are relative to *https://api.mux.com* | [**create_live_stream_simulcast_target**](LiveStreamsApi.md#create_live_stream_simulcast_target) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets | Create a live stream simulcast target | | [**delete_live_stream**](LiveStreamsApi.md#delete_live_stream) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID} | Delete a live stream | | [**delete_live_stream_playback_id**](LiveStreamsApi.md#delete_live_stream_playback_id) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Delete a live stream playback ID | -| [**delete_live_stream_simulcast_target**](LiveStreamsApi.md#delete_live_stream_simulcast_target) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a Live Stream Simulcast Target | +| [**delete_live_stream_simulcast_target**](LiveStreamsApi.md#delete_live_stream_simulcast_target) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a live stream simulcast target | | [**disable_live_stream**](LiveStreamsApi.md#disable_live_stream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/disable | Disable a live stream | | [**enable_live_stream**](LiveStreamsApi.md#enable_live_stream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/enable | Enable a live stream | | [**get_live_stream**](LiveStreamsApi.md#get_live_stream) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID} | Retrieve a live stream | | [**get_live_stream_playback_id**](LiveStreamsApi.md#get_live_stream_playback_id) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a live stream playback ID | -| [**get_live_stream_simulcast_target**](LiveStreamsApi.md#get_live_stream_simulcast_target) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a Live Stream Simulcast Target | +| [**get_live_stream_simulcast_target**](LiveStreamsApi.md#get_live_stream_simulcast_target) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a live stream simulcast target | | [**list_live_streams**](LiveStreamsApi.md#list_live_streams) | **GET** /video/v1/live-streams | List live streams | | [**reset_stream_key**](LiveStreamsApi.md#reset_stream_key) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key | Reset a live stream's stream key | | [**signal_live_stream_complete**](LiveStreamsApi.md#signal_live_stream_complete) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/complete | Signal a live stream is finished | @@ -381,7 +381,7 @@ nil (empty response body) > delete_live_stream_simulcast_target(live_stream_id, simulcast_target_id) -Delete a Live Stream Simulcast Target +Delete a live stream simulcast target Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state. @@ -402,7 +402,7 @@ live_stream_id = 'live_stream_id_example' # String | The live stream ID simulcast_target_id = 'simulcast_target_id_example' # String | The ID of the simulcast target. begin - # Delete a Live Stream Simulcast Target + # Delete a live stream simulcast target api_instance.delete_live_stream_simulcast_target(live_stream_id, simulcast_target_id) rescue MuxRuby::ApiError => e puts "Error when calling LiveStreamsApi->delete_live_stream_simulcast_target: #{e}" @@ -417,7 +417,7 @@ This returns an Array which contains the response data (`nil` in this case), sta ```ruby begin - # Delete a Live Stream Simulcast Target + # Delete a live stream simulcast target data, status_code, headers = api_instance.delete_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id) p status_code # => 2xx p headers # => { ... } @@ -734,7 +734,7 @@ end > get_live_stream_simulcast_target(live_stream_id, simulcast_target_id) -Retrieve a Live Stream Simulcast Target +Retrieve a live stream simulcast target Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information. @@ -755,7 +755,7 @@ live_stream_id = 'live_stream_id_example' # String | The live stream ID simulcast_target_id = 'simulcast_target_id_example' # String | The ID of the simulcast target. begin - # Retrieve a Live Stream Simulcast Target + # Retrieve a live stream simulcast target result = api_instance.get_live_stream_simulcast_target(live_stream_id, simulcast_target_id) p result rescue MuxRuby::ApiError => e @@ -771,7 +771,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve a Live Stream Simulcast Target + # Retrieve a live stream simulcast target data, status_code, headers = api_instance.get_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id) p status_code # => 2xx p headers # => { ... } diff --git a/docs/MonitoringBreakdownTimeseriesDatapoint.md b/docs/MonitoringBreakdownTimeseriesDatapoint.md index 4941220..738d7a1 100644 --- a/docs/MonitoringBreakdownTimeseriesDatapoint.md +++ b/docs/MonitoringBreakdownTimeseriesDatapoint.md @@ -7,6 +7,7 @@ | **value** | **String** | | [optional] | | **metric_value** | **Float** | | [optional] | | **concurrent_viewers** | **Integer** | | [optional] | +| **starting_up_viewers** | **Integer** | | [optional] | ## Example @@ -16,7 +17,8 @@ require 'mux_ruby' instance = MuxRuby::MonitoringBreakdownTimeseriesDatapoint.new( value: null, metric_value: null, - concurrent_viewers: null + concurrent_viewers: null, + starting_up_viewers: null ) ``` diff --git a/docs/PlaybackIDApi.md b/docs/PlaybackIDApi.md index 496ada7..4a0a9b8 100644 --- a/docs/PlaybackIDApi.md +++ b/docs/PlaybackIDApi.md @@ -4,14 +4,14 @@ All URIs are relative to *https://api.mux.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**get_asset_or_livestream_id**](PlaybackIDApi.md#get_asset_or_livestream_id) | **GET** /video/v1/playback-ids/{PLAYBACK_ID} | Retrieve an Asset or Live Stream ID | +| [**get_asset_or_livestream_id**](PlaybackIDApi.md#get_asset_or_livestream_id) | **GET** /video/v1/playback-ids/{PLAYBACK_ID} | Retrieve an asset or live stream ID | ## get_asset_or_livestream_id > get_asset_or_livestream_id(playback_id) -Retrieve an Asset or Live Stream ID +Retrieve an asset or live stream ID Retrieves the Identifier of the Asset or Live Stream associated with the Playback ID. @@ -31,7 +31,7 @@ api_instance = MuxRuby::PlaybackIDApi.new playback_id = 'playback_id_example' # String | The live stream's playback ID. begin - # Retrieve an Asset or Live Stream ID + # Retrieve an asset or live stream ID result = api_instance.get_asset_or_livestream_id(playback_id) p result rescue MuxRuby::ApiError => e @@ -47,7 +47,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve an Asset or Live Stream ID + # Retrieve an asset or live stream ID data, status_code, headers = api_instance.get_asset_or_livestream_id_with_http_info(playback_id) p status_code # => 2xx p headers # => { ... } diff --git a/docs/SimulcastTarget.md b/docs/SimulcastTarget.md index 256503d..07dfb8f 100644 --- a/docs/SimulcastTarget.md +++ b/docs/SimulcastTarget.md @@ -6,9 +6,10 @@ | ---- | ---- | ----------- | ----- | | **id** | **String** | ID of the Simulcast Target | [optional] | | **passthrough** | **String** | Arbitrary user-supplied metadata set when creating a simulcast target. | [optional] | -| **status** | **String** | The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established. | [optional] | -| **stream_key** | **String** | Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too. | [optional] | -| **url** | **String** | RTMP hostname including the application name for the third party live streaming service. | [optional] | +| **status** | **String** | The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. When a simulcast target has this status it will have an `error_severity` field with more details about the error. | [optional] | +| **stream_key** | **String** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations. | [optional] | +| **url** | **String** | The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT. | [optional] | +| **error_severity** | **String** | The severity of the error encountered by the simulcast target. This field is only set when the simulcast target is in the `errored` status. See the values of severities below and their descriptions. * `normal`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. A simulcast may transition back into the broadcasting state if a connection with the service can be re-established. * `fatal`: The simulcast target is incompatible with the current input to the parent live stream. No further attempts to this simulcast target will be made for the current live stream asset. | [optional] | ## Example @@ -20,7 +21,8 @@ instance = MuxRuby::SimulcastTarget.new( passthrough: null, status: null, stream_key: null, - url: null + url: null, + error_severity: null ) ``` diff --git a/docs/VideoView.md b/docs/VideoView.md index 3615eaf..b5e1de8 100644 --- a/docs/VideoView.md +++ b/docs/VideoView.md @@ -158,6 +158,9 @@ | **ad_exit_before_start_percentage** | **String** | | [optional] | | **long_resume** | **Boolean** | | [optional] | | **long_rebuffering** | **Boolean** | | [optional] | +| **playback_failure_error_type_id** | **Integer** | | [optional] | +| **playback_business_exception_error_type_id** | **Integer** | | [optional] | +| **video_startup_business_exception_error_type_id** | **Integer** | | [optional] | ## Example @@ -318,7 +321,10 @@ instance = MuxRuby::VideoView.new( ad_exit_before_start_count: null, ad_exit_before_start_percentage: null, long_resume: null, - long_rebuffering: null + long_rebuffering: null, + playback_failure_error_type_id: null, + playback_business_exception_error_type_id: null, + video_startup_business_exception_error_type_id: null ) ``` diff --git a/gen/generator-config.json b/gen/generator-config.json index d0f0f21..2e89332 100644 --- a/gen/generator-config.json +++ b/gen/generator-config.json @@ -8,5 +8,5 @@ "gemSourceLocation": "https://github.com/muxinc/mux-ruby", "gemLicense": "MIT", "moduleName": "MuxRuby", - "gemVersion": "3.13.0" + "gemVersion": "3.14.0" } diff --git a/lib/mux_ruby.rb b/lib/mux_ruby.rb index 7edb517..85a65d0 100644 --- a/lib/mux_ruby.rb +++ b/lib/mux_ruby.rb @@ -55,6 +55,8 @@ require 'mux_ruby/models/export_date' require 'mux_ruby/models/export_file' require 'mux_ruby/models/filter_value' +require 'mux_ruby/models/generate_track_subtitles_request' +require 'mux_ruby/models/generate_track_subtitles_response' require 'mux_ruby/models/get_asset_input_info_response' require 'mux_ruby/models/get_asset_or_live_stream_id_response' require 'mux_ruby/models/get_asset_or_live_stream_id_response_data' diff --git a/lib/mux_ruby/api/assets_api.rb b/lib/mux_ruby/api/assets_api.rb index f351fdd..9251eb7 100644 --- a/lib/mux_ruby/api/assets_api.rb +++ b/lib/mux_ruby/api/assets_api.rb @@ -421,6 +421,83 @@ def delete_asset_track_with_http_info(asset_id, track_id, opts = {}) return data, status_code, headers end + # Generate track subtitles + # Generates subtitles (captions) for a given audio track. This API can be used for up to 7 days after an asset is created. + # @param asset_id [String] The asset ID. + # @param track_id [String] The track ID. + # @param generate_track_subtitles_request [GenerateTrackSubtitlesRequest] + # @param [Hash] opts the optional parameters + # @return [GenerateTrackSubtitlesResponse] + def generate_asset_track_subtitles(asset_id, track_id, generate_track_subtitles_request, opts = {}) + data, _status_code, _headers = generate_asset_track_subtitles_with_http_info(asset_id, track_id, generate_track_subtitles_request, opts) + data + end + + # Generate track subtitles + # Generates subtitles (captions) for a given audio track. This API can be used for up to 7 days after an asset is created. + # @param asset_id [String] The asset ID. + # @param track_id [String] The track ID. + # @param generate_track_subtitles_request [GenerateTrackSubtitlesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(GenerateTrackSubtitlesResponse, Integer, Hash)>] GenerateTrackSubtitlesResponse data, response status code and response headers + def generate_asset_track_subtitles_with_http_info(asset_id, track_id, generate_track_subtitles_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AssetsApi.generate_asset_track_subtitles ...' + end + # verify the required parameter 'asset_id' is set + if @api_client.config.client_side_validation && asset_id.nil? + fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.generate_asset_track_subtitles" + end + # verify the required parameter 'track_id' is set + if @api_client.config.client_side_validation && track_id.nil? + fail ArgumentError, "Missing the required parameter 'track_id' when calling AssetsApi.generate_asset_track_subtitles" + end + # verify the required parameter 'generate_track_subtitles_request' is set + if @api_client.config.client_side_validation && generate_track_subtitles_request.nil? + fail ArgumentError, "Missing the required parameter 'generate_track_subtitles_request' when calling AssetsApi.generate_asset_track_subtitles" + end + # resource path + local_var_path = '/video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'TRACK_ID' + '}', CGI.escape(track_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_track_subtitles_request) + + # return_type + return_type = opts[:debug_return_type] || 'GenerateTrackSubtitlesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['accessToken'] + + new_options = opts.merge( + :operation => :"AssetsApi.generate_asset_track_subtitles", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AssetsApi#generate_asset_track_subtitles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve an asset # Retrieves the details of an asset that has previously been created. Supply the unique asset ID that was returned from your previous request, and Mux will return the corresponding asset information. The same information is returned when creating an asset. # @param asset_id [String] The asset ID. @@ -685,7 +762,7 @@ def list_assets_with_http_info(opts = {}) return data, status_code, headers end - # Update an Asset + # Update an asset # Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the `passthrough` field. # @param asset_id [String] The asset ID. # @param update_asset_request [UpdateAssetRequest] @@ -696,7 +773,7 @@ def update_asset(asset_id, update_asset_request, opts = {}) data end - # Update an Asset + # Update an asset # Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the `passthrough` field. # @param asset_id [String] The asset ID. # @param update_asset_request [UpdateAssetRequest] diff --git a/lib/mux_ruby/api/live_streams_api.rb b/lib/mux_ruby/api/live_streams_api.rb index 834a4e6..84ef128 100644 --- a/lib/mux_ruby/api/live_streams_api.rb +++ b/lib/mux_ruby/api/live_streams_api.rb @@ -354,7 +354,7 @@ def delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, o return data, status_code, headers end - # Delete a Live Stream Simulcast Target + # Delete a live stream simulcast target # Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state. # @param live_stream_id [String] The live stream ID # @param simulcast_target_id [String] The ID of the simulcast target. @@ -365,7 +365,7 @@ def delete_live_stream_simulcast_target(live_stream_id, simulcast_target_id, opt nil end - # Delete a Live Stream Simulcast Target + # Delete a live stream simulcast target # Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state. # @param live_stream_id [String] The live stream ID # @param simulcast_target_id [String] The ID of the simulcast target. @@ -679,7 +679,7 @@ def get_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts return data, status_code, headers end - # Retrieve a Live Stream Simulcast Target + # Retrieve a live stream simulcast target # Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information. # @param live_stream_id [String] The live stream ID # @param simulcast_target_id [String] The ID of the simulcast target. @@ -690,7 +690,7 @@ def get_live_stream_simulcast_target(live_stream_id, simulcast_target_id, opts = data end - # Retrieve a Live Stream Simulcast Target + # Retrieve a live stream simulcast target # Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information. # @param live_stream_id [String] The live stream ID # @param simulcast_target_id [String] The ID of the simulcast target. diff --git a/lib/mux_ruby/api/metrics_api.rb b/lib/mux_ruby/api/metrics_api.rb index e50eaa6..90e4061 100644 --- a/lib/mux_ruby/api/metrics_api.rb +++ b/lib/mux_ruby/api/metrics_api.rb @@ -55,7 +55,7 @@ def get_metric_timeseries_data_with_http_info(metric_id, opts = {}) fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsApi.get_metric_timeseries_data" end # verify enum value - allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "live_stream_latency", "max_downscale_percentage", "max_request_latency", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_success_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "request_latency", "request_throughput", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate", "video_startup_failure_percentage", "ad_attempt_count", "ad_break_count", "ad_break_error_count", "ad_break_error_percentage", "ad_error_count", "ad_error_percentage", "ad_exit_before_start_count", "ad_exit_before_start_percentage", "ad_impression_count", "ad_startup_error_count", "ad_startup_error_percentage"] + allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "live_stream_latency", "max_downscale_percentage", "max_request_latency", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_success_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "request_latency", "request_throughput", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate", "video_startup_failure_percentage", "ad_attempt_count", "ad_break_count", "ad_break_error_count", "ad_break_error_percentage", "ad_error_count", "ad_error_percentage", "ad_exit_before_start_count", "ad_exit_before_start_percentage", "ad_impression_count", "ad_startup_error_count", "ad_startup_error_percentage", "playback_business_exception_percentage", "video_startup_business_exception_percentage"] if @api_client.config.client_side_validation && !allowable_values.include?(metric_id) fail ArgumentError, "invalid value for \"metric_id\", must be one of #{allowable_values}" end @@ -149,7 +149,7 @@ def get_overall_values_with_http_info(metric_id, opts = {}) fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsApi.get_overall_values" end # verify enum value - allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "live_stream_latency", "max_downscale_percentage", "max_request_latency", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_success_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "request_latency", "request_throughput", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate", "video_startup_failure_percentage", "ad_attempt_count", "ad_break_count", "ad_break_error_count", "ad_break_error_percentage", "ad_error_count", "ad_error_percentage", "ad_exit_before_start_count", "ad_exit_before_start_percentage", "ad_impression_count", "ad_startup_error_count", "ad_startup_error_percentage"] + allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "live_stream_latency", "max_downscale_percentage", "max_request_latency", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_success_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "request_latency", "request_throughput", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate", "video_startup_failure_percentage", "ad_attempt_count", "ad_break_count", "ad_break_error_count", "ad_break_error_percentage", "ad_error_count", "ad_error_percentage", "ad_exit_before_start_count", "ad_exit_before_start_percentage", "ad_impression_count", "ad_startup_error_count", "ad_startup_error_percentage", "playback_business_exception_percentage", "video_startup_business_exception_percentage"] if @api_client.config.client_side_validation && !allowable_values.include?(metric_id) fail ArgumentError, "invalid value for \"metric_id\", must be one of #{allowable_values}" end @@ -228,7 +228,7 @@ def list_all_metric_values_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MetricsApi.list_all_metric_values ...' end - allowable_values = ["asn", "asset_id", "browser", "browser_version", "cdn", "continent_code", "country", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "custom_10", "exit_before_video_start", "experiment_name", "live_stream_id", "operating_system", "operating_system_version", "page_type", "playback_id", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_content_type", "video_encoding_variant", "video_id", "video_series", "video_startup_failure", "video_title", "view_drm_type", "view_has_ad", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id"] + allowable_values = ["asn", "asset_id", "browser", "browser_version", "cdn", "continent_code", "country", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "custom_10", "exit_before_video_start", "experiment_name", "live_stream_id", "operating_system", "operating_system_version", "page_type", "playback_failure", "playback_business_exception", "playback_id", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_content_type", "video_encoding_variant", "video_id", "video_series", "video_startup_failure", "video_startup_business_exception", "video_title", "view_drm_type", "view_has_ad", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id"] if @api_client.config.client_side_validation && opts[:'dimension'] && !allowable_values.include?(opts[:'dimension']) fail ArgumentError, "invalid value for \"dimension\", must be one of #{allowable_values}" end @@ -319,11 +319,11 @@ def list_breakdown_values_with_http_info(metric_id, opts = {}) fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsApi.list_breakdown_values" end # verify enum value - allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "live_stream_latency", "max_downscale_percentage", "max_request_latency", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_success_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "request_latency", "request_throughput", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate", "video_startup_failure_percentage", "ad_attempt_count", "ad_break_count", "ad_break_error_count", "ad_break_error_percentage", "ad_error_count", "ad_error_percentage", "ad_exit_before_start_count", "ad_exit_before_start_percentage", "ad_impression_count", "ad_startup_error_count", "ad_startup_error_percentage"] + allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "live_stream_latency", "max_downscale_percentage", "max_request_latency", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_success_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "request_latency", "request_throughput", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate", "video_startup_failure_percentage", "ad_attempt_count", "ad_break_count", "ad_break_error_count", "ad_break_error_percentage", "ad_error_count", "ad_error_percentage", "ad_exit_before_start_count", "ad_exit_before_start_percentage", "ad_impression_count", "ad_startup_error_count", "ad_startup_error_percentage", "playback_business_exception_percentage", "video_startup_business_exception_percentage"] if @api_client.config.client_side_validation && !allowable_values.include?(metric_id) fail ArgumentError, "invalid value for \"metric_id\", must be one of #{allowable_values}" end - allowable_values = ["asn", "asset_id", "browser", "browser_version", "cdn", "continent_code", "country", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "custom_10", "exit_before_video_start", "experiment_name", "live_stream_id", "operating_system", "operating_system_version", "page_type", "playback_id", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_content_type", "video_encoding_variant", "video_id", "video_series", "video_startup_failure", "video_title", "view_drm_type", "view_has_ad", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id"] + allowable_values = ["asn", "asset_id", "browser", "browser_version", "cdn", "continent_code", "country", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "custom_10", "exit_before_video_start", "experiment_name", "live_stream_id", "operating_system", "operating_system_version", "page_type", "playback_failure", "playback_business_exception", "playback_id", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_content_type", "video_encoding_variant", "video_id", "video_series", "video_startup_business_exception", "video_startup_failure", "video_title", "view_drm_type", "view_has_ad", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id"] if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by']) fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}" end @@ -422,7 +422,7 @@ def list_insights_with_http_info(metric_id, opts = {}) fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsApi.list_insights" end # verify enum value - allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "live_stream_latency", "max_downscale_percentage", "max_request_latency", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_success_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "request_latency", "request_throughput", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate", "video_startup_failure_percentage", "ad_attempt_count", "ad_break_count", "ad_break_error_count", "ad_break_error_percentage", "ad_error_count", "ad_error_percentage", "ad_exit_before_start_count", "ad_exit_before_start_percentage", "ad_impression_count", "ad_startup_error_count", "ad_startup_error_percentage"] + allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "live_stream_latency", "max_downscale_percentage", "max_request_latency", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_success_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "request_latency", "request_throughput", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate", "video_startup_failure_percentage", "ad_attempt_count", "ad_break_count", "ad_break_error_count", "ad_break_error_percentage", "ad_error_count", "ad_error_percentage", "ad_exit_before_start_count", "ad_exit_before_start_percentage", "ad_impression_count", "ad_startup_error_count", "ad_startup_error_percentage", "playback_business_exception_percentage", "video_startup_business_exception_percentage"] if @api_client.config.client_side_validation && !allowable_values.include?(metric_id) fail ArgumentError, "invalid value for \"metric_id\", must be one of #{allowable_values}" end diff --git a/lib/mux_ruby/api/playback_id_api.rb b/lib/mux_ruby/api/playback_id_api.rb index 2cfac71..dbfb50e 100644 --- a/lib/mux_ruby/api/playback_id_api.rb +++ b/lib/mux_ruby/api/playback_id_api.rb @@ -19,7 +19,7 @@ class PlaybackIDApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # Retrieve an Asset or Live Stream ID + # Retrieve an asset or live stream ID # Retrieves the Identifier of the Asset or Live Stream associated with the Playback ID. # @param playback_id [String] The live stream's playback ID. # @param [Hash] opts the optional parameters @@ -29,7 +29,7 @@ def get_asset_or_livestream_id(playback_id, opts = {}) data end - # Retrieve an Asset or Live Stream ID + # Retrieve an asset or live stream ID # Retrieves the Identifier of the Asset or Live Stream associated with the Playback ID. # @param playback_id [String] The live stream's playback ID. # @param [Hash] opts the optional parameters diff --git a/lib/mux_ruby/models/asset.rb b/lib/mux_ruby/models/asset.rb index 9ccb785..e563308 100644 --- a/lib/mux_ruby/models/asset.rb +++ b/lib/mux_ruby/models/asset.rb @@ -89,6 +89,9 @@ class Asset # True means this live stream is a test asset. 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 assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. attr_accessor :test + # The type of ingest used to create the asset. + attr_accessor :ingest_type + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -140,7 +143,8 @@ def self.attribute_map :'static_renditions' => :'static_renditions', :'recording_times' => :'recording_times', :'non_standard_input_reasons' => :'non_standard_input_reasons', - :'test' => :'test' + :'test' => :'test', + :'ingest_type' => :'ingest_type' } end @@ -178,7 +182,8 @@ def self.openapi_types :'static_renditions' => :'AssetStaticRenditions', :'recording_times' => :'Array', :'non_standard_input_reasons' => :'AssetNonStandardInputReasons', - :'test' => :'Boolean' + :'test' => :'Boolean', + :'ingest_type' => :'String' } end @@ -322,6 +327,10 @@ def initialize(attributes = {}) if attributes.key?(:'test') self.test = attributes[:'test'] end + + if attributes.key?(:'ingest_type') + self.ingest_type = attributes[:'ingest_type'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -348,6 +357,8 @@ def valid? return false unless master_access_validator.valid?(@master_access) mp4_support_validator = EnumAttributeValidator.new('String', ["standard", "none"]) return false unless mp4_support_validator.valid?(@mp4_support) + ingest_type_validator = EnumAttributeValidator.new('String', ["on_demand_url", "on_demand_direct_upload", "on_demand_clip", "live_rtmp", "live_srt"]) + return false unless ingest_type_validator.valid?(@ingest_type) true end @@ -421,6 +432,16 @@ def mp4_support=(mp4_support) @mp4_support = mp4_support end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] ingest_type Object to be assigned + def ingest_type=(ingest_type) + validator = EnumAttributeValidator.new('String', ["on_demand_url", "on_demand_direct_upload", "on_demand_clip", "live_rtmp", "live_srt"]) + unless validator.valid?(ingest_type) + fail ArgumentError, "invalid value for \"ingest_type\", must be one of #{validator.allowable_values}." + end + @ingest_type = ingest_type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -452,7 +473,8 @@ def ==(o) static_renditions == o.static_renditions && recording_times == o.recording_times && non_standard_input_reasons == o.non_standard_input_reasons && - test == o.test + test == o.test && + ingest_type == o.ingest_type end # @see the `==` method @@ -464,7 +486,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created_at, status, duration, max_stored_resolution, resolution_tier, max_resolution_tier, encoding_tier, max_stored_frame_rate, aspect_ratio, playback_ids, tracks, errors, per_title_encode, upload_id, is_live, passthrough, live_stream_id, master, master_access, mp4_support, source_asset_id, normalize_audio, static_renditions, recording_times, non_standard_input_reasons, test].hash + [id, created_at, status, duration, max_stored_resolution, resolution_tier, max_resolution_tier, encoding_tier, max_stored_frame_rate, aspect_ratio, playback_ids, tracks, errors, per_title_encode, upload_id, is_live, passthrough, live_stream_id, master, master_access, mp4_support, source_asset_id, normalize_audio, static_renditions, recording_times, non_standard_input_reasons, test, ingest_type].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/create_simulcast_target_request.rb b/lib/mux_ruby/models/create_simulcast_target_request.rb index 6a8b3a8..c5eb810 100644 --- a/lib/mux_ruby/models/create_simulcast_target_request.rb +++ b/lib/mux_ruby/models/create_simulcast_target_request.rb @@ -18,10 +18,10 @@ class CreateSimulcastTargetRequest # Arbitrary user-supplied metadata set by you when creating a simulcast target. attr_accessor :passthrough - # Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. + # Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations. attr_accessor :stream_key - # RTMP hostname including application name for the third party live streaming service. Example: `rtmp://live.example.com/app`. + # The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT. attr_accessor :url # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/mux_ruby/models/error.rb b/lib/mux_ruby/models/error.rb index 8b0a39d..bfec8e1 100644 --- a/lib/mux_ruby/models/error.rb +++ b/lib/mux_ruby/models/error.rb @@ -39,6 +39,9 @@ class Error # The error code attr_accessor :code + # The string version of the error code + attr_accessor :player_error_code + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -49,7 +52,8 @@ def self.attribute_map :'last_seen' => :'last_seen', :'description' => :'description', :'count' => :'count', - :'code' => :'code' + :'code' => :'code', + :'player_error_code' => :'player_error_code' } end @@ -68,7 +72,8 @@ def self.openapi_types :'last_seen' => :'String', :'description' => :'String', :'count' => :'Integer', - :'code' => :'Integer' + :'code' => :'Integer', + :'player_error_code' => :'String' } end @@ -78,7 +83,8 @@ def self.openapi_nullable :'notes', :'message', :'description', - :'code' + :'code', + :'player_error_code' ]) end @@ -128,6 +134,10 @@ def initialize(attributes = {}) if attributes.key?(:'code') self.code = attributes[:'code'] end + + if attributes.key?(:'player_error_code') + self.player_error_code = attributes[:'player_error_code'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +165,8 @@ def ==(o) last_seen == o.last_seen && description == o.description && count == o.count && - code == o.code + code == o.code && + player_error_code == o.player_error_code end # @see the `==` method @@ -167,7 +178,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, percentage, notes, message, last_seen, description, count, code].hash + [id, percentage, notes, message, last_seen, description, count, code, player_error_code].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/generate_track_subtitles_request.rb b/lib/mux_ruby/models/generate_track_subtitles_request.rb new file mode 100644 index 0000000..d98d11a --- /dev/null +++ b/lib/mux_ruby/models/generate_track_subtitles_request.rb @@ -0,0 +1,221 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'date' +require 'time' + +module MuxRuby + class GenerateTrackSubtitlesRequest + # Generate subtitle tracks using automatic speech recognition with this configuration. + attr_accessor :generated_subtitles + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'generated_subtitles' => :'generated_subtitles' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'generated_subtitles' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::GenerateTrackSubtitlesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::GenerateTrackSubtitlesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'generated_subtitles') + if (value = attributes[:'generated_subtitles']).is_a?(Array) + self.generated_subtitles = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + generated_subtitles == o.generated_subtitles + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [generated_subtitles].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MuxRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mux_ruby/models/generate_track_subtitles_response.rb b/lib/mux_ruby/models/generate_track_subtitles_response.rb new file mode 100644 index 0000000..d9f75fd --- /dev/null +++ b/lib/mux_ruby/models/generate_track_subtitles_response.rb @@ -0,0 +1,218 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'date' +require 'time' + +module MuxRuby + class GenerateTrackSubtitlesResponse + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Track' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::GenerateTrackSubtitlesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::GenerateTrackSubtitlesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MuxRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mux_ruby/models/input_settings.rb b/lib/mux_ruby/models/input_settings.rb index 12f7d1e..1c99262 100644 --- a/lib/mux_ruby/models/input_settings.rb +++ b/lib/mux_ruby/models/input_settings.rb @@ -21,7 +21,7 @@ class InputSettings attr_accessor :overlay_settings - # Generate subtitle tracks using automatic speech recognition using this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. + # Generate subtitle tracks using automatic speech recognition with this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. attr_accessor :generated_subtitles # The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. diff --git a/lib/mux_ruby/models/live_stream.rb b/lib/mux_ruby/models/live_stream.rb index e84778c..5ae3769 100644 --- a/lib/mux_ruby/models/live_stream.rb +++ b/lib/mux_ruby/models/live_stream.rb @@ -79,6 +79,9 @@ class LiveStream # Unique key used for encrypting a stream to a Mux SRT endpoint. attr_accessor :srt_passphrase + # The protocol used for the active ingest stream. This is only set when the live stream is active. + attr_accessor :active_ingest_protocol + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -125,7 +128,8 @@ def self.attribute_map :'latency_mode' => :'latency_mode', :'test' => :'test', :'max_continuous_duration' => :'max_continuous_duration', - :'srt_passphrase' => :'srt_passphrase' + :'srt_passphrase' => :'srt_passphrase', + :'active_ingest_protocol' => :'active_ingest_protocol' } end @@ -158,7 +162,8 @@ def self.openapi_types :'latency_mode' => :'String', :'test' => :'Boolean', :'max_continuous_duration' => :'Integer', - :'srt_passphrase' => :'String' + :'srt_passphrase' => :'String', + :'active_ingest_protocol' => :'String' } end @@ -286,6 +291,10 @@ def initialize(attributes = {}) if attributes.key?(:'srt_passphrase') self.srt_passphrase = attributes[:'srt_passphrase'] end + + if attributes.key?(:'active_ingest_protocol') + self.active_ingest_protocol = attributes[:'active_ingest_protocol'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -320,6 +329,8 @@ def valid? return false unless latency_mode_validator.valid?(@latency_mode) return false if !@max_continuous_duration.nil? && @max_continuous_duration > 43200 return false if !@max_continuous_duration.nil? && @max_continuous_duration < 60 + active_ingest_protocol_validator = EnumAttributeValidator.new('String', ["rtmp", "srt"]) + return false unless active_ingest_protocol_validator.valid?(@active_ingest_protocol) true end @@ -361,6 +372,16 @@ def max_continuous_duration=(max_continuous_duration) @max_continuous_duration = max_continuous_duration end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] active_ingest_protocol Object to be assigned + def active_ingest_protocol=(active_ingest_protocol) + validator = EnumAttributeValidator.new('String', ["rtmp", "srt"]) + unless validator.valid?(active_ingest_protocol) + fail ArgumentError, "invalid value for \"active_ingest_protocol\", must be one of #{validator.allowable_values}." + end + @active_ingest_protocol = active_ingest_protocol + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -387,7 +408,8 @@ def ==(o) latency_mode == o.latency_mode && test == o.test && max_continuous_duration == o.max_continuous_duration && - srt_passphrase == o.srt_passphrase + srt_passphrase == o.srt_passphrase && + active_ingest_protocol == o.active_ingest_protocol end # @see the `==` method @@ -399,7 +421,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, audio_only, embedded_subtitles, generated_subtitles, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, reduced_latency, low_latency, simulcast_targets, latency_mode, test, max_continuous_duration, srt_passphrase].hash + [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, audio_only, embedded_subtitles, generated_subtitles, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, reduced_latency, low_latency, simulcast_targets, latency_mode, test, max_continuous_duration, srt_passphrase, active_ingest_protocol].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/monitoring_breakdown_timeseries_datapoint.rb b/lib/mux_ruby/models/monitoring_breakdown_timeseries_datapoint.rb index 3d0194d..1ef295c 100644 --- a/lib/mux_ruby/models/monitoring_breakdown_timeseries_datapoint.rb +++ b/lib/mux_ruby/models/monitoring_breakdown_timeseries_datapoint.rb @@ -21,12 +21,15 @@ class MonitoringBreakdownTimeseriesDatapoint attr_accessor :concurrent_viewers + attr_accessor :starting_up_viewers + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'value' => :'value', :'metric_value' => :'metric_value', - :'concurrent_viewers' => :'concurrent_viewers' + :'concurrent_viewers' => :'concurrent_viewers', + :'starting_up_viewers' => :'starting_up_viewers' } end @@ -40,7 +43,8 @@ def self.openapi_types { :'value' => :'String', :'metric_value' => :'Float', - :'concurrent_viewers' => :'Integer' + :'concurrent_viewers' => :'Integer', + :'starting_up_viewers' => :'Integer' } end @@ -78,6 +82,10 @@ def initialize(attributes = {}) if attributes.key?(:'concurrent_viewers') self.concurrent_viewers = attributes[:'concurrent_viewers'] end + + if attributes.key?(:'starting_up_viewers') + self.starting_up_viewers = attributes[:'starting_up_viewers'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -100,7 +108,8 @@ def ==(o) self.class == o.class && value == o.value && metric_value == o.metric_value && - concurrent_viewers == o.concurrent_viewers + concurrent_viewers == o.concurrent_viewers && + starting_up_viewers == o.starting_up_viewers end # @see the `==` method @@ -112,7 +121,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [value, metric_value, concurrent_viewers].hash + [value, metric_value, concurrent_viewers, starting_up_viewers].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/simulcast_target.rb b/lib/mux_ruby/models/simulcast_target.rb index a60e7ec..e9c91e5 100644 --- a/lib/mux_ruby/models/simulcast_target.rb +++ b/lib/mux_ruby/models/simulcast_target.rb @@ -21,15 +21,18 @@ class SimulcastTarget # Arbitrary user-supplied metadata set when creating a simulcast target. attr_accessor :passthrough - # The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established. + # The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. When a simulcast target has this status it will have an `error_severity` field with more details about the error. attr_accessor :status - # Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too. + # Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations. attr_accessor :stream_key - # RTMP hostname including the application name for the third party live streaming service. + # The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT. attr_accessor :url + # The severity of the error encountered by the simulcast target. This field is only set when the simulcast target is in the `errored` status. See the values of severities below and their descriptions. * `normal`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. A simulcast may transition back into the broadcasting state if a connection with the service can be re-established. * `fatal`: The simulcast target is incompatible with the current input to the parent live stream. No further attempts to this simulcast target will be made for the current live stream asset. + attr_accessor :error_severity + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -59,7 +62,8 @@ def self.attribute_map :'passthrough' => :'passthrough', :'status' => :'status', :'stream_key' => :'stream_key', - :'url' => :'url' + :'url' => :'url', + :'error_severity' => :'error_severity' } end @@ -75,7 +79,8 @@ def self.openapi_types :'passthrough' => :'String', :'status' => :'String', :'stream_key' => :'String', - :'url' => :'String' + :'url' => :'String', + :'error_severity' => :'String' } end @@ -119,6 +124,10 @@ def initialize(attributes = {}) if attributes.key?(:'url') self.url = attributes[:'url'] end + + if attributes.key?(:'error_severity') + self.error_severity = attributes[:'error_severity'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -133,6 +142,8 @@ def list_invalid_properties def valid? status_validator = EnumAttributeValidator.new('String', ["idle", "starting", "broadcasting", "errored"]) return false unless status_validator.valid?(@status) + error_severity_validator = EnumAttributeValidator.new('String', ["normal", "fatal"]) + return false unless error_severity_validator.valid?(@error_severity) true end @@ -146,6 +157,16 @@ def status=(status) @status = status end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] error_severity Object to be assigned + def error_severity=(error_severity) + validator = EnumAttributeValidator.new('String', ["normal", "fatal"]) + unless validator.valid?(error_severity) + fail ArgumentError, "invalid value for \"error_severity\", must be one of #{validator.allowable_values}." + end + @error_severity = error_severity + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -155,7 +176,8 @@ def ==(o) passthrough == o.passthrough && status == o.status && stream_key == o.stream_key && - url == o.url + url == o.url && + error_severity == o.error_severity end # @see the `==` method @@ -167,7 +189,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, passthrough, status, stream_key, url].hash + [id, passthrough, status, stream_key, url, error_severity].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/video_view.rb b/lib/mux_ruby/models/video_view.rb index 8930c24..0119df0 100644 --- a/lib/mux_ruby/models/video_view.rb +++ b/lib/mux_ruby/models/video_view.rb @@ -323,6 +323,12 @@ class VideoView attr_accessor :long_rebuffering + attr_accessor :playback_failure_error_type_id + + attr_accessor :playback_business_exception_error_type_id + + attr_accessor :video_startup_business_exception_error_type_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -479,7 +485,10 @@ def self.attribute_map :'ad_exit_before_start_count' => :'ad_exit_before_start_count', :'ad_exit_before_start_percentage' => :'ad_exit_before_start_percentage', :'long_resume' => :'long_resume', - :'long_rebuffering' => :'long_rebuffering' + :'long_rebuffering' => :'long_rebuffering', + :'playback_failure_error_type_id' => :'playback_failure_error_type_id', + :'playback_business_exception_error_type_id' => :'playback_business_exception_error_type_id', + :'video_startup_business_exception_error_type_id' => :'video_startup_business_exception_error_type_id' } end @@ -644,7 +653,10 @@ def self.openapi_types :'ad_exit_before_start_count' => :'Integer', :'ad_exit_before_start_percentage' => :'String', :'long_resume' => :'Boolean', - :'long_rebuffering' => :'Boolean' + :'long_rebuffering' => :'Boolean', + :'playback_failure_error_type_id' => :'Integer', + :'playback_business_exception_error_type_id' => :'Integer', + :'video_startup_business_exception_error_type_id' => :'Integer' } end @@ -1418,6 +1430,18 @@ def initialize(attributes = {}) if attributes.key?(:'long_rebuffering') self.long_rebuffering = attributes[:'long_rebuffering'] end + + if attributes.key?(:'playback_failure_error_type_id') + self.playback_failure_error_type_id = attributes[:'playback_failure_error_type_id'] + end + + if attributes.key?(:'playback_business_exception_error_type_id') + self.playback_business_exception_error_type_id = attributes[:'playback_business_exception_error_type_id'] + end + + if attributes.key?(:'video_startup_business_exception_error_type_id') + self.video_startup_business_exception_error_type_id = attributes[:'video_startup_business_exception_error_type_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -1591,7 +1615,10 @@ def ==(o) ad_exit_before_start_count == o.ad_exit_before_start_count && ad_exit_before_start_percentage == o.ad_exit_before_start_percentage && long_resume == o.long_resume && - long_rebuffering == o.long_rebuffering + long_rebuffering == o.long_rebuffering && + playback_failure_error_type_id == o.playback_failure_error_type_id && + playback_business_exception_error_type_id == o.playback_business_exception_error_type_id && + video_startup_business_exception_error_type_id == o.video_startup_business_exception_error_type_id end # @see the `==` method @@ -1603,7 +1630,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [view_total_upscaling, preroll_ad_asset_hostname, player_source_domain, region, viewer_user_agent, preroll_requested, page_type, startup_score, view_seek_duration, country_name, player_source_height, longitude, buffering_count, video_duration, player_source_type, city, view_id, platform_description, video_startup_preroll_request_time, viewer_device_name, video_series, viewer_application_name, updated_at, view_total_content_playback_time, cdn, player_instance_id, video_language, player_source_width, player_error_message, player_mux_plugin_version, watched, playback_score, page_url, metro, view_max_request_latency, requests_for_first_preroll, view_total_downscaling, latitude, player_source_host_name, inserted_at, view_end, mux_embed_version, player_language, page_load_time, viewer_device_category, video_startup_preroll_load_time, player_version, watch_time, player_source_stream_type, preroll_ad_tag_hostname, viewer_device_manufacturer, rebuffering_score, experiment_name, viewer_os_version, player_preload, buffering_duration, player_view_count, player_software, player_load_time, platform_summary, video_encoding_variant, player_width, view_seek_count, viewer_experience_score, view_error_id, video_variant_name, preroll_played, viewer_application_engine, viewer_os_architecture, player_error_code, buffering_rate, events, player_name, view_start, view_average_request_throughput, video_producer, error_type_id, mux_viewer_id, video_id, continent_code, session_id, exit_before_video_start, video_content_type, viewer_os_family, player_poster, view_average_request_latency, video_variant_id, player_source_duration, player_source_url, mux_api_version, video_title, id, short_time, rebuffer_percentage, time_to_first_frame, viewer_user_id, video_stream_type, player_startup_time, viewer_application_version, view_max_downscale_percentage, view_max_upscale_percentage, country_code, used_fullscreen, isp, property_id, player_autoplay, player_height, asn, asn_name, quality_score, player_software_version, player_mux_plugin_name, sub_property_id, player_remote_played, view_max_playhead_position, view_playing_time, view_session_id, viewer_connection_type, viewer_device_model, weighted_average_bitrate, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10, live_stream_latency, asset_id, environment_id, live_stream_id, mux_embed, playback_id, player_error_context, view_drm_type, view_dropped_frame_count, view_has_ad, video_startup_failure, ad_attempt_count, ad_break_count, ad_break_error_count, ad_break_error_percentage, ad_error_count, ad_error_percentage, ad_impression_count, ad_startup_error_count, ad_startup_error_percentage, ad_exit_before_start_count, ad_exit_before_start_percentage, long_resume, long_rebuffering].hash + [view_total_upscaling, preroll_ad_asset_hostname, player_source_domain, region, viewer_user_agent, preroll_requested, page_type, startup_score, view_seek_duration, country_name, player_source_height, longitude, buffering_count, video_duration, player_source_type, city, view_id, platform_description, video_startup_preroll_request_time, viewer_device_name, video_series, viewer_application_name, updated_at, view_total_content_playback_time, cdn, player_instance_id, video_language, player_source_width, player_error_message, player_mux_plugin_version, watched, playback_score, page_url, metro, view_max_request_latency, requests_for_first_preroll, view_total_downscaling, latitude, player_source_host_name, inserted_at, view_end, mux_embed_version, player_language, page_load_time, viewer_device_category, video_startup_preroll_load_time, player_version, watch_time, player_source_stream_type, preroll_ad_tag_hostname, viewer_device_manufacturer, rebuffering_score, experiment_name, viewer_os_version, player_preload, buffering_duration, player_view_count, player_software, player_load_time, platform_summary, video_encoding_variant, player_width, view_seek_count, viewer_experience_score, view_error_id, video_variant_name, preroll_played, viewer_application_engine, viewer_os_architecture, player_error_code, buffering_rate, events, player_name, view_start, view_average_request_throughput, video_producer, error_type_id, mux_viewer_id, video_id, continent_code, session_id, exit_before_video_start, video_content_type, viewer_os_family, player_poster, view_average_request_latency, video_variant_id, player_source_duration, player_source_url, mux_api_version, video_title, id, short_time, rebuffer_percentage, time_to_first_frame, viewer_user_id, video_stream_type, player_startup_time, viewer_application_version, view_max_downscale_percentage, view_max_upscale_percentage, country_code, used_fullscreen, isp, property_id, player_autoplay, player_height, asn, asn_name, quality_score, player_software_version, player_mux_plugin_name, sub_property_id, player_remote_played, view_max_playhead_position, view_playing_time, view_session_id, viewer_connection_type, viewer_device_model, weighted_average_bitrate, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10, live_stream_latency, asset_id, environment_id, live_stream_id, mux_embed, playback_id, player_error_context, view_drm_type, view_dropped_frame_count, view_has_ad, video_startup_failure, ad_attempt_count, ad_break_count, ad_break_error_count, ad_break_error_percentage, ad_error_count, ad_error_percentage, ad_impression_count, ad_startup_error_count, ad_startup_error_percentage, ad_exit_before_start_count, ad_exit_before_start_percentage, long_resume, long_rebuffering, playback_failure_error_type_id, playback_business_exception_error_type_id, video_startup_business_exception_error_type_id].hash end # Builds the object from hash diff --git a/lib/mux_ruby/version.rb b/lib/mux_ruby/version.rb index 3f63233..86403a4 100644 --- a/lib/mux_ruby/version.rb +++ b/lib/mux_ruby/version.rb @@ -11,5 +11,5 @@ =end module MuxRuby - VERSION = '3.13.0' + VERSION = '3.14.0' end diff --git a/spec/models/generate_track_subtitles_request_spec.rb b/spec/models/generate_track_subtitles_request_spec.rb new file mode 100644 index 0000000..6c9219b --- /dev/null +++ b/spec/models/generate_track_subtitles_request_spec.rb @@ -0,0 +1,34 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MuxRuby::GenerateTrackSubtitlesRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::GenerateTrackSubtitlesRequest do + let(:instance) { MuxRuby::GenerateTrackSubtitlesRequest.new } + + describe 'test an instance of GenerateTrackSubtitlesRequest' do + it 'should create an instance of GenerateTrackSubtitlesRequest' do + expect(instance).to be_instance_of(MuxRuby::GenerateTrackSubtitlesRequest) + end + end + describe 'test attribute "generated_subtitles"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/generate_track_subtitles_response_spec.rb b/spec/models/generate_track_subtitles_response_spec.rb new file mode 100644 index 0000000..27f8921 --- /dev/null +++ b/spec/models/generate_track_subtitles_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MuxRuby::GenerateTrackSubtitlesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::GenerateTrackSubtitlesResponse do + let(:instance) { MuxRuby::GenerateTrackSubtitlesResponse.new } + + describe 'test an instance of GenerateTrackSubtitlesResponse' do + it 'should create an instance of GenerateTrackSubtitlesResponse' do + expect(instance).to be_instance_of(MuxRuby::GenerateTrackSubtitlesResponse) + end + end + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end