mux_ruby 1.3.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +2 -1
- data/Gemfile.lock +37 -35
- data/README.md +6 -1
- data/docs/Asset.md +1 -1
- data/docs/AssetsApi.md +54 -0
- data/docs/CreateAssetRequest.md +1 -1
- data/docs/CreateLiveStreamRequest.md +2 -0
- data/docs/CreateUploadRequest.md +1 -0
- data/docs/LiveStream.md +2 -1
- data/docs/UpdateAssetMasterAccessRequest.md +8 -0
- data/docs/Upload.md +1 -0
- data/docs/VideoView.md +16 -14
- data/examples/data/exercise-errors.rb +1 -1
- data/examples/video/exercise-assets.rb +10 -0
- data/lib/mux_ruby.rb +1 -0
- data/lib/mux_ruby/api/assets_api.rb +61 -0
- data/lib/mux_ruby/api_client.rb +6 -1
- data/lib/mux_ruby/api_error.rb +3 -0
- data/lib/mux_ruby/configuration.rb +1 -4
- data/lib/mux_ruby/models/asset.rb +13 -13
- data/lib/mux_ruby/models/asset_static_renditions_files.rb +4 -4
- data/lib/mux_ruby/models/create_asset_request.rb +13 -13
- data/lib/mux_ruby/models/create_live_stream_request.rb +24 -4
- data/lib/mux_ruby/models/create_upload_request.rb +13 -4
- data/lib/mux_ruby/models/input_settings_overlay_settings.rb +46 -0
- data/lib/mux_ruby/models/live_stream.rb +14 -5
- data/lib/mux_ruby/models/update_asset_master_access_request.rb +219 -0
- data/lib/mux_ruby/models/upload.rb +13 -4
- data/lib/mux_ruby/models/video_view.rb +36 -18
- data/lib/mux_ruby/version.rb +1 -1
- data/spec/api/assets_api_spec.rb +13 -0
- data/spec/models/asset_spec.rb +6 -6
- data/spec/models/asset_static_renditions_files_spec.rb +2 -2
- data/spec/models/create_asset_request_spec.rb +6 -6
- data/spec/models/create_live_stream_request_spec.rb +12 -0
- data/spec/models/create_upload_request_spec.rb +6 -0
- data/spec/models/input_settings_overlay_settings_spec.rb +8 -0
- data/spec/models/live_stream_spec.rb +6 -0
- data/spec/models/update_asset_master_access_request_spec.rb +38 -0
- data/spec/models/upload_spec.rb +6 -0
- data/spec/models/video_view_spec.rb +12 -0
- data/test.sh +28 -0
- metadata +65 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 044a3655b853ad9277d213c6259b2a73071fb1c198ae46956f368d6933f5a288
|
4
|
+
data.tar.gz: 0424ff46a5d2035d32092ca261a75422bde616a324341b1f144180cee74d5dfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d37bb4b970e888934ef8c7041b0d16b6669e97c1250504c962f81462c9c278f75e513e6bfe25a415aa94f3e2b1add8ae699a7181a0a834f4cc29f751d0deeee9
|
7
|
+
data.tar.gz: 3618c152283e26e9a6ce43426279e3cff70f94b5ba2184b7707519c99b9b613d448c3b567c463b6fa4b2b2045b0ad9d28f59e0eb1f8b9e8a2c0f139daf711ac7
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,58 +1,59 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mux_ruby (1.
|
4
|
+
mux_ruby (1.6.0)
|
5
5
|
json (~> 2.1, >= 2.1.0)
|
6
6
|
typhoeus (~> 1.0, >= 1.0.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
ZenTest (4.
|
12
|
-
addressable (2.
|
13
|
-
public_suffix (>= 2.0.2, <
|
11
|
+
ZenTest (4.12.0)
|
12
|
+
addressable (2.7.0)
|
13
|
+
public_suffix (>= 2.0.2, < 5.0)
|
14
14
|
autotest (4.4.6)
|
15
15
|
ZenTest (>= 4.4.1)
|
16
|
-
autotest-fsevent (0.2.
|
16
|
+
autotest-fsevent (0.2.17)
|
17
17
|
sys-uname
|
18
18
|
autotest-growl (0.2.16)
|
19
19
|
autotest-rails-pure (4.1.2)
|
20
|
-
byebug (
|
20
|
+
byebug (11.1.1)
|
21
21
|
coderay (1.1.2)
|
22
22
|
crack (0.4.3)
|
23
23
|
safe_yaml (~> 1.0.0)
|
24
24
|
diff-lcs (1.3)
|
25
|
-
ethon (0.
|
25
|
+
ethon (0.12.0)
|
26
26
|
ffi (>= 1.3.0)
|
27
|
-
ffi (1.
|
28
|
-
hashdiff (0.
|
29
|
-
json (2.
|
30
|
-
method_source (0.
|
31
|
-
pry (0.
|
32
|
-
coderay (~> 1.1
|
33
|
-
method_source (~>
|
34
|
-
pry-byebug (3.
|
35
|
-
byebug (~>
|
36
|
-
pry (~> 0.
|
37
|
-
public_suffix (
|
38
|
-
rake (12.
|
39
|
-
rspec (3.
|
40
|
-
rspec-core (~> 3.
|
41
|
-
rspec-expectations (~> 3.
|
42
|
-
rspec-mocks (~> 3.
|
43
|
-
rspec-core (3.
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-expectations (3.
|
27
|
+
ffi (1.12.2)
|
28
|
+
hashdiff (1.0.1)
|
29
|
+
json (2.3.0)
|
30
|
+
method_source (1.0.0)
|
31
|
+
pry (0.13.1)
|
32
|
+
coderay (~> 1.1)
|
33
|
+
method_source (~> 1.0)
|
34
|
+
pry-byebug (3.9.0)
|
35
|
+
byebug (~> 11.0)
|
36
|
+
pry (~> 0.13.0)
|
37
|
+
public_suffix (4.0.4)
|
38
|
+
rake (12.3.3)
|
39
|
+
rspec (3.9.0)
|
40
|
+
rspec-core (~> 3.9.0)
|
41
|
+
rspec-expectations (~> 3.9.0)
|
42
|
+
rspec-mocks (~> 3.9.0)
|
43
|
+
rspec-core (3.9.1)
|
44
|
+
rspec-support (~> 3.9.1)
|
45
|
+
rspec-expectations (3.9.1)
|
46
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
-
rspec-support (~> 3.
|
48
|
-
rspec-mocks (3.
|
47
|
+
rspec-support (~> 3.9.0)
|
48
|
+
rspec-mocks (3.9.1)
|
49
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
-
rspec-support (~> 3.
|
51
|
-
rspec-support (3.
|
52
|
-
safe_yaml (1.0.
|
53
|
-
|
50
|
+
rspec-support (~> 3.9.0)
|
51
|
+
rspec-support (3.9.2)
|
52
|
+
safe_yaml (1.0.5)
|
53
|
+
solid_assert (1.0.0)
|
54
|
+
sys-uname (1.2.1)
|
54
55
|
ffi (>= 1.0.0)
|
55
|
-
typhoeus (1.3.
|
56
|
+
typhoeus (1.3.1)
|
56
57
|
ethon (>= 0.9.0)
|
57
58
|
vcr (3.0.3)
|
58
59
|
webmock (1.24.6)
|
@@ -70,10 +71,11 @@ DEPENDENCIES
|
|
70
71
|
autotest-rails-pure (~> 4.1, >= 4.1.2)
|
71
72
|
mux_ruby!
|
72
73
|
pry-byebug
|
73
|
-
rake (~> 12.
|
74
|
+
rake (~> 12.3.3)
|
74
75
|
rspec (~> 3.6, >= 3.6.0)
|
76
|
+
solid_assert
|
75
77
|
vcr (~> 3.0, >= 3.0.1)
|
76
78
|
webmock (~> 1.24, >= 1.24.3)
|
77
79
|
|
78
80
|
BUNDLED WITH
|
79
|
-
1.
|
81
|
+
1.17.2
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
![Mux Ruby Banner](github-ruby-sdk.png)
|
2
2
|
|
3
|
+
![](https://github.com/muxinc/mux-ruby/workflows/Integration%20Test/badge.svg)
|
4
|
+
|
3
5
|
# Mux Ruby
|
4
6
|
|
5
7
|
Official Mux API wrapper for ruby projects, supporting both Mux Data and Mux Video.
|
@@ -19,8 +21,11 @@ Use `bundle install` to install dependencies if you're developing locally.
|
|
19
21
|
## Installation
|
20
22
|
|
21
23
|
### Adding to your Gemfile
|
24
|
+
|
25
|
+
This gem can be sourced from [RubyGems](https://rubygems.org/gems/mux_ruby)
|
26
|
+
|
22
27
|
```
|
23
|
-
gem 'mux_ruby'
|
28
|
+
gem 'mux_ruby'
|
24
29
|
```
|
25
30
|
|
26
31
|
### Clone and install locally
|
data/docs/Asset.md
CHANGED
@@ -13,7 +13,6 @@ Name | Type | Description | Notes
|
|
13
13
|
**aspect_ratio** | **String** | | [optional]
|
14
14
|
**playback_ids** | [**Array<PlaybackID>**](PlaybackID.md) | | [optional]
|
15
15
|
**tracks** | [**Array<Track>**](Track.md) | | [optional]
|
16
|
-
**demo** | **BOOLEAN** | | [optional]
|
17
16
|
**errors** | [**AssetErrors**](AssetErrors.md) | | [optional]
|
18
17
|
**per_title_encode** | **BOOLEAN** | | [optional]
|
19
18
|
**is_live** | **BOOLEAN** | | [optional]
|
@@ -24,5 +23,6 @@ Name | Type | Description | Notes
|
|
24
23
|
**mp4_support** | **String** | | [optional] [default to 'none']
|
25
24
|
**normalize_audio** | **BOOLEAN** | | [optional] [default to false]
|
26
25
|
**static_renditions** | [**AssetStaticRenditions**](AssetStaticRenditions.md) | | [optional]
|
26
|
+
**test** | **BOOLEAN** | | [optional]
|
27
27
|
|
28
28
|
|
data/docs/AssetsApi.md
CHANGED
@@ -14,6 +14,7 @@ Method | HTTP request | Description
|
|
14
14
|
[**get_asset_input_info**](AssetsApi.md#get_asset_input_info) | **GET** /video/v1/assets/{ASSET_ID}/input-info | Retrieve asset input info
|
15
15
|
[**get_asset_playback_id**](AssetsApi.md#get_asset_playback_id) | **GET** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a playback ID
|
16
16
|
[**list_assets**](AssetsApi.md#list_assets) | **GET** /video/v1/assets | List assets
|
17
|
+
[**update_asset_master_access**](AssetsApi.md#update_asset_master_access) | **PUT** /video/v1/assets/{ASSET_ID}/master-access | Update master access
|
17
18
|
[**update_asset_mp4_support**](AssetsApi.md#update_asset_mp4_support) | **PUT** /video/v1/assets/{ASSET_ID}/mp4-support | Update MP4 support
|
18
19
|
|
19
20
|
|
@@ -524,6 +525,59 @@ Name | Type | Description | Notes
|
|
524
525
|
|
525
526
|
|
526
527
|
|
528
|
+
# **update_asset_master_access**
|
529
|
+
> AssetResponse update_asset_master_access(asset_id, update_asset_master_access_request)
|
530
|
+
|
531
|
+
Update master access
|
532
|
+
|
533
|
+
Allows you add temporary access to the master (highest-quality) version of the asset in MP4 format. A URL will be created that can be used to download the master version for 24 hours. After 24 hours Master Access will revert to \"none\". This master version is not optimized for web and not meant to be streamed, only downloaded for purposes like archiving or editing the video offline.
|
534
|
+
|
535
|
+
### Example
|
536
|
+
```ruby
|
537
|
+
# load the gem
|
538
|
+
require 'mux_ruby'
|
539
|
+
# setup authorization
|
540
|
+
MuxRuby.configure do |config|
|
541
|
+
# Configure HTTP basic authorization: accessToken
|
542
|
+
config.username = 'YOUR USERNAME'
|
543
|
+
config.password = 'YOUR PASSWORD'
|
544
|
+
end
|
545
|
+
|
546
|
+
api_instance = MuxRuby::AssetsApi.new
|
547
|
+
asset_id = 'asset_id_example' # String | The asset ID.
|
548
|
+
update_asset_master_access_request = MuxRuby::UpdateAssetMasterAccessRequest.new # UpdateAssetMasterAccessRequest |
|
549
|
+
|
550
|
+
begin
|
551
|
+
#Update master access
|
552
|
+
result = api_instance.update_asset_master_access(asset_id, update_asset_master_access_request)
|
553
|
+
p result
|
554
|
+
rescue MuxRuby::ApiError => e
|
555
|
+
puts "Exception when calling AssetsApi->update_asset_master_access: #{e}"
|
556
|
+
end
|
557
|
+
```
|
558
|
+
|
559
|
+
### Parameters
|
560
|
+
|
561
|
+
Name | Type | Description | Notes
|
562
|
+
------------- | ------------- | ------------- | -------------
|
563
|
+
**asset_id** | **String**| The asset ID. |
|
564
|
+
**update_asset_master_access_request** | [**UpdateAssetMasterAccessRequest**](UpdateAssetMasterAccessRequest.md)| |
|
565
|
+
|
566
|
+
### Return type
|
567
|
+
|
568
|
+
[**AssetResponse**](AssetResponse.md)
|
569
|
+
|
570
|
+
### Authorization
|
571
|
+
|
572
|
+
[accessToken](../README.md#accessToken)
|
573
|
+
|
574
|
+
### HTTP request headers
|
575
|
+
|
576
|
+
- **Content-Type**: application/json
|
577
|
+
- **Accept**: application/json
|
578
|
+
|
579
|
+
|
580
|
+
|
527
581
|
# **update_asset_mp4_support**
|
528
582
|
> AssetResponse update_asset_mp4_support(asset_id, update_asset_mp4_support_request)
|
529
583
|
|
data/docs/CreateAssetRequest.md
CHANGED
@@ -5,11 +5,11 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**input** | [**Array<InputSettings>**](InputSettings.md) | | [optional]
|
7
7
|
**playback_policy** | [**Array<PlaybackPolicy>**](PlaybackPolicy.md) | | [optional]
|
8
|
-
**demo** | **BOOLEAN** | | [optional]
|
9
8
|
**per_title_encode** | **BOOLEAN** | | [optional]
|
10
9
|
**passthrough** | **String** | | [optional]
|
11
10
|
**mp4_support** | **String** | | [optional]
|
12
11
|
**normalize_audio** | **BOOLEAN** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to false]
|
13
12
|
**master_access** | **String** | | [optional]
|
13
|
+
**test** | **BOOLEAN** | | [optional]
|
14
14
|
|
15
15
|
|
@@ -8,5 +8,7 @@ Name | Type | Description | Notes
|
|
8
8
|
**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]
|
9
9
|
**passthrough** | **String** | | [optional]
|
10
10
|
**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]
|
11
|
+
**test** | **BOOLEAN** | | [optional]
|
12
|
+
**simulcast_targets** | [**Array<CreateSimulcastTargetRequest>**](CreateSimulcastTargetRequest.md) | | [optional]
|
11
13
|
|
12
14
|
|
data/docs/CreateUploadRequest.md
CHANGED
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|
6
6
|
**timeout** | **Integer** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` | [optional] [default to 3600]
|
7
7
|
**cors_origin** | **String** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional]
|
8
8
|
**new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | |
|
9
|
+
**test** | **BOOLEAN** | | [optional]
|
9
10
|
|
10
11
|
|
data/docs/LiveStream.md
CHANGED
@@ -10,10 +10,11 @@ Name | Type | Description | Notes
|
|
10
10
|
**recent_asset_ids** | **Array<String>** | | [optional]
|
11
11
|
**status** | **String** | | [optional]
|
12
12
|
**playback_ids** | [**Array<PlaybackID>**](PlaybackID.md) | | [optional]
|
13
|
-
**new_asset_settings** | [**
|
13
|
+
**new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional]
|
14
14
|
**passthrough** | **String** | | [optional]
|
15
15
|
**reconnect_window** | **Float** | | [optional]
|
16
16
|
**reduced_latency** | **BOOLEAN** | | [optional]
|
17
17
|
**simulcast_targets** | [**Array<SimulcastTarget>**](SimulcastTarget.md) | | [optional]
|
18
|
+
**test** | **BOOLEAN** | | [optional]
|
18
19
|
|
19
20
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# MuxRuby::UpdateAssetMasterAccessRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**master_access** | **String** | Add or remove access to the master version of the video. | [optional]
|
7
|
+
|
8
|
+
|
data/docs/Upload.md
CHANGED
@@ -11,5 +11,6 @@ Name | Type | Description | Notes
|
|
11
11
|
**error** | [**UploadError**](UploadError.md) | | [optional]
|
12
12
|
**cors_origin** | **String** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional]
|
13
13
|
**url** | **String** | The URL to upload the associated source media to. | [optional]
|
14
|
+
**test** | **BOOLEAN** | | [optional]
|
14
15
|
|
15
16
|
|
data/docs/VideoView.md
CHANGED
@@ -11,22 +11,22 @@ Name | Type | Description | Notes
|
|
11
11
|
**preroll_requested** | **BOOLEAN** | | [optional]
|
12
12
|
**page_type** | **String** | | [optional]
|
13
13
|
**startup_score** | **String** | | [optional]
|
14
|
-
**view_seek_duration** | **
|
14
|
+
**view_seek_duration** | **Integer** | | [optional]
|
15
15
|
**country_name** | **String** | | [optional]
|
16
16
|
**player_source_height** | **Integer** | | [optional]
|
17
17
|
**longitude** | **String** | | [optional]
|
18
|
-
**buffering_count** | **
|
19
|
-
**video_duration** | **
|
18
|
+
**buffering_count** | **Integer** | | [optional]
|
19
|
+
**video_duration** | **Integer** | | [optional]
|
20
20
|
**player_source_type** | **String** | | [optional]
|
21
21
|
**city** | **String** | | [optional]
|
22
22
|
**view_id** | **String** | | [optional]
|
23
23
|
**platform_description** | **String** | | [optional]
|
24
|
-
**video_startup_preroll_request_time** | **
|
24
|
+
**video_startup_preroll_request_time** | **Integer** | | [optional]
|
25
25
|
**viewer_device_name** | **String** | | [optional]
|
26
26
|
**video_series** | **String** | | [optional]
|
27
27
|
**viewer_application_name** | **String** | | [optional]
|
28
28
|
**updated_at** | **String** | | [optional]
|
29
|
-
**view_total_content_playback_time** | **
|
29
|
+
**view_total_content_playback_time** | **Integer** | | [optional]
|
30
30
|
**cdn** | **String** | | [optional]
|
31
31
|
**player_instance_id** | **String** | | [optional]
|
32
32
|
**video_language** | **String** | | [optional]
|
@@ -37,8 +37,8 @@ Name | Type | Description | Notes
|
|
37
37
|
**playback_score** | **String** | | [optional]
|
38
38
|
**page_url** | **String** | | [optional]
|
39
39
|
**metro** | **String** | | [optional]
|
40
|
-
**view_max_request_latency** | **
|
41
|
-
**requests_for_first_preroll** | **
|
40
|
+
**view_max_request_latency** | **Integer** | | [optional]
|
41
|
+
**requests_for_first_preroll** | **Integer** | | [optional]
|
42
42
|
**view_total_downscaling** | **String** | | [optional]
|
43
43
|
**latitude** | **String** | | [optional]
|
44
44
|
**player_source_host_name** | **String** | | [optional]
|
@@ -48,7 +48,7 @@ Name | Type | Description | Notes
|
|
48
48
|
**player_language** | **String** | | [optional]
|
49
49
|
**page_load_time** | **Integer** | | [optional]
|
50
50
|
**viewer_device_category** | **String** | | [optional]
|
51
|
-
**video_startup_preroll_load_time** | **
|
51
|
+
**video_startup_preroll_load_time** | **Integer** | | [optional]
|
52
52
|
**player_version** | **String** | | [optional]
|
53
53
|
**watch_time** | **Integer** | | [optional]
|
54
54
|
**player_source_stream_type** | **String** | | [optional]
|
@@ -58,14 +58,14 @@ Name | Type | Description | Notes
|
|
58
58
|
**experiment_name** | **String** | | [optional]
|
59
59
|
**viewer_os_version** | **String** | | [optional]
|
60
60
|
**player_preload** | **BOOLEAN** | | [optional]
|
61
|
-
**buffering_duration** | **
|
61
|
+
**buffering_duration** | **Integer** | | [optional]
|
62
62
|
**player_view_count** | **Integer** | | [optional]
|
63
63
|
**player_software** | **String** | | [optional]
|
64
|
-
**player_load_time** | **
|
64
|
+
**player_load_time** | **Integer** | | [optional]
|
65
65
|
**platform_summary** | **String** | | [optional]
|
66
66
|
**video_encoding_variant** | **String** | | [optional]
|
67
67
|
**player_width** | **Integer** | | [optional]
|
68
|
-
**view_seek_count** | **
|
68
|
+
**view_seek_count** | **Integer** | | [optional]
|
69
69
|
**viewer_experience_score** | **String** | | [optional]
|
70
70
|
**view_error_id** | **Integer** | | [optional]
|
71
71
|
**video_variant_name** | **String** | | [optional]
|
@@ -77,7 +77,7 @@ Name | Type | Description | Notes
|
|
77
77
|
**events** | [**Array<VideoViewEvent>**](VideoViewEvent.md) | | [optional]
|
78
78
|
**player_name** | **String** | | [optional]
|
79
79
|
**view_start** | **String** | | [optional]
|
80
|
-
**view_average_request_throughput** | **
|
80
|
+
**view_average_request_throughput** | **Integer** | | [optional]
|
81
81
|
**video_producer** | **String** | | [optional]
|
82
82
|
**error_type_id** | **Integer** | | [optional]
|
83
83
|
**mux_viewer_id** | **String** | | [optional]
|
@@ -88,7 +88,7 @@ Name | Type | Description | Notes
|
|
88
88
|
**video_content_type** | **String** | | [optional]
|
89
89
|
**viewer_os_family** | **String** | | [optional]
|
90
90
|
**player_poster** | **String** | | [optional]
|
91
|
-
**view_average_request_latency** | **
|
91
|
+
**view_average_request_latency** | **Integer** | | [optional]
|
92
92
|
**video_variant_id** | **String** | | [optional]
|
93
93
|
**player_source_duration** | **Integer** | | [optional]
|
94
94
|
**player_source_url** | **String** | | [optional]
|
@@ -97,7 +97,7 @@ Name | Type | Description | Notes
|
|
97
97
|
**id** | **String** | | [optional]
|
98
98
|
**short_time** | **String** | | [optional]
|
99
99
|
**rebuffer_percentage** | **String** | | [optional]
|
100
|
-
**time_to_first_frame** | **
|
100
|
+
**time_to_first_frame** | **Integer** | | [optional]
|
101
101
|
**viewer_user_id** | **String** | | [optional]
|
102
102
|
**video_stream_type** | **String** | | [optional]
|
103
103
|
**player_startup_time** | **Integer** | | [optional]
|
@@ -111,7 +111,9 @@ Name | Type | Description | Notes
|
|
111
111
|
**player_autoplay** | **BOOLEAN** | | [optional]
|
112
112
|
**player_height** | **Integer** | | [optional]
|
113
113
|
**asn** | **Integer** | | [optional]
|
114
|
+
**asn_name** | **String** | | [optional]
|
114
115
|
**quality_score** | **String** | | [optional]
|
115
116
|
**player_software_version** | **String** | | [optional]
|
117
|
+
**player_mux_plugin_name** | **String** | | [optional]
|
116
118
|
|
117
119
|
|
@@ -15,7 +15,7 @@ end
|
|
15
15
|
errors_api = MuxRuby::ErrorsApi.new
|
16
16
|
|
17
17
|
# ========== list-errors ==========
|
18
|
-
errors = errors_api.list_errors(:filters => ['browser:
|
18
|
+
errors = errors_api.list_errors(:filters => ['browser:Safari'], :timeframe => ['7:days'])
|
19
19
|
assert errors != nil
|
20
20
|
assert errors.data != nil
|
21
21
|
assert errors.data.length > 0
|
@@ -77,6 +77,16 @@ assert mp4_asset.data.id == create_response.data.id
|
|
77
77
|
assert mp4_asset.data.mp4_support == 'standard'
|
78
78
|
puts "update-asset-mp4-support OK ✅"
|
79
79
|
|
80
|
+
# ========== update-asset-master-access ==========
|
81
|
+
master_req = MuxRuby::UpdateAssetMasterAccessRequest.new
|
82
|
+
master_req.master_access = 'temporary'
|
83
|
+
master_asset = assets_api.update_asset_master_access(create_response.data.id, master_req)
|
84
|
+
assert master_asset != nil
|
85
|
+
assert master_asset.data != nil
|
86
|
+
assert master_asset.data.id == create_response.data.id
|
87
|
+
assert master_asset.data.master_access == 'temporary'
|
88
|
+
puts "update-asset-master-access OK ✅"
|
89
|
+
|
80
90
|
# ========== create-asset-track ==========
|
81
91
|
cat = MuxRuby::CreateTrackRequest.new(:url => "https://tears-of-steel-subtitles.s3.amazonaws.com/tears-en.vtt", :type => "text", :text_type => "subtitles", :language_code => "en", :name => "English", :closed_captions => false)
|
82
92
|
subtitles_track = assets_api.create_asset_track(create_response.data.id, cat)
|
data/lib/mux_ruby.rb
CHANGED
@@ -67,6 +67,7 @@ require 'mux_ruby/models/simulcast_target'
|
|
67
67
|
require 'mux_ruby/models/simulcast_target_response'
|
68
68
|
require 'mux_ruby/models/track'
|
69
69
|
require 'mux_ruby/models/update_asset_mp4_support_request'
|
70
|
+
require 'mux_ruby/models/update_asset_master_access_request'
|
70
71
|
require 'mux_ruby/models/upload'
|
71
72
|
require 'mux_ruby/models/upload_error'
|
72
73
|
require 'mux_ruby/models/upload_response'
|
@@ -555,6 +555,67 @@ module MuxRuby
|
|
555
555
|
return data, status_code, headers
|
556
556
|
end
|
557
557
|
|
558
|
+
# Update master access
|
559
|
+
# Allows you add temporary access to the master (highest-quality) version of the asset in MP4 format. A URL will be created that can be used to download the master version for 24 hours. After 24 hours Master Access will revert to \"none\". This master version is not optimized for web and not meant to be streamed, only downloaded for purposes like archiving or editing the video offline.
|
560
|
+
# @param asset_id The asset ID.
|
561
|
+
# @param update_asset_master_access_request
|
562
|
+
# @param [Hash] opts the optional parameters
|
563
|
+
# @return [AssetResponse]
|
564
|
+
def update_asset_master_access(asset_id, update_asset_master_access_request, opts = {})
|
565
|
+
data, _status_code, _headers = update_asset_master_access_with_http_info(asset_id, update_asset_master_access_request, opts)
|
566
|
+
data
|
567
|
+
end
|
568
|
+
|
569
|
+
# Update master access
|
570
|
+
# Allows you add temporary access to the master (highest-quality) version of the asset in MP4 format. A URL will be created that can be used to download the master version for 24 hours. After 24 hours Master Access will revert to \"none\". This master version is not optimized for web and not meant to be streamed, only downloaded for purposes like archiving or editing the video offline.
|
571
|
+
# @param asset_id The asset ID.
|
572
|
+
# @param update_asset_master_access_request
|
573
|
+
# @param [Hash] opts the optional parameters
|
574
|
+
# @return [Array<(AssetResponse, Fixnum, Hash)>] AssetResponse data, response status code and response headers
|
575
|
+
def update_asset_master_access_with_http_info(asset_id, update_asset_master_access_request, opts = {})
|
576
|
+
if @api_client.config.debugging
|
577
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.update_asset_master_access ...'
|
578
|
+
end
|
579
|
+
# verify the required parameter 'asset_id' is set
|
580
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
581
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.update_asset_master_access"
|
582
|
+
end
|
583
|
+
# verify the required parameter 'update_asset_master_access_request' is set
|
584
|
+
if @api_client.config.client_side_validation && update_asset_master_access_request.nil?
|
585
|
+
fail ArgumentError, "Missing the required parameter 'update_asset_master_access_request' when calling AssetsApi.update_asset_master_access"
|
586
|
+
end
|
587
|
+
# resource path
|
588
|
+
local_var_path = '/video/v1/assets/{ASSET_ID}/master-access'.sub('{' + 'ASSET_ID' + '}', asset_id.to_s)
|
589
|
+
|
590
|
+
# query parameters
|
591
|
+
query_params = {}
|
592
|
+
|
593
|
+
# header parameters
|
594
|
+
header_params = {}
|
595
|
+
# HTTP header 'Accept' (if needed)
|
596
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
597
|
+
# HTTP header 'Content-Type'
|
598
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
599
|
+
|
600
|
+
# form parameters
|
601
|
+
form_params = {}
|
602
|
+
|
603
|
+
# http body (model)
|
604
|
+
post_body = @api_client.object_to_http_body(update_asset_master_access_request)
|
605
|
+
auth_names = ['accessToken']
|
606
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
607
|
+
:header_params => header_params,
|
608
|
+
:query_params => query_params,
|
609
|
+
:form_params => form_params,
|
610
|
+
:body => post_body,
|
611
|
+
:auth_names => auth_names,
|
612
|
+
:return_type => 'AssetResponse')
|
613
|
+
if @api_client.config.debugging
|
614
|
+
@api_client.config.logger.debug "API called: AssetsApi#update_asset_master_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
615
|
+
end
|
616
|
+
return data, status_code, headers
|
617
|
+
end
|
618
|
+
|
558
619
|
# Update MP4 support
|
559
620
|
# Allows you add or remove mp4 support for assets that were created without it. Currently there are two values supported in this request, `standard` and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question.
|
560
621
|
# @param asset_id The asset ID.
|