mux_ruby 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +4 -4
- data/docs/AssetNonStandardInputReasons.md +2 -0
- data/docs/CreateLiveStreamRequest.md +2 -0
- data/docs/ExportsApi.md +1 -1
- data/docs/FiltersApi.md +2 -2
- data/docs/LiveStreamEmbeddedSubtitleSettings.md +24 -0
- data/docs/LiveStreamsApi.md +73 -0
- data/docs/UpdateLiveStreamEmbeddedSubtitlesRequest.md +18 -0
- data/examples/data/exercise-errors.rb +1 -2
- data/examples/video/exercise-assets.rb +1 -0
- data/gen/generator-config.json +1 -1
- data/lib/mux_ruby/api/exports_api.rb +2 -2
- data/lib/mux_ruby/api/filters_api.rb +4 -4
- data/lib/mux_ruby/api/live_streams_api.rb +71 -0
- data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +23 -1
- data/lib/mux_ruby/models/create_live_stream_request.rb +13 -1
- data/lib/mux_ruby/models/live_stream_embedded_subtitle_settings.rb +287 -0
- data/lib/mux_ruby/models/track.rb +0 -12
- data/lib/mux_ruby/models/update_live_stream_embedded_subtitles_request.rb +221 -0
- data/lib/mux_ruby/version.rb +1 -1
- data/lib/mux_ruby.rb +2 -0
- data/spec/models/live_stream_embedded_subtitle_settings_spec.rb +56 -0
- data/spec/models/update_live_stream_embedded_subtitles_request_spec.rb +34 -0
- metadata +98 -90
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7a99cd8098b01ddad710e7153232db2cac36c4d31d2d53fce6bb58dfa382784
|
4
|
+
data.tar.gz: 8784940c59311b4cae0ff0baf15fc31a9c28970b8ce39e75520715fc21fdaba0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 942398ee0cd547f3e0e2ef124e67b47017feab7a0c3865ac61254fc4ac72040980a91b62bc1e558f04b5af23476ef2dee86e9ce38ee8b8e0946847907fc16287
|
7
|
+
data.tar.gz: 74e58bf7aa0ff96bb4affc8fcb1917dba3a285a2b80785699201c5c0433e17d0c00ad68dc02eeed9e0dd43540b7faaa4eb719c7e9bcfc2152e96297c961ae29a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mux_ruby (
|
4
|
+
mux_ruby (3.0.0)
|
5
5
|
typhoeus (~> 1.0, >= 1.0.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -11,7 +11,7 @@ GEM
|
|
11
11
|
byebug (11.1.1)
|
12
12
|
coderay (1.1.2)
|
13
13
|
diff-lcs (1.3)
|
14
|
-
ethon (0.
|
14
|
+
ethon (0.15.0)
|
15
15
|
ffi (>= 1.15.0)
|
16
16
|
ffi (1.15.4)
|
17
17
|
jaro_winkler (1.5.4)
|
@@ -67,4 +67,4 @@ DEPENDENCIES
|
|
67
67
|
solid_assert
|
68
68
|
|
69
69
|
BUNDLED WITH
|
70
|
-
2.2.
|
70
|
+
2.2.25
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ Not familiar with Mux? Check out https://mux.com/ for more information.
|
|
17
17
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
18
18
|
|
19
19
|
- API version: v1
|
20
|
-
- Package version:
|
20
|
+
- Package version: 3.0.0
|
21
21
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
22
22
|
For more information, please visit [https://docs.mux.com](https://docs.mux.com)
|
23
23
|
|
@@ -34,16 +34,16 @@ gem build mux_ruby.gemspec
|
|
34
34
|
Then either install the gem locally:
|
35
35
|
|
36
36
|
```shell
|
37
|
-
gem install ./mux_ruby-
|
37
|
+
gem install ./mux_ruby-3.0.0.gem
|
38
38
|
```
|
39
39
|
|
40
|
-
(for development, run `gem install --dev ./mux_ruby-
|
40
|
+
(for development, run `gem install --dev ./mux_ruby-3.0.0.gem` to install the development dependencies)
|
41
41
|
|
42
42
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
43
43
|
|
44
44
|
Finally add this to the Gemfile:
|
45
45
|
|
46
|
-
gem 'mux_ruby', '~>
|
46
|
+
gem 'mux_ruby', '~> 3.0.0'
|
47
47
|
|
48
48
|
### Install from Git
|
49
49
|
|
@@ -9,6 +9,7 @@
|
|
9
9
|
| **video_gop_size** | **String** | The video key frame Interval (also called as Group of Picture or GOP) of the input file is `high`. This parameter is present when the gop is greater than 10 seconds. | [optional] |
|
10
10
|
| **video_frame_rate** | **String** | The video frame rate of the input file. Video with average frames per second (fps) less than 10 or greater than 120 is non-standard. A `-1` frame rate value indicates Mux could not determine the frame rate of the video track. | [optional] |
|
11
11
|
| **video_resolution** | **String** | The video resolution of the input file. Video resolution higher than 2048 pixels on any one dimension (height or width) is considered non-standard, The resolution value is presented as `width` x `height` in pixels. | [optional] |
|
12
|
+
| **video_bitrate** | **String** | The video bitrate of the input file is `high`. This parameter is present when the average bitrate of any key frame interval (also known as Group of Pictures or GOP) is higher than what's considered standard which typically is 16 Mbps. | [optional] |
|
12
13
|
| **pixel_aspect_ratio** | **String** | The video pixel aspect ratio of the input file. | [optional] |
|
13
14
|
| **video_edit_list** | **String** | Video Edit List reason indicates that the input file's video track contains a complex Edit Decision List. | [optional] |
|
14
15
|
| **audio_edit_list** | **String** | Audio Edit List reason indicates that the input file's audio track contains a complex Edit Decision List. | [optional] |
|
@@ -25,6 +26,7 @@ instance = MuxRuby::AssetNonStandardInputReasons.new(
|
|
25
26
|
video_gop_size: null,
|
26
27
|
video_frame_rate: null,
|
27
28
|
video_resolution: null,
|
29
|
+
video_bitrate: null,
|
28
30
|
pixel_aspect_ratio: null,
|
29
31
|
video_edit_list: null,
|
30
32
|
audio_edit_list: null,
|
@@ -9,6 +9,7 @@
|
|
9
9
|
| **reconnect_window** | **Float** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. | [optional] |
|
10
10
|
| **passthrough** | **String** | | [optional] |
|
11
11
|
| **audio_only** | **Boolean** | Force the live stream to only process the audio track when the value is set to true. Mux drops the video track if broadcasted. | [optional] |
|
12
|
+
| **embedded_subtitles** | [**Array<LiveStreamEmbeddedSubtitleSettings>**](LiveStreamEmbeddedSubtitleSettings.md) | Describe the embedded closed caption contents of the incoming live stream. | [optional] |
|
12
13
|
| **reduced_latency** | **Boolean** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ | [optional] |
|
13
14
|
| **low_latency** | **Boolean** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. | [optional] |
|
14
15
|
| **test** | **Boolean** | Marks the live stream as a test live stream when the value is set to true. A test live stream can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test live streams created. Test live streams 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] |
|
@@ -25,6 +26,7 @@ instance = MuxRuby::CreateLiveStreamRequest.new(
|
|
25
26
|
reconnect_window: null,
|
26
27
|
passthrough: null,
|
27
28
|
audio_only: null,
|
29
|
+
embedded_subtitles: null,
|
28
30
|
reduced_latency: null,
|
29
31
|
low_latency: null,
|
30
32
|
test: null,
|
data/docs/ExportsApi.md
CHANGED
@@ -14,7 +14,7 @@ All URIs are relative to *https://api.mux.com*
|
|
14
14
|
|
15
15
|
List property video view export links
|
16
16
|
|
17
|
-
|
17
|
+
The API has been replaced by the list-exports-views API call. Lists the available video view exports along with URLs to retrieve them.
|
18
18
|
|
19
19
|
### Examples
|
20
20
|
|
data/docs/FiltersApi.md
CHANGED
@@ -14,7 +14,7 @@ All URIs are relative to *https://api.mux.com*
|
|
14
14
|
|
15
15
|
Lists values for a specific filter
|
16
16
|
|
17
|
-
|
17
|
+
The API has been replaced by the list-dimension-values API call. Lists the values for a filter along with a total count of related views.
|
18
18
|
|
19
19
|
### Examples
|
20
20
|
|
@@ -94,7 +94,7 @@ end
|
|
94
94
|
|
95
95
|
List Filters
|
96
96
|
|
97
|
-
|
97
|
+
The API has been replaced by the list-dimensions API call. Lists all the filters broken out into basic and advanced.
|
98
98
|
|
99
99
|
### Examples
|
100
100
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# MuxRuby::LiveStreamEmbeddedSubtitleSettings
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | A name for this live stream closed caption track. | [optional] |
|
8
|
+
| **passthrough** | **String** | Arbitrary metadata set for the live stream closed caption track. Max 255 characters. | [optional] |
|
9
|
+
| **language_code** | **String** | The language of the closed caption stream. Value must be BCP 47 compliant. | [optional][default to 'en'] |
|
10
|
+
| **language_channel** | **String** | CEA-608 caption channel to read data from. | [optional][default to 'cc1'] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'mux_ruby'
|
16
|
+
|
17
|
+
instance = MuxRuby::LiveStreamEmbeddedSubtitleSettings.new(
|
18
|
+
name: null,
|
19
|
+
passthrough: null,
|
20
|
+
language_code: null,
|
21
|
+
language_channel: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
data/docs/LiveStreamsApi.md
CHANGED
@@ -18,6 +18,7 @@ All URIs are relative to *https://api.mux.com*
|
|
18
18
|
| [**list_live_streams**](LiveStreamsApi.md#list_live_streams) | **GET** /video/v1/live-streams | List live streams |
|
19
19
|
| [**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 |
|
20
20
|
| [**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 |
|
21
|
+
| [**update_live_stream_embedded_subtitles**](LiveStreamsApi.md#update_live_stream_embedded_subtitles) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/embedded-subtitles | Update a live stream's embedded subtitles |
|
21
22
|
|
22
23
|
|
23
24
|
## create_live_stream
|
@@ -1002,3 +1003,75 @@ end
|
|
1002
1003
|
- **Content-Type**: Not defined
|
1003
1004
|
- **Accept**: application/json
|
1004
1005
|
|
1006
|
+
|
1007
|
+
## update_live_stream_embedded_subtitles
|
1008
|
+
|
1009
|
+
> <LiveStreamResponse> update_live_stream_embedded_subtitles(live_stream_id, update_live_stream_embedded_subtitles_request)
|
1010
|
+
|
1011
|
+
Update a live stream's embedded subtitles
|
1012
|
+
|
1013
|
+
Configures a live stream to receive embedded closed captions. The resulting Asset's subtitle text track will have `closed_captions: true` set.
|
1014
|
+
|
1015
|
+
### Examples
|
1016
|
+
|
1017
|
+
```ruby
|
1018
|
+
require 'time'
|
1019
|
+
require 'mux_ruby'
|
1020
|
+
# setup authorization
|
1021
|
+
MuxRuby.configure do |config|
|
1022
|
+
# Configure HTTP basic authorization: accessToken
|
1023
|
+
config.username = 'YOUR USERNAME'
|
1024
|
+
config.password = 'YOUR PASSWORD'
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
api_instance = MuxRuby::LiveStreamsApi.new
|
1028
|
+
live_stream_id = 'live_stream_id_example' # String | The live stream ID
|
1029
|
+
update_live_stream_embedded_subtitles_request = MuxRuby::UpdateLiveStreamEmbeddedSubtitlesRequest.new # UpdateLiveStreamEmbeddedSubtitlesRequest |
|
1030
|
+
|
1031
|
+
begin
|
1032
|
+
# Update a live stream's embedded subtitles
|
1033
|
+
result = api_instance.update_live_stream_embedded_subtitles(live_stream_id, update_live_stream_embedded_subtitles_request)
|
1034
|
+
p result
|
1035
|
+
rescue MuxRuby::ApiError => e
|
1036
|
+
puts "Error when calling LiveStreamsApi->update_live_stream_embedded_subtitles: #{e}"
|
1037
|
+
end
|
1038
|
+
```
|
1039
|
+
|
1040
|
+
#### Using the update_live_stream_embedded_subtitles_with_http_info variant
|
1041
|
+
|
1042
|
+
This returns an Array which contains the response data, status code and headers.
|
1043
|
+
|
1044
|
+
> <Array(<LiveStreamResponse>, Integer, Hash)> update_live_stream_embedded_subtitles_with_http_info(live_stream_id, update_live_stream_embedded_subtitles_request)
|
1045
|
+
|
1046
|
+
```ruby
|
1047
|
+
begin
|
1048
|
+
# Update a live stream's embedded subtitles
|
1049
|
+
data, status_code, headers = api_instance.update_live_stream_embedded_subtitles_with_http_info(live_stream_id, update_live_stream_embedded_subtitles_request)
|
1050
|
+
p status_code # => 2xx
|
1051
|
+
p headers # => { ... }
|
1052
|
+
p data # => <LiveStreamResponse>
|
1053
|
+
rescue MuxRuby::ApiError => e
|
1054
|
+
puts "Error when calling LiveStreamsApi->update_live_stream_embedded_subtitles_with_http_info: #{e}"
|
1055
|
+
end
|
1056
|
+
```
|
1057
|
+
|
1058
|
+
### Parameters
|
1059
|
+
|
1060
|
+
| Name | Type | Description | Notes |
|
1061
|
+
| ---- | ---- | ----------- | ----- |
|
1062
|
+
| **live_stream_id** | **String** | The live stream ID | |
|
1063
|
+
| **update_live_stream_embedded_subtitles_request** | [**UpdateLiveStreamEmbeddedSubtitlesRequest**](UpdateLiveStreamEmbeddedSubtitlesRequest.md) | | |
|
1064
|
+
|
1065
|
+
### Return type
|
1066
|
+
|
1067
|
+
[**LiveStreamResponse**](LiveStreamResponse.md)
|
1068
|
+
|
1069
|
+
### Authorization
|
1070
|
+
|
1071
|
+
[accessToken](../README.md#accessToken)
|
1072
|
+
|
1073
|
+
### HTTP request headers
|
1074
|
+
|
1075
|
+
- **Content-Type**: application/json
|
1076
|
+
- **Accept**: application/json
|
1077
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# MuxRuby::UpdateLiveStreamEmbeddedSubtitlesRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **embedded_subtitles** | [**Array<LiveStreamEmbeddedSubtitleSettings>**](LiveStreamEmbeddedSubtitleSettings.md) | Describe the embedded closed caption contents of the incoming live stream. | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'mux_ruby'
|
13
|
+
|
14
|
+
instance = MuxRuby::UpdateLiveStreamEmbeddedSubtitlesRequest.new(
|
15
|
+
embedded_subtitles: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -16,8 +16,7 @@ errors_api = MuxRuby::ErrorsApi.new
|
|
16
16
|
|
17
17
|
# ========== list-errors ==========
|
18
18
|
errors = errors_api.list_errors(:filters => ['browser:Safari'], :timeframe => ['7:days'])
|
19
|
+
require 'pry'; binding.pry
|
19
20
|
assert errors != nil
|
20
21
|
assert errors.data != nil
|
21
|
-
assert errors.data.length > 0
|
22
|
-
assert errors.data.first.id != nil
|
23
22
|
puts "list-errors OK ✅"
|
@@ -119,6 +119,7 @@ assert asset_with_2_captions.data.tracks.length == 4 # Audio, Video, French that
|
|
119
119
|
puts "create-asset-track OK ✅"
|
120
120
|
|
121
121
|
# ========== delete-asset-track ==========
|
122
|
+
Kernel.sleep(5)
|
122
123
|
assets_api.delete_asset_track(create_response.data.id, subtitles_track.data.id)
|
123
124
|
asset_with_1_captions = assets_api.get_asset(create_response.data.id)
|
124
125
|
assert asset_with_1_captions.data.tracks.length == 3 # Audio, Video, French that we ingested with the asset
|
data/gen/generator-config.json
CHANGED
@@ -20,7 +20,7 @@ module MuxRuby
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# List property video view export links
|
23
|
-
#
|
23
|
+
# The API has been replaced by the list-exports-views API call. Lists the available video view exports along with URLs to retrieve them.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @return [ListExportsResponse]
|
26
26
|
def list_exports(opts = {})
|
@@ -29,7 +29,7 @@ module MuxRuby
|
|
29
29
|
end
|
30
30
|
|
31
31
|
# List property video view export links
|
32
|
-
#
|
32
|
+
# The API has been replaced by the list-exports-views API call. Lists the available video view exports along with URLs to retrieve them.
|
33
33
|
# @param [Hash] opts the optional parameters
|
34
34
|
# @return [Array<(ListExportsResponse, Integer, Hash)>] ListExportsResponse data, response status code and response headers
|
35
35
|
def list_exports_with_http_info(opts = {})
|
@@ -20,7 +20,7 @@ module MuxRuby
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Lists values for a specific filter
|
23
|
-
#
|
23
|
+
# The API has been replaced by the list-dimension-values API call. Lists the values for a filter along with a total count of related views.
|
24
24
|
# @param filter_id [String] ID of the Filter
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
26
|
# @option opts [Integer] :limit Number of items to include in the response (default to 25)
|
@@ -34,7 +34,7 @@ module MuxRuby
|
|
34
34
|
end
|
35
35
|
|
36
36
|
# Lists values for a specific filter
|
37
|
-
#
|
37
|
+
# The API has been replaced by the list-dimension-values API call. Lists the values for a filter along with a total count of related views.
|
38
38
|
# @param filter_id [String] ID of the Filter
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @option opts [Integer] :limit Number of items to include in the response
|
@@ -95,7 +95,7 @@ module MuxRuby
|
|
95
95
|
end
|
96
96
|
|
97
97
|
# List Filters
|
98
|
-
#
|
98
|
+
# The API has been replaced by the list-dimensions API call. Lists all the filters broken out into basic and advanced.
|
99
99
|
# @param [Hash] opts the optional parameters
|
100
100
|
# @return [ListFiltersResponse]
|
101
101
|
def list_filters(opts = {})
|
@@ -104,7 +104,7 @@ module MuxRuby
|
|
104
104
|
end
|
105
105
|
|
106
106
|
# List Filters
|
107
|
-
#
|
107
|
+
# The API has been replaced by the list-dimensions API call. Lists all the filters broken out into basic and advanced.
|
108
108
|
# @param [Hash] opts the optional parameters
|
109
109
|
# @return [Array<(ListFiltersResponse, Integer, Hash)>] ListFiltersResponse data, response status code and response headers
|
110
110
|
def list_filters_with_http_info(opts = {})
|
@@ -927,5 +927,76 @@ module MuxRuby
|
|
927
927
|
end
|
928
928
|
return data, status_code, headers
|
929
929
|
end
|
930
|
+
|
931
|
+
# Update a live stream's embedded subtitles
|
932
|
+
# Configures a live stream to receive embedded closed captions. The resulting Asset's subtitle text track will have `closed_captions: true` set.
|
933
|
+
# @param live_stream_id [String] The live stream ID
|
934
|
+
# @param update_live_stream_embedded_subtitles_request [UpdateLiveStreamEmbeddedSubtitlesRequest]
|
935
|
+
# @param [Hash] opts the optional parameters
|
936
|
+
# @return [LiveStreamResponse]
|
937
|
+
def update_live_stream_embedded_subtitles(live_stream_id, update_live_stream_embedded_subtitles_request, opts = {})
|
938
|
+
data, _status_code, _headers = update_live_stream_embedded_subtitles_with_http_info(live_stream_id, update_live_stream_embedded_subtitles_request, opts)
|
939
|
+
data
|
940
|
+
end
|
941
|
+
|
942
|
+
# Update a live stream's embedded subtitles
|
943
|
+
# Configures a live stream to receive embedded closed captions. The resulting Asset's subtitle text track will have `closed_captions: true` set.
|
944
|
+
# @param live_stream_id [String] The live stream ID
|
945
|
+
# @param update_live_stream_embedded_subtitles_request [UpdateLiveStreamEmbeddedSubtitlesRequest]
|
946
|
+
# @param [Hash] opts the optional parameters
|
947
|
+
# @return [Array<(LiveStreamResponse, Integer, Hash)>] LiveStreamResponse data, response status code and response headers
|
948
|
+
def update_live_stream_embedded_subtitles_with_http_info(live_stream_id, update_live_stream_embedded_subtitles_request, opts = {})
|
949
|
+
if @api_client.config.debugging
|
950
|
+
@api_client.config.logger.debug 'Calling API: LiveStreamsApi.update_live_stream_embedded_subtitles ...'
|
951
|
+
end
|
952
|
+
# verify the required parameter 'live_stream_id' is set
|
953
|
+
if @api_client.config.client_side_validation && live_stream_id.nil?
|
954
|
+
fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.update_live_stream_embedded_subtitles"
|
955
|
+
end
|
956
|
+
# verify the required parameter 'update_live_stream_embedded_subtitles_request' is set
|
957
|
+
if @api_client.config.client_side_validation && update_live_stream_embedded_subtitles_request.nil?
|
958
|
+
fail ArgumentError, "Missing the required parameter 'update_live_stream_embedded_subtitles_request' when calling LiveStreamsApi.update_live_stream_embedded_subtitles"
|
959
|
+
end
|
960
|
+
# resource path
|
961
|
+
local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/embedded-subtitles'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s))
|
962
|
+
|
963
|
+
# query parameters
|
964
|
+
query_params = opts[:query_params] || {}
|
965
|
+
|
966
|
+
# header parameters
|
967
|
+
header_params = opts[:header_params] || {}
|
968
|
+
# HTTP header 'Accept' (if needed)
|
969
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
970
|
+
# HTTP header 'Content-Type'
|
971
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
972
|
+
|
973
|
+
# form parameters
|
974
|
+
form_params = opts[:form_params] || {}
|
975
|
+
|
976
|
+
# http body (model)
|
977
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_live_stream_embedded_subtitles_request)
|
978
|
+
|
979
|
+
# return_type
|
980
|
+
return_type = opts[:debug_return_type] || 'LiveStreamResponse'
|
981
|
+
|
982
|
+
# auth_names
|
983
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
984
|
+
|
985
|
+
new_options = opts.merge(
|
986
|
+
:operation => :"LiveStreamsApi.update_live_stream_embedded_subtitles",
|
987
|
+
:header_params => header_params,
|
988
|
+
:query_params => query_params,
|
989
|
+
:form_params => form_params,
|
990
|
+
:body => post_body,
|
991
|
+
:auth_names => auth_names,
|
992
|
+
:return_type => return_type
|
993
|
+
)
|
994
|
+
|
995
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
996
|
+
if @api_client.config.debugging
|
997
|
+
@api_client.config.logger.debug "API called: LiveStreamsApi#update_live_stream_embedded_subtitles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
998
|
+
end
|
999
|
+
return data, status_code, headers
|
1000
|
+
end
|
930
1001
|
end
|
931
1002
|
end
|
@@ -31,6 +31,9 @@ module MuxRuby
|
|
31
31
|
# The video resolution of the input file. Video resolution higher than 2048 pixels on any one dimension (height or width) is considered non-standard, The resolution value is presented as `width` x `height` in pixels.
|
32
32
|
attr_accessor :video_resolution
|
33
33
|
|
34
|
+
# The video bitrate of the input file is `high`. This parameter is present when the average bitrate of any key frame interval (also known as Group of Pictures or GOP) is higher than what's considered standard which typically is 16 Mbps.
|
35
|
+
attr_accessor :video_bitrate
|
36
|
+
|
34
37
|
# The video pixel aspect ratio of the input file.
|
35
38
|
attr_accessor :pixel_aspect_ratio
|
36
39
|
|
@@ -73,6 +76,7 @@ module MuxRuby
|
|
73
76
|
:'video_gop_size' => :'video_gop_size',
|
74
77
|
:'video_frame_rate' => :'video_frame_rate',
|
75
78
|
:'video_resolution' => :'video_resolution',
|
79
|
+
:'video_bitrate' => :'video_bitrate',
|
76
80
|
:'pixel_aspect_ratio' => :'pixel_aspect_ratio',
|
77
81
|
:'video_edit_list' => :'video_edit_list',
|
78
82
|
:'audio_edit_list' => :'audio_edit_list',
|
@@ -93,6 +97,7 @@ module MuxRuby
|
|
93
97
|
:'video_gop_size' => :'String',
|
94
98
|
:'video_frame_rate' => :'String',
|
95
99
|
:'video_resolution' => :'String',
|
100
|
+
:'video_bitrate' => :'String',
|
96
101
|
:'pixel_aspect_ratio' => :'String',
|
97
102
|
:'video_edit_list' => :'String',
|
98
103
|
:'audio_edit_list' => :'String',
|
@@ -141,6 +146,10 @@ module MuxRuby
|
|
141
146
|
self.video_resolution = attributes[:'video_resolution']
|
142
147
|
end
|
143
148
|
|
149
|
+
if attributes.key?(:'video_bitrate')
|
150
|
+
self.video_bitrate = attributes[:'video_bitrate']
|
151
|
+
end
|
152
|
+
|
144
153
|
if attributes.key?(:'pixel_aspect_ratio')
|
145
154
|
self.pixel_aspect_ratio = attributes[:'pixel_aspect_ratio']
|
146
155
|
end
|
@@ -170,6 +179,8 @@ module MuxRuby
|
|
170
179
|
def valid?
|
171
180
|
video_gop_size_validator = EnumAttributeValidator.new('String', ["high"])
|
172
181
|
return false unless video_gop_size_validator.valid?(@video_gop_size)
|
182
|
+
video_bitrate_validator = EnumAttributeValidator.new('String', ["high"])
|
183
|
+
return false unless video_bitrate_validator.valid?(@video_bitrate)
|
173
184
|
video_edit_list_validator = EnumAttributeValidator.new('String', ["non-standard"])
|
174
185
|
return false unless video_edit_list_validator.valid?(@video_edit_list)
|
175
186
|
audio_edit_list_validator = EnumAttributeValidator.new('String', ["non-standard"])
|
@@ -189,6 +200,16 @@ module MuxRuby
|
|
189
200
|
@video_gop_size = video_gop_size
|
190
201
|
end
|
191
202
|
|
203
|
+
# Custom attribute writer method checking allowed values (enum).
|
204
|
+
# @param [Object] video_bitrate Object to be assigned
|
205
|
+
def video_bitrate=(video_bitrate)
|
206
|
+
validator = EnumAttributeValidator.new('String', ["high"])
|
207
|
+
unless validator.valid?(video_bitrate)
|
208
|
+
fail ArgumentError, "invalid value for \"video_bitrate\", must be one of #{validator.allowable_values}."
|
209
|
+
end
|
210
|
+
@video_bitrate = video_bitrate
|
211
|
+
end
|
212
|
+
|
192
213
|
# Custom attribute writer method checking allowed values (enum).
|
193
214
|
# @param [Object] video_edit_list Object to be assigned
|
194
215
|
def video_edit_list=(video_edit_list)
|
@@ -229,6 +250,7 @@ module MuxRuby
|
|
229
250
|
video_gop_size == o.video_gop_size &&
|
230
251
|
video_frame_rate == o.video_frame_rate &&
|
231
252
|
video_resolution == o.video_resolution &&
|
253
|
+
video_bitrate == o.video_bitrate &&
|
232
254
|
pixel_aspect_ratio == o.pixel_aspect_ratio &&
|
233
255
|
video_edit_list == o.video_edit_list &&
|
234
256
|
audio_edit_list == o.audio_edit_list &&
|
@@ -244,7 +266,7 @@ module MuxRuby
|
|
244
266
|
# Calculates hash code according to all attributes.
|
245
267
|
# @return [Integer] Hash code
|
246
268
|
def hash
|
247
|
-
[video_codec, audio_codec, video_gop_size, video_frame_rate, video_resolution, pixel_aspect_ratio, video_edit_list, audio_edit_list, unexpected_media_file_parameters].hash
|
269
|
+
[video_codec, audio_codec, video_gop_size, video_frame_rate, video_resolution, video_bitrate, pixel_aspect_ratio, video_edit_list, audio_edit_list, unexpected_media_file_parameters].hash
|
248
270
|
end
|
249
271
|
|
250
272
|
# Builds the object from hash
|
@@ -27,6 +27,9 @@ module MuxRuby
|
|
27
27
|
# Force the live stream to only process the audio track when the value is set to true. Mux drops the video track if broadcasted.
|
28
28
|
attr_accessor :audio_only
|
29
29
|
|
30
|
+
# Describe the embedded closed caption contents of the incoming live stream.
|
31
|
+
attr_accessor :embedded_subtitles
|
32
|
+
|
30
33
|
# Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/
|
31
34
|
attr_accessor :reduced_latency
|
32
35
|
|
@@ -46,6 +49,7 @@ module MuxRuby
|
|
46
49
|
:'reconnect_window' => :'reconnect_window',
|
47
50
|
:'passthrough' => :'passthrough',
|
48
51
|
:'audio_only' => :'audio_only',
|
52
|
+
:'embedded_subtitles' => :'embedded_subtitles',
|
49
53
|
:'reduced_latency' => :'reduced_latency',
|
50
54
|
:'low_latency' => :'low_latency',
|
51
55
|
:'test' => :'test',
|
@@ -66,6 +70,7 @@ module MuxRuby
|
|
66
70
|
:'reconnect_window' => :'Float',
|
67
71
|
:'passthrough' => :'String',
|
68
72
|
:'audio_only' => :'Boolean',
|
73
|
+
:'embedded_subtitles' => :'Array<LiveStreamEmbeddedSubtitleSettings>',
|
69
74
|
:'reduced_latency' => :'Boolean',
|
70
75
|
:'low_latency' => :'Boolean',
|
71
76
|
:'test' => :'Boolean',
|
@@ -116,6 +121,12 @@ module MuxRuby
|
|
116
121
|
self.audio_only = attributes[:'audio_only']
|
117
122
|
end
|
118
123
|
|
124
|
+
if attributes.key?(:'embedded_subtitles')
|
125
|
+
if (value = attributes[:'embedded_subtitles']).is_a?(Array)
|
126
|
+
self.embedded_subtitles = value
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
119
130
|
if attributes.key?(:'reduced_latency')
|
120
131
|
self.reduced_latency = attributes[:'reduced_latency']
|
121
132
|
end
|
@@ -182,6 +193,7 @@ module MuxRuby
|
|
182
193
|
reconnect_window == o.reconnect_window &&
|
183
194
|
passthrough == o.passthrough &&
|
184
195
|
audio_only == o.audio_only &&
|
196
|
+
embedded_subtitles == o.embedded_subtitles &&
|
185
197
|
reduced_latency == o.reduced_latency &&
|
186
198
|
low_latency == o.low_latency &&
|
187
199
|
test == o.test &&
|
@@ -197,7 +209,7 @@ module MuxRuby
|
|
197
209
|
# Calculates hash code according to all attributes.
|
198
210
|
# @return [Integer] Hash code
|
199
211
|
def hash
|
200
|
-
[playback_policy, new_asset_settings, reconnect_window, passthrough, audio_only, reduced_latency, low_latency, test, simulcast_targets].hash
|
212
|
+
[playback_policy, new_asset_settings, reconnect_window, passthrough, audio_only, embedded_subtitles, reduced_latency, low_latency, test, simulcast_targets].hash
|
201
213
|
end
|
202
214
|
|
203
215
|
# Builds the object from hash
|